Control speed of servo

I am using 2XL-430 servos (from engineering kit) and am building the upper body (just head ATM) of humanoid robot that is interactive with people. It uses AI to recognize people and Natural Language Processing to hold conversions with people all running an a Jetson Xaiver NX.

The 2XL-430 servo is in the heck joint that moves the head (move servos will be added for arms later).

I want to be able to control the speed that the servos move. I use the Goal position register (116) to set the position I want ti to travel to. I have tried changing the value in the Goal velocity register (112) but it doesn’t seem to change the speed of the servo. I have found that changing the value in the Goal PWM register (100) it does change the speed. I assume the Goal PWM doesn’t set a regulated speed but rather just sets the goal amount of power sent to the motor. Is there a way to set regulated goal speed rather than a goal power??

Was Profile Acceleration (Add. 108) set to 0? In this case, from my own experience, for small changes in Goal Positions, it was hard to discern if there is “change in Profile Velocity” (Add. 112) in effect. Have you tested for large changes in Goal Position, like 120-150 degrees or so?

I used r+manger to play with all the values in all the registers. I was moving the Goal servo position by 90 degress at a time.

The servos updated to latest firmware v46.

The only thing that seemed to make the speed that the servo moved change was the Goal PWM register

The last time I tested Profile Velocity and Profile Acceleration of the XL-430s, I was using TASK and I made a video of those tests, accessible here

If you scroll forward to Time 10:00 minutes, you are going to see that there are response differences between Profile Velocity settings 75 and 125. If you also use non-zero Profile Acceleration values, you are going to see more distinct response/performance differences.

1 Like

do you know which register get changed to slow it down?? As I am controlling the servos from a Jetson Xaiver NX board using the dynamixel SDK

Profile Acceleration is at Add 108.
If you want more precise timings, you can look at sub-section 2.2.3 in MicroPython in my Engineer book Vol 1.

Come to think of it, if your final goal is to have the head swing between two fixed Goal Positions, but at different speeds (i.e., timings) then you need to have a look at Time Control, see my Sub-Section 2.2.4 in Vol.1.

I am running the robot from a Jetson Xaiver NX as it uses AI models. I am controlling the dynamixels using robotis official dynamixelSDK in python.

eyes of the robot are controlled by hobby micro servos and the neck joint by a 2XL dynamixel.

The neck is in a cascade control loop with the eyes. The AI processes each frame of the video stream and works out where the eyes should look then the the neck moves to try keep the eyes in a central position.

The control loop runs at 30fps so every 1/30th of a second I am giving the dynamixel new position and speed to move. I am trying to make the movements and smooth and natural as possible, not so easy with eye using hobby servos but should be able to get natural movements with the dynamixels as they have so much more control with acceleration profiles as well as speed and torque control.

I have found if I lower the value in the Position P Gain register 78 and lower the Goal PWM register 100 then I get both lower speeds and lower acceleration and decelation near start and finish position that seems to make for more realistic movements

1 Like

With the Xavier used, it looks like that you are planning for a big robot eventually. The XL-430 has so many control features so it is great that you found a new way to do what you need.
Are you using GStreamer on your Xavier? I found that it helps a lots on the Nano.

1 Like

Yer when I brought the Xaiver I though it would be an over kill but it seems when you want to run really cool AI models it chews up so much processing power that even with the Xavier NX your still wanting more.

Here’s the robot being tested with some kids. They named him Kevin.

1 Like

Good show! Kevin was tracking pretty smoothly.
Looking at what the kids were wearing reminds me that it is Winter down under!

1 Like