Inertia definition results to a robot that sinks into ground
UPDATE: Hi, I found out that the front of robot model in gazebo falls into ground if the mass of the inertial section of the base_link as well as the caster (front_roller) is to large. But why? Tried to change the makro default_interial to some specific makros for box, cylinder and sphere. But I receive the same result if I use mass >1 for base_link or if i add the caster link.
Please check screenshots to get an idea of my strange robot position in gazebo.
Any idea?
BR Marco
Hi, i tried to setup a custom robot by using the tutorials and explanations on urdf, xacro and gazebo.
After several hours of finetuning gazebo started and the robort was shown :)
But the robot seems to be in the air (a few cm)(not standing on the ground plane) and any command is without any reaction. Tried RQT Gui or teleop to send commands. nothing happens.
Not sure whats wrong. In rviz robot seems to be on the ground. (and parallel to the ground - in gazebo not) UPDATE: In Rviz see the odom frame isnt parallel to the ground. Seems exactly the opposite angel as the robot is shown in gazebo. I also tried to add some coordinates to the footprint. Also I changed the origins so that base_link has z=0. Also strange is the z position of my front-roller in relation to the right and left roller. Both have in xacro the same z value. But in Rviz they are not shown on the same position.
UPDATE: Added to pics from rviz and gazebo.
xacro definition of robot:
<robot name="hallrover_v1" xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:property name="hallrover_body_width" value="0.20"/>
<xacro:property name="hallrover_body_length" value="1.50"/>
<xacro:property name="hallrover_body_heigth" value="0.10"/>
<xacro:property name="hallrover_frame_heigth" value="0.05"/>
<xacro:property name="hallrover_frame_width" value="1.34"/>
<!-- - roller_length*2 + roller_body_space*2 + hallrover_body_width + hallrover_frame_thick*2 -->
<xacro:property name="hallrover_frame_length" value="1.50"/>
<xacro:property name="hallrover_frame_thick" value="0.05"/>
<!-- hallrover_frame_height -->
<xacro:property name="roller_length" value="0.50"/>
<xacro:property name="roller_diam" value="0.25"/>
<xacro:property name="roller_body_space" value="0.02"/>
<xacro:macro name="default_inertial" params="mass">
<inertial>
<mass value="${mass}"/>
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
</inertial>
</xacro:macro>
<!-- Import all Gazebo-customization elements, including Gazebo colors -->
<xacro:include filename="$(find hallrover_v1)/urdf/hallrover_v1.gazebo"/>
<!--https://www.generationrobots.com/blog/en/2015/02/robotic-simulation-scenarios-with-gazebo-and-ros/ -->
<link name="base_footprint">
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<box size="0.001 0.001 0.001" />
</geometry>
</visual>
</link>
<joint name="base_joint" type="fixed">
<parent link="base_footprint"/>
<child link="base_link"/>
<origin xyz="0 0 0" rpy="0 0 0" />
</joint>
<gazebo>
<material>Gazebo/White</material>
</gazebo>
<link name="base_link">
<visual>
<geometry>
<box size="${hallrover_body_width} ${hallrover_body_length} ${hallrover_body_heigth}"/>
</geometry>
<origin xyz="0 0 0"/>
<material name="white">
<color rgba="1 1 1 1"/>
</material>
</visual>
<collision>
<geometry>
<box size ...