-
Notifications
You must be signed in to change notification settings - Fork 65
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
[SW-642] Make it obvious when spot is running out of battery #252
[SW-642] Make it obvious when spot is running out of battery #252
Conversation
Current dependencies on/for this PR: This stack of pull requests is managed by Graphite. |
e590c8e
to
64f00a4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a heads-up, #209 is going to move the code that's modified in this PR into a separate C++-based node, which will impact your implementation here.
A future-proof way to handle this warning would be to make a ROS node that's added to the Spot driver launch description which subscribes to the battery state ROS topic published by the driver and runs the check you added here in the subscriber callback.
b2c8072
to
398ad35
Compare
Pull Request Test Coverage Report for Build 7923150267Details
💛 - Coveralls |
…rning when spot battery is <= 10%
ccfce27
to
e389a91
Compare
The changes I requested have been put in place. Dismissing so I don't block the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this out by running the spot_alerts node by itself and publishing a BatteryStateArray message like this:
ros2 topic pub --rate 1 /status/battery_states spot_msgs/msg/BatteryStateArray "{battery_states: [{charge_percentage: 8.0}]}"
, and the pop-up appears like I'd expect.
There are a couple things that can be addressed in follow-up work, such as handling Spot charging back above the low-battery threshold level while these nodes are still running.
…up while driver is still running
I just added in an extra check to reset the low_battery flag in case the spot is charging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry just realized in all the questions I had about parameters I never clicked approve. Thanks for doing this!!
…titute#252) Created a new `spot_alerts` node to monitor stats and throw a pop-up alert warning the user. It currently only monitors the battery states and throws a warning up if the percentage is <= 10%. Also added the `low_battery` parameter flag to prevent constant pop up spamming. Tested on a spot with low battery.
Created a new
spot_alerts
node to monitor stats and throw a pop-up alert warning the user. It currently only monitors the battery states and throws a warning up if the percentage is <= 10%.Also added the
low_battery
parameter flag to prevent constant pop up spamming.Tested on a spot with low battery.