Hi,
I’m trying to achieve the following with odrive & D6374-150kv:
- Accelerate a mobile robot or such quickly to a certain dedicated speed.
- Letting it roll forward freely without the motor to break or accelerate
- After a certain distance, take control back and break the mobile so that it stops to a given position.
This would be straight forward without point 2. - just to set vel_limit and input_pos and that’s it.
I have tried the following:
my_drive.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL
start_pos = my_drive.axis0.controller.input_pos
my_drive.axis0.motor.config.current_lim = 30
my_drive.axis0.controller.input_pos = start_pos + 10.0
time to accelerate
time.sleep(0.1)
my_drive.axis0.motor.config.current_lim = 1
time for free rolling
time.sleep(0.5)
take the control back and stop at
my_drive.axis0.motor.config.current_lim = 30
my_drive.axis0.controller.input_pos = start_pos + 10.0
Both 1. acceleration and 2. free rolling works OK by setting the current limit low, but taking control back and moving to the final position do not work, and odrive gives motor failed error.
I’m still new with odrive, thus there’s probably an obvious solution to this.
Could you please advice how to achieve the points 1-3.
All in all, odrive is a really great product. I’m already impressed with its capabilities and easy ways to control with python.