Odrive micro not moving to requested position

I have an odrive micro with a SPI encoder, and I have set it to absolute encoder reference frame with an offset to home it.

If I use the GUI to enable and command the micro, it works as expected with requested positions moving the odrive in the absolute reference frame. If I initialize it from CAN, setting the odrive to AXIS_STATE_CLOSED_LOOP_CONTROL, then requesting a position move with Set_Input_Pos message, it will move to what appears to be the boot reference frame.

If I then go to the GUI and request a position move, the odrive will not go to the position requested (even though it correctly reports it’s current position in the absolute frame). I’ve attached a gif of a requested move, with the odrive moving to the wrong position (note that I have confirmed that it isn’t just overshooting the setpoint – where it stops in the gif is actually where it is trying to go)

What next steps can I do to debug this?

Thanks!

odrive_pos_setpoint

odrive_values

Looks like I was sending the position message with the ODRIVE_SET_INPUT_VEL ID, but since it was in position mode it interpreted it as a position? Strange that it didn’t set it to velocity mode, but it looks like it was my bad.

Great to hear you figured it out! In position control, the velocity messages are used for feedforwards (see here Controller — ODrive Documentation 0.6.11 documentation), hence the small amount of movement.