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

Nothing published to the /map topic when using SLAM Toolbox (ROS Noetic)

asked 2022-03-24 06:27:55 -0500

Reuben gravatar image

updated 2022-03-27 23:48:45 -0500

I’m trying to use the slam_toolbox (https://github.com/SteveMacenski/slam...) on Ubuntu 20.04.4 LTS with ROS Noetic for mapping a Gazebo environment (I usually try the ‘world’ environment) with Turtlebot3.

However, after launching, the slam_toolbox node never publishes anything to the /map topic despite being listed as a subscriber and publisher for the topic. Trying to add the map display to rviz produces a warning with a message, “No map received”.

rqt_graph: https://imgbb.com/r67mpyX TF tree: https://ibb.co/m00KtGv

When I try rostopic echo /map, the output is “WARNING: no messages received and simulated time is active. Is /clock being published?”

I have tried the asynchronous, synchronous and offline methods of the toolbox and I have also tried running some relevant projects from Github (https://github.com/search?q=slam_tool...), but I still run into the same issue.

This is the launch file that I’m using,

<launch>
  <!-- Arguments -->
  <arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/>
  <arg name="configuration_basename" default="turtlebot3_lds_2d.lua"/>
  <arg name="open_rviz" default="true"/>

  <!-- Gazebo -->
    <include file="$(find turtlebot3_gazebo)/launch/turtlebot3_world.launch" />

  <!-- TurtleBot3 -->
  <include file="$(find turtlebot3_bringup)/launch/turtlebot3_remote.launch">
    <arg name="model" value="$(arg model)" />
  </include>

  <!-- Mapping -->
    <include file="$(find slam_toolbox)/launch/online_async.launch" />

  <!-- rviz -->
  <group if="$(arg open_rviz)"> 
    <node pkg="rviz" type="rviz" name="rviz" required="true" />
  </group>

</launch>

This may not be relevant but after running the launch file, “LaserRangeScan contains 360 range readings, expected 359” is repeatedly published to the terminal. Also calling map_saver, just results in a “ Waiting for the map” output. When I tried launching with turtlebot3_gmapping.launch instead of slam_toolbox, I was able to save the map successfully.

I’m still quite new to ROS so there may be something obvious that I’ve missed here.

edit retag flag offensive close merge delete

Comments

Hi, I'm having the same problem. Were you able to solve it?

Thomas Stevens gravatar image Thomas Stevens  ( 2022-11-14 09:54:58 -0500 )edit

Hi, unfortunately I wasn't able to solve the issue and I moved on to ROS 2

Reuben gravatar image Reuben  ( 2022-11-22 05:35:30 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2023-04-25 03:43:53 -0500

berk tepebag gravatar image

A simple python code which subscribes to the laser topic and reduces data value by 1 and publishes to a new topic solved my problem. I have 960 readings so seems like total number does not make a difference as OP mentioned 360 readings causing the same error.

def scan_cb(data):
data.ranges = data.ranges[1:]
pub_scan.publish(data)
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-03-24 06:27:55 -0500

Seen: 619 times

Last updated: Apr 25 '23