Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Gazebo & ROS Subscriber and Publisher C++

Hello all, I am new to ROS and I am trying to write a subscriber and publisher c++ code to talk with Gazebo. I want to get the states of each link and be able to publish to each link to control its joint angles.

I was successfully able to control my model in Gazebo via a rostopic pub command and am struggling to write a c++ code to do the same. Similarly, I have not been able to write any code to get the link states. I was able to get code working to subscribe to the /joint_states, but this does not reflect the link states in Gazebo.

Any help would be appreciated!

Ubuntu: 14.04 LTS ROS: Indigo Gazebo: 2.2.3