what is gazebo_msgs/ModelStates dependencies? [closed]

asked 2015-05-04 10:38:45 -0500

Zargol gravatar image

updated 2015-05-04 10:44:07 -0500

I tried to use gazebo_msgs::ModelStates but it does not compile. When I use gazebo_msgs::ModelState I will get the error below:

[ERROR] [1430752035.526287969, 184.707000000]: Client [/listener] wants topic /gazebo/model_states to have datatype/md5sum [gazebo_msgs/ModelState/9330fd35f2fcd82d457e54bd54e10593], but our version has [gazebo_msgs/ModelStates/48c080191eb15c41858319b4d8a609c2]. Dropping connection.

Here is my code, what should I include for using gazebo_msgs/ModelStates?

  #include "ros/ros.h"
  #include "std_msgs/String.h"
  #include "gazebo_msgs/ModelStates.h"

  void chatterCallback(const gazebo_msgs::ModelStates::ConstPtr& msg)
     ROS_INFO("I heard: ");

int main(int argc, char **argv)
  ros::init(argc, argv, "listener");
  ros::NodeHandle n;
  ros::Subscriber sub = n.subscribe("/gazebo/model_states", 1000, chatterCallback);
edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by Zargol
close date 2015-05-04 10:43:23.036142



Of which question is this a duplicate?

Neil Traft gravatar image Neil Traft  ( 2015-08-11 17:24:54 -0500 )edit

I missed a "s" at the end of model_state->model_states!!! http://answers.ros.org/question/47486...

Zargol gravatar image Zargol  ( 2015-08-12 05:08:21 -0500 )edit
Zargol gravatar image Zargol  ( 2015-08-12 05:11:31 -0500 )edit