Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The previous answer did not solve the problem in my case, since the object could still be moved by exerting forces on it.

But following model file did the job for me:

<?xml version="1.0" ?>
<model:physical name="pallet" 
    xmlns:body="http://playerstage.sourceforge.net/gazebo/xmlschema/#body"
    xmlns:geom="http://playerstage.sourceforge.net/gazebo/xmlschema/#geom"
>

<static>true</static>

<body:box name="pallet_body">
    <xyz>  0   0.0  0.0</xyz>
    <rpy>   0.0    0.0    0.0</rpy>

    <geom:box name="base">   
        <mesh>default</mesh>
        <size> 1.2 0.8 0.05</size>  
        <visual>
            <size> 1.2 0.8 0.05</size>
            <material>Gazebo/WoodPallet</material>
            <mesh>unit_box</mesh>
        </visual>
        <collision>
            <size> 1.2 0.05 0.5</size>
        </collision>
    </geom:box>
</body:box>

</model:physical>

Launch file as follows:

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