Skip to content

TruncatePathLocal

A custom control node, which modifies a path making it shorter. It removes parts of the path which are more distant than specified forward/backward distance around robot

Input Ports

input_path

Type: nav_msgs::msg::Path Default: N/A

The original path to be truncated.

distance_forward

Type: double Default: 8.0

The trimming distance in forward direction. Set to -1 to search full path forward.

distance_backward

Type: double Default: 4.0

The trimming distance in backward direction.

robot_base_frame

Type: string Default: N/A

Robot base frame id. If not provided, uses the BT Navigator's robot_base_frame parameter value (base_link by default).

transform_tolerance

Type: double Default: 0.2

Robot pose lookup tolerance.

pose

Type: geometry_msgs::msg::PoseStamped Default: N/A

Manually specified pose to be used alternatively to current robot pose.

angular_distance_weight

Type: double Default: 0.0

Weight of angular distance relative to positional distance when finding which path pose is closest to robot. Not applicable on paths without orientations assigned.

max_robot_pose_search_dist

Type: double Default: numeric_limits<double>::infinity()

Maximum forward integrated distance along the path (starting from the last detected pose) to bound the search for the closest pose to the robot. When set to infinity (default), whole path is searched every time.

Output Ports

output_path

Type: nav_msgs::msg::Path Default: N/A

The resulting truncated path.

Example

<TruncatePathLocal input_path="{path}" output_path="{path_local}"
                   distance_forward="3.5" distance_backward="2.0"/>