Home | Tutorials | Wiki | Issues
Ask Your Question
0

How to get the joint position value from model?

asked 2019-07-31 07:38:26 -0500

gary gravatar image

Hi,

I create a robot has an arm and, use python(joint position controller) to control it. Now I want to get the current joint position value. Is there any plugin function could use?

Thanks!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2019-08-01 02:34:27 -0500

kumpakri gravatar image

updated 2019-08-01 02:34:49 -0500

You can use the function Position() in your gazebo-ROS model plugin.

Use as jointPtr->Position(0)

edit flag offensive delete link more

Comments

Is python usable?

gary gravatar imagegary ( 2019-08-19 01:35:02 -0500 )edit

@gary No, Gazebo does not provide an API for Python.

kumpakri gravatar imagekumpakri ( 2019-08-19 04:40:02 -0500 )edit
0

answered 2019-08-01 09:46:08 -0500

bhej gravatar image

You can use a joint_state_publisher

<plugin name="joint_state_publisher" filename="libgazebo_ros_joint_state_publisher.so">
   <jointName>your_joint</jointName>
   <updateRate>50.0</updateRate>
   <alwaysOn>true</alwaysOn>
</plugin>
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-07-31 07:38:26 -0500

Seen: 58 times

Last updated: Aug 01