Class DockingServer
Defined in File docking_server.hpp
Inheritance Relationships
Base Type
public nav2_util::LifecycleNode
Class Documentation
An action server which implements charger docking node for AMRs.
Public Types
Public Functions
A constructor for opennav_docking::DockingServer.
- Parameters:
options – Additional options to control creation of the node.
A destructor for opennav_docking::DockingServer.
Called at the conclusion of docking actions. Saves relevant docking data for later undocking action.
Publish feedback from a docking action.
- Parameters:
state – Current state - should be one of those defined in message.
Generate a dock from action goal.
- Parameters:
goal – Action goal
- Returns:
Raw dock pointer to manage;
Do initial perception, up to a timeout.
- Parameters:
dock – Dock instance, gets queried for refined pose.
dock_pose – Initial dock pose, will be refined by perception.
Use control law and dock perception to approach the charge dock.
- Parameters:
dock – Dock instance, gets queried for refined pose and docked state.
dock_pose – Initial dock pose, will be refined by perception.
- Returns:
True if dock successfully approached, False if cancelled. For any internal error, will throw.
Wait for charging to begin.
- Parameters:
dock – Dock instance, used to query isCharging().
- Returns:
True if charging successfully started within alloted time.
Reset the robot for another approach by controlling back to staging pose.
- Parameters:
staging_pose – The target pose that will reset for another approach.
- Returns:
True if reset is successful.
Run a single iteration of the control loop to approach a pose.
- Parameters:
cmd – The return command.
pose – The pose to command towards.
linear_tolerance – Pose is reached when linear distance is within this tolerance.
angular_tolerance – Pose is reached when angular distance is within this tolerance.
is_docking – If true, the robot is docking. If false, the robot is undocking.
backward – If true, the robot will drive backwards.
- Returns:
True if pose is reached.
Get the robot pose (aka base_frame pose) in another frame.
- Parameters:
frame – The frame_id to get the robot pose in.
- Returns:
Computed robot pose, throws TF2 error if failure.
Gets a preempted goal if immediately requested.
- Parameters:
Goal – goal to check or replace if required with preemption
action_server – Action server to check for preemptions on
- Returns:
SUCCESS or FAILURE
Checks and logs warning if action canceled.
- Parameters:
action_server – Action server to check for cancellation on
name – Name of action to put in warning message
- Returns:
True if action has been cancelled
Checks and logs warning if action preempted.
- Parameters:
action_server – Action server to check for preemption on
name – Name of action to put in warning message
- Returns:
True if action has been preempted
Configure member variables.
- 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
Publish zero velocity at terminal condition.
Protected Functions
Main action callback method to complete docking request.
Main action callback method to complete undocking request.
Callback executed when a parameter change is detected.
- Parameters:
event – ParameterEvent message
Protected Attributes