Fix nullopt dereference in GoToPlace goal selection of 'one_of'#130
Merged
arjo129 merged 1 commit intoopen-rmf:mainfrom Dec 24, 2025
Merged
Fix nullopt dereference in GoToPlace goal selection of 'one_of'#130arjo129 merged 1 commit intoopen-rmf:mainfrom
arjo129 merged 1 commit intoopen-rmf:mainfrom
Conversation
Signed-off-by: kjchee <keai_jiang_chee@cgh.com.sg>
arjo129
approved these changes
Dec 24, 2025
Member
arjo129
left a comment
There was a problem hiding this comment.
Thanks for catching this! Tested and confirmed that the fix solves the bug,
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #130 +/- ##
=========================================
- Coverage 36.44% 0 -36.45%
=========================================
Files 65 0 -65
Lines 2557 0 -2557
Branches 1416 0 -1416
=========================================
- Hits 932 0 -932
+ Misses 550 0 -550
+ Partials 1075 0 -1075
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
When using 'one_of' feature in GoToPlace, a reachable goal followed by an unreachable goal (eg. lane closed) combination will trigger a runtime failure. eg:
The root cause is a nullopt dereference during goal selection, where the estimate time comparison unconditionally accesses
invariant_duration_optfor a subsequent unreachable goal while generating the GoToPlace model.Fix applied
Applied a nullopt check before
else if (shortest_travel_time.value() > invariant_duration_opt.value()).If
invariant_duration_optis nullopt then we skip this goal candidate.To test
a. Before fix:
tinyRobot1_charger, and tintRobot2 is at waypointtinyRobot2_charger.presupplies& waypointpatrol_D2ros2 topic pub /lane_closure_requests rmf_fleet_msgs/msg/LaneRequest "{fleet_name: 'tinyRobot', open_lanes: [], close_lanes: [0,1]}" --oncecoe&supplies)ros2 run rmf_demos_tasks dispatch_go_to_place -p coe supplies --use_sim_timeb. After fix:
GenAI Use
We follow OSRA's policy on GenAI tools
Generated-by: