Bonsoir
J’ai une configuration partielle de Poppy, juste la “tete” avec un AX-12 pour le Head_y(id=37) et un AX-18 pour le Head_z(36), lors de l’instruction :
poppy_config_file = '/home/odroid/Poppy/Dev/Config/poppy_config.json'
with open(poppy_config_file) as f:
poppy_config = json.load(f)
poppy = pypot.robot.from_config(poppy_config)
poppy.start_sync()
j’ai une erreur :
odroid@poppy-server:~/Poppy/Dev$ python Pop_Listen_Sensor.py
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/local/lib/python2.7/dist-packages/pypot/utils/stoppablethread.py", line 113, in _wrapped_target
self._setup()
File "/usr/local/lib/python2.7/dist-packages/pypot/dynamixel/controller.py", line 144, in setup
positions, speeds, loads = zip(*values)
ValueError: need more than 0 values to unpack
ma configuration est la suivante :
poppy_config={}
poppy_config['controllers'] = {}
poppy_config['controllers']['upper_body_controller'] = {
"port": "TODO: Set the good port name",
"sync_read": True,
"attached_motors": ["head"],
}
poppy_config['motorgroups'] = {
"head": ["head_z", "head_y"],
}
poppy_config['motors'] = {
"head_y": {
"id": 37,
"type": "AX-12",
"orientation": "indirect",
"offset": 10.0,
"angle_limit": [-40, 8 ],
},
"head_z": {
"id": 36,
"type": "AX-18",
"orientation": "direct",
"offset": 0.0,
"angle_limit": [-100, 100 ],
},
}
if __name__ == '__main__':
import json
poppy_config['controllers']['upper_body_controller']['port'] = "/dev/ttyUSB0"
with open('poppy_config.json','w') as f:
json.dump(poppy_config, f, indent=2)
J’ai fait les tests un moteur à la fois et cela fonctionne mais pas les 2 !
Merci pour votre aide