Description

Publishes a ChLidarSensor as either sensor_msgs/msg/PointCloud2 (xyzi point cloud, the default) or sensor_msgs/msg/LaserScan (a single ring of ranges + intensities).

PointCloud2 requires a ChFilterXYZIAccess filter; LaserScan requires a ChFilterDIAccess filter.

#include <ChROSLidarHandler.h>

Inherits chrono::ros::ChROSHandler.

Public Member Functions

 ChROSLidarHandler (std::shared_ptr< chrono::sensor::ChLidarSensor > lidar, const std::string &topic_name, ChROSLidarHandlerMessageType msg_type=ChROSLidarHandlerMessageType::POINT_CLOUD2)
 Tick at the sensor's own update rate.
 
 ChROSLidarHandler (double update_rate, std::shared_ptr< chrono::sensor::ChLidarSensor > lidar, const std::string &topic_name, ChROSLidarHandlerMessageType msg_type=ChROSLidarHandlerMessageType::POINT_CLOUD2)
 Tick at an explicit rate.
 
virtual bool Initialize (ChROSBridge &bridge) override
 Creates the PointCloud2 or LaserScan publisher per the configured message type.
 

Protected Member Functions

virtual void Tick (double time) override
 Publishes the latest scan (skipped while no subscriber is connected).
 

The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono_ros/handlers/sensor/ChROSLidarHandler.h
  • /builds/uwsbel/chrono/src/chrono_ros/handlers/sensor/ChROSLidarHandler.cpp