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

Revision history [back]

click to hide/show revision 1
initial version

Thank you for the answer. However, even if I do the following:

sensor_msgs::PointCloud2 test_message; object_detection_module::clusterVectorConstPtr msg1; msg1->clusterClouds.push_back(test_message);

I am receiving the compilation error:

error: passing ‘const _clusterClouds_type {aka const std::vector<sensor_msgs::pointcloud2_<std::allocator<void> >, std::allocator<sensor_msgs::pointcloud2_<std::allocator<void> > > >}’ as ‘this’ argument of ‘void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = sensor_msgs::PointCloud2_<std::allocator<void> >, _Alloc = std::allocator<sensor_msgs::pointcloud2_<std::allocator<void> > >, std::vector<_Tp, _Alloc>::value_type = sensor_msgs::PointCloud2_<std::allocator<void> >]’ discards qualifiers [-fpermissive] make[2]: * [object_detection_module/CMakeFiles/object_detection_main.dir/src/object_detection_class.cpp.o] Error 1 make[1]: [object_detection_module/CMakeFiles/object_detection_main.dir/all] Error 2 make: ** [all] Error 2 Invoking "make" failed

Thx in advance,

Akis