Multi-robot mapping with laser scan merging idea

asked 2020-05-07 13:59:19 -0500

Ganach9 gravatar image

Hi, I had an idea for mapping spaces using multiple robots and I've been testing it out to see whether it would work. The idea came from the fact that slam_gmapping doesn't seem to work with multiple laser scans. So what if we just combined laser scans from different robots in separate parts of the building to some central frame?

Right now, I have two Clearpath Husky robots (https://github.com/husky/husky) in a basic building I've made. To spawn multiple huskies I've been using https://github.com/shehancaldera/mult... to set everything up. Each of them publishes their laser topics on /husky#/scan.

I'm using ira_laser_tools (https://github.com/iralabdisco/ira_la...) to try and merge the topics together, but I'm not sure if I'm doing it correctly. This is in ROS Melodic with Gazebo9.

My current launch file looks like this:

<launch> <arg name="world_file" default="$(find rover_main)/worlds/scenario1.world"/>

<!--Launch gazebo-->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="use_sim_time" value="true"/>
    <arg name="debug" value="false"/>
    <arg name="gui" value="true"/>
    <arg name="world_name" value="$(arg world_file)"/>
    <arg name="paused" value="false"/>
</include>
<!-- Set Husky parameters -->
<arg name="laser_enabled" default="true"/>
<arg name="ur5_enabled" default="false"/>
<arg name="kinect_enabled" default="false"/>

<!--Spawn Husky rover-->
<group ns="husky1">
    <include file="$(find multihusky_gazebo)/launch/spawn_multihusky.launch">
        <arg name="robot_namespace" value="husky1" />
        <arg name="x" value="-3" />
        <arg name="y" value="-3" />
        <arg name="yaw" value="0" />
        <arg name="laser_enabled" value="$(arg laser_enabled)"/>
        <arg name="kinect_enabled" value="$(arg kinect_enabled)"/>
    </include>
    <!--- Run Move Base -->
    <include file="$(find husky_navigation)/launch/move_base.launch">
        <arg name="robot_namespace" value="husky1" />
    </include>
</group>

<!--Spawn Husky rover again-->
<group ns="husky2">
    <include file="$(find multihusky_gazebo)/launch/spawn_multihusky.launch">
        <arg name="robot_namespace" value="husky2" />
        <arg name="x" value="-5" />
        <arg name="y" value="-5" />
        <arg name="yaw" value="0" />
        <arg name="laser_enabled" value="$(arg laser_enabled)"/>
        <arg name="kinect_enabled" value="$(arg kinect_enabled)"/>
    </include>
    <!--- Run Move Base -->
    <include file="$(find husky_navigation)/launch/move_base.launch">
        <arg name="robot_namespace" value="husky2" />
    </include>
</group>

<node pkg="tf" type="static_transform_publisher" name="husky1_broadcaster" args="-3 -3 0 0 0 0 odom husky1/odom 100"/>
<node pkg="tf" type="static_transform_publisher" name="husky2_broadcaster" args="-5 -5 0 0 0 0 odom husky2/odom 100"/>

<!-- Laser Scan Merger -->
<node pkg="ira_laser_tools" name="laserscan_multi_merger" type="laserscan_multi_merger" output="screen">
    <param name="destination_frame" value="/odom"/>
    <param name="cloud_destination_topic" value="/merged_cloud"/>
    <param name="scan_destination_topic" value="/scan_multi"/>
    <!-- LIST OF THE LASER SCAN TOPICS TO SUBSCRIBE -->
    <param name="laserscan_topics" value ="/husky1/scan /husky2/scan" /> 

    <param name="angle_min" value="-2.0"/>
    <param name="angle_max" value="2.0"/>
    <param name="angle_increment" value="0.0058"/>
    <param name ...
(more)
edit retag flag offensive close merge delete