Overview
Thehazard_detection_node processes depth camera point cloud data to detect hazards such as boulders, craters, and other obstacles in the robot’s environment. It uses Open3D for point cloud processing and implements a plane segmentation algorithm to identify obstacles that deviate from the ground plane.
The node performs the following processing pipeline:
- Filters invalid points (NaN and infinite values)
- Downsamples the point cloud using voxel filtering
- Removes statistical outliers
- Segments the ground plane using RANSAC
- Publishes remaining points as detected obstacles
Parameters
This node does not declare any configurable ROS parameters. Processing parameters are hardcoded:- Voxel downsampling size: 0.05 m
- Statistical outlier removal: 20 neighbors, 2.0 std deviation ratio
- Plane segmentation distance threshold: 0.05 m
- RANSAC iterations: 1000
Published Topics
/hazards/front
Type:sensor_msgs/msg/PointCloud2
Description: Filtered point cloud containing detected obstacles after ground plane removal. Points are published in the same frame as the input camera data. This topic can be consumed by costmap layers or visualization tools.
Subscribed Topics
/camera_front/points
Type:sensor_msgs/msg/PointCloud2
Description: Raw point cloud data from the front-facing depth camera. Expected to contain XYZ fields. The node filters out NaN and infinite values during processing.