0
$\begingroup$

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:

Screenshot

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.

$\endgroup$
2
  • $\begingroup$ Have you tried removing inertia and collision settings altogether? If it's just a visual then try it with only the visuals. $\endgroup$
    – Chuck
    Commented Jan 23, 2023 at 2:04
  • $\begingroup$ I tried it, and now the gazebo gui doesn't load any model. I anticipated that, as the inertial information are required according to this $\endgroup$ Commented Jan 23, 2023 at 9:23

1 Answer 1

0
$\begingroup$

To add a static link, you add the the kinematic property to your urdf:

<gazebo reference="base_link" >
  <!-- other properties you want to define for the base link -->
  <kinematic> true </kinematic>
</gazebo>

Here is a list of the properties of links. There isn't a static property. There is a kinematic property. I found this source that said the following:

A kinematic link (as opposed to a dynamic link) is not affected by external forces. It can influence other bodies in its vicinity, but it's not influenced by them.

And i tested it and it worked perfectly.

enter image description here

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