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

Check for mininum hardware version before reading option switch #144

Closed rohbotics closed 3 years ago

rohbotics commented 3 years ago

Fixes #139

@samiamlabs this is the initial easy part of the fix that we discussed.

samiamlabs commented 3 years ago

It looks to me like robot->hardware_version is set to 0 here and is not read from params anywhere at the moment. https://github.com/UbiquityRobotics/ubiquity_motor/blob/c4f8bbecdc66fbe06f2d34bca7fc4539a09821bd/src/motor_hardware.cc#L139 Is that correct?

rohbotics commented 3 years ago

@samiamlabs Good catch, thanks! Updated so that setHardwareVersion actually sets that variable. setHardwareVersion is called with the value of the ros param, and is set to 49 by default.

rohbotics commented 3 years ago

Merging based on discussion with @mjstn at huddle yesterday.