Home | Tutorials | Wiki | Issues
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

4 Wheel Robot wheels unstable. Fix needed.

Hi All, I am new here and this is my first question and as a result I can't post images so will do the best I can to explain what I'm experiencing.

Platform Details: Distributor ID: Ubuntu Description: Ubuntu 18.04.2 LTS Release: 18.04 Codename: bionic ROS Distro: Melodic

I successfully spawned a 4 wheeler in Gazebo and for some reason, every half revolution, this Robot's wheels sink into an imaginary hole in Gazebo's plane. Imagine that you have 4 wheels with a small segment cut off (not enough to make their cross section a semi circle but almost), that's exactly how they behave. What happens is after every half revolution, part of the wheels sink below the ground plane in Gazebo and then literally rise back to the surface. Between revolutions everything is fine by the way.

See my robot URDF below. I have seen a similar question in this link but all it stated was the wheels were perpetually below the ground plane. This is not my case. The Robot behaves as it should in between half revolutions. Note that I have experimented with robot weights and Kp values of the wheels (used a stepwise approach to no avail). Please help. I am at my wits' end. Note that the part of the code that is the wheels is refered to <xacro:macro name="wheel_position_macro" params="prefix suffix reflect1 reflect2">

Thanks in anticipation of your help.

` <robot name="Rover" xmlns:xacro="http://www.ros.org/wiki/xacro">

<xacro:property name="wheel_thickness" value="0.15"/> <xacro:property name="wheel_diameter" value="0.4"/> <xacro:property name="wheel_guide_thickness" value="0.05"/> <xacro:property name="wheel_guide_length" value="0.4"/> <xacro:property name="wheel_guide_height" value="0.1"/> <xacro:property name="body_length" value="0.6"/> <xacro:property name="body_width" value="0.5"/> <xacro:property name="body_height" value="0.3"/> <xacro:property name="camera_width" value="0.01"/> <xacro:property name="wheel_mass" value="0.5"/> <xacro:property name="body_mass" value="1"/> <xacro:property name="guide_mass" value="0.5"/> <xacro:property name="axel_mass" value="0.5"/> <xacro:property name="camera_mass" value="0.1"/> <xacro:property name="kinect_mass" value="0.5"/> <xacro:property name="pi" value="3.1415"/>

<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>

<xacro:macro name="shape_visual" params="length width height color"> <visual> <pose xyz="0 0 1.0"/> <geometry> <box size="${length} ${width} ${height}"/> </geometry> <material name="${color}"/> </visual> <collision> <geometry> <box size="${length} ${width} ${height}"/> </geometry>
</collision>

</xacro:macro>

<xacro:macro name="camera_visual" params="length width height color"> <visual> <geometry> <box size="${length} ${width} ${height}"/> </geometry> <material name="${color}"/> </visual> <collision> <geometry> <box size="${length} ${width} ${height}"/> </geometry>
</collision>

</xacro:macro>

<xacro:macro name="wheel_guide_macro" params="prefix reflect"> <link name="${prefix}_wheel_guide"> <visual> <origin xyz="0 ${reflect*wheel_guide_thickness/2} 0"/> <geometry> <box size="${wheel_guide_length} ${wheel_guide_thickness} ${wheel_guide_height}"/> </geometry> <material name="black"/> </visual> <collision> <geometry> <box size="${wheel_guide_length} ${wheel_guide_thickness} ${wheel_guide_height}"/> </geometry>
</collision> <xacro:default_inertial mass="${guide_mass}"/> </link> <joint name="${prefix}_wheel_guide_joint" type="fixed"> <axis xyz="0 1 0" rpy="0 0 0"/> <parent link="base_link"/> <child link="${prefix}_wheel_guide"/> <origin xyz="0 ${reflect*body_width/2} 0" rpy="0 0 0"/> </joint> <gazebo reference="${prefix}_wheel_guide"> <gravity value="true"/> <mindepth>0.00001</mindepth> <material>Gazebo/Grey</material> </gazebo> </xacro:macro>

<xacro:macro name="wheel_axle_macro" params="prefix suffix reflect1 reflect2"> <link name="${prefix}_${suffix}_wheel_axle"> <visual> <origin xyz="0 0 0" rpy="0 ${reflect2*2.0*pi/3} 0"/> <geometry> <cylinder radius="${wheel_guide_height*0.2}" length="${wheel_guide_length/2}"/> </geometry> <material name="black"/> </visual> <collision> <geometry> <cylinder radius="${wheel_guide_height*0.2}" length="${wheel_guide_length/2}"/> </geometry>
</collision> <xacro:default_inertial mass="${axel_mass}"/> </link> <joint name="${prefix}_${suffix}_wheel_axle_joint" type="fixed"> <parent link="${prefix}_wheel_guide"/> <child link="${prefix}_${suffix}_wheel_axle"/> <origin xyz="${reflect2*wheel_guide_length/2} ${reflect1* wheel_guide_thickness/2} ${-wheel_guide_height}" rpy="0 0 0"/> </joint> <gazebo reference="${prefix}_${suffix}_wheel_axle"> <gravity value="true"/> <mindepth>0.00001</mindepth> <material>Gazebo/Grey</material> </gazebo> </xacro:macro>

<xacro:macro name="wheel_position_macro" params="prefix suffix reflect1 reflect2"> <link name="${prefix}_${suffix}_wheel"> <visual> <origin xyz="0 0 0" rpy="${pi/2} 0 0"/> <geometry> <cylinder radius="${wheel_diameter/2}" length="${wheel_thickness}"/> </geometry> <material name="black"/> </visual> <collision> <geometry> <cylinder radius="${wheel_diameter/2}" length="${wheel_thickness}"/> </geometry>
<surface> <bounce> <restitution_coefficient>0.0</restitution_coefficient> <threshold>0</threshold> </bounce> </surface>
</collision> <xacro:default_inertial mass="${wheel_mass}"/> </link> <joint name="${prefix}_${suffix}_wheel_joint" type="continuous"> <axis xyz="0 1 0"/> <parent link="${prefix}_${suffix}_wheel_axle"/> <child link="${prefix}_${suffix}_wheel"/> <origin xyz="${reflect2*body_length/6.0} ${reflect1*wheel_thickness/2} -${body_height/4.0}"/> </joint> <gazebo reference="${prefix}_${suffix}_wheel"> <mu1 value="200.0"/> <mu2 value="100.0"/> <kp value="1.0e+6"/> <kd value="1.0"/> <gravity value="true"/> <maxvel>0.0000001</maxvel> <mindepth>0.00001</mindepth> <material>Gazebo/Black</material> </gazebo> <transmission name="${prefix}_${suffix}_wheel_trans"> <type>transmission_interface/SimpleTransmission</type> <actuator name="${prefix}_${suffix}_wheel_motor"> <hardwareinterface>VelocityJointInterface</hardwareinterface> <mechanicalreduction>1</mechanicalreduction> </actuator> <joint name="${prefix}_${suffix}_wheel_joint"> <hardwareinterface>VelocityJointInterface</hardwareinterface> </joint> </transmission> </xacro:macro>

<material name="white"> <color rgba="1 1 1 1"/> </material> <material name="black"> <color rgba="0 0 0 1"/> </material> <material name="blue"> <color rgba="0 0 0.9 1"/> </material> <material name="green"> <color rgba="0 0.8 0 1"/> </material>

<link name="base_link">

<xacro:shape_visual length="0.6" width="0.5" height="0.3" color="white"/> <xacro:default_inertial mass="${body_mass}"/> </link> <gazebo reference="base_link"> <material>Gazebo/White</material> <mindepth>0.00001</mindepth> <gravity value="true"/> </gazebo>

<xacro:wheel_guide_macro prefix="left" reflect="-1.0"/> <xacro:wheel_guide_macro prefix="right" reflect="1.0"/> <xacro:wheel_axle_macro prefix="right" suffix="front" reflect1="1.0" reflect2="1.0"/> <xacro:wheel_axle_macro prefix="left" suffix="front" reflect1="-1.0" reflect2="1.0"/> <xacro:wheel_axle_macro prefix="left" suffix="back" reflect1="-1.0" reflect2="-1.0"/> <xacro:wheel_axle_macro prefix="right" suffix="back" reflect1="1.0" reflect2="-1.0"/>

<xacro:wheel_position_macro prefix="left" suffix="front" reflect1="-1.0" reflect2="1.0"/> <xacro:wheel_position_macro prefix="left" suffix="back" reflect1="-1.0" reflect2="-1.0"/> <xacro:wheel_position_macro prefix="right" suffix="back" reflect1="1.0" reflect2="-1.0"/> <xacro:wheel_position_macro prefix="right" suffix="front" reflect1="1.0" reflect2="1.0"/>

<link name="camera_link"> <xacro:camera_visual length="0.01" width="${body_width/12.0}" height="${body_width/12.0}" color="black"/> <xacro:default_inertial mass="${camera_mass}"/> </link> <joint name="camera_joint" type="fixed"> <parent link="base_link"/> <child link="camera_link"/> <origin xyz="${body_length/2 + camera_width} 0 0" rpy="0 0 0"/> </joint> <link name="kinect"> <visual> <pose>0 0 0.036 0 0 0</pose>

<geometry>
  <mesh filename="package://learning_tf/meshes/kinect.dae"/>
</geometry>

</visual> <collision> <geometry> <mesh filename="package://learning_tf/meshes/kinect.dae"/> </geometry>
</collision> <xacro:default_inertial mass="${kinect_mass}"/> </link> <joint name="kinect_joint" type="fixed"> <axis xyz="0 1 0"/> <parent link="base_link"/> <child link="kinect"/> <origin xyz="-${body_length/2.0 - body_width/4.0} 0 ${body_height/2 + body_height/6}" rpy="0 0 0"/> </joint> <gazebo reference="camera_link"> <material>Gazebo/Blue</material> <sensor type="camera" name="camera1"> <update_rate>30.0</update_rate> <camera name="head"> <horizontal_fov>1.3962634</horizontal_fov> <image> <width>800</width> <height>800</height> <format>R8G8B8</format> </image> <clip> <near>0.02</near> <far>300</far> </clip> <noise> <type>gaussian</type> <mean>0.0</mean> <stddev>0.007</stddev> </noise> </camera> <plugin name="camera_controller" filename="libgazebo_ros_camera.so"> <alwayson>true</alwayson> <updaterate>0.0</updaterate> <cameraname>camera1</cameraname> <imagetopicname>image_raw</imagetopicname> <camerainfotopicname>camera_info</camerainfotopicname> <framename>camera_link</framename> <hackbaseline>0.07</hackbaseline> <distortionk1>0.0</distortionk1> <distortionk2>0.0</distortionk2> <distortionk3>0.0</distortionk3> <distortiont1>0.0</distortiont1> <distortiont2>0.0</distortiont2> </plugin> </sensor> </gazebo> <link name="kinect_optical_link"/>

<joint name="kinect_optical_joint" type="fixed"> <axis xyz="0 1 0"/> <parent link="base_link"/> <child link="kinect_optical_link"/> <origin xyz="-${body_length/2.0 - body_width/4.0} 0 ${body_height/2 + body_height/6}" rpy="-${pi/2} 0 -${pi/2}"/> </joint> <gazebo reference="kinect"> <sensor name="camera_kinect" type="depth"> <update_rate>20</update_rate> <camera> <horizontal_fov>1.047198</horizontal_fov> <image> <width>640</width> <height>480</height> <format>R8G8B8</format> </image> <clip> <near>0.05</near> <far>3</far> </clip> </camera> <plugin name="camera_plugin" filename="libgazebo_ros_openni_kinect.so"> <baseline>0.2</baseline> <alwayson>true</alwayson> <updaterate>0.0</updaterate> <cameraname>camera_ir</cameraname> <imagetopicname>/camera_kinect/depth/image_raw</imagetopicname> <camerainfotopicname>/camera_kinect/depth/camera_info</camerainfotopicname> <depthimagetopicname>/camera_kinect/depth/image_raw</depthimagetopicname> <depthimageinfotopicname>/camera_kinect/depth/camera_info</depthimageinfotopicname> <pointcloudtopicname>/camera_kinect/depth/points</pointcloudtopicname> <framename>kinect_optical_link</framename> <pointcloudcutoff>0.1</pointcloudcutoff> <distortionk1>0</distortionk1> <distortionk2>0</distortionk2> <distortionk3>0</distortionk3> <distortiont1>0</distortiont1> <distortiont2>0</distortiont2> <cxprime>0</cxprime> <cx>0</cx> <cy>0</cy> <focallength>0</focallength> <hackbaseline>0</hackbaseline> </plugin> </sensor> </gazebo>

<gazebo> <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so"> <robotnamespace>/</robotnamespace> </plugin> </gazebo> </robot>

`

4 Wheel Robot wheels unstable. Fix needed.

Hi All, I am new here and this is my first question and as a result I can't post images so will do the best I can to explain what I'm experiencing.

Platform Details: Distributor ID: Ubuntu Description: Ubuntu 18.04.2 LTS Release: 18.04 Codename: bionic ROS Distro: Melodic

I successfully spawned a 4 wheeler in Gazebo and for some reason, every half revolution, this Robot's wheels sink into an imaginary hole in Gazebo's plane. Imagine that you have 4 wheels with a small segment cut off (not enough to make their cross section a semi circle but almost), that's exactly how they behave. What happens is after every half revolution, part of the wheels sink below the ground plane in Gazebo and then literally rise back to the surface. Between revolutions everything is fine by the way.

See my robot URDF below. I have seen a similar question in this link but all it stated was the wheels were perpetually below the ground plane. This is not my case. The Robot behaves as it should in between half revolutions. Note that I have experimented with robot weights and Kp values of the wheels (used a stepwise approach to no avail). Please help. I am at my wits' end. Note that the part of the code that is the wheels is refered to <xacro:macro name="wheel_position_macro" params="prefix suffix reflect1 reflect2">

Thanks in anticipation of your help.

`

<?xml version = "1.0"?>
<robot name="Rover" xmlns:xacro="http://www.ros.org/wiki/xacro">

xmlns:xacro="http://www.ros.org/wiki/xacro"> <xacro:property name="wheel_thickness" value="0.15"/> <xacro:property name="wheel_diameter" value="0.4"/> <xacro:property name="wheel_guide_thickness" value="0.05"/> <xacro:property name="wheel_guide_length" value="0.4"/> <xacro:property name="wheel_guide_height" value="0.1"/> <xacro:property name="body_length" value="0.6"/> <xacro:property name="body_width" value="0.5"/> <xacro:property name="body_height" value="0.3"/> <xacro:property name="camera_width" value="0.01"/> <xacro:property name="wheel_mass" value="0.5"/> <xacro:property name="body_mass" value="1"/> <xacro:property name="guide_mass" value="0.5"/> <xacro:property name="axel_mass" value="0.5"/> <xacro:property name="camera_mass" value="0.1"/> <xacro:property name="kinect_mass" value="0.5"/> <xacro:property name="pi" value="3.1415"/>

value="3.1415"/> <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>

</xacro:macro> <xacro:macro name="shape_visual" params="length width height color"> <visual> <pose xyz="0 0 1.0"/> <geometry> <box size="${length} ${width} ${height}"/> </geometry> <material name="${color}"/> </visual> <collision> <geometry> <box size="${length} ${width} ${height}"/> </geometry>
</collision>

</xacro:macro>

</collision> </xacro:macro> <xacro:macro name="camera_visual" params="length width height color"> <visual> <geometry> <box size="${length} ${width} ${height}"/> </geometry> <material name="${color}"/> </visual> <collision> <geometry> <box size="${length} ${width} ${height}"/> </geometry>
</collision>

</xacro:macro>

</collision> </xacro:macro> <xacro:macro name="wheel_guide_macro" params="prefix reflect"> <link name="${prefix}_wheel_guide"> <visual> <origin xyz="0 ${reflect*wheel_guide_thickness/2} 0"/> <geometry> <box size="${wheel_guide_length} ${wheel_guide_thickness} ${wheel_guide_height}"/> </geometry> <material name="black"/> </visual> <collision> <geometry> <box size="${wheel_guide_length} ${wheel_guide_thickness} ${wheel_guide_height}"/> </geometry>
</collision> <xacro:default_inertial mass="${guide_mass}"/> </link> <joint name="${prefix}_wheel_guide_joint" type="fixed"> <axis xyz="0 1 0" rpy="0 0 0"/> <parent link="base_link"/> <child link="${prefix}_wheel_guide"/> <origin xyz="0 ${reflect*body_width/2} 0" rpy="0 0 0"/> <!--limit effort="1000.0" lower="${-pi/8}" upper="${pi/8}" velocity="0.5"/> For setting joint mobility around the Y axis --> </joint> <gazebo reference="${prefix}_wheel_guide"> <gravity value="true"/> <mindepth>0.00001</mindepth> <minDepth>0.00001</minDepth> <material>Gazebo/Grey</material> </gazebo> </xacro:macro>

</xacro:macro> <xacro:macro name="wheel_axle_macro" params="prefix suffix reflect1 reflect2"> <!--Reflect1 represents left-right reflect, reflect2 represents front-back reflect --> <link name="${prefix}_${suffix}_wheel_axle"> <visual> <origin xyz="0 0 0" rpy="0 ${reflect2*2.0*pi/3} 0"/> <geometry> <cylinder radius="${wheel_guide_height*0.2}" length="${wheel_guide_length/2}"/> </geometry> <material name="black"/> </visual> <collision> <geometry> <cylinder radius="${wheel_guide_height*0.2}" length="${wheel_guide_length/2}"/> </geometry>
</collision> <xacro:default_inertial mass="${axel_mass}"/> </link> <joint name="${prefix}_${suffix}_wheel_axle_joint" type="fixed"> <parent link="${prefix}_wheel_guide"/> <child link="${prefix}_${suffix}_wheel_axle"/> <origin xyz="${reflect2*wheel_guide_length/2} ${reflect1* wheel_guide_thickness/2} ${-wheel_guide_height}" rpy="0 0 0"/> </joint> <gazebo reference="${prefix}_${suffix}_wheel_axle"> <gravity value="true"/> <mindepth>0.00001</mindepth> <minDepth>0.00001</minDepth> <material>Gazebo/Grey</material> </gazebo> </xacro:macro>

</xacro:macro> <xacro:macro name="wheel_position_macro" params="prefix suffix reflect1 reflect2"> <link name="${prefix}_${suffix}_wheel"> <visual> <origin xyz="0 0 0" rpy="${pi/2} 0 0"/> <geometry> <cylinder radius="${wheel_diameter/2}" length="${wheel_thickness}"/> </geometry> <material name="black"/> </visual> <collision> <geometry> <cylinder radius="${wheel_diameter/2}" length="${wheel_thickness}"/> </geometry>
<surface> <bounce> <restitution_coefficient>0.0</restitution_coefficient> <threshold>0</threshold> </bounce> </surface>
</collision> <xacro:default_inertial mass="${wheel_mass}"/> </link> <joint name="${prefix}_${suffix}_wheel_joint" type="continuous"> <axis xyz="0 1 0"/> <parent link="${prefix}_${suffix}_wheel_axle"/> <child link="${prefix}_${suffix}_wheel"/> <origin xyz="${reflect2*body_length/6.0} ${reflect1*wheel_thickness/2} -${body_height/4.0}"/> </joint> <gazebo reference="${prefix}_${suffix}_wheel"> <mu1 value="200.0"/> <mu2 value="100.0"/> <kp value="1.0e+6"/> <kd value="1.0"/> <gravity value="true"/> <maxvel>0.0000001</maxvel> <mindepth>0.00001</mindepth> <maxVel>0.0000001</maxVel> <minDepth>0.00001</minDepth> <material>Gazebo/Black</material> </gazebo> <!--Added Transmission Code --> <transmission name="${prefix}_${suffix}_wheel_trans"> <type>transmission_interface/SimpleTransmission</type> <actuator name="${prefix}_${suffix}_wheel_motor"> <hardwareinterface>VelocityJointInterface</hardwareinterface> <mechanicalreduction>1</mechanicalreduction> <hardwareInterface>VelocityJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> <joint name="${prefix}_${suffix}_wheel_joint"> <hardwareinterface>VelocityJointInterface</hardwareinterface> <hardwareInterface>VelocityJointInterface</hardwareInterface> </joint> </transmission> </xacro:macro>

</xacro:macro> <material name="white"> <color rgba="1 1 1 1"/> </material> <material name="black"> <color rgba="0 0 0 1"/> </material> <material name="blue"> <color rgba="0 0 0.9 1"/> </material> <material name="green"> <color rgba="0 0.8 0 1"/> </material>

</material> <!--link name="base_footprint"/> <joint name="base_joint" type="fixed" > <parent link="base_link" /> <child link="base_footprint" /> <origin xyz="0 0 -0.57325" rpy="0 0 0" /> </joint--> <link name="base_link">

name="base_link"> <xacro:shape_visual length="0.6" width="0.5" height="0.3" color="white"/> <xacro:default_inertial mass="${body_mass}"/> </link> <gazebo reference="base_link"> <material>Gazebo/White</material> <mindepth>0.00001</mindepth> <minDepth>0.00001</minDepth> <gravity value="true"/> </gazebo>

</gazebo> <xacro:wheel_guide_macro prefix="left" reflect="-1.0"/> <xacro:wheel_guide_macro prefix="right" reflect="1.0"/> <xacro:wheel_axle_macro prefix="right" suffix="front" reflect1="1.0" reflect2="1.0"/> <xacro:wheel_axle_macro prefix="left" suffix="front" reflect1="-1.0" reflect2="1.0"/> <xacro:wheel_axle_macro prefix="left" suffix="back" reflect1="-1.0" reflect2="-1.0"/> <xacro:wheel_axle_macro prefix="right" suffix="back" reflect1="1.0" reflect2="-1.0"/>

reflect2="-1.0"/> <xacro:wheel_position_macro prefix="left" suffix="front" reflect1="-1.0" reflect2="1.0"/> <xacro:wheel_position_macro prefix="left" suffix="back" reflect1="-1.0" reflect2="-1.0"/> <xacro:wheel_position_macro prefix="right" suffix="back" reflect1="1.0" reflect2="-1.0"/> <xacro:wheel_position_macro prefix="right" suffix="front" reflect1="1.0" reflect2="1.0"/>

reflect2="1.0"/> <link name="camera_link"> <xacro:camera_visual length="0.01" width="${body_width/12.0}" height="${body_width/12.0}" color="black"/> <xacro:default_inertial mass="${camera_mass}"/> </link> <joint name="camera_joint" type="fixed"> <parent link="base_link"/> <child link="camera_link"/> <origin xyz="${body_length/2 + camera_width} 0 0" rpy="0 0 0"/> </joint> <link name="kinect"> <visual> <pose>0 0 0.036 0 0 0</pose>

0</pose>

    <geometry>
   <mesh filename="package://learning_tf/meshes/kinect.dae"/>
 </geometry>

</visual> <collision> <geometry> <mesh filename="package://learning_tf/meshes/kinect.dae"/> </geometry>
</collision> <!--xacro:shape_visual length="${body_width/6.0}" width="${body_width/2.0}" height="${body_height/3}" color="blue"/--> <xacro:default_inertial mass="${kinect_mass}"/> </link> <joint name="kinect_joint" type="fixed"> <axis xyz="0 1 0"/> 0" /> <parent link="base_link"/> <child link="kinect"/> <origin xyz="-${body_length/2.0 - body_width/4.0} 0 ${body_height/2 + body_height/6}" rpy="0 0 0"/> </joint> <gazebo reference="camera_link"> <material>Gazebo/Blue</material> <sensor type="camera" name="camera1"> <update_rate>30.0</update_rate> <camera name="head"> <horizontal_fov>1.3962634</horizontal_fov> <image> <width>800</width> <height>800</height> <format>R8G8B8</format> </image> <clip> <near>0.02</near> <far>300</far> </clip> <noise> <type>gaussian</type> <!-- Noise is sampled independently per pixel on each frame. That pixel's noise value is added to each of its color channels, which at that point lie in the range [0,1]. --> <mean>0.0</mean> <stddev>0.007</stddev> </noise> </camera> <plugin name="camera_controller" filename="libgazebo_ros_camera.so"> <alwayson>true</alwayson> <updaterate>0.0</updaterate> <cameraname>camera1</cameraname> <imagetopicname>image_raw</imagetopicname> <camerainfotopicname>camera_info</camerainfotopicname> <framename>camera_link</framename> <hackbaseline>0.07</hackbaseline> <distortionk1>0.0</distortionk1> <distortionk2>0.0</distortionk2> <distortionk3>0.0</distortionk3> <distortiont1>0.0</distortiont1> <distortiont2>0.0</distortiont2> <alwaysOn>true</alwaysOn> <updateRate>0.0</updateRate> <cameraName>camera1</cameraName> <imageTopicName>image_raw</imageTopicName> <cameraInfoTopicName>camera_info</cameraInfoTopicName> <frameName>camera_link</frameName> <hackBaseline>0.07</hackBaseline> <distortionK1>0.0</distortionK1> <distortionK2>0.0</distortionK2> <distortionK3>0.0</distortionK3> <distortionT1>0.0</distortionT1> <distortionT2>0.0</distortionT2> </plugin> </sensor> </gazebo> <link name="kinect_optical_link"/>

name="kinect_optical_link"/> <joint name="kinect_optical_joint" type="fixed"> <axis xyz="0 1 0"/> 0" /> <parent link="base_link"/> <child link="kinect_optical_link"/> <origin xyz="-${body_length/2.0 - body_width/4.0} 0 ${body_height/2 + body_height/6}" rpy="-${pi/2} 0 -${pi/2}"/> </joint> <gazebo reference="kinect"> <sensor name="camera_kinect" type="depth"> <update_rate>20</update_rate> <camera> <horizontal_fov>1.047198</horizontal_fov> <image> <width>640</width> <height>480</height> <format>R8G8B8</format> </image> <clip> <near>0.05</near> <far>3</far> </clip> </camera> <plugin name="camera_plugin" filename="libgazebo_ros_openni_kinect.so"> <baseline>0.2</baseline> <alwayson>true</alwayson> <updaterate>0.0</updaterate> <cameraname>camera_ir</cameraname> <imagetopicname>/camera_kinect/depth/image_raw</imagetopicname> <camerainfotopicname>/camera_kinect/depth/camera_info</camerainfotopicname> <depthimagetopicname>/camera_kinect/depth/image_raw</depthimagetopicname> <depthimageinfotopicname>/camera_kinect/depth/camera_info</depthimageinfotopicname> <pointcloudtopicname>/camera_kinect/depth/points</pointcloudtopicname> <framename>kinect_optical_link</framename> <pointcloudcutoff>0.1</pointcloudcutoff> <distortionk1>0</distortionk1> <distortionk2>0</distortionk2> <distortionk3>0</distortionk3> <distortiont1>0</distortiont1> <distortiont2>0</distortiont2> <cxprime>0</cxprime> <cx>0</cx> <cy>0</cy> <focallength>0</focallength> <hackbaseline>0</hackbaseline> <alwaysOn>true</alwaysOn> <!-- Keep this zero, update_rate in the parent <sensor> tag will control the frame rate. --> <updateRate>0.0</updateRate> <cameraName>camera_ir</cameraName> <imageTopicName>/camera_kinect/depth/image_raw</imageTopicName> <cameraInfoTopicName>/camera_kinect/depth/camera_info</cameraInfoTopicName> <depthImageTopicName>/camera_kinect/depth/image_raw</depthImageTopicName> <depthImageInfoTopicName>/camera_kinect/depth/camera_info</depthImageInfoTopicName> <pointCloudTopicName>/camera_kinect/depth/points</pointCloudTopicName> <frameName>kinect_optical_link</frameName> <pointCloudCutoff>0.1</pointCloudCutoff> <distortionK1>0</distortionK1> <distortionK2>0</distortionK2> <distortionK3>0</distortionK3> <distortionT1>0</distortionT1> <distortionT2>0</distortionT2> <CxPrime>0</CxPrime> <Cx>0</Cx> <Cy>0</Cy> <focalLength>0</focalLength> <hackBaseline>0</hackBaseline> </plugin> </sensor> </gazebo>

</gazebo> <gazebo> <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so"> <robotnamespace>/</robotnamespace> <robotNamespace>/</robotNamespace> </plugin> </gazebo> </robot>

`

</robot>