sbgisen / vesc

VESC Interface for ROS
Apache License 2.0
44 stars 33 forks source link

Clarify what "gear_retio" represents #16

Closed ssr-yuki closed 3 years ago

ssr-yuki commented 3 years ago

In vesc_hardware_interface, there exist a parameter named gear_ratio. It means a kind of reduction ratio, however, the value is calculated not by (input displacement) / (output displacement) but by (hall sensor value) / (input displacement).

We have to introduce a new variable representing hall sensor values per round to clear the complexity. Joint effort and joint velocity is wrong because of the complexity of gear_ratio variable.

ssr-yuki commented 3 years ago

Hall sensor-based pulse satisfies the following equation:

the Number of Pulses on 1 Rotation [pulse/round] = the Number of Motor Poles [/round] * the Number of Hall Sensors [pulse]
ssr-yuki commented 3 years ago

I conclude that gear_ratio should represent velocity ratio: it depends only on reduction gears.

Both the number of motor poles and the number of hall sensors have to be parameterized for vesc_hw_interface. The former is also required to calculate accurate joint velocity (see #20 for more details).