44 #include <sensor_msgs/Image.h> 45 #include <sensor_msgs/PointCloud2.h> 56 cloud_cb (
const sensor_msgs::PointCloud2ConstPtr& cloud)
58 if (cloud->height <= 1)
60 ROS_ERROR(
"Input point cloud is not organized, ignoring!");
66 image_.header = cloud->header;
69 catch (std::runtime_error &e)
97 main (
int argc,
char **argv)
99 ros::init (argc, argv,
"convert_pointcloud_to_image");
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
void publish(const boost::shared_ptr< M > &message) const
ros::Publisher image_pub_
int main(int argc, char **argv)
std::string resolveName(const std::string &name, bool remap=true) const
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
void cloud_cb(const sensor_msgs::PointCloud2ConstPtr &cloud)
#define ROS_INFO_STREAM(args)
void toROSMsg(const sensor_msgs::PointCloud2 &cloud, sensor_msgs::Image &image)
#define ROS_ERROR_STREAM(args)
sensor_msgs::Image image_