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

The way you have defined it, obstacles is a Points msg, not a vector of Points, and thus has only one member: points. You would access it with res.obstacles.points[0]. Since points is a vector, make sure you resize it first or push_back the element instead.

The way you have defined it, obstacles is a Points Points msg, not a vector of Points, Points, and thus has only one member: points. You would access it with res.obstacles.points[0]. res.obstacles.points[0]. Since points points is a vector, make sure you resize it first or push_back the element instead.