Finally had time to get back to this. Unfortunately still doesn’t work. All motors but head_z and head_y have been disabled, but running
poppy = PoppyTorso()
results in
WARNING:pypot.dynamixel:Port:/dev/ttyACM0 ids found:[44]
WARNING:pypot.dynamixel:Port:/dev/ttyACM0 ids found:[]
and freezes. If I interrupt the kernel, I get the full error message:
---------------------------------------------------------------------------
KeyboardInterrupt Traceback (most recent call last)
<ipython-input-2-45ad582bf5ae> in <module>()
----> 1 poppy = PoppyTorso()
/home/poppy/miniconda/lib/python2.7/site-packages/poppy/creatures/abstractcreature.pyc in __new__(cls, base_path, config, simulator, scene, host, port, id, use_snap, snap_host, snap_port, snap_quiet, use_http, http_host, http_port, http_quiet, use_remote, remote_host, remote_port, start_background_services, sync, **extra)
117 else:
118 try:
--> 119 poppy_creature = from_json(config, sync, **extra)
120 except IndexError as e:
121 raise IOError('Connection to the robot failed! {}'.format(e.message))
/home/poppy/miniconda/lib/python2.7/site-packages/pypot/robot/config.pyc in from_json(json_file, sync, strict, use_dummy_io, **extra)
270 config = json.load(f, object_pairs_hook=OrderedDict)
271
--> 272 return from_config(config, sync=sync, strict=strict, use_dummy_io=use_dummy_io, **extra)
273
274
/home/poppy/miniconda/lib/python2.7/site-packages/pypot/robot/config.pyc in from_config(config, strict, sync, use_dummy_io, **extra)
60 attached_ids = [m.id for m in attached_motors]
61 if not use_dummy_io:
---> 62 dxl_io = dxl_io_from_confignode(config, c_params, attached_ids, strict)
63
64 check_motor_eprom_configuration(config, dxl_io, motor_names)
/home/poppy/miniconda/lib/python2.7/site-packages/pypot/robot/config.pyc in dxl_io_from_confignode(config, c_params, ids, strict)
151
152 if port == 'auto':
--> 153 port = pypot.dynamixel.find_port(ids, strict)
154 logger.info('Found port {} for ids {}'.format(port, ids))
155
/home/poppy/miniconda/lib/python2.7/site-packages/pypot/dynamixel/__init__.pyc in find_port(ids, strict)
86 try:
87 with DxlIOCls(port) as dxl:
---> 88 _ids_founds = dxl.scan(ids)
89 ids_founds += _ids_founds
90
/home/poppy/miniconda/lib/python2.7/site-packages/pypot/dynamixel/io/abstract_io.pyc in scan(self, ids)
218 def scan(self, ids=range(254)):
219 """ Pings all ids within the specified list, by default it finds all the motors connected to the bus. """
--> 220 return [id for id in ids if self.ping(id)]
221
222 # MARK: - Specific Getter / Setter
/home/poppy/miniconda/lib/python2.7/site-packages/pypot/dynamixel/io/abstract_io.pyc in ping(self, id)
211
212 try:
--> 213 self._send_packet(pp, error_handler=None)
214 return True
215 except DxlTimeoutError:
/home/poppy/miniconda/lib/python2.7/site-packages/pypot/dynamixel/io/abstract_io.pyc in _send_packet(self, instruction_packet, wait_for_status_packet, error_handler, _force_lock)
524
525 if not error_handler:
--> 526 return self.__real_send(instruction_packet, wait_for_status_packet, _force_lock)
527
528 try:
/home/poppy/miniconda/lib/python2.7/site-packages/pypot/dynamixel/io/abstract_io.pyc in __real_send(self, instruction_packet, wait_for_status_packet, _force_lock)
483
484 data = instruction_packet.to_string()
--> 485 nbytes = self._serial.write(data)
486 if len(data) != nbytes:
487 raise DxlCommunicationError(self,
/home/poppy/miniconda/lib/python2.7/site-packages/serial/serialposix.pyc in write(self, data)
523 assert timeout is None
524 # wait for write operation
--> 525 abort, ready, _ = select.select([self.pipe_abort_write_r], [self.fd], [], None)
526 if abort:
527 os.read(self.pipe_abort_write_r, 1)
KeyboardInterrupt:
If I change the port from Auto to /dev/ttyACM0, I get this instead
WARNING:pypot.robot.config:Could not find the motors (33, 34, 35, 41, 42, 43, 44, 51, 52, 53, 54) on bus /dev/ttyACM0.
WARNING:pypot.dynamixel.error:Timeout after sending DxlReadDataPacket(id=33, address=6, length=4) to motors 33
WARNING:pypot.dynamixel.error:Timeout after sending DxlReadDataPacket(id=34, address=6, length=4) to motors 34
WARNING:pypot.dynamixel.error:Timeout after sending DxlReadDataPacket(id=35, address=6, length=4) to motors 35
WARNING:pypot.dynamixel.error:Timeout after sending DxlReadDataPacket(id=41, address=6, length=4) to motors 41
WARNING:pypot.dynamixel.error:Timeout after sending DxlReadDataPacket(id=42, address=6, length=4) to motors 42
WARNING:pypot.dynamixel.error:Timeout after sending DxlReadDataPacket(id=43, address=6, length=4) to motors 43
WARNING:pypot.dynamixel.error:Timeout after sending DxlReadDataPacket(id=44, address=6, length=4) to motors 44
WARNING:pypot.dynamixel.error:Timeout after sending DxlReadDataPacket(id=51, address=6, length=4) to motors 51
WARNING:pypot.dynamixel.error:Timeout after sending DxlReadDataPacket(id=52, address=6, length=4) to motors 52
WARNING:pypot.dynamixel.error:Timeout after sending DxlReadDataPacket(id=53, address=6, length=4) to motors 53
WARNING:pypot.dynamixel.error:Timeout after sending DxlReadDataPacket(id=54, address=6, length=4) to motors 54
Exception in thread Thread-4:
Traceback (most recent call last):
File "/home/poppy/miniconda/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/home/poppy/miniconda/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/poppy/miniconda/lib/python2.7/site-packages/pypot/utils/stoppablethread.py", line 121, in _wrapped_target
self._setup()
File "/home/poppy/miniconda/lib/python2.7/site-packages/pypot/dynamixel/controller.py", line 52, in setup
self.regname))
IOError: Cannot initialize syncloop for "pid_gain". You need to desactivate sync_read if you use a usb2dynamixel device.
Exception in thread Thread-3:
Traceback (most recent call last):
File "/home/poppy/miniconda/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/home/poppy/miniconda/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/poppy/miniconda/lib/python2.7/site-packages/pypot/utils/stoppablethread.py", line 121, in _wrapped_target
self._setup()
File "/home/poppy/miniconda/lib/python2.7/site-packages/pypot/dynamixel/syncloop.py", line 22, in setup
[c.start() for c in self.controllers]
File "/home/poppy/miniconda/lib/python2.7/site-packages/pypot/robot/controller.py", line 25, in start
self.wait_to_start()
File "/home/poppy/miniconda/lib/python2.7/site-packages/pypot/utils/stoppablethread.py", line 86, in wait_to_start
'for details.'.format(self._thread.name))
RuntimeError: Setup failed, see Thread-4 Tracebackfor details.
Basically it’s as if it is completely ignoring the “broken”: true statements in the poppy_torso.json config file