Some advices for trajectory mode

I use move_to_pos( ) command to control my motors, and found some problems about trajectory control mode.

  1. Sometimes I want a stop command to cancel my work but not idle.
  2. While my odrive axis raises error or I set the state to idle, trajectory controller still working to change my position_set. So, after I enable my motor, it will suddenly move out of my control.
  3. When I set a further target, the motor will suddenly slow down, and immediately resume. For example, first, I set move_to_pos(100) at pos 0, then set move_to_pos(150) at pos 50, the issue will occur. It’s easy to find that the tone of motor sound changed at the moment.
2 Likes

I also find that I can’t change my motors’ calibration_current. While I run full calibration, the current of the axis always shows 10A.
My motor was set max_current 5A, and can’t calibration successfully.

Trajectory control has a lot of improvements in the 0.5.1 firmware compared to the default firmware.
After you upgrade, the function move_to_pos() will be gone. Instead, you set controller.input_mode to INPUT_MODE_TRAP_TRAJ and set controller.input_pos instead of calling move_to_pos().