ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Just out of my head, it's been a couple of months: I stumbled upon something similar and it wasn't because of the custom type, but of how I used the publisher. Check if you * pass the correct object * template the publisher correctly * and similar stuff...

Hope this helps!

Just out of my head, it's been a couple of months: I stumbled upon something similar and it wasn't because of the custom type, but of how I used the publisher. Check if you * you

  • pass the correct object * object
  • template the publisher correctly * correctly
  • and similar stuff...

Hope this helps!


EDIT: Just looked it up. Here's the relevant parts of my code copied together:

ros::Publisher myPublisher; sensor_msgs::PointCloud2::Ptr cloudPtr; <fill the="" cloud=""> myPublisher = n.advertise<sensor_msgs::pointcloud2>("topic/name", 10); myPublisher.publish(cloudPtr);

However, I directly fill the sensor_msgs::PointCloud2 datatype of ROS instead of using the PCL one.

Just out of my head, it's been a couple of months: I stumbled upon something similar and it wasn't because of the custom type, but of how I used the publisher. Check if you

  • pass the correct object
  • template the publisher correctly
  • and similar stuff...

Hope this helps!


EDIT: Just looked it up. Here's the relevant parts of my code copied together:

ros::Publisher myPublisher;
sensor_msgs::PointCloud2::Ptr cloudPtr;
<fill the="" cloud="">
the cloud>
myPublisher = n.advertise<sensor_msgs::pointcloud2>("topic/name", n.advertise<sensor_msgs::PointCloud2>("topic/name", 10);
myPublisher.publish(cloudPtr);

myPublisher.publish(cloudPtr);

However, I directly fill the sensor_msgs::PointCloud2 datatype of ROS instead of using the PCL one.