ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Problem with merging two lidars

asked 2020-11-01 06:14:22 -0500

al_ca gravatar image

updated 2020-11-02 06:56:35 -0500

Hi there,

Can someone explain why this is happening? I am using the ira_laser_tools. image description

NOTE: The L corresponds to the right as you see the robot in the picture and R to the left.

<gazebo reference="sick_L_laser">
<material value="Gazebo/Blue" />
<sensor type="ray" name="sick_lms_5_laser_gazebo_v0">
  <always_on>true</always_on>
  <update_rate>100.0</update_rate>
  <pose>0 0 0 0 0 0</pose>
  <visualize>false</visualize>
  <ray>
    <scan>
      <horizontal>
        <samples>720</samples>
        <resolution>1</resolution>
        <min_angle>-1.5708</min_angle> <!--90 moires -->
        <max_angle>2.44346</max_angle> <!--140 moires -->
      </horizontal>
    </scan>
    <range>
      <min>0.05</min>
      <max>10.0</max>
      <resolution>0.01</resolution>
    </range>
  </ray>
  <plugin name="gazebo_ros_sick_lms_5_laser_gazebo_v0_controller" filename="libgazebo_ros_laser.so">
    <gaussianNoise>0.0005</gaussianNoise>
    <alwaysOn>true</alwaysOn>
    <updateRate>100.0</updateRate>
    <topicName>scan_L</topicName>     
    <frameName>sick_L_laser</frameName>
  </plugin>
</sensor>

</gazebo>

<gazebo reference="sick_R_laser">
<material value="Gazebo/Blue" />
<sensor type="ray" name="sick_lms_5_laser_gazebo_v0">
  <always_on>true</always_on>
  <update_rate>100.0</update_rate>
  <pose>0 0 0 0 0 0</pose>
  <visualize>true</visualize>
  <ray>
    <scan>
      <horizontal>
        <samples>720</samples>
        <resolution>1</resolution>
        <min_angle>-2.44346</min_angle> <!--140 moires -->
        <max_angle>1.5708</max_angle> <!--90 moires -->
      </horizontal>
    </scan>
    <range>
      <min>0.05</min>
      <max>10.0</max>
      <resolution>0.01</resolution>
    </range>
  </ray>
  <plugin name="gazebo_ros_sick_lms_5_laser_gazebo_v0_controller" filename="libgazebo_ros_laser.so">
    <gaussianNoise>0.0005</gaussianNoise>
    <alwaysOn>true</alwaysOn>
    <updateRate>100.0</updateRate>
    <topicName>scan_R</topicName> 
    <frameName>sick_R_laser</frameName>
  </plugin>
</sensor>

</gazebo>

-- IRA_LASER_TOOLS --

<launch>

    <node pkg="ira_laser_tools" name="laserscan_multi_merger" type="laserscan_multi_merger" output="screen">
        <param name="destination_frame" value="base_link"/>
    <param name="cloud_destination_topic" value="merged_cloud"/>
    <param name="scan_destination_topic" value="scan_multi"/>
            <param name="laserscan_topics" value ="/scan_L /scan_R" /> 

            <param name="angle_min" value="-3.1415"/>
            <param name="angle_max" value="3.1415"/>
            <param name="angle_increment" value="0.0058"/>
            <param name="scan_time" value="0.0333333"/>
            <param name="range_min" value="0.05"/>
            <param name="range_max" value="50.0"/>

</node>

</launch>

edit retag flag offensive close merge delete

Comments

could you also please upload your config file for ira_laser_tools?

harshal gravatar image harshal  ( 2020-11-02 04:18:22 -0500 )edit

of course,

al_ca gravatar image al_ca  ( 2020-11-02 06:51:47 -0500 )edit

And have you tested whether the angle min and max are not causing that problem? You in effect have min of -140 and max of 140, instead of +/- 180. Basically, have you already tried adapting all of these params to your laser scanners?

harshal gravatar image harshal  ( 2020-11-02 07:58:37 -0500 )edit

I have the same angle min and max in the real lidars and no problem appears at all, only in gazebo. So I am wondering I am doing something wrong with gazebo plugins or gazebo has the problem?

al_ca gravatar image al_ca  ( 2020-11-02 08:14:22 -0500 )edit

The Gazebo plugins are supposed to be a model of the real sensor, but do not recreate/represent data in the exact same way. However, if the individual sensors in Gazebo are working properly (without ira_laser_tools), then the problem doesn't seem to be due to Gazebo as the laser_tools package is basically post processing the data and shouldn't affect the plugins themselves.

I would still suggest adapting the ira_laser_tools config for your actual sensors. If it already works fine, then with the correct config, it should work fine too. Then you have a better base of narrowing down the problem. Of course, if by changing the config something stops working as it is now, you can always revert back the config.

harshal gravatar image harshal  ( 2020-11-03 04:43:11 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-11-08 04:55:08 -0500

al_ca gravatar image

Finally, the solution is to put different names to the <<<name="sick_lms_5_laser_gazebo_v0">>>

For example

<gazebo reference="sick_L_laser"> <material value="Gazebo/Blue"/> <sensor type="ray" name="sick_lms_5_laser_gazebo_v0">

and

<gazebo reference="sick_R_laser"> <material value="Gazebo/Blue"/> <sensor type="ray" name="sick_lms_5_laser_gazebo_v1">

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-11-01 06:14:22 -0500

Seen: 494 times

Last updated: Nov 08 '20