Two lasers on one robot not working properly
I have two lasers (ray
sensors) on my robot (modeled in URDF), on front and back. However, when I use both of them, I can see a few problems
- they do not publish at the intended frequency. Published frequency seems to be around 10Hz at the beginning and slows down little by little to around 8Hz.
- Each laser shows a glitch few times a second where the laser seems to be shifted
- When I set the laser to be visualized, gazebo only shows one laser
When I only use one laser, it works fine and publishes at the rate specified in <update_rate>
tag.
Here's some images from the robot with ROS move-base with both lasers in use. Green dots in line shows the laser. Black box is the robot
Both lasers on. Only the rear one seems to be working
How gazebo shows only one laser. The other laser is positioned on top left corner of the robot
The glitch. The one laser that was working is still showing as well. The shifted laser seems to be the combined laser showing the full 360 view but it is rotated 180
This is the gazebo elements for the lasers. What am I missing here?
<gazebo reference="front_scan">
<material>Gazebo/FlatBlack</material>
<sensor name="lds_lfcd_sensor" type="ray">
<pose>0 0 0 0 0 0</pose>
<visualize>false</visualize>
<update_rate>2</update_rate>
<ray>
<scan>
<horizontal>
<samples>360</samples>
<resolution>1</resolution>
<min_angle>-2.25619449019</min_angle>
<max_angle>2.25619449019</max_angle>
</horizontal>
</scan>
<range>
<min>0.12</min>
<max>15.0</max>
<resolution>0.015</resolution>
</range>
<noise>
<type>gaussian</type>
<mean>0.0</mean>
<stddev>0.01</stddev>
</noise>
</ray>
<plugin filename="libgazebo_ros_laser.so" name="gazebo_ros_lds_lfcd_controller">
<topicName>scan</topicName>
<frameName>front_scan</frameName>
</plugin>
</sensor>
</gazebo>
<gazebo reference="rear_scan">
<material>Gazebo/FlatBlack</material>
<sensor name="lds_lfcd_sensor" type="ray">
<pose>0 0 0 0 0 0</pose>
<visualize>false</visualize>
<update_rate>2</update_rate>
<ray>
<scan>
<horizontal>
<samples>360</samples>
<resolution>1</resolution>
<min_angle>-2.25619449019</min_angle>
<max_angle>2.25619449019</max_angle>
</horizontal>
</scan>
<range>
<min>0.12</min>
<max>15.0</max>
<resolution>0.015</resolution>
</range>
<noise>
<type>gaussian</type>
<mean>0.0</mean>
<stddev>0.01</stddev>
</noise>
</ray>
<plugin filename="libgazebo_ros_laser.so" name="gazebo_ros_lds_lfcd_controller">
<topicName>scan</topicName>
<frameName>rear_scan</frameName>
</plugin>
</sensor>
</gazebo>