I have a robot that has a platform to transport objects. However, if I place a model on top of that platform and move the robot, the object will stay in its place and eventually fall to the floor. Even if I place a Model from the Gazebo library, so I guess there is somethign wrong with the robot.
How do I make my robot sticky?
right now it has these features:
<!-- Link0 -->
<gazebo reference="${name}_link">
<selfCollide>true</selfCollide>
<material>Gazebo/Grey</material>
<maxVel>1</maxVel>
<minDepth>0.001</minDepth>
<dampingFactor>1</dampingFactor>
<mu1>0.2</mu1>
<mu2>0.2</mu2>
<kp>1000000</kp>
<kd>100000</kd>
<!--<maxContacts>0</maxContacts>-->
</gazebo>
the gazebo.urdf.xacro for the robot:
<?xml version="1.0"?>
<robot name="robot_base" xmlns:xacro="http://www.ros.org/wiki/xacro">
<gazebo>
<plugin name="gazebo_ros_controller" filename="libgazebo_ros_control.so">
<robotNamespace>/robot_base</robotNamespace>
<robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType>
</plugin>
</gazebo>
</robot>
the urdf.xacro for the model:
<?xml version="1.0"?>
<xacro:include filename="$(find robot_base)/urdf/robot_base.gazebo.xacro" />
<xacro:include filename="$(find robot_base)/urdf/robot_base.transmission.xacro" />
<property name="max_force" value="100.0"/>
<property name="max_torque" value="100.0"/>
<property name="max_lin_velocity" value="1.0"/>
<property name="max_rot_velocity" value="1.0"/>
<property name="min_position" value="-100.0"/>
<property name="max_position" value="100.0"/>
<property name="pi" value="3.14159"/>
<property name="m" value="400"/> <!--mass of object-->
<property name="h" value="0.645"/> <!--heigth of object-->
<property name="l" value="1.204"/> <!--length of object-->
<property name="w" value="0.72"/> <!--width of object-->
<xacro:macro name="robot_base_visual_origin">
<origin xyz="0.542 0 0.065" rpy="0 0 ${pi}"/>
<material name="Orange"/>
</xacro:macro>
<xacro:macro name="robot_base_collision_origin">
<origin xyz="0.542 0 0.0651" rpy="0 0 ${pi}"/>
<material name="Orange"/>
</xacro:macro>
<xacro:macro name="robot_base_left_arm_mount_origin">
<origin xyz="0.417 0.175 0.653" rpy="0 0 -1.5707963267948966"/>
<!--<origin xyz="0.43 0.18 0.645" rpy="0 0 1.5707963267948966"/>-->
</xacro:macro>
<xacro:macro name="robot_base_right_arm_mount_origin">
<origin xyz="0.417 -0.175 0.653" rpy="0 0 -1.5707963267948966"/>
</xacro:macro>
<xacro:macro name="robot_base_mast_mount_origin">
<origin xyz="-0.30 0.230 0.645" rpy="0 0 0"/>
</xacro:macro>
<xacro:macro name="robot_base" params="parent_link name hardware_interface">
<joint name="${name}_fixed_base_joint" type="fixed">
<!--<axis xyz="0 0 1"/>
<limit lower="${min_position}" upper="${max_position}" effort="${max_force}" velocity="${max_lin_velocity}"/>-->
<child link="${name}_virtual_link_0" />
<parent link="${parent_link}"/>
</joint>
<link name="${name}_virtual_link_0">
<!--<visual>
<origin xyz="0 0 0.1" rpy="0 0 0" />
<geometry>
<box size="0.001 0.001 0.001" />
</geometry>
</visual>
<collision>
<origin xyz="0 0 0.1" rpy="0 0 0" />
<geometry>
<box size="0.001 0.001 0.001" />
</geometry>
</collision>-->
<inertial>
<mass value="0.001" />
<inertia
ixx="0.00000001" ixy="0.0" ixz="0.0"
iyy="0.00000001" iyz="0.0"
izz="0.00000001" />
</inertial>
</link>
<joint name="${name}_joint_x" type="prismatic">
<origin xyz="0 0 0" rpy="0 0 0" />
<axis xyz="1 0 0"/>
<limit lower="${min_position}" upper="${max_position}" effort="${max_force}" velocity="${max_lin_velocity}"/>
<parent link="${name}_virtual_link_0"/>
<child link="${name}_virtual_link_1" />
</joint>
<link name="${name}_virtual_link_1">
<!--<visual>
<origin xyz="0 0 0.1" rpy="0 0 0" />
<geometry>
<box size="0.001 0.001 0.001" />
</geometry>
</visual>
<collision>
<origin xyz="0 0 0.1" rpy="0 0 0" />
<geometry>
<box size="0.001 0.001 0.001" />
</geometry>
</collision>-->
<inertial>
<mass value="0.001" />
<inertia
ixx="0.00000001" ixy="0.0" ixz="0.0"
iyy="0.00000001" iyz="0.0"
izz="0.00000001" />
</inertial>
</link>
<joint name="${name}_joint_y" type="prismatic">
<origin xyz="0 0 0" rpy="0 0 0" />
<axis xyz="0 1 0"/>
<limit lower="${min_position}" upper="${max_position}" effort="${max_force}" velocity="${max_lin_velocity}"/>
<parent link="${name}_virtual_link_1"/>
<child link="${name}_virtual_link_2" />
</joint>
<link name="${name}_virtual_link_2">
<!--<visual>
<origin xyz="0 0 0.1" rpy="0 0 0" />
<geometry>
<box size="0.001 0.001 0.001" />
</geometry>
</visual>
<collision>
<origin xyz="0 0 0.1" rpy="0 0 0" />
<geometry>
<box size="0.001 0.001 0.001" />
</geometry>
</collision>-->
<inertial>
<mass value="0.001" />
<inertia
ixx="0.00000001" ixy="0.0" ixz="0.0"
iyy="0.00000001" iyz="0.0"
izz="0.00000001" />
</inertial>
</link>
<joint name="${name}_joint_theta" type="continuous">
<origin xyz="0 0 0" rpy="0 0 0" />
<axis xyz="0 0 1"/>
<limit effort="${max_torque}" velocity="${max_rot_velocity}" upper="${-1.0 * pi}" lower="${pi}"/>
<parent link="${name}_virtual_link_2"/>
<child link="${name}_link" />
</joint>
<link name="${name}_link">
<visual>
<xacro:robot_base_visual_origin />
<geometry>
<mesh #robot_mesh# />
</geometry>
</visual>
<collision>
<xacro:robot_base_collision_origin />
<geometry>
<mesh #robot_mesh# />
</geometry>
<!--<contact_coefficients kd="100" kp="60000"/>-->
</collision>
<inertial>
<mass value="${m}" />
<inertia
ixx="${(m * ( l * l + h * h))/12}" ixy="0.0" ixz="0.0"
iyy="${(m * ( l * l + w * w))/12}" iyz="0.0"
izz="${(m * ( h * h + h * h))/12}" />
</inertial>
</link>
<joint name="${name}_left_arm_mount_joint" type="fixed">
<xacro:robot_base_left_arm_mount_origin />
<parent link="${name}_link"/>
<child link="${name}_left_arm_mount_link" />
</joint>
<link name="${name}_left_arm_mount_link">
<inertial>
<mass value="0.001" />
<inertia
ixx="0.00000001" ixy="0.0" ixz="0.0"
iyy="0.00000001" iyz="0.0"
izz="0.00000001" />
</inertial>
</link>
<joint name="${name}_right_arm_mount_joint" type="fixed">
<xacro:robot_base_right_arm_mount_origin />
<parent link="${name}_link"/>
<child link="${name}_right_arm_mount_link" />
</joint>
<link name="${name}_right_arm_mount_link">
<inertial>
<mass value="0.001" />
<inertia
ixx="0.00000001" ixy="0.0" ixz="0.0"
iyy="0.00000001" iyz="0.0"
izz="0.00000001" />
</inertial>
</link>
<joint name="${name}_mast_mount_joint" type="fixed">
<xacro:robot_base_mast_mount_origin />
<parent link="${name}_link"/>
<child link="${name}_link_mast_mount" />
</joint>
<link name="${name}_link_mast_mount">
<inertial>
<mass value="0.001" />
<inertia
ixx="0.00000001" ixy="0.0" ixz="0.0"
iyy="0.00000001" iyz="0.0"
izz="0.00000001" />
</inertial>
</link>
<!--Extensions -->
<xacro:robot_base_gazebo name="${name}" />
<xacro:robot_base_transmission name="${name}" hardware_interface="${hardware_interface}"/>
</xacro:macro>
</robot>
Originally posted by Lyndwyrm on Gazebo Answers with karma: 11 on 2016-10-21
Post score: 0
Original comments
Comment by chapulina on 2016-10-25:
How are you moving your robot? Did you turn on contact visualization and check that the models are indeed touching?
Comment by Lyndwyrm on 2016-10-26:
I am using postion_controllers/JointTrajectoryController, there are several contacts between the object and the robot. I tried setting the mu coefficients of the object and the robot to Inf, but that didn't change anything.
Comment by nkoenig on 2016-10-26:
What version of gazebo are you using? And, can you post your entire model?
Comment by Lyndwyrm on 2016-10-26:
currently using 2.2.3, i hope the model is understandable