UbiquityRobotics / ubiquity_main

Main documentation as well as other misc files
Other
19 stars 7 forks source link

EStop error due to motor node is not setting MCB board revproperly on startup #244

Closed mjstn closed 3 years ago

mjstn commented 3 years ago

Because MCB does not know it's hardware version till host tells it the rev we have this startup error which leads to possible motor jump if movement command comes prior to first ESTOP power on on the MCB.

Start with main power and ESTOP power both off. Turn on main power. MCB can only know it is rev 5.x or later if motor power is on and relies on host to override that. Host is telling MCB it is version 4.9. If any cmd_vel happens OR robot is moved and encs change that sets up this error to happen. Estop power is turned on and robot JUMPS. MCB also very quickly knows it is now 5.x but the jump has happened.

To fix this motor node must read the I2C register that holds MCB board rev and set that in MCB prior to any speed commands being sent to robot by host.

This can be fixed in motor_node.cc by doing I2C reg read before host sets robot Hardware Version

mjstn commented 3 years ago

This is Avalon image specific