Ask Your Question

Dr. Orion Lawlor's profile - activity

2012-04-19 18:16:49 -0600 received badge  Enlightened (source)
2012-04-09 16:34:03 -0600 received badge  Good Answer (source)
2012-04-05 17:29:11 -0600 received badge  Nice Answer (source)
2012-04-03 15:34:40 -0600 received badge  Teacher (source)
2012-04-03 15:07:08 -0600 received badge  Supporter (source)
2012-04-03 14:53:57 -0600 answered a question Turtlebot unable to check laptop battery/BAT0/state

I had the same problem. Since the EeePC 1215N was discontinued, the Turtlebot now ships from I Heart Robotics with a Lenovo ThinkPad X130e. This laptop's battery shows up in /proc/acpi/battery/BAT1, not BAT0 as is hardcoded into ROS electric's Also, the battery's capacity and charge state is reported in mW instead of mA, so just swapping BAT0 to BAT1 in the script doesn't fix it.

I've uploaded an updated version of electric's that should fix both of these problems:

I use a shell glob to find BAT*, and recognize either mW or mA for battery capacity. This should work with both EeePC and ThinkPad based turtlebots, but I only have the ThinkPad to test with. To use the new script, from your turtlebot:

  1. wget
  2. sudo cp /opt/ros/electric/stacks/turtlebot/turtlebot_node/scripts/
  3. sudo rosmake turtlebot_node
  4. sudo service turtlebot restart