ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

I strongly suggest you take a in-depth look at the beginner tutorials, especially Understanding ROS Topics and Writing a Simple Publisher and Subscriber (C++) ones.

I can spot at least two mistakes:

  • The subscriber callback has to based on the correct type (not std_msgs:String but nav_msgs/Odometry)
  • You have to include the corresponding message header, not gazebo_ros_p3d