UbiquityRobotics / ubiquity_motor

Package that provides a ROS interface for the motors in UbiquityRobotics robots
BSD 3-Clause "New" or "Revised" License
25 stars 24 forks source link

Need support for Magni motors with gear ratio of 5.17 #123

Closed mjstn closed 2 years ago

mjstn commented 3 years ago

Our wheel supplier is moving to gear ratio of 5.17 The current gear reduction ratio is 4.3

We must have new wheel type support in firmware as well as ubiquity_motor layers.

mjstn commented 3 years ago

A working ubiquity_motor codeset that runs on Noetic image is now present in branch addMotorGearRatioParameter.

There is no impact on firmware. Our firmware has always only returned incremental ticks and the host side does all the conversion to ODOM as well as setting of MCB speed has always been in units that regulate tics per time interval so the host here also is doing the adjustments. Everything is host side.

In order to not go out of hand in this change this change will only be ok if both wheels have the same gear ratio. This is certainly ok for new units but for replacement both wheels must match. Realistically speaking if somebody orders a replacement wheel it is extremely rare AND if it is due to wheel wear it is best they replace both anyway.

You add to base.yaml in ubiquity motor section wheel_gear_ratio and the newer ones we will get will then use a value of 5.17
The default is about 4.29 so no entry in base.yaml is backwards compatible with all users base.yaml now.

mjstn commented 3 years ago

This has been implemented only at Host layer. There was no need to modify firmware.

mjstn commented 2 years ago

Today the 5.17 gear ration motors were tested on the 11-24-2021 image. the required base.yaml change needs this line in ubiquity_motor: section wheel_gear_ratio: 5.17

The forward and back odom worked great for forward to 0.8 M then back to 0. The rotation is off which was due to these proto motors stick out about 1cm extra from chasis thus making rotation be more than expected. I saw 98 degrees for a 'near 90 deg' rotation (not exact rotation). So that makes sense as wheel separation was off thus rotation is off.

mjstn commented 2 years ago

Closing this as it is in kinetic-devel and noetic-devel at this time.