Drear ROS users,
I have a model of a robot arm (KUKA youBot) running in Gazebo. In my cpp program, which generates messages for the Joints of the model, I also need to somehow read and store into a variable the current positions of the Joints.
As far as I know, the corresponding messages are published under the topic named "joint_states". So, when I type in a separate Terminal Window "rostopic echo joint_states", I get all the names of the joints together with corresponding positions, velocities, etc.,constantly published with some high freq. (+ from the youbot Documentation (Locomotec) it is known, that "the arm periodically publish JointState messages for position and velocities of the arm joints").
So, how can I subscribe for this topic "joint_states", read out and store the positions of the arm joints?
Hope for your help!
2 dornhege: Please, if possible, explain in some more detail, what do you mean by "just use sensor_msgs::JointState"? Please give a short example on how to, e.g., add 0.03 to all current positions of the Joints, which have currently been read out by "just using sensor_msgs::JointState".. You will help me so much!.. - ASMIK2011ROS (13 mins ago)
Originally posted by ASMIK2011ROS on ROS Answers with karma: 62 on 2011-06-05
Post score: -1