ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org |
![]() | 1 | initial version |
Keep in mind that setting msg->width and msg->height has no effect over msg->points. The problem is that you are trying to iterate over msg->points when it is still empty.
You can verify that actually, the inside of the for loop is never being executed and msg->points.size() will be 0. msg->width * msg->height will be equal to pc.points.size() and hence the assertion failure.
You should iterate over the correct variable. Probably pc.points
I might be wrong, but I hope this helps.
![]() | 2 | No.2 Revision |
Keep in mind that setting msg->width and msg->height has no effect over msg->points. The problem is that you are trying to iterate over msg->points when it is still empty.
You can verify that actually, the inside of the for for loop is never being executed and msg->points.size() will be 0. msg->width * msg->height will be equal to pc.points.size() and hence the assertion failure.
You should iterate over the correct variable. Probably pc.points
I might be wrong, but I hope this helps.