How to specify URDF link which attaches to world ground?
Hello. The system is Gazebo7 (ver 7.16), running ROS Kinetic, in Ubuntu 16.04. The model I am working with looks like so:
The problem is that when I start the simulation my robot jumps up like crazy (13 meters or so) and lands painfully. I was able to figure out that the jump occurs due to the fact that the simulation starts with the robot partially "inside" the ground:
I now understand that the reason for this is that my base_link (the largest box in the center of the robot) which is the coordinate system origin of my model is snapped to the ground of the simulation (figured this out using: https://answers.ros.org/question/2251...). The problem is that the base_link is not the lowest part of the model.
I tried moving the Z axis of the <origin> tag of the base_link in the URDF file, but it didn't have the desired effect:
Is there a tag I can integrate into my URDF that dictates which link snaps to the ground? or is there a mod I can do in the .world file? I am hoping the simulation can be started with the wheels on the ground rather than inside the ground.
Last piece of information: I saved the world with the robot on all four wheels, and when I launch the simulation all is well; however as soon as I select "Reset world" from the "Edit" menu, the robot jumps super high.
I have attached the URDF for the base_link for reference:
<link name="base_link">
<!--If you do not explicitly specify a <collision> element. Gazebo will
treat your link as "invisible" to laser scanners and collision checking-->
<collision>
<geometry>
<box size="0.65 0.381 0.132"/>
</geometry>
<!-- line below allows us to insert:<origin rpy="${rpy}" xyz="${xyz}"/>-->
<origin rpy="0 0 0" xyz="-0.325 -0.1905 0.066"/>
</collision>
<visual>
<geometry>
<!--box dimensions is Meters. L X W X H where the L X H is a ractange,
and the H extrudes it upwards -->
<box size="0.65 0.381 0.132"/>
</geometry>
<!-- line below allows us to insert:<origin rpy="${rpy}" xyz="${xyz}"/>-->
<origin rpy="0 0 0" xyz="-0.325 -0.1905 0.066"/>
<material name="white"/>
</visual>
<inertial>
<!-- line below allows us to insert:<origin rpy="${rpy}" xyz="${xyz}"/>-->
<origin rpy="0 0 0" xyz="-0.325 -0.1905 0.066"/>
<!--all blocks now need a 'mass' argument-->
<mass value="25"/>
<!--This is the 3x3 inertial matrix. See: https://wiki.ros.org/urdf/XML/link -->
<!--where x=length; y=width; z=height. these lines of code came from
Emiliano Borghi's project-->
<inertia ixx="0.33871875" ixy="0" ixz="0" iyy="0.916508333333" iyz="0" izz="0.916508333333"/>
</inertial>
</link>
Thanks in advance.