ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Hi Metal!
The error message
`const struct sensor_msgs::PointCloud2_<std::allocator<void> >’ has no member named ‘points’
The variable input has type sensor_msgs::PointCloud2, you can see its definition here.
You can use input->data or transform input to a pcl::PointCloud<pcl::pointxyz> which is somewhat easier to use.
You can do it like this
pcl::PointCloud<pcl::PointXYZ> input_;
pcl::fromROSMsg(*input, input_);
I hope this is helpful for you. Martin.
2 | I forgot several words xD |
Hi Metal!
The error message
`const struct sensor_msgs::PointCloud2_<std::allocator<void> >’ has no member named ‘points’
The is telling the truth, the variable input has type sensor_msgs::PointCloud2, you can see its definition here.
You can use input->data or transform input to a pcl::PointCloud<pcl::pointxyz> which is somewhat easier to use.
You can do it like this
pcl::PointCloud<pcl::PointXYZ> input_;
pcl::fromROSMsg(*input, input_);
I hope this is helpful for you. Martin.
3 | No.3 Revision |
Hi Metal!
The error message
`const struct sensor_msgs::PointCloud2_<std::allocator<void> >’ has no member named ‘points’
is telling the truth, the variable input has type sensor_msgs::PointCloud2, sensor_msgs::PointCloud2 and has no member called points, you can see its definition here.
You can use input->data or transform input to a pcl::PointCloud<pcl::pointxyz> which is somewhat easier to use.
You can do it like this
pcl::PointCloud<pcl::PointXYZ> input_;
pcl::fromROSMsg(*input, input_);
I hope this is helpful for you. Martin.