-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish battery state #379
Comments
JFYI: this is what Android apps use to display the battery level: https://github.com/rosjava/android_remocons/blob/kinetic/common_tools/src/main/java/com/github/rosjava/android_remocons/common_tools/dashboards/DefaultDashboard.java#L102. It does the quotient between the battery capacity and the charge to display the percentage (it is a bit awful, but that's how it works). We wrote a battery publisher for Tangobot that publishes the battery level according to that, in case you want to take a look: https://github.com/ekumenlabs/tangobot/blob/master/tangobot_app/app/src/main/java/com/ekumen/tangobot/nodes/DeviceBatteryPublisherNode.java. Note that this doesn't use |
...as sensor_msgs/BatteryState. Not really related to Tango, but it might be useful for applications where a self-powered Tango device is used as a localization sensor.
I am not familiar with the Android API, but the BatteryManager seems to provide the necessary information.
The text was updated successfully, but these errors were encountered: