-
Notifications
You must be signed in to change notification settings - Fork 993
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
sensor_msgs::BatteryState percentage with a negative value #1284
Comments
Battery messages are processed here:
Math is simple |
@vooon Thank you for your message. I got the same values with Analyze (qgc) and I am surprised by the voltage value (65 volts and I have a 4C lipo battery). I am wondering whether I did not correctly configure the power panel with QGC or not. |
@FaboNo yes, likely that battery monitor is misconfigured. But i don't know what exactly wrong, so probably first better to try reconfigure until you got possible values in QGC. |
@vooon the cable from the power module was plugged inot POWER2 instead of POWER1 on the pixhawk v2.1. This is why the pixhawk s not able to measure the voltage. Now it works fine. |
This is only bug and feature tracker, please use it
to report bugs or request features.
Issue details
Please describe the problem, or desired feature
When I am reading the battery status (/mavros/battery -- see below) I noticed that the percentage value is always small and negative. However in the documentation this value should be between 0 and 1. Can you tell me what is missing? Thank you
I added a screenshot of the px4 parameters associated with the battery in case I missed something?
MAVROS version and platform
Mavros: ?0.18.4?
ROS: ?Kinetic?
Ubuntu: ?16.04?
Autopilot type and version
[ ] ArduPilot
[ x ] PX4
Version: ?3.7.1?
Node logs
Diagnostics
ros@ros:~/catkin_ws$ rostopic echo -n1 /diagnostics
header:
seq: 27
stamp:
secs: 1528206472
nsecs: 230403402
frame_id: ''
status:
level: 2
name: "mavros: GPS"
message: "No satellites"
hardware_id: "/dev/ttyPIXEXT:921600"
values:
value: "0"
value: "Unknown"
value: "Unknown"
level: 0
name: "mavros: Heartbeat"
message: "Normal"
hardware_id: "/dev/ttyPIXEXT:921600"
values:
value: "0.959974"
value: "Quadrotor"
value: "PX4 Autopilot"
value: "AUTO.LOITER"
value: "Standby"
level: 0
name: "mavros: System"
message: "Normal"
hardware_id: "/dev/ttyPIXEXT:921600"
values:
value: "0x00000000"
value: "0x00200020"
value: "55.2"
value: "0.0"
value: "0"
value: "0"
value: "0"
value: "0"
value: "0"
level: 0
name: "mavros: Battery"
message: "Normal"
hardware_id: "/dev/ttyPIXEXT:921600"
values:
value: "-0.0"
value: "-1.0"
Check ID
The text was updated successfully, but these errors were encountered: