Class RouteServer
Defined in File route_server.hpp
Inheritance Relationships
Base Type
public nav2_util::LifecycleNode
Class Documentation
An action server implements a Navigation Route-Graph planner to compliment free-space planning in the Planner Server.
Public Types
Public Functions
A constructor for nav2_route::RouteServer.
- Parameters:
options – Additional options to control creation of the node.
A destructor for nav2_route::RouteServer.
Protected Functions
Configure member variables and initializes planner.
- Parameters:
state – Reference to LifeCycle node state
- Returns:
SUCCESS or FAILURE
Activate member variables.
- Parameters:
state – Reference to LifeCycle node state
- Returns:
SUCCESS or FAILURE
Deactivate member variables.
- Parameters:
state – Reference to LifeCycle node state
- Returns:
SUCCESS or FAILURE
Reset member variables.
- Parameters:
state – Reference to LifeCycle node state
- Returns:
SUCCESS or FAILURE
Called when in shutdown state.
- Parameters:
state – Reference to LifeCycle node state
- Returns:
SUCCESS or FAILURE
Main route action server callbacks for computing and tracking a route.
Compute a route to the goal, incorporating rerouting information.
This method combines finding the starting and ending nodes with the route planner to determine the relevant node locations and compute the route. The provided ReroutingState can specify:
an updated starting node ID when tracking a previous route,
an overridden starting pose for rerouting,
optional constraints such as blocked elements to avoid (if provided).
This allows progress to continue smoothly when re-planning or recovering from partial execution of a previous route.
- Parameters:
goal – The request goal information.
rerouting_info – State describing updated start and rerouting context.
- Returns:
A route from the selected start node to the goal.
Compute a route to the goal.
- Parameters:
goal – The request goal information.
- Returns:
A route from the selected start node to the goal.
Main processing called by both action server callbacks to centralize the great deal of shared code between them.
Find the planning duration of the request and log warnings.
- Parameters:
start_time – Start of planning time
- Returns:
Duration of planning time
Find the routing request is valid (action server OK and not cancelled)
- Parameters:
action_server – Actions server to check
- Returns:
if the request is valid
Populate result for compute route action.
- Parameters:
result – Result to populate
route – Route to use to populate result
path – Path to use to populate result
planning_duration – Time to create a valid route
Populate result for compute and track route action.
- Parameters:
result – Result to populate
route – Route to use to populate result
path – Path to use to populate result
planning_duration – Time to create a valid route
The service callback to set a new route graph.
- Parameters:
request_header – to the service
request – to the service
response – from the service
Log exception warnings, templated by action message type.
- Parameters:
goal – Goal that failed
exception – Exception message
Protected Attributes