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

Multi-robot exploration with explorer and adhoc_communication?

asked 2015-11-14 06:54:48 -0500

js4 gravatar image

updated 2015-11-21 03:01:37 -0500

Hi ,

i am trying to setup a multi-robot-exploration like shown in the video of the explorer package (http://wiki.ros.org/explorer). Did someone successfully get that setup running? (explorer + map_merger + adhoc_communication)

Here is what i got so far: I started with files from https://github.com/OSLL/aau_multi_robot, which is a fork of the aau-ros/aau_multi_robot repository containing some new launch files. If i run my launch file, based on them, the 2 robots start exploration, but in an uncoordinated way.

I then read a bit in the source code and found a comment stating that the robot names have to be added to the source code (in explorer.cpp at line 103 of the explorer package). I added my robot names and recompiled explorer. but unfortunately that doesn't change anything.

Last thing i found was a commented Preprocessor directive #define JOIN_ALL_GROUPS (in define.h of the adhoc_communication package), which activates a code block (in adhoc_communication.cpp at line 1208) in which this adhoc_communication node tries to join all existing multicast groups. I uncommented this directive and compiled adhoc_communication again. Then i get error messages (from adhoc_communication) like this:

DROP FRAME: ID[36] CONFIRMER MAC[00-00-00-00-00-11] SOURCE HOST[] TYPE[MC ACTIVATION]
REMOVE DOWNLINK: GROUP[mc_robot_1]  HOST[robot_0]

and from explorer i get warnings like:

Failed to call service sendToMulticast [/robot_0/adhoc_communication/send_frontier]

So i guess i configured something wrong with the adhoc_communication package. Any help would be appreciated. Thanks!

Here is my current launch file (aau_multi_robot_simulation is a package i created containing parameter and configuration files; i don't think the problem is related to them, so i omit them):

<?xml version="1.0"?>
<launch>

<arg name="num_of_robots" default="2" />
<arg name="robot_macs" default="robot_0,00:00:00:00:00:11!robot_1,00:00:00:00:00:22!" />
<arg name="log_path" default="$(env HOME)/logs" />
<arg name="robot_local_map_frame" default="map" />
<arg name="output" default="log" />
<arg name="frontier_selection" default="1"/>
<param name="/use_sim_time" value="true"/>


<node pkg="stage_ros" type="stageros" name="simulation" args="$(find aau_multi_robot_simulation)/world/sim_world.world" />

<!-- ROBOT 1 !-->
<node pkg="adhoc_communication" type="adhoc_communication" name="robot_0" respawn="true" launch-prefix="xterm -e">
    <param name="mac" value="00:00:00:00:00:11"/>
    <param name="robot_name" value="robot_0"/>
    <param name="interface" value="lo"/>
    <param name="num_link_retrans" value="3" />
    <param name="num_e2e_retrans" value="3" />
    <param name="num_rreq" value="1" />
    <param name="max_frame_size" value="1500" />
    <param name="hop_limit_min" value="0" />
    <param name="hop_limit_max" value="0" />
    <param name="hop_limit_increment" value="3" />
    <param name="max_packet_size" value="1500000" />
    <param name="beacon_interval" value="100" />
    <param name="enable_cooperative_relaying" value="true" />
    <param name="simulation_mode" value="true"/>
    <param name="robots_in_simulation" value="$(arg num_of_robots)" />
    <param name="sim_robot_macs" value="$(arg robot_macs)" />
    <param name="p_tx" value="1" />

</node>

<node name="teleop_0" pkg="teleop_twist_keyboard" type="teleop_twist_keyboard.py" output="$(arg output)" launch-prefix="xterm -e" args="-t /robot_0/cmd_vel" />

<node pkg="map_merger" type="map_merger" name="map_merger" output="$(arg output)" ns="robot_0" respawn="true" launch-prefix="xterm -e">
    <param name="log_path" value="$(arg log_path)" />
    <param name="robot_name" value="robot_0" />
    <param name="robot_prefix" value="" />
    <param name="local_map_frame_id ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2015-11-20 08:10:40 -0500

Micha Sende gravatar image

updated 2015-11-20 08:40:48 -0500

Hi, I'm running the configuration with the launch files I attached. Give it a try and let me know if it works for you. Regards, Micha

master.launch which starts everything needed:

<?xml version="1.0"?>
<launch>
    <node name="stage" pkg ="stage_ros" type="stageros" args="$(find multi_robot_simulation)/world/world.world" />
    <param name="use_sim_time"  value="true"/>
    <group ns="robot_0">
        <include file="$(find adhoc_communication)/launch/adhoc_communication.launch">
            <arg name="log_path" value="logs/15-11-20/14-06-42/1" />
            <arg name="robot_name" value="robot_0" />
            <arg name="robot_prefix" value="/robot_0" />
            <arg name="interface" value="lo" />
            <arg name="use_sim_time" value="true" />
            <arg name="mac" value="02:01:00:00:00:00" />
            <arg name="sim_robot_macs" value="robot_0,02:01:00:00:00:00!robot_1,02:02:00:00:00:00" />
        </include>
        <include file="$(find multi_robot_simulation)/launch/move_base.launch">
            <arg name="robot" value="robot_0" />
            <arg name="robot_pref" value="/robot_0" />
            <arg name="output" value="log" />
        </include>
        <include file="$(find multi_robot_simulation)/launch/mapping.launch">
            <arg name="robot" value="robot_0" />
            <arg name="robot_prefix" value="/robot_0" />
            <arg name="robot_local_map_frame" value="robot_0/map" />
            <arg name="output" value="log" />
            <arg name="log_path" value="logs/15-11-20/14-06-42/1" />
            <arg name="use_sim_time" value="true" />
            <arg name="xmax" value="35" />
            <arg name="xmin" value="-35" />
            <arg name="ymax" value="35" />
            <arg name="ymin" value="-35" />
        </include>
        <include file="$(find map_merger)/launch/map_merger.launch">
            <arg name="robot_name" value="robot_0" />
            <arg name="robot_prefix" value="/robot_0" />
            <arg name="robot_local_map_frame" value="robot_0/map" />
            <arg name="output" value="log" />
            <arg name="log_path" value="logs/15-11-20/14-06-42/1" />
            <arg name="use_sim_time" value="true" />
        </include>
        <include file="$(find explorer)/launch/exploration.launch">
            <arg name="robot_name" value="robot_0" />
            <arg name="robot_prefix" value="/robot_0" />
            <arg name="output" value="log" />
            <arg name="log_path" value="logs/15-11-20/14-06-42/1" />
            <arg name="frontier_selection" value="1" />
            <arg name="use_sim_time" value="true" />
        </include>
    </group>
    <group ns="robot_1">
        <include file="$(find adhoc_communication)/launch/adhoc_communication.launch">
            <arg name="log_path" value="logs/15-11-20/14-06-42/1" />
            <arg name="robot_name" value="robot_1" />
            <arg name="robot_prefix" value="/robot_1" />
            <arg name="interface" value="lo" />
            <arg name="use_sim_time" value="true" />
            <arg name="mac" value="02:02:00:00:00:00" />
            <arg name="sim_robot_macs" value="robot_0,02:01:00:00:00:00!robot_1,02:02:00:00:00:00" />
        </include>
        <include file="$(find multi_robot_simulation)/launch/move_base.launch">
            <arg name="robot" value="robot_1" />
            <arg name="robot_pref" value="/robot_1" />
            <arg name="output" value="log" />
        </include>
        <include file="$(find multi_robot_simulation)/launch/mapping.launch">
            <arg name="robot" value="robot_1" />
            <arg name="robot_prefix" value="/robot_1" />
            <arg name="robot_local_map_frame" value="robot_1/map" />
            <arg name="output" value="log" />
            <arg name="log_path" value="logs/15-11-20/14-06-42/1" />
            <arg name="use_sim_time" value="true" />
            <arg name="xmax" value="35" />
            <arg name="xmin" value="-35" />
            <arg name="ymax" value="35" />
            <arg name="ymin" value="-35" />
        </include>
        <include file="$(find map_merger)/launch/map_merger.launch">
            <arg name="robot_name" value="robot_1" />
            <arg name="robot_prefix" value="/robot_1" />
            <arg name="robot_local_map_frame" value="robot_1/map" />
            <arg name="output" value="log" />
            <arg name="log_path" value="logs/15-11-20/14-06-42/1" />
            <arg name="use_sim_time" value="true" />
        </include>
        <include file="$(find explorer)/launch/exploration.launch">
            <arg name="robot_name" value="robot_1" />
            <arg name ...
(more)
edit flag offensive delete link more

Comments

Hi Micha,

thanks for your answer! With that launch files i get exactly the same results as with my files. Are you sure the robots explore in a coordinated way on your machine? I am adding some information in my question above since the space for comments is limited.

js4 gravatar image js4  ( 2015-11-20 15:58:17 -0500 )edit

I know this is a pretty old thread but do you know where the exploration.launch file is located? I can't find it anywhere but it would appear that it is not something that you simply have to make on your own.

On that note, did either of your finally get this to work correctly?

dbcampbell92 gravatar image dbcampbell92  ( 2017-09-11 11:26:36 -0500 )edit

Hi, seems like they updated their repository. Here is the version of the file i used https://github.com/OSLL/multibot/comm... . I had to stop working with ros, so i can´t help you any further.

js4 gravatar image js4  ( 2017-09-11 16:30:36 -0500 )edit

Question Tools

4 followers

Stats

Asked: 2015-11-14 06:54:48 -0500

Seen: 1,031 times

Last updated: Nov 21 '15