How to support additional sdf elements (<ode>,
<bullet>, <bounce>, etc) in urdf file using the <gazebo> tag
Hey there,
I would like to use ROS and urdf to simulate my robot. (I do not want to use any sdf files). However I have a given sdf file and now try to convert it to urdf. Now my problem is that in the sdf file there are multiple physics engines used ( ode and bullet). Does anyone know how to convert that to urdf? Cause according to this http://gazebosim.org/tutorials/?tut=r... Tutorial (under <gazebo> Elements For Links) There is only a very limited table of what is possible to add in gazebo references.</gazebo>
This is a snippet of my sdf file I would like to convert to urdf:
<collision name='body_collision'>
<laser_retro>0</laser_retro>
<max_contacts>10</max_contacts>
<pose frame=''>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<uri>model://ballbot/meshs/body.stl</uri>
<scale>0.001 0.001 0.001</scale>
</mesh>
</geometry>
<surface>
<friction>
<ode>
<mu>0</mu>
<mu2>0</mu2>
<fdir1>0 0 0</fdir1>
<slip1>0</slip1>
<slip2>0</slip2>
</ode>
<torsional>
<coefficient>1</coefficient>
<patch_radius>0</patch_radius>
<surface_radius>0</surface_radius>
<use_patch_radius>1</use_patch_radius>
<ode>
<slip>0</slip>
</ode>
</torsional>
</friction>
<bounce>
<restitution_coefficient>0</restitution_coefficient>
<threshold>1e+06</threshold>
</bounce>
<contact>
<collide_without_contact>0</collide_without_contact>
<collide_without_contact_bitmask>1</collide_without_contact_bitmask>
<collide_bitmask>1</collide_bitmask>
<ode>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
<max_vel>0.01</max_vel>
<min_depth>0</min_depth>
</ode>
<bullet>
<split_impulse>1</split_impulse>
<split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
</bullet>
</contact>
</surface>
</collision>
I currently did it like this:
<gazebo reference="base_link">
<material>Gazebo/DarkGrey</material>
<gravity>1</gravity>
<maxVel>0.01</maxVel>
<minDepth>0</minDepth>
<mu1>0.0</mu1>
<mu2>0.0</mu2>
<fdir1>0 0 0</fdir1>
<kp>1e+13</kp>
<kd>1.0</kd>
<selfCollide>0</selfCollide>
<maxContacts>10</maxContacts>
<laserRetro>0</laserRetro>
</gazebo>
With josephcoombe hint I now did the following:test.urdf:
<?xml version="1.0"?>
<robot name ="myrobot" xmlns:xacro="http://ros.org/wiki/xacro">
<link name="wheel2_link">
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<mesh filename="package://....stl" scale="0.001 0.001 0.001" />
</geometry>
<cast_shadows>1</cast_shadows>
<transparency>0</transparency>
<material name="light_black" />
</visual>
<inertial>
<origin xyz="0.0 0.0 0.0" />
<mass value="0.275" />
<inertia ixx="0.00026602" ixy="0" ixz="0" iyy="0.00019582" iyz="0" izz="0.00029553" />
</inertial>
<collision>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<mesh filename="package://....stl" scale="0.001 0.001 0.001" />
</geometry>
</collision>
</link>
<gazebo reference="wheel2_link">
<maxVel>0.01</maxVel>
<minDepth>0</minDepth>
<mu1>0.2</mu1>
<mu2>0.0</mu2>
<fdir1>0 0 0</fdir1>
<kp>1e+13</kp>
<kd>1.0</kd>
<selfCollide>0</selfCollide>
<maxContacts>10</maxContacts>
<laserRetro>0</laserRetro>
</gazebo>
</robot>
My result test.sdf file:
<sdf version='1.6'>
<model name='myrobot'>
<link name='wheel2_link'>
<pose frame=''>0 0 0 0 -0 0</pose>
<inertial>
<pose frame=''>0 0 0 ...
Edited question title to better reflect content