Problem with the first start

Hello,

I have some Problems with the first Start of Poppy.
I use 1 USB2Dynamixel. So I changed the config to use 1 port for "torso, head, arms and legs.
This is the beginning of the Poppy_config:

{
“controllers”: {
“upper_body_controller”: {
“sync_read”: true,
“attached_motors”: [
“torso”,
“head”,
“arms”,
“legs”
],
“port”: “/dev/ttyUSB1”
}
},

When I process the instructions here:

enter link description here

i get an ValueError:

import pypot.robot
from poppytools.configuration.config import poppy_config
poppy = pypot.robot.from_config(poppy_config)

ValueError Traceback (most recent call last)
/home/faps/ in ()
1 import pypot.robot
2 from poppytools.configuration.config import poppy_config
----> 3 poppy = pypot.robot.from_config(poppy_config)
4

/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/robot/config.pyc in from_config(config, strict)
162 time.sleep(1)
163
→ 164 robot._attach_dxl_motors(dxl_io, dxl_motors)
165
166 # Create the alias for the motorgroups

/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/robot/robot.pyc in _attach_dxl_motors(self, dxl_io, dxl_motors)
42
43 def _attach_dxl_motors(self, dxl_io, dxl_motors):
—> 44 c = BaseDxlController(dxl_io, dxl_motors)
45 self._dxl_controllers.append(c)
46

/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/controller.py in init(self, dxl_io, dxl_motors)
109 values = self._dxl_io.get_goal_position_speed_load(self._ids)
110 print zip(*values)
→ 111 positions, speeds, loads = zip(*values)
112 for m, p, s, l in zip(self._motors, positions, speeds, loads):
113 m._values[‘goal_position’] = p

ValueError: need more than 0 values to unpack

I think the problem is this line

values = self._dxl_io.get_goal_position_speed_load(self._ids)

Has anyone an idea what could be my problem?

Thanks
Mathis

The problem seems to be the USB2Dynamixel does not find motors. Therefore the variable “values” come back empty.

Before going into details could you tell us more:

  • I use the MX 28, MX 64 and AX 12A as written in the BOM list.

  • for power I made a connectioncable like this:

  • The setup is like this:


    It’s just a fast drawing. I hope you understand how I did it. The red on the top is a Y-wire with one clip to the AX-12A in the head, one to the AX-12A in the torso and the other two are for each arm. The other Y-wire is from the last MX-28 in the torso to the legs.

  • the scan should be correct. If i make it that way:

dxl_io_upper = pypot.dynamixel.DxlIO(‘/dev/ttyUSB1’)
print dxl_io_upper.scan(range(60))

[11, 12, 13, 14, 15, 21, 22, 23, 24, 25, 31, 32, 33, 34, 35, 36, 37, 41, 42, 43, 44, 51, 52, 53, 54]

1 Like

Can you try the following code and show us the result?

dxl_io_upper = pypot.dynamixel.DxlIO('/dev/ttyUSB1')
ids = dxl_io_upper.scan(range(60))
print dxl_io.get_goal_position_speed_load(ids)

I tried it with your code and I got an NameError:

dxl_io_upper = pypot.dynamixel.DxlIO(‘/dev/ttyUSB1’)
ids = dxl_io_upper.scan(range(60))
print dxl_io.get_goal_position_speed_load(ids)


NameError Traceback (most recent call last)
/home/faps/ in ()
1 dxl_io_upper = pypot.dynamixel.DxlIO(‘/dev/ttyUSB1’)
2 ids = dxl_io_upper.scan(range(60))
----> 3 print dxl_io.get_goal_position_speed_load(ids)
4

NameError: name ‘dxl_io’ is not defined

After I changed it to “print dxl_io_upper.get_goal_position_speed_load(ids)” and the result is:

dxl_io_upper = pypot.dynamixel.DxlIO(‘/dev/ttyUSB1’)
ids = dxl_io_upper.scan(range(60))
print dxl_io_upper.get_goal_position_speed_load(ids)

((-8.04, 0.0, 100.0), (1.45, 0.0, 100.0), (-18.07, 0.0, 100.0), (-2.59, 0.0, 100.0), (-24.13, 0.0, 100.0), (-10.33, 0.0, 100.0), (-1.71, 0.0, 100.0), (18.77, 0.0, 100.0), (2.68, 0.0, 100.0), (22.11, 0.0, 100.0), (1.45, 0.0, 100.0), (18.77, 0.0, 100.0), (0.04, 0.0, 100.0), (-45.23, 0.0, 100.0), (-9.45, 0.0, 100.0), (4.84, 0.0, 100.0), (7.77, 0.0, 100.0), (-10.15, 0.0, 100.0), (-7.08, 0.0, 100.0), (6.81, 0.0, 100.0), (-46.55, 0.0, 100.0), (-14.29, 0.0, 100.0), (15.78, 0.0, 100.0), (19.74, 0.0, 100.0), (73.8, 0.0, 100.0))

Did you change the config in the poppy_config_generator.py file or directly in the poppy_config.json file ?

Also you have to turn off the “sync_read” (i.e "sync_read": false) because it is not compatible with the USB2Dynamixel.

1 Like

I also changed it in the poppy_config_generator.py

But now it works :slight_smile:

But in the next step Poppy doesn’t go to the right position.
I will search the promblem now.

Thank you a lot :slight_smile:

So what was the problem ?

Also if the robot does not go in the right position, it is probably a problem with the motors assembly. Could you take picture of problematic joints ?

I think the problem was the “sync_read”. after changing it, everything went well :smile:

When i do the next step, poppy go to a position like that:


most of the motors turn off and I get “NotImplementedError”.
The assembly should be correct.

Can you paste the whole terminal error you get ? Usually there is more information than just NotImplementedError.

But I would bet it is a “overload” error, and it is because of the arm/shoulder assembly.

import time

import pypot.robot
from poppytools.configuration.config import poppy_config

poppy = pypot.robot.from_config(poppy_config)
poppy.start_sync()

for m in poppy.motors:
m.compliant = False

for m in poppy.motors:
m.goto_position(0, 5)

time.sleep(5)

[(3.82, -4.97, -13.23, -2.51, 4.18, 14.81, -17.74, 22.64, 4.62, -23.08, -29.41, -3.74, -0.84, -5.58, 6.37, -5.76, 1.27, 1.98, -1.27, -29.14, -0.92, 6.37, -1.45, 1.71, 30.29), (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), (100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0)]
Exception in thread Thread-get_pos_speed_load:
Traceback (most recent call last):
File “/usr/lib/python2.7/threading.py”, line 551, in __bootstrap_inner
self.run()
File “/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/controller.py”, line 169, in run
self.function()
File “/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/controller.py”, line 118, in _get_pos_speed_load
values = self._dxl_io.get_present_position_speed_load(self._ids)
File “/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/io.py”, line 404, in my_getter
return self._get_control_value(control, ids, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/io.py”, line 451, in _get_control_value
sp = self._send_packet(rp, error_handler=error_handler)
File “/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/io.py”, line 575, in _send_packet
f(error_handler)
File “/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/error.py”, line 44, in handle_overload_error
raise NotImplementedError
NotImplementedError

Exception in thread Thread-get_present_temperature:
Traceback (most recent call last):
File “/usr/lib/python2.7/threading.py”, line 551, in __bootstrap_inner
self.run()
File “/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/controller.py”, line 169, in run
self.function()
File “/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/controller.py”, line 46, in
self.add_sync_loop(freq, lambda: self._get_register(regname, varname),
File “/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/controller.py”, line 55, in _get_register
values = getattr(self.dxl_io, 'get{}'.format(regname))(ids)
File “/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/io.py”, line 404, in my_getter
return self._get_control_value(control, ids, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/io.py”, line 451, in _get_control_value
sp = self._send_packet(rp, error_handler=error_handler)
File “/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/io.py”, line 575, in _send_packet
f(error_handler)
File “/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/error.py”, line 44, in handle_overload_error
raise NotImplementedError
NotImplementedError

Exception in thread Thread-get_angle_limit:
Traceback (most recent call last):
File “/usr/lib/python2.7/threading.py”, line 551, in __bootstrap_inner
self.run()
File “/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/controller.py”, line 169, in run
self.function()
File “/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/controller.py”, line 46, in
self.add_sync_loop(freq, lambda: self._get_register(regname, varname),
File “/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/controller.py”, line 55, in _get_register
values = getattr(self.dxl_io, 'get{}'.format(regname))(ids)
File “/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/io.py”, line 404, in my_getter
return self._get_control_value(control, ids, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/io.py”, line 451, in _get_control_value
sp = self._send_packet(rp, error_handler=error_handler)
File “/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/io.py”, line 575, in _send_packet
f(error_handler)
File “/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/error.py”, line 44, in handle_overload_error
raise NotImplementedError
NotImplementedError

Exception in thread Thread-get_present_voltage:
Traceback (most recent call last):
File “/usr/lib/python2.7/threading.py”, line 551, in __bootstrap_inner
self.run()
File “/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/controller.py”, line 169, in run
self.function()
File “/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/controller.py”, line 46, in
self.add_sync_loop(freq, lambda: self._get_register(regname, varname),
File “/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/controller.py”, line 55, in _get_register
values = getattr(self.dxl_io, 'get{}'.format(regname))(ids)
File “/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/io.py”, line 404, in my_getter
return self._get_control_value(control, ids, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/io.py”, line 451, in _get_control_value
sp = self._send_packet(rp, error_handler=error_handler)
File “/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/io.py”, line 575, in _send_packet
f(error_handler)
File “/usr/local/lib/python2.7/dist-packages/pypot-1.7.1-py2.7.egg/pypot/dynamixel/error.py”, line 44, in handle_overload_error
raise NotImplementedError
NotImplementedError

So is it a problem with the motors assembly. From the picture it seems several motors are not oriented correctly.

Please check this:

For the shoulder, it is a bit more complicated as you have the “beta” version and there is no 3D printed part as support for indications… Yet first check the torso, from the picture there are at least 2/3 motors not correctly oriented.

Is the shoulder correct like this?
Or should I turn the motor 90°?

It is not, the point should be oriented toward the chest and not upward.

Also while you are removing the bolts, take picture of the way you fixed the HN07-H101 part with the shoulder_x motor. It is not intuitive so you may have put it in a wrong orientation too.

EDIT: Here you have the futur shoulder part of Poppy Humanoid v1.0: shoulder.SLDPRT (1.9 MB)
So you can check how to align the motors.

1 Like

the 2 motors at the shoulder have been assembled wrong.
I gonna fix it now…
Thanks a lot for your help :smile:

The shoulder assembly is really annoying for this reason on the beta-version.

1 Like

I fixed it and now it works :smile:
tomorrow i will try the the behavior.

1 Like

This topic was automatically closed after 24 hours. New replies are no longer allowed.