Skip to content
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

Fix charging status #347

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Fix charging status #347

wants to merge 2 commits into from

Conversation

mxgrey
Copy link
Contributor

@mxgrey mxgrey commented Apr 25, 2024

There's been a long outstanding TODO for the fleet adapter to set the published robot status to charging when a robot is charging. This PR fixes that, and also accounts for whether the robot's dedicated waypoint is a charging waypoint or actually just a waiting point.

This also adds a parking: [ ... ] list to the charging schedule node so that certain waypoints can be tagged as parking waypoints and that will get updated correctly. Note that this means the charging schedule node will not work with any fleets that have the name "parking".

Signed-off-by: Michael X. Grey <mxgrey@intrinsic.ai>
Signed-off-by: Michael X. Grey <mxgrey@intrinsic.ai>
@@ -847,7 +854,8 @@ class RobotContext
std::size_t _charging_wp;
/// When the robot reaches its _charging_wp, is there to wait for a charger
/// (true) or to actually charge (false)?
bool _waiting_for_charger;
bool _waiting_for_charger = false;
std::shared_ptr<void> _lock_charging;
Copy link
Member

@arjo129 arjo129 Apr 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind if I ask why we are using a std::shared_ptr<void> here? It might be worth documenting the rationale. Are we some how abusing reference counting here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants