ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
This really is a C++ question, you probably want to read up on how pointers work in C++. Your "cloud" variable is allocated on the stack and not via a pointer, so you cannot access it´s elements using the ->
operator. So everytime you access a member of cloud you have to use (for example)
cloud.points.size()
as opposed to
cloud->points.size()