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

Hi @LukeAI,

What you want is not sizeof that returns the size in bytes of the object but size function that returns the size of the vector. So in your case, since the points msgs instances are std vectors, it would be something like:

auto req_size = req.points.size();

Regards.