RUSH
Reusable Utilities in Single Headers is a collection of header-only utilities for C++
Loading...
Searching...
No Matches
rush::roscv::Publisher Class Reference

This class extends ros::Publisher to directly publish OpenCV matrices. More...

#include <ros-cv-bridge.hpp>

Inheritance diagram for rush::roscv::Publisher:

Public Member Functions

Publisheroperator= (const ros::Publisher &x)
 
void publish (const cv::Mat &img, const ros::Time &time=ros::Time::now(), const std::string &frame_id="")
 Publishes an OpenCV Mat as a ROS Image message.
 

Detailed Description

This class extends ros::Publisher to directly publish OpenCV matrices.

Member Function Documentation

◆ publish()

void rush::roscv::Publisher::publish ( const cv::Mat & img,
const ros::Time & time = ros::Time::now(),
const std::string & frame_id = "" )
inline

Publishes an OpenCV Mat as a ROS Image message.

Parameters
imgThe input OpenCV Mat to be published.
timeThe ROS time to be associated with the message.
frame_idThe frame ID for the ROS message.

The documentation for this class was generated from the following file: