Simulating a custom robot going up a ramp in Gazebo [closed]
Hi all,
I tried to simulate a custom 4-wheel robot model (URDF) going up a ramp in gazebo but it cannot do so. It can navigate on the ground plane using a custom base controller but when it tries to go up the ramp it gets stuck.
What am I missing in the URDF? Some pointers to implement this is appreciated.
Thank you
CS
Here is my URDF
I still dont have a good grasp of the tags anchor, mechanicalReduction
<robot xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor" xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller" xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface" xmlns:xacro="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface" name="my_robot">
<include filename="$(find rover_base_controller)/urdf/materials.urdf.xacro" />
<!-- This adds the laser macro, including the scan for gazebo and link name -->
<include filename="$(find pr2_description)/urdf/sensors/hokuyo_lx30_laser.urdf.xacro" />
<xacro:property name="scale" value="1.0"/>
<xacro:property name="base_length" value="0.6"/>
<xacro:property name="base_width" value="0.3"/>
<xacro:property name="base_height" value="0.1"/>
<xacro:property name="wheel_base1_length" value="0.02"/>
<xacro:property name="wheel_base1_width" value="0.02"/>
<xacro:property name="wheel_base1_height" value="0.07"/>
<xacro:property name="wheel_base2_length" value="0.02"/>
<xacro:property name="wheel_base2_width" value="0.05"/>
<xacro:property name="wheel_base2_height" value="0.01"/>
<xacro:property name="wheel_base3_length" value="0.02"/>
<xacro:property name="wheel_base3_width" value="0.02"/>
<xacro:property name="wheel_base3_height" value="0.06"/>
<xacro:property name="wheel_thickness" value="0.06"/>
<xacro:property name="wheel_radius" value="0.053"/>
<xacro:property name="mast_height" value="0.2"/>
<xacro:property name="mast_length" value="0.01"/>
<xacro:property name="mast_width" value="0.01"/>
<xacro:property name="mast_vertical_bar_height" value="0.01"/>
<xacro:property name="mast_vertical_bar_length" value="0.01"/>
<xacro:property name="mast_vertical_bar_width" value="0.2"/>
<xacro:property name="M_PI" value="3.14159265"/>
<xacro:macro name="default_inertial" params="mass">
<inertial>
<mass value="${mass}" />
<inertia ixx="0.01" ixy="0.0" ixz="0.0"
iyy="0.01" iyz="0.0"
izz="0.01" />
</inertial>
</xacro:macro>
<!-- base_footprint is a fictitious link(frame) that is on the ground right below base_link origin,
navigation stack depends on this frame -->
<link name="base_footprint">
<inertial>
<mass value="0.0001" />
<origin xyz="0 0 0" />
<inertia ixx="0.0001" ixy="0.0" ixz="0.0"
iyy="0.0001" iyz="0.0"
izz="0.0001" />
</inertial>
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<box size="0.001 0.001 0.001" />
</geometry>
<material name="Green"/>
</visual>
<collision>
<origin xyz="0 0 ${wheel_base1_height + wheel_radius}" rpy="0 0 0" />
<geometry>
<box size="0.001 0.001 0.001" />
</geometry>
</collision>
</link>
<link name="base_link">
<visual>
<geometry>
<box size="${base_length*scale} ${base_width*scale} ${base_height*scale}"/>
</geometry>
<material name="Blue"/>
</visual>
<collision>
<geometry>
<box size="${base_length} ${base_width} ${base_height}"/>
</geometry>
</collision>
<xacro:default_inertial mass="50"/>
</link>
<joint name="base_footprint_joint" type="fixed">
<!-- NB: While you would think this would make it go up, it is oddly reversed.
This moves the joint to 0,0,0 where we want it ...