Battery charge not shown in Android apps #136

corot opened this Issue Jun 20, 2012 · 1 comment


None yet
1 participant

corot commented Jun 20, 2012

No description provided.

@ghost ghost assigned corot Jun 20, 2012


corot commented Jun 20, 2012

Fixed with two changes:

  • I modified diagnostics.yaml to remove the node name (by adding remove_prefix: mobile_base)
  • We send Current Charge and Capacity diagnostic values. See /kobuki_node/src/node/diagnostics.cpp


  • As "Current (A)", we send 0 when the robot is unplugged and 3.14 if charging/charged. 3.14 is the current supplied by our basic charger. So if this changes, or the docking base differs, this value will be false. This is not terrible because we identify properly when the robot is charging, but just a bit amateurish.
  • As "Capacity (Ah)" we always send 2.2, what is that of the 4S1P battery, because by now we cannot identify the battery at use in our driver. This is not terrible too, because of the way we calculate the charge percent, explained below.
  • As "Charge (Ah)" we send the capacity multiplied by the charge percent and divided by 100. As we obtain this percent from the voltage, all this tricky Amperage values don't affect the charge shown to the user, that is correct despite the validity of all these hardcoded values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment