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

This is more a C++ issue: the error is telling you that the variable msg is not a pointer. And it isn't: it's a reference to a JointState object.

This is more a C++ issue: the error is telling you that the variable msg is not a pointer. And it isn't: it's a reference to a JointState object.

Edit: so replace the -> with a . (dot).

This is more a C++ issue: the error is telling you that the variable msg is not a pointer. And it isn't: it's a reference to a JointState object.

Edit: so replace the -> with a . (dot).

Note: you can't directly pass the position member to ROS_INFO(..) though. Unlike Python, C++ doesn't have auto-conversions to strings.