Skip to content

Commit

Permalink
Catch which node is missing its waypoint
Browse files Browse the repository at this point in the history
Signed-off-by: Michael X. Grey <[email protected]>
  • Loading branch information
mxgrey committed Nov 2, 2023
1 parent 8bf9ab2 commit 3efab18
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,7 @@ class ScheduledDifferentialDriveExpander
std::make_shared<SearchNode>(
SearchNode{
std::nullopt,
std::nullopt,
top->waypoint,
{},
p,
yaw,
Expand Down Expand Up @@ -1721,7 +1721,15 @@ class ScheduledDifferentialDriveExpander
if (!top->waypoint.has_value())
{
// If the node does not have a waypoint, then it must be a start node.
assert(top->start.has_value());
if (!top->start.has_value())
{
throw std::runtime_error(
"[rmf_traffic::agv::planning::DifferentialDrivePlanner::expand] "
"Node has no waypoint and also no start information. It was produced "
"on line [" + std::to_string(top->line) + "]. This should not be "
"possible. Please report this critical bug to the maintainers of "
"rmf_traffic.");
}
expand_start(top, queue);
return;
}
Expand Down

0 comments on commit 3efab18

Please sign in to comment.