Robotics StackExchange | Archived questions

How to publish joint angle using plugins?

we know that gazebo already publish rostopics and rosservices which contains Joint position ,velocity and efforts.Also we can get joint angle using a model plugin . The question is how to publish it as a rostopic.I'v seen examples about publishing image data using plugin,after editing the plugin,they all have some tags in .world file between .
However i don't konw how to set my own,so is there some methods i can use or the whole thing is unnecessary?

Asked by wangshanren on 2016-04-20 10:45:00 UTC

Comments

I had a tough time understanding your question, do you mind trying to rephrase it a little? Are you just trying to make a gazebo plugin that publishes joint angles over a ROS topic?

Asked by pcdangio on 2016-04-21 09:46:15 UTC

Yes,but this morning i found the rosservice gazebo provided,In the response we can get the angle position,Thanks anyway!

Asked by wangshanren on 2016-04-21 22:47:45 UTC

Answers

Okay,the truth is in rosservice that gazebo published,using command below: get_jnt_state_client.call(get_joint_state_srv_msg); q1.push_back(get_joint_state_srv_msg.response.position[0]); Here,the position is the ANGLE !!!

Asked by wangshanren on 2016-04-20 20:34:59 UTC

Comments