We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2573e11 commit e396499Copy full SHA for e396499
src/impl/vamp/planning/aorrtc.hh
@@ -69,6 +69,12 @@ namespace vamp::planning
69
auto temp_node = NNNode{0, cost, c};
70
nn->nearestR(temp_node, NNNode::distance(temp_node, root), near_list);
71
72
+ // Explicitly handle case where no neighbors are within r distance.
73
+ if (near_list.empty())
74
+ {
75
+ return {root, c.distance(root.array)};
76
+ }
77
+
78
const auto *new_nearest_node = &near_list[0];
79
float new_nearest_distance = c.distance(new_nearest_node->array);
80
0 commit comments