I thought, a position command has four parameters.
p axis position velocity current
p 0 100000 -> brings the motor to position 100000 with the velocity defined in “odrv0.axis0.controller.config.vel_limit”
p 0 100000 20000 -> should bring the motor to position 100000 with the velocity of 20000 till 20000 is smaller than the defined vel_limit.
In my tests, the velocity is allways the velocity defined in “odrv0.axis0.controller.config.vel_limit”. The velocity in the command has no effect. Can somebody explain me how to change the velocity at a position command?
Thanks / Zennix
I noticed the same behaviour. I set an speed using odrivetools. (I increased ithe speef from ten thousand to two hundred thousand) and then saved it. Run it from odrivetools and it worked.
Then, I switched to a little Python script to run the motor at two hundred thousand and it didn’t…It run probably at its default (10000).
Went back to odrivetools and.decrease the speef to one hundred thousand. Went back to script, run it and got same speef (about ten thousand)
Went back to odrivetools and switch speed to one, then back to script and motor was still doing ten thousand.
So, I concluded that speed parameters that I used on odrivetools have no saying beyond that.
Went back to my Python script and I set the desired speed and motor started running at such speed inmediately.
Hope this helps
did you checked the ASCII interface too?
Thanks / Zennix
Sorry that’s not really how it works. The velocity and current parameters are “feed-forward terms” which should inform the ODrive of the expected velocity at the current point in time, and is only really useful for dynamic trajectories, where the velocity is changing all the time.
You could make your own ascii command that has the syntax that you are looking for, that will modify vel_limit for you at the same time as setting the position setpoint. I think there is quite a lot of demand for this, so we can make this official: feel free to submit a PR.
Soon you could use a “go-to” command, which uses a constant velocity trajectory, this feature is on the way.
I implemented a ‘z’ command that modifiy the vel_limit as you told me.
It works, thank you.
Greetings / Zennix