DxlCommunicationError Traceback (most recent call last)
<ipython-input-3-277838a6949f> in <module>
1 with Dxl320IO("/dev/ttyAMA0") as f:
----> 2 print(f.scan())
3
~/pyenv/lib/python3.7/site-packages/pypot/dynamixel/io/abstract_io.py in scan(self, ids)
219 def scan(self, ids=range(254)):
220 """ Pings all ids within the specified list, by default it finds all the motors connected to the bus. """
--> 221 return [id for id in ids if self.ping(id)]
222
223 # MARK: - Specific Getter / Setter
~/pyenv/lib/python3.7/site-packages/pypot/dynamixel/io/abstract_io.py in <listcomp>(.0)
219 def scan(self, ids=range(254)):
220 """ Pings all ids within the specified list, by default it finds all the motors connected to the bus. """
--> 221 return [id for id in ids if self.ping(id)]
222
223 # MARK: - Specific Getter / Setter
~/pyenv/lib/python3.7/site-packages/pypot/dynamixel/io/abstract_io.py in ping(self, id)
212
213 try:
--> 214 self._send_packet(pp, error_handler=None)
215 return True
216 except DxlTimeoutError:
~/pyenv/lib/python3.7/site-packages/pypot/dynamixel/io/abstract_io.py in _send_packet(self, instruction_packet, wait_for_status_packet, error_handler, _force_lock)
529
530 if not error_handler:
--> 531 return self.__real_send(instruction_packet, wait_for_status_packet, _force_lock)
532
533 try:
~/pyenv/lib/python3.7/site-packages/pypot/dynamixel/io/abstract_io.py in __real_send(self, instruction_packet, wait_for_status_packet, _force_lock)
497 return
498
--> 499 status_packet = self.__real_read(instruction_packet, _force_lock=True)
500
501 logger.debug('Receiving %s', status_packet,
~/pyenv/lib/python3.7/site-packages/pypot/dynamixel/io/abstract_io.py in __real_read(self, instruction_packet, _force_lock)
519 except ValueError:
520 msg = 'could not parse received data {}'.format(bytearray(data))
--> 521 raise DxlCommunicationError(self, msg, instruction_packet)
522
523 return status_packet
DxlCommunicationError: could not parse received data bytearray(b'\x00\x00\x01\xff\xf9\xff\xfd') after sending DxlPingPacket(id=0)
Cause du problème : le checksum de fin ici est incorrect et génère une exception.