Description

Publishes a ChCameraSensor as sensor_msgs/msg/Image (rgba8).

The camera must carry a ChFilterRGBA8Access filter. The pixel buffer is moved to the message as one bulk blob (zero-copy into the codec); the extraction is skipped entirely when no ROS subscriber is connected.

#include <ChROSCameraHandler.h>

Inherits chrono::ros::ChROSHandler.

Public Member Functions

 ChROSCameraHandler (std::shared_ptr< chrono::sensor::ChCameraSensor > camera, const std::string &topic_name)
 Tick at the sensor's own update rate.
 
 ChROSCameraHandler (double update_rate, std::shared_ptr< chrono::sensor::ChCameraSensor > camera, const std::string &topic_name)
 Tick at an explicit rate.
 
virtual bool Initialize (ChROSBridge &bridge) override
 Creates the Image publisher and caches the image dimensions.
 

Protected Member Functions

virtual void Tick (double time) override
 Publishes the latest frame (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/ChROSCameraHandler.h
  • /builds/uwsbel/chrono/src/chrono_ros/handlers/sensor/ChROSCameraHandler.cpp