Ask Your Question
0

Convert sdf file to urdf.xacro

asked 2017-11-03 08:59:08 -0600

Markus gravatar image

updated 2017-11-03 09:00:28 -0600

Hey there I actually have a sdf file given and would like to convert it to an urdf.xacro file. As I have not found any converter for that I would like to do that by hand. Now what I currently have is e.g a sdf file which has a content like this:

    <joint name='body_link_JOINT_0' type='revolute'>
  <parent>body_link</parent>
  <child>wheel1_link</child>
  <pose frame=''>0 0 0 0 -0 0</pose>
  <axis>
    <xyz>0 1 0</xyz>
    <use_parent_model_frame>0</use_parent_model_frame>
    <limit>
      <lower>-1.79769e+308</lower>
      <upper>1.79769e+308</upper>
      <effort>-1</effort>
      <velocity>-1</velocity>
    </limit>
    <dynamics>
      <spring_reference>0</spring_reference>
      <spring_stiffness>0</spring_stiffness>
      <damping>0</damping>
      <friction>0</friction>
    </dynamics>
  </axis>
  <physics>
    <ode>
      <limit>
        <cfm>0</cfm>
        <erp>0.2</erp>
      </limit>
      <suspension>
        <cfm>0</cfm>
        <erp>0.2</erp>
      </suspension>
    </ode>
  </physics>
</joint>

My current urdf.xacro file looks like this:

    <joint name="wheel1_joint" type="revolute">
  <parent link="base_link" />
  <child link="wheel1_link" />
  <origin xyz="-0.1315 -0.0759 0.2817" rpy="0.9804 -0.3972 -1.5708" />
  <axis xyz="0 1 0" />
  <limit lower="-1.79769e+308" upper="1.79769e+308" effort="-1" velocity="-1" />
  <dynamics friction="0" />
</joint>

Unfortunately I do not know how to deal with the physics tag.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-11-10 22:09:24 -0600

clyde gravatar image

There's no physics tag defined in URDF. If you add the tag it will be safely ignored.

If you want to pass physics data to Gazebo for simulations you can add gazebo tags to your URDF files as mentioned here: http://gazebosim.org/tutorials/?tut=r...

edit flag offensive delete link more

Comments

Hey thanks for your response. I now added gazebo references. According to http://gazebosim.org/tutorials/?tut=r... under " <gazebo> Elements For Links" there is only a limited list which describes attributes I can set. However I do not know if I can use multiple physics engines there as well?!</gazebo>

Markus gravatar imageMarkus ( 2017-11-13 12:16:12 -0600 )edit

Not that I've found. You can try asking on the Gazebo forums: http://answers.gazebosim.org/questions/

clyde gravatar imageclyde ( 2017-11-13 12:26:31 -0600 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-11-03 08:59:08 -0600

Seen: 796 times

Last updated: Nov 10 '17