Gazebo model_states
Hi everyone,
My question is very simple: What I'm doing wrong????
I did a easy subscriptor:
#include "ros/ros.h"
#include "gazebo_msgs/ModelState.h"
void chatterCallback(const gazebo_msgs::ModelState::ConstPtr& msg)
{
int i = 0;
ROS_INFO("I heard: %d", i);
}
int main(int argc, char **argv)
{
ros::init(argc, argv, "listener");
ros::NodeHandle n;
ros::Subscriber sub = n.subscribe("gazebo/model_states",1000, chatterCallback);
ROS_INFO("IN ");
ros::Duration(1,0).sleep();
ROS_INFO("OUT ");
ros::spin();
return 0;
}
And the resoult is:
./bin/listener
[ INFO] [1352123368.021140417]: IN
[ INFO] [1352123369.264976085, 18.667000000]: OUT
(.. nothing ..)
While I do: (I obtain a lot of topic)
rostopic echo /gazebo/model_states
Regars.