Ask Your Question

ROS urdf for Moveit!

asked 2015-05-25 10:18:03 -0600

TkrA gravatar image

updated 2015-05-29 04:13:53 -0600

Hi there!

I am currently working on a project, i am using servo motors to build a robotic arm. The arm is aligned vertically, the gripper points to the sky. In the joint description i wrote (urdf):

<limit effort="1.0" lower="0" upper="1.88" velocity="0.5"/>

meaning the joint state publisher will publish a state in the interval 0-1.88 radian (=120 grades). so my servos are moving 120 grades, 60 grades in each direction and are set to the center. When i start ROS Moveit! it publishes 0, for the initial positions, while i need 60 grades. Any ideas how can i fix this? How can i configure the urdf to start publishing positions in the center of the domain, causing a right move of my robot arm?

Thanks, TkrA

edit retag flag offensive close merge delete



Just a comment, but your issue isn't only with MoveIt obviously: anything that uses urdf (and the joint definitions in yours) is going to assume that 0 rad is your robot's zero-position.

gvdhoorn gravatar image gvdhoorn  ( 2015-05-26 02:16:28 -0600 )edit

Yes, i thought there are some settings i can make in the urdf file, to define the correct zero-position. Until now i could't find anything. Thanks!

TkrA gravatar image TkrA  ( 2015-05-27 06:19:41 -0600 )edit

You might be able to hack this together with a mimic joint that has an offset.

dornhege gravatar image dornhege  ( 2015-05-27 08:16:46 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-05-29 12:53:44 -0600

TkrA gravatar image

I finally found the answer: reading the code joint_state_publisher

minval = float(limit.getAttribute('lower'))
maxval = float(limit.getAttribute('upper'))


if minval > 0 or maxval < 0:
zeroval = (maxval + minval)/2

meaning if i wrote in the urdf

<limit effort="1.0" lower="0.001" upper="1.88" velocity="0.5"/>

the robot's zero postition=zeroval (middle)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2015-05-25 10:18:03 -0600

Seen: 718 times

Last updated: May 29 '15