Multi robot (turtlebot3) navigation issues with laser data and map frame

asked 2021-08-15 23:06:17 -0500

bashrc gravatar image

updated 2021-08-17 22:09:41 -0500

jayess gravatar image

Hi, I am working on Multi-robot navigation, I have followed this topic. I am able to complete the first part which spawns multiple turtlebots in the gazebo with their respective namespaces. Once I try setting up the navigation stack I face the following warnings

[ WARN] [1629021283.562207144, 17.354000000]: No laser scan received (and thus no pose updates have been published) 
for 17.354000 seconds.  Verify that data is being published on the /robot1/scan topic.
[ WARN] [1629021283.563194584, 17.354000000]: Frame_id of map received:'/map' doesn't match global_frame_id:'map'. 
This could cause issues with reading published topics

when I do,

rostopic echo  /robot1/scan

I get the following output which confirms that the data is being published on the /robot1/scan topic

seq: 280
secs: 68
nsecs: 229000000
frame_id: "robot1_tf/base_scan"
angle_min: 0.0
angle_max: 6.28318977356
angle_increment: 0.0175019223243
time_increment: 0.0
scan_time: 0.0
range_min: 0.119999997318
range_max: 3.5
ranges: [0.36660903692245483, 0.3823273181915283, 0.38093674182891846, 0.3956436514854431, ....]
intensities: [0.0, 0.0, 0.0, 0.0 ....]

I can visualise the laser data in Rviz. Below I've attached all the launch files associated. I am using ROS melodic and Turtlebot3


  <!--param name="/use_sim_time" value="true" /-->

  <!-- start world -->
  <!--node name="gazebo" pkg="gazebo_ros" type="gazebo" 
  args="$(find turtlebot_gazebo)/worlds/" respawn="false" output="screen" /-->

  <!-- start gui -->
  <!--node name="gazebo_gui" pkg="gazebo_ros" type="gui" respawn="false" output="screen"/-->

<include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find turtlebot3_gazebo)/worlds/"/>
    <arg name="paused" value="false"/>
    <arg name="use_sim_time" value="true"/>
    <arg name="gui" value="true"/>
    <arg name="headless" value="false"/>
    <arg name="debug" value="false"/>

<!-- include our robots -->
<include file="$(find multi_robot_nav)/launch/robots.launch"/>


 <arg name="robot_name"/>
 <arg name="init_pose"/>

 <node name="spawn_minibot_model" pkg="gazebo_ros" type="spawn_model"
 args="$(arg init_pose) -urdf -param /robot_description -model $(arg robot_name)"
 respawn="false" output="screen" />

 <node pkg="robot_state_publisher" type="robot_state_publisher" 
      name="robot_state_publisher" output="screen"/>

<!-- The odometry estimator, throttling, fake laser etc. go here -->
<!-- All the stuff as from usual robot launch file -->


  <!-- No namespace here as we will share this description. 
   Access with slash at the beginning -->

  <arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/>
  <arg name="x_pos" default="3.0"/>
  <arg name="y_pos" default="1.0"/>
  <arg name="z_pos" default="0.0"/> -->
  <param name="robot_description"
  command="$(find xacro)/xacro --inorder $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" />

  <!-- BEGIN ROBOT 1-->
  <group ns="robot1">
   <param name="tf_prefix" value="robot1_tf" />
   <include file="$(find multi_robot_nav)/launch/one_robot.launch" >
   <arg name="init_pose" value="-x 1 -y 1 -z 0" />
   <arg name="robot_name"  value="Robot1" />

   <!-- BEGIN ROBOT 2-->
   <group ...
edit retag flag offensive close merge delete


The warnings concerning Fixed Frame [map] does not exist could simply be that when in RViz, under Global Options, the default is Fixed Frame - map, but since you launch everything in namespaces and with prefixes, maybe try selecting a different option. According to your rqt_graph, map topic is not receiving any information, but I'm not sure what /map 's purpose is. For launching multiple robots at the same time I would also recommend writing a static publisher node that connects both robots' tf_trees.

sniegs gravatar image sniegs  ( 2021-08-16 06:49:24 -0500 )edit

If I change the fixed frame to something else, the map does not load properly in Rviz

bashrc gravatar image bashrc  ( 2021-08-16 23:24:25 -0500 )edit

@bashrc could you please update your question with the images attached directly to the question? I've given you enough karma to do so

jayess gravatar image jayess  ( 2021-08-17 22:10:17 -0500 )edit

I'm in the same probiems, but still can't fix it. Could you tell me the way to solve this ?

quyetbui gravatar image quyetbui  ( 2022-05-14 01:25:00 -0500 )edit