Unable to move the second robot using nav2d exploration
Hi,
I am trying to explore an area autonomously using multiple robots. I have created a launch file which looks like below:
<launch>
<!-- Start the Stage simulator with the provided environment -->
<node pkg="stage_ros" type="stageros" name ="stageros" args="$(find test_package)/maps/lab1.world" respawn="false">
<param name="base_watchdog_timeout" value="0.5"/>
</node>
<node name="R0_MapAlign" pkg="tf" type="static_transform_publisher" args="0 0 0 0 0 0 /map /robot_0/map 100"/>
<node name="R1_MapAlign" pkg="tf" type="static_transform_publisher" args="0 0 0 0 0 0 /map /robot_1/map 100"/>
<!-- Start the first robot -->
<group ns="robot_0">
<param name="robot_id" value="1"/>
<param name="tf_prefix" type="string" value="robot_0"/>
<rosparam file="$(find test_package)/param/ros.yaml"/>
<!-- Start the Navigator to move the robot autonomously -->
<node name="Navigator" pkg="nav2d_navigator" type="navigator" output="screen">
<rosparam file="$(find test_package)/param/navigator.yaml"/>
</node>
<node name="GetMap" pkg="nav2d_navigator" type="get_map_client"/>
<node name="Explore" pkg="nav2d_navigator" type="explore_client" output="screen"/>
<node name="SetGoal" pkg="nav2d_navigator" type="set_goal_client"/>
<!-- Start the Operator to control the simulated robot -->
<node name="Operator" pkg="nav2d_operator" type="operator">
<remap from="scan" to="base_scan"/>
<rosparam file="$(find test_package)/param/operator.yaml"/>
<rosparam file="$(find test_package)/param/costmap.yaml" ns="local_map"/>
</node>
<!-- Start Mapper to genreate map from laser scans -->
<node name="Mapper" pkg="nav2d_karto" type="mapper">
<remap from="scan" to="base_scan" />
<remap from="karto_in" to="/shared_scans_r2"/>
<remap from="karto_out" to="/shared_scans_r1"/>
<rosparam file="$(find test_package)/param/mapper.yaml"/>
</node>
<!-- Get URDF(Unified Robot Description Format), which is an XML format for representing a robot model for Pioneer3at-->
<include file="$(find p2os_urdf)/launch/upload_pioneer3at.xml"/>
<node pkg="robot_state_publisher" type="state_publisher" name="robot_state_publisher">
<param name="publish_frequency" type="double" value="30.0"/>
</node>
<node pkg="p2os_urdf" type="p2os_publisher_3at" name="publisher"/>
</group>
<!-- Start the second robot-->
<group ns="robot_1">
<param name="robot_id" value="2"/>
<param name="tf_prefix" type="string" value="robot_1"/>
<rosparam file="$(find test_package)/param/ros.yaml"/>
<!-- Start the Navigator to move the robot autonomously -->
<node name="Navigator" pkg="nav2d_navigator" type="navigator" output="screen">
<rosparam file="$(find test_package)/param/navigator.yaml"/>
</node>
<node name="GetMap" pkg="nav2d_navigator" type="get_map_client"/>
<node name="Explore" pkg="nav2d_navigator" type="explore_client" output="screen"/>
<node name="SetGoal" pkg="nav2d_navigator" type="set_goal_client"/>
<!-- Start the Operator to control the simulated robot -->
<node name="Operator" pkg="nav2d_operator" type="operator">
<remap from="scan" to="base_scan"/>
<rosparam file="$(find test_package)/param/operator.yaml"/>
<rosparam file="$(find test_package)/param/costmap.yaml" ns="local_map"/>
</node>
I am able to move the first robot for mapping and exploration, but the second robot does not moves. After I enter the command, nothing happens. For the first robot, it moves, but i get response:0 in the terminal.
Can anyone please help me with what is wrong with my program?