-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Hello again Tobit,
I have been trying to use closed-loop position control commands (using your repo installed as a python package) to get a motor to follow a smooth position curve: as a simple test, a sin(t) curve with a typical time step of 1 ms (though I have tried various step sizes up to 0.1 s and down to 0.1 ms). Like this:
startup_pos = {}
for id in motor_IDs:
startup_pos[id] = motor[id].getMultiTurnAngle()
t = 0
dt = 0.001
def sin_pos(t):
max_angle = 30 # degrees
freq = 0.5 # Hz
return startup_pos[5] + max_angle * math.sin(2 * math.pi * freq * t)
while True:
fr_knee.sendPositionAbsoluteSetpoint(sin_pos(t), 500)
time.sleep(dt)
t += dt
However, this results in my motor jumping to various positions along the expected curve and stopping at each for a moment (maybe about a half-second), like it is only receiving some of the commands and ignoring the others. The frequency of the jumps does not seem to vary with time step size that I can tell. Have you experienced similar? Do you know if there is a substantial delay between when these motors will accept new closed-loop position commands? I'm using several RMD-X8-Pro-H V3, and each I've tested has done the same.
I have also tried various max velocity inputs, which as expected changes the speed at which the motor jumps from one position to the other, but otherwise is the same.
I'm aware this may be an issue with the motor rather than with your repo, so I apologize if this is an inappropriate forum for this discussion. I just figured you may be knowledgeable, so it was worth asking. I have reached out to myactuator for comment also. If this is just a behaviour of the motor for this control mode, I would like to try Motion Control Mode as an alternative, thus #9.
Thanks again,
Stefan