Hi,
I can not manage to have Poppy running for more than 3 minutes. There are always errors that make the computer lose connexion with the robot and I have to restart everything again: unplug the USB2AX and the power of Poppy.
I regularly have checksum errors. They seem to happen at random times, but most particularly when I ask Poppy to play a recorded movements.
If I understand well from what I read, this could come from connexion problems? I checked and it seems all the connections are plugged fine. I use a (one) USB2AX for Poppy-torso, and I have the last up-to-date pypot (pip install pypot --upgrade) running on a macos x yosemite.
My program is:
#importer des fonctions
import time
import math
import json
import pypot.robot
from pypot.primitive.move import MoveRecorder, Move, MovePlayer
#se connecter au robot
ergo = pypot.robot.from_json('poppy_torso/configuration/poppy_torso_repaired.json')
#on met le robot debout: tous les moteurs a 0
#for m in ergo.motors:
indicesTable=[1,2,3,4,5,6,7,8,9,11,12,13]; #[10,11,12,13]
for m in [ergo.motors[x] for x in indicesTable]:
m.compliant=False
m.goal_position=0.0
#imprimer tous les noms des moteurs
for x in range(0,len(ergo.motors)):
print "motor ",x," is ", ergo.motors[x].name
#indiquer quels moteurs on relache
indices=[11,12,13,14,10,7,8,9,2]; #[10,11,12,13]
for m in [ergo.motors[x] for x in indices]:
m.compliant=True
#commencer l'enregistrement
move_recorder = MoveRecorder(ergo, 50, ergo.motors)
move_recorder.start()
print "start"
#duree de l'enregistrement
time.sleep(10)
#arreter l'enregistrement
print "stop"
time.sleep(2)
move_recorder.stop()
for m in range(0,len(ergo.motors)):
ergo.motors[m].compliant=False
#sauvegrader le fichier sous le nom 'my_nice_move.txt'
with open('my_nice_move.txt', 'w') as f:
move_recorder.move.save(f)
#rejouer le mouvement sauvegarde sans le fichier
with open('my_nice_move.txt') as f:
m = Move.load(f)
ergo.compliant = False
move_player = MovePlayer(ergo, m)
move_player.start()
time.sleep(10)
print("end")
and I get errors like:
Exception in thread Thread-3:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/Library/Python/2.7/site-packages/pypot/utils/stoppablethread.py", line 119, in _wrapped_target
self._target()
File "/Library/Python/2.7/site-packages/pypot/utils/stoppablethread.py", line 179, in run
make_update_loop(self, self._update)
File "/Library/Python/2.7/site-packages/pypot/utils/stoppablethread.py", line 152, in make_update_loop
update_func()
File "/Library/Python/2.7/site-packages/pypot/dynamixel/controller.py", line 150, in update
self.get_present_position_speed_load(self.working_motors)
File "/Library/Python/2.7/site-packages/pypot/dynamixel/controller.py", line 155, in get_present_position_speed_load
values = self.io.get_present_position_speed_load(ids)
File "/Library/Python/2.7/site-packages/pypot/dynamixel/io/abstract_io.py", line 358, in my_getter
return self._get_control_value(control, ids, **kwargs)
File "/Library/Python/2.7/site-packages/pypot/dynamixel/io/abstract_io.py", line 390, in _get_control_value
_force_lock=True)
File "/Library/Python/2.7/site-packages/pypot/dynamixel/io/abstract_io.py", line 537, in _send_packet
f(error_handler)
File "/Library/Python/2.7/site-packages/pypot/dynamixel/error.py", line 43, in handle_checksum_error
raise NotImplementedError
NotImplementedError
What kind of errors is that? If it is a connexion error, how do we know which connexion it is? How can we avoid these connexions?