Skip in-place rotation after Dock event to avoid double docking #126
+49
−9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bug fix
Fixed bug
Fix double docking issue reported at open-rmf/rmf_ros2#479.
In
rmf_traffic::agv::planning::reconstruct_waypoints, previous node's event is copied over to next in-place rotation candidate (here). This behavior is fine for most events, but not for Dock, since it causes the Dock command to trigger twice and adds an unnecessary in-place rotation after docking action.Fix applied
Skipping the in-place rotation after Dock event while generating the
std::vector<WaypointCandidate> candidates.To test it
a. Before Fix:
tinyRobot1_charger.add a line of debug message at ExecutePlan.cpp to verify double Dock added to _phases.
eg.
std::cout << "````````````````````````Add a Dock phase, dock_name[" << dock.dock_name() << "]\n";launch office sim
send tinyRobot1 from waypoint
tinyRobot1_chargerto waypointpatrol_A1.then, send tinyRobot1 to waypoint
tinyRobot1_charger.We will see the terminal log with 2 Dock phase added to _phases.
b. After Fix:
GenAI Use
We follow OSRA's policy on GenAI tools