We already tried this before I contacted you and it definitely did not work then. Not sure why the hub motors/wheels remain damped (ie, offer resistance to movement) even when the red switch (power supply to motor control board and motors) is in the OFF position?
Yes, wheel encoders do put out data as verified by running the command:
rosrun tf tf_echo odom base_link when the red switch is in the OFF position, but the magni’s hub motor wheels offer resistance to movement (damped) even when red switch is in the OFF position. This does NOT help us.
So there are three states of resistance in the hub wheel motors we’ve observed:
-
When everything is turned OFF, there is no resistance offered by the hub motors/wheels whatsoever and they free-wheel just fine.
-
When the Raspberry Pi is powered up (black switch is in the ON position), but motor control power is powered OFF (red switch is in the OFF position), the hub wheel motors are damped and offer a lot of resistance to movement. Magni is not able to be easily pushed around.
-
When everything is powered up, ie the Raspberry Pi is powered up (black switch in ON position) and the motor controller board is powered powered up (red switch in ON position), then Magni’s hub motors/wheels are essentially locked-up and cannot be moved at all by pushing it. Although it can be driven with the joystick and keyboard just fine as one would expect.
We did some poking around and found a block of code that seems to control the power and speed logic to the motors. The code is in this file in the source code for ROS motor controller node here:
https://github.com/UbiquityRobotics/ubiquity_motor/blob/kinetic-devel/src/motor_node.cc (specifically line 269):
The boolean estop_mode_power_off mode is enabled when power is turned OFF, but it writes a zero speed value of ‘(0.0, 0.0)’. I’m wondering if that’s the reason why the wheels offer significant resistance but are not locked-up? (resistance state 2. in my description above).
What’s the consequence of commenting-out that logic and re-building the motor_node.cc ROS node? Will hub motors/wheels free-wheel and offer no resistance if no speed value of ‘(0.0, 0.0)’ is being written to them? Thanks in advance.