ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

URDF using mimic joints and conversion to OpenRAVE format

asked 2012-08-08 12:47:52 -0600

How is the current state of support for the "mimic" tag for joints in URDF files? On electric, it appears that I can set the tags, but they seem to be ignored by the joint state publisher (and gazebo, from looking at Q/A discussions from the past). Are they used by any ROS tools at all?

What I'm most interested in at the moment is converting the urdf with mimic tags to the OpenRAVE COLLADA format (to generate ikfast in the end). The mimic tags seem to get lost in the conversion process, however. There seems to be code for the conversion in collada_urdf, so is this a bug?

Example portion of the URDF file:

  <joint name="joint_j1" type="revolute">
    <parent link="connectorj01"/>
    <child link="link1"/>
    <origin xyz="0 0.0933 0.0302" rpy="${M_PI_H} 0 ${3*M_PI_H}" />
    <axis xyz="0 0 1" />        
    <limit  lower="-1.5708" upper="1.5708" effort="10.0" velocity="1.5708" />
    <dynamics damping="1.0" friction="1.0"/>            
  </joint>      

  <joint name="joint_j1m" type="revolute">
    <parent link="link1"/>
    <child link="connectorj2"/>
    <origin xyz="0.253 0.003 0" rpy="0 0 0" />
    <axis xyz="0 0 1" />
    <limit  lower="-1.5708" upper="1.5708" effort="10.0" velocity="1.5708" />
    <mimic joint="joint_j1" multiplier="-1" offset="0"/> 
    <dynamics damping="1.0" friction="1.0"/>
  </joint>

The OpenRAVE COLLADA model generated from this urdf does not contain any mimic tags (and manually adding them doesn't trivially work either, but that's probably more a topic for the OpenRAVE mailing list)

I'm aware of previous discussions like this or this, but those do not help with the mentioned problems.

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
0

answered 2012-08-10 11:17:14 -0600

lauras gravatar image

I'm on the same project as Stefan, but I have far less experience with ROS and OpenRAVE. From Rosen's response, I now know that the COLLADA model that was generated does in fact include the mimic tags properly, and when I run

openrave-robot.py newarmdae.dae --info joints

I get the same output that Rosen's second response displays. 5 DOF arm, one fixed joint, two mimic joints.

IKfast apparently doesn't support mimic joints. I unfortunately do not have experience generating inverse kinematics with anything besides IKfast, and I'm not sure what other methods there are to choose from. Here are the steps I am using to generate IK after I generate the COLLADA model and create the OpenRAVE scene description; would anybody tell me what I need to change or what different steps I need to follow to generate IK with the mimic tags included?

roscd openrave/bin

export PYTHONPATH=$PYTHONPATH:`./openrave-config --python-dir`

./openrave.py --database inversekinematics --robot=/home/myusername/rosext/.../urdf/newarm.xml --iktype=TranslationDirection5D
edit flag offensive delete link more
1

answered 2012-08-09 06:09:03 -0600

if you execute this on your robot

openrave-robot.py newarmdae.dae --info joints

you should get

name           joint_index dof_index parent_link   child_link    mimic   
-------------------------------------------------------------------------
joint_j0       0           0         arm_base_link connectorj01          
joint_j1       1           1         connectorj01  link1                 
joint_j2       2           2         connectorj2   link2                 
joint_j3       3           3         connectorj3   connectorj4           
joint_j4       4           4         connectorj4   endeffector           
arm_base_joint -1          -1        base          arm_base_link         
joint_j1m      -1          -1        link1         connectorj2   joint_j1
joint_j2m      -1          -1        link2         connectorj3   joint_j2
-------------------------------------------------------------------------
name           joint_index dof_index parent_link   child_link    mimic

which shows that your robot has 5 DOF, 1 static joint (arm_base_joint), and 2 mimic joints

so the file is read correctly. however you should note that ikfast does not support solving IK with mimic joints in the arm chain.

edit flag offensive delete link more

Comments

Oh, so ikfast was the problem! I've unfortunately never generated OpenRAVE IK with anything other than ikfast... what is the best way to do this? Can you recommend any tutorials? Thank you!

lauras gravatar image lauras  ( 2012-08-09 06:29:44 -0600 )edit
1

answered 2012-08-08 20:36:59 -0600

please send the generated collada format. i would like to check what was actually generated. last time i exported the pr2, the mimic joints were exported as well...

edit flag offensive delete link more

Comments

Hi! I'm on the same project as Stefan, though I have far less ROS and OpenRAVE experience. I was going to post a response with the code for the .dae file, but it's over 1400 lines long. Should I go on and post the whole thing, or would any specific section be enough?

lauras gravatar image lauras  ( 2012-08-09 02:10:16 -0600 )edit

if you cannot zip it and attach the file, please send it to rosen.diankov_at_gmail

Rosen Diankov gravatar image Rosen Diankov  ( 2012-08-09 02:22:02 -0600 )edit

Just sent it. Thank you for looking into this!

lauras gravatar image lauras  ( 2012-08-09 02:36:35 -0600 )edit

thanks, i just opened the file you sent and the mimic joints were there.... what version of openrave are you using? 0.6.x or later versions should all work..

Rosen Diankov gravatar image Rosen Diankov  ( 2012-08-09 02:52:47 -0600 )edit

I'm using version 0.6.3. As the mechanical design of the arm is 5DOF, I have been been using --iktype=TranslationDirection5D, but that would mean that the mimic joints do not count as DOF in software. Is that actually the way it works, or was I mistaken?

lauras gravatar image lauras  ( 2012-08-09 05:58:41 -0600 )edit
0

answered 2012-08-09 10:23:46 -0600

Jim Rothrock gravatar image

Are they used by any ROS tools at all?

Here's one:

The mimic tag is used by the gazebo_ros_actuator_array Gazebo plug-in (http://www.ros.org/wiki/actuator_array_gazebo_plugin), which allows one to control joint positions by sending JointState messages to the "command" topic.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2012-08-08 12:47:52 -0600

Seen: 2,421 times

Last updated: Aug 10 '12