Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Fixed urdf object in Gazebo

Hi,

I`m trying to get a fixed object in Gazebo, meaning it can not be moved by exerting forces on it.
The urdf looks like this:

<link name="world"/>

<joint name="pallet_joint" type="floating">
    <parent link="world"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <child link="pallet_body"/>
</joint>

<link name="pallet_body">
    <inertial>
        <mass value="10.0"/>
        <origin rpy="0 0 0" xyz="0 0 0"/>
        <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="0.1" iyz="0.0" izz="0.1"/>
    </inertial>
    <visual>
        <origin rpy="0 0 0 " xyz="0 0 0"/>
        <geometry>
            <box size="0.8 1.2 0.15"/>
        </geometry>
    </visual>
    <collision>
        <origin rpy="0 0 0" xyz="0 0 0"/>
        <geometry>
            <box size="0.8 1.2 0.15"/>
        </geometry>
    </collision>
</link>

The launch file looks like this:

<?xml version="1.0"?>
<launch>
    <param name="pallet" textfile="$(find gazebo_tests)/pallet.urdf" />
    <node name="spawn_pallet" pkg="gazebo" type="spawn_model" args="-urdf -param pallet -model pallet1 -x 5.0 -y 5.0 -z 0.5 " respawn="false" output="screen" />
</launch>

This works fine, but when I change the joint type to 'fixed' the pallet doesn't get spawned any more.

<joint name="pallet_joint" type="fixed">

Although 'pallet1' is displayed in the Models-list in Gazebo, it is no where to be seen. No errors get printed either.
(Changing the joint type to 'continuous' makes the pallet shake around at the origin - not at location '5.0 5.0 0.5' where it should be spawned.)

Any suggestions would be greatly appreciated!

Regards,
Eli