View Full Version : Interfacing ROS with pincher arm (AX-12A servos)

11-19-2017, 12:28 PM
Hi guys,

I have a little concerns about servo movement under ROS control. Pincher arm is configured with ROS and moveit.
Above plot presents axis position and its velocity. As you can see velocity plot is jerky a bit.

Arbotix plugin looks like follows:

port: /dev/ttyUSB0
rate: 100
write_rate : 50
read_rate : 50
joints: {
arm_shoulder_pan_joint : {id: 1, max_speed: 50.0},
arm_shoulder_lift_joint : {id: 2, max_speed: 50.0},
arm_elbow_flex_joint : {id: 3, max_speed: 50.0},
arm_wrist_flex_joint : {id: 4, max_speed: 50.0},
gripper_joint : {id: 6, max_speed: 50.0},
gripper_link_joint : {id: 5, max_speed: 50.0}

controllers: {
arm_controller: {type: follow_controller, joints: [arm_shoulder_pan_joint, arm_shoulder_lift_joint, arm_elbow_flex_joint, arm_wrist_flex_joint, gripper_link_joint], action_name: arm_controller/follow_joint_trajectory }

1) I am wondering if it is the best I can achieve. What are your experiences with setting movement?
2) I would like to switch from position control to velocity control. Unfortunately there is no way to control velocity only. I can set velocity of moving to goal position but what about velocity control loop? No way so far. Maybe another servos have this feature?

Kind regards,

11-20-2017, 08:20 PM
You can turn the AX-12A into "wheel mode" at which point it will be velocity controlled.
The velocity returned by the AX-12A depends on a number of parameters, including the noise and resolution of the built-in encoder.
It's only 10 bits, using a potentiometer wiper, and honestly, the 10 bits on the AVR microcontroller can in turn be somewhat noisy at times.
So, if the servo moves 1 or 2 or 3 ticks in any one control loop time interval, calculating the velocity based on that quantization will be inherently noisy.
The XM and MX servos use 12 bit magnetic encoders that are less noisy and have higher resolution.