How to get MoveIt! and the Dynamixel stack working together?

1,794 views
Skip to first unread message

Hendrik Wiese

unread,
Dec 3, 2013, 9:13:57 AM12/3/13
to moveit...@googlegroups.com
Hi folks,

What I need help with...

I'm still trying to wrap my head around how things work with MoveIt. I've got a working SRDF demo and am trying to plug the Dynamixel stack into it so that the execution isn't just faked but instead moves real servo motors.

Has anybody here already combined these two stacks to work together? Could anybody please provide whole working example stack that shows how to control Dynamixel servo motors with MoveIt?

What I've been trying so far...

I've cloned the stack from https://github.com/arebgun/dynamixel_motor.git and am trying to get a Joint Trajectory Action Controller running. But all I can get started successfully is a set of Joint Position Controllers. 

Here's a launch file for the controller manager:

<launch>
    <node name="dynamixel_manager" pkg="dynamixel_controllers" type="controller_manager.py" required="true" output="screen">
        <rosparam>
            namespace: dxl_manager
            serial_ports:
                pan_tilt_port:
                    port_name: "/dev/ttyUSB0"
                    baud_rate: 1000000
                    min_motor_id: 1
                    max_motor_id: 25
                    update_rate: 20
        </rosparam>
    </node>
</launch>

My launch file for the controller spawner:

<launch>
<rosparam file="$(find otter4_arm_controller)/arm.yaml" command="load" />
<node name="arm_controller_spawner" 
pkg="dynamixel_controllers" 
type="controller_spawner.py" 
args="
--manager=dxl_manager 
--port=pan_tilt_port 
ctl_joint_a ctl_joint_b ctl_joint_c ctl_joint_d" output="screen" />
</launch>

The arm.yaml:

ctl_joint_a:
  controller:
    package: dynamixel_controllers
    module: joint_position_controller
    type: JointPositionController # have tried to replace this by JointTrajectoryActionController; but the necessary initialization methods are incompatible
  joint_name: joint_a
  joint_speed: 1.17
  motor:
    id: 3
    init: 512
    min: 0
    max: 1023
ctl_joint_b:
  controller:
    package: dynamixel_controllers
    module: joint_position_controller
    type: JointPositionController
  joint_name: joint_b
  joint_speed: 1.17
  motor:
    id: 2
    init: 512
    min: 0
    max: 1023
ctl_joint_c:
  controller:
    package: dynamixel_controllers
    module: joint_position_controller
    type: JointPositionController
  joint_name: joint_c
  joint_speed: 1.17
  motor:
    id: 1
    init: 512
    min: 0
    max: 1023
ctl_joint_d:
  controller:
    package: dynamixel_controllers
    module: joint_position_controller
    type: JointPositionController
  joint_name: joint_d
  joint_speed: 1.17
  motor:
    id: 4
    init: 512
    min: 0
    max: 1023

And the robot_controllers.yaml

controller_list:
  - name: moveit_simple_controller
    action_ns: follow_joint_trajectory
    default: true
    type: FollowJointTrajectory
    joints:
      - joint_a
      - joint_b
      - joint_c
      - joint_d

If you need any other files to be able to help me, please ask! I'll hopefully be able to deliver. 

MoveIt is trying to address action servers named joint_a to joint_d which don't exist. If I get it right these action servers should be started by JointTrajectoryActionController which exists but apparently isn't used anywhere.

This is still absolutely confusing for me since there seems to be no easy documentation yet...

Thanks a lot!

Cheers,
Hendrik

Hendrik Wiese

unread,
Dec 4, 2013, 5:08:02 AM12/4/13
to moveit...@googlegroups.com
Alright, I've got it. It works! 

I'm going to write a tutorial on how to get MoveIt and Dynamixel Servos working together. As soon as I find time for that.

jsnc...@gmail.com

unread,
Feb 13, 2014, 4:59:31 PM2/13/14
to moveit...@googlegroups.com
Have you thought any more about that tutorial?

I am in the same position of trying to use Dynamixel motors with MoveIt. Would you be able to post your relevant configuration files? I feel that I must be 95% of the way there.

Thanks,
Jason

Dave Coleman

unread,
Feb 13, 2014, 8:31:40 PM2/13/14
to jsnc...@gmail.com, moveit-users
I had MoveIt working with our lab's custom ClamArm last year, it used the C++ version of Anton's http://wiki.ros.org/dynamixel_motor stack, which I believe he never released officially (only the python version). 

I don't have time to support it anymore but I think it could be helpful:


:: dave | 251.463.2345 c

Patrick Goebel

unread,
Feb 13, 2014, 10:39:34 PM2/13/14
to moveit...@googlegroups.com
Hi Jason,

I have MoveIt working with Anton's dynamixel_motor packages. I am using
the Hydro Debian versions of both MoveIt and dynamixel_motor under
Ubuntu 12.04. I don't have my files on a public server yet but I have
attached the key files I use to get it working. Note that I am not
using a gripper yet since, AFAIK, Anton does not have a gripper
controller in his packages.

I have a 6-dof Dynamixel arm with two RX-24F servos and four AX-12
servos. I also have two AX-12 servos controlling a pan-and-tilt head.
I therefore use two USB2Dynamixel controllers for the two servo types
which is why you will see two ports defined in my dynamixel launch file.

My robot's name is "pedestal_pi_no_gripper" so replace that with your
robot's name wherever appropriate. Here are the files I have attached:

In my MoveIt config directory:
controllers.yaml
kinematics.yaml

In my MoveIt launch directory:
pedestal_pi_with_gripper_moveit_controller_manager.launch.xml

In my robot's dynamixel config directory:
pedestal_pi_no_gripper_dynamixels.yaml

In my robot's dynamixel launch directory:
pedestal_pi_no_gripper_dynamixels.launch

Let me know if you need anything else.

--patrick
controllers.yaml
kinematics.yaml
pedestal_pi_no_gripper_moveit_controller_manager.launch.xml
pedestal_pi_no_gripper_dynamixels.yaml
pedestal_pi_no_gripper_dynamixels.launch
Reply all
Reply to author
Forward
0 new messages