subscribing to data from gazebo plugin
hello,i would like to subscribe the hight information and the orientation information of the plugin,that is included within the urdf-file. here the included part :
<controller:gazebo_ros_p3d name="quadro_groundtruth_sim" plugin="libgazebo_ros_p3d.so">
<alwaysOn>true</alwaysOn>
<updateRate>100.0</updateRate>
<bodyName>imu_link</bodyName>
<topicName>ground_truth_pose</topicName>
<gaussianNoise>0.0</gaussianNoise>
<frameName>map</frameName>
<interface:position name="my_box_p3d_position_iface" />
</controller:gazebo_ros_p3d>
how can i subscribe this hight information and the orientation information within a node? i tried following.But i don't know how to proceed.
#include "ros/ros.h"
#include "std_msgs/String.h"
#include "gazebo_ros_p3d.h" // is that the header i have to include???
void chatterCallback(const std_msgs::String::ConstPtr& msg)
{
ROS_INFO("I heard: [%s]", msg->data.c_str());
}
int main(int argc, char **argv)
{
ros::init(argc, argv, "listener");
ros::NodeHandle n;
ros::Subscriber sub = n.subscribe("ground_truth_pose", 1000, chatterCallback);
ros::spin();
return 0;
}
But where is my mistake? thanks,regards