Target reaching times anomaly

Issue:

I am using a robotic hand with Dynamixel motors. I am sending two position targets to the motors, in a repeated fashion as follows:

target_2, target_1, target_2, target_1 and so on.

I am checking the completion status of the movement reading register 122.

On one target the time it takes on average is ~0.78 seconds (target_2 - target_1), whereas, on the other direction the time it takes is on average ~0.021 seconds,

Why is such a big difference. Visually looking, the time appears to be the same for each movement.

target_1 : [3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14, 3.14]

target_2 :  [3.141, 4.67, 4.363, 3.926, \
                   3.141, 4.67, 4.363, 3.926, \
                   3.141, 4.67, 4.363, 3.752, \
                   3.665, 4.939, 3.857, 3.839]

All the angles are radian angles.


DYNAMIXEL Servo:

XC330-M288-T


DYNAMIXEL Controller:

current_based_position_control mode


Dynamixel SDK

LIST ALL SOFTWARE INTERFACES USED IN THIS PROJECT

So far I have only used XL-330s, but I think that the same concepts should apply to the XC-330s.

Are you using the default values (=0) for Profile Acceleration and Profile Velocity? If you are, they put the actuators into a STEP PROFILE which uses an “Impulse” function to drive them. Can you try putting them into Trapezoidal Profile to see if that helps.

Also, instead of monitoring Addr 122, you can try monitoring Bit 1 of Addr 123 to see if that helps.

You can also try to put the servos into Time-based Position Control mode to see if the time synchronization gets better. See Addr. 10 - Drive Mode and Bit 2.

1 Like

Hi @roboteer , thanks for your answer.

I only read it now, but, I had already tried through my exploration changing from STEP profile to a Trapezoidal profile. And, I am now monitoring Bit 1 of Addr 123. Though, my timing anomaly persists. Also, while most of the time, elapsed time while reaching target_1 was higher, at arbitrary points during the test, I also noticed target_2 reaching taking the similar time, but then there were several instances where the same targets could be reached swiftly (as time-stamped by elapsed time). However, visually, always the movements appear to take similar time.

I will try to play with the time-based position control now. Could the bandwidth setting (baudrate) be a factor, i.e., it might be causing to overwhelm the communication channel for data reads, and hence at different points in time, elapsed times are different, but if that was the case, we would see its effect visually on the movements.

thanks,

Please provide any thoughts you might have in this regard.

It sounds like that you need to have a group of actuators reaching certain poses at the same time, in Robotis parlance you want to use Motion Programming.

You’ll have two choices:

  1. Use the CM-550 to control the hand via its MOTION tool, this is fairly straightforward and use your regular hardware controller for the rest of your robot.
  2. Stay with your regular hardware controller and program your own Motion Array (regular Python/C++ 2-D arrays) and put the actuators of the robotic hand into TIME-BASED POSITION CONTROL with Profile Acceleration (Addr. 108) set to 0 and Profile Velocity (Addr. 112) set in ms (whatever time period that you need for your hand to go from one pose to the next). That time period can be of different values between poses, depending on the motion timings that you need. Also, very importantly you need to use SyncWrite to send a big DXL Packet for these actuators.

I used this approach to make this robot “walk” using an RPi-4B some years back.

Quadruped

The programming is documented in Chapter 5 of the book

https://www.amazon.com/Projects-Guide-ROBOTIS-ENGINEER-Combined/dp/0999391879