I want to simulate a RR robot in gazebo and I want to place the first link over a box. This box shouldn't be a part of the simulation, and is there only for visual effect.
How can I make a specific link/object static?
I created a fixed joint with a link named "world". Also, I tried adding a static tag.
However, it still included in the physics calculations, resulting in a weird behaviour. It spins on its own and it tilts, like this:
Relevant parts of the urdf:
<link name="world"/>
<joint name="world_joint" type="fixed">
<parent link="world"/>
<child link="base_link"/>
<origin rpy="0 0 0" xyz="0 0 ${base_height}"/>
</joint>
<link name="base_link">
<visual>
...
</visual>
<collision>
...
</collision>
<inertial>
<mass value="100" />
<inertia ixx="0.1" ixy="0.0" ixz="0.0"
iyy="0.1" iyz="0.0"
izz="0.1" />
<origin rpy="0 0 0" xyz="0 0 ${-base_height/2}"/>
</inertial>
</link>
<gazebo reference="base_link" >
<material> Gazebo/Blue </material>
<static>true</static>
</gazebo>
I made the inertia of the base_link greater
<inertia ixx="100" ixy="0.0" ixz="0.0" iyy="100" iyz="0.0" izz="100" />
and now the base doesn't tilt and the link doesn't rotate on its own. However, as I specified it as a static link, I anticipated that it shouldn't have that behaviour no matter its inertia.
Edit After some more searching, i found out that you cannot specify a link as static (sdf documentation). However, i still expect that the fixed joint with the world frame would keep the box in place.
I also changed some parameters of the physics engine, namely erp and cfm (you can find them here), but the weird behaviour continued.