You can check battery information via a ROS topic with Rover Robots! Now you can verify more information while your robot is in the field without having to get out the multimeter!
To view information about the battery in your Rover Robot, there are two topics you can use: /robot_status and /rover_*robot type*/battery_status
Note: These are only available in ROS2.
To call them use “ ros2 topic echo /*desired topic here* “
The major difference between the topics is the /battery_status topic provides only information about the battery, specifically the voltage, state of charge (SOC), and the current, while the robot_status topic will display motor information as well as battery.
Note: There are other fields within these topics, but they are not implemented yet and will report 0's, that is expected.
ros2 topic echo /rover_*type*/battery_status
Current: The current is reported in milliamps, and will only display when the motors are being driven by the motor controller. Moving the motor by hand will not cause the current to update, only via twist commands through ROS or direct movement commands through the motor controllers.
Voltage: The voltage is reported in Volts.
State of Charge: The SOC is an estimated percentage of the battery remaining.
This reporting requires an adjustment to the motor controller inside the MĪTI, mini and Zero if you already have one and wish to use this feature.
For the Zero
Connect the Zero to a computer running Vesc Tool 6.00 or higher. Hit Autoconnect and select Motor ID Local in the bottom left corner of the application window and then select the App Settings > General tab from the bar on the right. Be sure Status 1, 4, and 5 are all checked and then hit the Write App Settings button, the down arrow next to the A, on the far right bar of the application window. Then check Motor ID 8 and be sure only Status 1 is checked in the same area.
For the mini and MĪTI
Open the robot to access the motor controller inside. You must connect to the motor controller of the front left wheel with a micro USB connection. Then connect to a computer running Vesc Tool 6.00 or higher. Hit Autoconnect and select Motor ID Local in the bottom left corner of the application window and then select the App Settings > General tab from the bar on the right. Be sure Status 1, 4, and 5 are all checked and then hit the Write App Settings button, the down arrow next to the A, on the far right bar of the application window. Check the remaining motor IDs and be sure that only Status 1 is checked for each of them.