Class ControllerMethodBase
Defined in File ControllerMethodBase.hpp
Inheritance Relationships
Base Type
public easynav::MethodBase(Class MethodBase)
Class Documentation
Abstract base class for control methods in Easy Navigation.
This class defines the interface for control algorithm implementations. Derived classes must implement the control logic and provide access to the computed command.
Public Functions
Default constructor.
Virtual destructor.
Initialize the controller method.
Creates required publishers, reads configuration parameters and forwards initialization to MethodBase.
- Parameters:
parent_node – Reference to the parent lifecycle node.
plugin_name – Plugin identifier used for namespacing parameters.
tf_prefix – Optional TF prefix for frame resolution.
- Returns:
An empty value on success, or an error message otherwise.
Helper to run the real-time control method if appropriate.
Invokes update_rt() only if the method is due or forced by trigger.
- Parameters:
nav_state – The current state of the navigation system.
trigger – Force execution regardless of timing.
- Returns:
True if update_rt() was called, false otherwise.
Protected Functions
Run the control method and update the control command.
Called by the system to compute a new control command using the current navigation state.
- Parameters:
nav_state – The current state of the navigation system.
Detect whether an imminent collision is present.
The check uses the robot velocity, braking distance, safety margins and a filtered point cloud in the motion frame. It returns true if any point lies within the collision prediction region.
- Parameters:
nav_state – Current navigation state containing velocity and perceptions.
- Returns:
True if a collision is predicted, false otherwise.
Callback executed when a collision is detected.
The default implementation stops the robot by setting a zero Twist.
- Parameters:
nav_state – Reference to the navigation state to modify.
Publish visualization markers for the collision checking region.
Publishes a CUBE representing the bounding box [min, max] used for point cloud filtering, and a SPHERE_LIST containing the filtered points used during the collision evaluation.
- Parameters:
min – Lower bound of the collision check region [x, y, z].
max – Upper bound of the collision check region [x, y, z].
cloud – Filtered point cloud used during collision evaluation.
imminent_collision – Whether the region is currently considered in collision.
Protected Attributes
Enable or disable visualization markers for debugging.
Enable or disable collision checking.
Robot radius used for safety calculations (m).
Vertical extent of the robot used for filtering (m).
Minimum Z considered when filtering point clouds (m).
Maximum braking deceleration (m/s²).
Safety margin added to the braking distance (m).
Leaf size used to downsample point clouds (m).
Frame in which motion and collision checks are evaluated.
Publisher for collision visualization markers.