ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Dynamixel_controller problem

asked 2012-05-07 08:01:29 -0500

rosnovice gravatar image

I am trying to control a dynamixel ax-12 servo by using ROS, I followed the tutorials and the answer to this same problem here: http://answers.ros.org/question/12336/dynamixel-controller-problems

When I start the tilt controller, the program hangs here:

Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading'="" from="" '="" usr="" lib="" python2.7="" threading.pyc'=""> ignored
process[tilt_controller_spawner-1]: started with pid [10077]
[INFO] [WallTime: 1336411930.934344] /dev/ttyUSB0 controller_spawner: waiting for controller_manager dynamixel_controller_manager to startup in global namespace...

I am not sure what the AttributeError is or how to fix this problem. I have less than 20 karma so I can not upload my launch files, I will include them in the text:

controller_manager.launch (I deleted the "<" and ">" symbols in order to show the full code) :


launch
    node name="dynamixel_manager" pkg="dynamixel_controllers" type="controller_manager.py" required="true" output="screen"
        rosparam
            namespace: dynamixel_controller_manager
            serial_ports:
                dxl_tty1:
                    port_name: "/dev/ttyUSB0"
                    baud_rate: 1000000
                    min_motor_id: 5
                    max_motor_id: 6
                    update_rate: 10
        /rosparam
    /node
/launch

start_tilt_controller.launch :


launch
    !-- Start tilt joint controller --
    rosparam file="$(find dynamixeltutorials)/tilt.yaml" command="load"/
    node name="tilt_controller_spawner" pkg="dynamixel_controllers" type="controller_spawner.py"
          args="--manager=dynamixel_controller_manager
        --port /dev/ttyUSB0
                tilt_controller"
          output="screen"/
/launch

tilt.yaml :


tilt_controller:
    controller:
        package: dynamixel_controllers
        module: joint_position_controller
        type: JointPositionController
    joint_name: tilt_joint
    joint_speed: 1.17
    motor:
        id: 5
        init: 512
        min: 0
        max: 1023

Any help with this problem will be appreciated.

edit retag flag offensive close merge delete

Comments

Thank you both so much!

rosnovice gravatar image rosnovice  ( 2012-05-08 03:26:20 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
3

answered 2012-05-07 13:23:35 -0500

arebgun gravatar image

It looks like you have problem in your start_tilt_controller.launch file, it should look like the following:

<launch>
    !-- Start tilt joint controller --
    <rosparam file="$(find dynamixeltutorials)/tilt.yaml" command="load"/>
    <node name="tilt_controller_spawner" pkg="dynamixel_controllers" type="controller_spawner.py"
          args="--manager=dynamixel_controller_manager
                --port=dxl_tty1
                tilt_controller"
          output="screen"/>
</launch>

Note, that you have to specify the nickname you gave to your serial port not the actual device name (dxl_tty1 vs /dev/ttyUSB0).

edit flag offensive delete link more
1

answered 2012-05-07 08:42:25 -0500

Miguel Prada gravatar image

I think that the AtributeError you see before the program hanging is caused by the python version that's installed by default on Ubuntu Precise (12.04). Apparently the error is related to the threading python library, so it wouldn't be strange that it affects the way the Dynamixel controller manager works.

Are you using 12.04? Would it be a big issue for you to downgrade to a previous version until this is fixed?

Judging by this bug report it seems that the bug has been fixed, but it probably hasn't reached the Ubuntu debs yet.

Can anyone shed more light on this?

edit flag offensive delete link more

Comments

Check out joq's comment on my [wrong] answer to this question

thebyohazard gravatar image thebyohazard  ( 2012-11-12 08:22:52 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2012-05-07 08:01:29 -0500

Seen: 1,172 times

Last updated: May 07 '12