41 double _f,
double t,
bool left)
52 info.distortion_model =
"plumb_bob";
95 pub = nh.
advertise<sensor_msgs::CameraInfo>(
"left/camera_info", 1);
100 pub = nh.
advertise<sensor_msgs::CameraInfo>(
"right/camera_info", 1);
114 const uint64_t freq = 1000000000ul;
118 info.header.stamp.sec = time / freq;
119 info.header.stamp.nsec = time - freq *
info.header.stamp.sec;
121 info.width =
static_cast<uint32_t
>(buffer->
getWidth(part));
122 info.height =
static_cast<uint32_t
>(buffer->
getHeight(part));
Interface for all publishers relating to images, point clouds or other stereo-camera data...
void publish(const boost::shared_ptr< M > &message) const
size_t getWidth(std::uint32_t part) const
bool used() override
Returns true if there are subscribers to the topic.
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
uint64_t getTimestampNS() const
uint32_t getNumSubscribers() const
sensor_msgs::CameraInfo info
size_t getHeight(std::uint32_t part) const
void publish(const rcg::Buffer *buffer, uint32_t part, uint64_t pixelformat) override
Offers a buffer for publication.
CameraInfoPublisher(ros::NodeHandle &nh, const std::string &frame_id_prefix, double f, double t, bool left)
Initialization of publisher.