After doing some low-speed, low-torque manuevers in trap_traj position mode, the motor started oscillating around the setpoint at ~.2 Hz. If I run in passthrough position control, no problem. Even in Idle, if I switch back to trap_traj, I can see the setpoint start to oscillate in large swings.
Maybe lower the vel_gain? There are several gains for the velocity and position PI controller
Passthrough will use a PI controller to move the motor to the input_pos as fast as possible, trap_traj or trapezoidal trajectory control will attempt to ramp the velocity at the rate of trap_traj.accel_lim to the trap_traj.vel_limit then ramp at the rate of trap_traj.decel_lim until the motor stops so that it stops at the desired position, and will adjust velocity to ensure it has the correct final position
I don’t think it’s the gains, as it should behave the same as Passthrough when it has finished the move and is sitting still.
I agree this is suspicious. There was a recent bug that made it so that trajectories never finished but instead repeatedly made tiny trajectory steps that overshot the target back and forth forever. It could be this. Can you plot velocity setpoint in liveplotter or GUI, that would help to confirm. axis0.controller.vel_setpoint.
Thanks for taking a look.
I haven’t had any luck with the GUI on Windows. I’m currently running the Odrive off a Pi, and the GUI works in the Chromium browser, but I wouldn’t call the plotter “working” in that instance. It is really jumpy. Is there a quick fix for that?
Are you sure you sent it to -0.5? input_pos is 0.5 here. Do you have some other module that is also sending it commands?
Are you using circular setpoint mode? That is not supported with the trajectory planner.
It does look like I meant +0.5 in that example. But that doesn’t change the presence of the oscillations.
I am not using circular setpoint mode.
I am still wrestling with a solution here … can you give me a little more insight into why the trap_traj mode starts to oscillate, and why it’s different than the behavior in POS_FILTER or PASSTHROUGH input modes?
If it’s helpful to give you more settings or plotted examples, I’m happy to do that. This behavior has my project development at a bit of a standstill right now.
Ok thanks. Sorry to be pedantic, it’s not clear what the decel limit is set to. Plotting input pos here as well is really helpful, thanks for that.
Can you do this screenshot again with the decel_limit box closed so we can get a full set of values to try to reproduce? Thanks.
Thank you very much!
I can confirm that setting accel_limit < decel_limit induces the oscillation. The magnitude of oscillation seems to scale with the difference between them.
Setting accel_limit > decel_limit does not result in oscillations.