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

Looks like there are a few problems here:

  • The Point class is in the geometry_msgs namespace, so you should use the fully-namespaced class type: geometry_msgs::Point
  • ROS message types (such as point) only have default constructors, so you have to construct the object before you can fill in its fields.
  • You cannot have code outside of a function or class in C++ (as in your second try)

P.S. - for future questions please use the "preformatted text" button and paste your code and error messages directly into the question.