0
$\begingroup$

Rosanswers logo

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.


Originally posted by Stefan Kohlbrecher on ROS Answers with karma: 24361 on 2012-08-08

Post score: 1

$\endgroup$

3 Answers 3

0
$\begingroup$

Rosanswers logo

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

Originally posted by lauras with karma: 56 on 2012-08-10

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$
0
$\begingroup$

Rosanswers logo

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...


Originally posted by Rosen Diankov with karma: 516 on 2012-08-08

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by lauras on 2012-08-09:
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?

Comment by Rosen Diankov on 2012-08-09:
if you cannot zip it and attach the file, please send it to rosen.diankov_at_gmail

Comment by lauras on 2012-08-09:
Just sent it. Thank you for looking into this!

Comment by Rosen Diankov on 2012-08-09:
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..

Comment by lauras on 2012-08-09:
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?

$\endgroup$
0
$\begingroup$

Rosanswers logo

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.


Originally posted by Rosen Diankov with karma: 516 on 2012-08-09

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by lauras on 2012-08-09:
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!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.