Class CollisionDetector
Defined in File collision_detector_node.hpp
Inheritance Relationships
Base Type
public nav2_util::LifecycleNode
Class Documentation
Collision Monitor ROS2 node.
Public Functions
Constructor for the nav2_collision_monitor::CollisionDetector.
- Parameters:
options – Additional options to control creation of the node.
Destructor for the nav2_collision_monitor::CollisionDetector.
Protected Functions
: Initializes and obtains ROS-parameters, creates main subscribers and publishers, creates polygons and data sources objects
- Parameters:
state – Lifecycle Node’s state
- Returns:
Success or Failure
: Activates LifecyclePublishers, polygons and main processor, creates bond connection
- Parameters:
state – Lifecycle Node’s state
- Returns:
Success or Failure
: Deactivates LifecyclePublishers, polygons and main processor, destroys bond connection
- Parameters:
state – Lifecycle Node’s state
- Returns:
Success or Failure
: Resets all subscribers/publishers, polygons/data sources arrays
- Parameters:
state – Lifecycle Node’s state
- Returns:
Success or Failure
Called in shutdown state.
- Parameters:
state – Lifecycle Node’s state
- Returns:
Success or Failure
Supporting routine obtaining all ROS-parameters.
- Returns:
True if all parameters were obtained or false in failure case
Supporting routine creating and configuring all polygons.
- Parameters:
base_frame_id – Robot base frame ID
transform_tolerance – Transform tolerance
- Returns:
True if all polygons were configured successfully or false in failure case
Supporting routine creating and configuring all data sources.
- Parameters:
base_frame_id – Robot base frame ID
odom_frame_id – Odometry frame ID. Used as global frame to get source->base time interpolated transform.
transform_tolerance – Transform tolerance
source_timeout – Maximum time interval in which data is considered valid
base_shift_correction – Whether to correct source data towards to base frame movement, considering the difference between current time and latest source time
- Returns:
True if all sources were configured successfully or false in failure case
Main processing routine.
Polygons publishing routine. Made for visualization.
Protected Attributes
TF buffer.
TF listener.
Polygons array.
Data sources array.
collision monitor state publisher
Collision points marker publisher.
timer that runs actions
main loop frequency