Skip to content

ComputeAndTrackRoute

Invokes the ComputeAndTrackRoute ROS 2 action server, which is implemented by the nav2_route module. The server address can be remapped using the server_name input port.

Input Ports

start

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

Start pose. Optional. Only used if not left empty. Takes in a blackboard variable, e.g. "{start}".

goal

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

Goal pose. Takes in a blackboard variable, e.g. "{goal}".

start_id

Type: unsigned int Default: N/A

Start node ID to use.

goal_id

Type: unsigned int Default: N/A

Goal node ID to use.

use_start

Type: bool Default: false

Whether to use the start or use TF to obtain the robot's start pose.

use_poses

Type: bool Default: false

Whether to use the start and goal poses or start and goal node IDs.

server_name

Type: string Default: N/A

Action server name. If not specified, compute_and_track_route is used.

server_timeout

Type: chrono::milliseconds Default: N/A

Action server timeout (ms). If not provided, uses the BT Navigator's default_server_timeout parameter value (20 ms by default).

Output Ports

execution_duration

Type: builtin_interfaces::msg::Duration Default: N/A

Time it took to compute the route.

last_node_id

Type: uint16 Default: N/A

ID of the previous node.

next_node_id

Type: uint16 Default: N/A

ID of the next node.

current_edge_id

Type: uint16 Default: N/A

ID of the current edge.

route

Type: nav2_msgs::msg::Route Default: N/A

List of RouteNodes to go from start to end.

path

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

Path created by ComputeAndTrackRoute node.

rerouted

Type: bool Default: N/A

Whether the plan has rerouted.

error_code_id

Type: uint16 Default: N/A

Compute route error code. See ComputeAndTrackRoute action message for the enumerated set of error codes.

error_msg

Type: string Default: N/A

Compute route error message. See ComputeAndTrackRoute action message for the enumerated set of error codes.

Example

<ComputeAndTrackRoute start="{start}" goal="{goal}" use_poses="{true}" use_start="{true}"
                      server_name="ComputeAndTrackRoute" server_timeout="10"
                      error_code_id="{compute_route_error_code}" error_msg="{compute_route_error_msg}"/>