The m4atx_battery_monitor package will read the information from a m4atx battery supply and publish it as a ros message.



m4atx_battery_monitor_node will read in the information from the m4atx and publish the information.

Published Topics

battery_status_m4atx ('m4atx_batter_monitor/PowerReading')
  • publishes the Power information


~diag_frequency (double, default: 1.0)
  • the frequency at which to poll the power supply
~input_nominal (double, default: 13.8)
  • the nominal voltage when the battery supply is fully charged
~battery_dead_voltage (double, default: 10.5)
  • the voltage at which the battery is considered dead (at a 0% charge)


A startup script is provided which will perform the following commands.


Locate the bus and device number of the device called "MicroChip Technology, Inc.".

sudo chmod a+rw /dev/bus/usb/<bus_num>/<device_num>

Where the bus_num and device_num were found above using lsusb.


To install the m4atx_battery_monitor package, you can choose to either install from source, or from the Ubuntu package:


To install from source, execute the following:

  •    1 cd /path/to/your/catkin/workspace/src
       2 git clone https://github.com/WPI-RAIL/m4atx_battery_monitor.git
       3 cd /path/to/your/catkin/workspace
       4 catkin_make 
       5 catkin_make install

Ubuntu Package

To install the Ubuntu package, execute the following:

  • sudo apt-get install ros-indigo-m4atx-battery-monitor


The ros_ethernet_rmp package contains a m4atx-battery-monitor.launch file. This file launches an instance of the m4atx_battery_monitor_node. To launch these nodes the following command can be used:

  • roslaunch m4atx_battery_monitor_node m4atx_battery_monitor_node.launch 

Now the node will publish the information as well as use espeak to inform the user of a state of charge less than or equal to 20%.


Please send bug reports to the GitHub Issue Tracker. Feel free to contact me at any point with questions and comments.

Wiki: m4atx_battery_monitor (last edited 2014-12-12 16:38:59 by davidkent)