Closed AbdElRahmanFarhan closed 1 year ago
It is not a bug.
Currently we use vesc_driver as a library, and binaries in vesc_driver package are only for debugging.
See https://github.com/sbgisen/vesc/tree/develop/vesc_hw_interface ; this package supports the unit conversion for various types of hardware integration.
Or, please contribute if you have problems on that.
Thanks for pointing that out. So, you mean that the position is actually returned as revolution and I only need to convert it to radians, right?
No, in my understanding. I think that the unit of position is not the number of rotations but the number of hall sensor pulses.
The following codes would help you, where the number of pole pairs and the gear ratio are parameters you have to set. https://github.com/sbgisen/vesc/blob/3d25c6a61d7cd14c673efe7412cbccd8afb7cad5/vesc_hw_interface/src/vesc_hw_interface.cpp#L218-L225
I think that the driver returns position as a revolution, not radians. I checked the code and I didn't find any conversion from revolution to radians.