ASCII move_incremental?

Hopefully a simple question: can I use the trajectory module’s move_incremental command with the ASCII protocol? If so, what’s the syntax? Context: using an ESP32 programmed in Arduino IDE to control an ODrive 3.6.

I’ve tried, for example:

w axis1.controller.move_incremental(10, False)

But nothing happens.

I also tried:

w axis1.controller.move_incremental 10 False

Likewise, no response.

The move_incremental via native protocol works perfectly on PC via USB.

This works fine via ASCII protocol with trajectory control mode, although doesn’t give me the incremental moves:

w axis1.controller.input_pos 10

You cannot use the move_incremental function with the ascii protocol. What you could do is use the trajectory command instead, but this assumes that from_goal_point = True. You should be able to work around this by including the pos_setpoint offset in the trajectory command. For reference, here’s the code for move_incremental, and here’s some pseudo code to recreate the from_goal_point = False behavior:

(assuming: axis1, displacement = 10)

  • get pos_setpoint with r axis1.controller.pos_setpoint
  • offset your displacement with this value: displacement = pos_setpoint + 10
  • use trajectory command with new displacement: t 1 {displacement}

Alternatively, you could incorporate the from_goal_point argument directly into the trajectory command code.

Hope this helps!