You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to use the approach polygon as our main "slow down and stop before obstacles" mechanism, with a 2-3 s time_before_collision, so the robot brakes early and smoothly when a person or an object shows up on its path. What blocks this today: our robot maneuvers close to the walls, so a long projection triggers on the walls constantly. Currently the only possibility is shrinking time_before_collision, but it cancels stopping before a person or an object on the path. Controllers already handle much of this through the costmap, but their behavior near obstacles is emergent from tuning - and a stop-and-wait behavior with e.g. MPPI needs additional BT logic anyway - while the approach polygon gives an explicit time-to-collision guarantee.
We are aware of the nav_to_pose_and_pause_near_goal_obstacle pattern, but PathLongerOnApproach only fires within prox_len of the goal and requires the planner to return a >= length_factor longer path to the exact same goal pose (we want a case with navigation through multiple goals).
What do we think about making the approach action path- or map-aware?
With either in place, the full "slow down, stop, wait, continue" behavior could be easily added with a small BT node: if collision_monitor_state shows the approach polygon active for more than X seconds, the application replans or skips goals instead of waiting forever. Two possible solutions:
Project the approach polygon along the path. Optional per-polygon mode: sweep the footprint along the upcoming poses of the path, up to time_before_collision * current speed. CM subscribes to transformed_global_plan; if the path is stale or missing (e.g. a behavior is driving instead of the controller), the current projection with the full time_before_collision applies.
FootprintApproach:
type: "polygon"action_type: "approach"footprint_topic: "/local_costmap/published_footprint"time_before_collision: 2.5simulation_time_step: 0.02project_along_path: true # new; false (default) = current straight-line projectionpath_topic: "/transformed_global_plan"# new, node-levelpath_timeout: 0.5# same semantics as source_timeout; 0.0 disables the staleness check
or
Extend ExclusionZone (Add exclusion zone functionality to collision monitor #6233) to take the static map as input. Today zones are hand-declared polygons. Optionally feeding it with a map layer (e.g. the static layer) would mask source points coinciding with its occupied cells, so approach only reacts to obstacles that are not in the map. Localization drift could mask a real wall - so it has to be opt-in with a tolerance parameter.
Implementation considerations
For 1: not sure if this should be a parameter of approach or a new action type next to it (e.g. path_approach).
P.S. happy to write the PR - which of the two would you prefer, or is there a better way?
Feature request
Feature description
We want to use the approach polygon as our main "slow down and stop before obstacles" mechanism, with a 2-3 s
time_before_collision, so the robot brakes early and smoothly when a person or an object shows up on its path. What blocks this today: our robot maneuvers close to the walls, so a long projection triggers on the walls constantly. Currently the only possibility is shrinkingtime_before_collision, but it cancels stopping before a person or an object on the path. Controllers already handle much of this through the costmap, but their behavior near obstacles is emergent from tuning - and a stop-and-wait behavior with e.g. MPPI needs additional BT logic anyway - while the approach polygon gives an explicit time-to-collision guarantee.We are aware of the
nav_to_pose_and_pause_near_goal_obstaclepattern, butPathLongerOnApproachonly fires withinprox_lenof the goal and requires the planner to return a >=length_factorlonger path to the exact same goal pose (we want a case with navigation through multiple goals).What do we think about making the approach action path- or map-aware?
With either in place, the full "slow down, stop, wait, continue" behavior could be easily added with a small BT node: if
collision_monitor_stateshows the approach polygon active for more than X seconds, the application replans or skips goals instead of waiting forever. Two possible solutions:time_before_collision* current speed. CM subscribes totransformed_global_plan; if the path is stale or missing (e.g. a behavior is driving instead of the controller), the current projection with the fulltime_before_collisionapplies.or
ExclusionZone(Add exclusion zone functionality to collision monitor #6233) to take the static map as input. Today zones are hand-declared polygons. Optionally feeding it with a map layer (e.g. the static layer) would mask source points coinciding with its occupied cells, so approach only reacts to obstacles that are not in the map. Localization drift could mask a real wall - so it has to be opt-in with a tolerance parameter.Implementation considerations
For 1: not sure if this should be a parameter of
approachor a new action type next to it (e.g.path_approach).P.S. happy to write the PR - which of the two would you prefer, or is there a better way?