-
Notifications
You must be signed in to change notification settings - Fork 276
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
Battery updates #183
Battery updates #183
Conversation
Signed-off-by: Carlos Aguero <caguero@openrobotics.org>
Signed-off-by: Carlos Aguero <caguero@openrobotics.org>
Codecov Report
@@ Coverage Diff @@
## ign-gazebo2 #183 +/- ##
============================================
Coverage 62.35% 62.35%
============================================
Files 123 123
Lines 6101 6101
============================================
Hits 3804 3804
Misses 2297 2297 Continue to review full report at Codecov.
|
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.
Thanks for improving the battery feature! I wasn't sure how to test the start/stop recharge function. Could we add some documentation on what service to send in the sdf file?
It's a bit harder to test because we're using a one way service, as we don't expect any response. One way services are not supported in How about I update |
If that's not too much work then I think that'd be very helpful for demo purposes. And yes, separate PR sounds like a good plan. |
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, just waiting for pending CI to approve
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.
Approve since the homebrew test failure doesn't seem to be introduced by this PR. @chapulina I saw a similar test failure in this CI https://build.osrfoundation.org/job/ignition_gazebo-ci-pr_any-homebrew-amd64/3142/
This patch introduces the following battery updates:
The recharging is no longer triggered by the parameter
socThreshold
. The old behavior implies that a battery automatically starts charging when the battery capacity falls below a certain threshold. I think it's more realistic that the recharging can be started or stopped on demand. I took the liberty of removing thesocThreshold
parameter directly because it wasn't documented in the header file.If
<enable_recharging>
is present, two new services are available for starting or stopping the battery recharge.If there's no joint velocity/force command, the battery doesn't drain anymore. Before, once the battery started draining, it never stopped even if the joints weren't moving.
I updated the battery status published. It can now be in
CHARGING
,DISCHARGING
,FULL
orNOT_CHARGING
state.I documented the SDF charging parameters and added a few minor tweaks.