"Your current position should be 0!"

Hi there,
I kind of got my odrive to work, but man this so strange documented, I really struggle !

I use HTerm to emulate an arduino

after some initials:
w axis0.motor.config.current_lim 60
w axis0.controller.config.vel_limit 1000000
w axis0.trap_traj.config.vel_limit 500000
w axis0.trap_traj.config.accel_limit 1000000
w axis0.trap_traj.config.decel_limit 1000000

I go with:
t 0 819200
for example to do moves analoge to the steps

now I want to set the counter to “0” or I want to go incremental with my commands.

no command gives me any feedback,
“w axis0.encoder.set_linear_count(0)” doesn’t do anything but gives me a feedback:
“invalid property”

I really need a good documentation of the commands, is there a hidden list ? :rofl:

Have you tried doing the same over the USB interface using the odrivetool Python program?
This is the main configuration interface for the drive - much easier to use and much more richly documented than the serial interface.

Hi,
Thx but the device has to work with the serial interface.
If I can change the setup of the board to incemental move-commands permanently with python, this would be ok.

could it still work with the “t 0 819200” command ?

THX

What I mean is, use the USB for initial configuration and test, then call save_configuration() and then use serial for control.

Unfortunately there is no way to use this specific feature over the UART interface. You will need to measure and store an offset value in the controller and use that to correctly send future position commands.

1 Like

Oh, I understand what @Groppo was asking for now. set_linear_count is intended for use during initial setting up only, not for control.
As robopilot said, just have the arduino remember the position, and add your increment to that… There is no “move relative” command.

OK thx a lot, is there a highest number I can give to the odrive? It should work in a long time testing system for weeks

What’s the application? Maybe you should be in velocity control mode?

The number is interpreted as a 32-bit floating point value.
The maximum is very high (3x10^38) but the precision drops as the value increases.

It needs to go an exact amount of rotations, the test verifies a rotation-counter but the precition within one rotation can be much less. Am I able to drop the resolution of the angel sensor to 20 steps/rotation or something like that ?

There’s currently no way (AFAIK) to decimate the encoder counts except for using a lower resolution encoder.
However I think you should be fine. How many revolutions does it need to go in total?

Integers between 2^n and 2^(n+1) round to a multiple of 2^(n-23) [WP]
2^(32-23) = 512
Therefore you’d have at least 2^31 counts i.e. a quarter million turns of an 8192 count encoder such as the CUI, until the precision drops below 1/20 of a turn i.e. 409 counts

In future there should be support for setting a position in real units such as metres or turns. i.e. adding a scale factor to the encoder counts.

Good, thats ok for me
THX