ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
To publish an image, please allocate the shared pointer yourself. I.e.
#include <boost make_shared.hpp="">
sensor_msgs::ImagePtr image = boost::make_shared<sensor_msgs::image> (); image->field = something; // fill your fields. pub.publish (image);
Please prefer std::copy
over memcpy
. It has as efficient and behave properly on all C++ types unlike memcpy.
2 | No.2 Revision |
To publish an image, please allocate the shared pointer yourself. I.e.
#include Please prefer std::copy
over memcpy
. It has as efficient and behave properly on all C++ types unlike memcpy.