0
$\begingroup$

I'm working with ros2 humble and I have my robot which I can spawn successfully on gazebo and RVIZ with the set up ready of the LIDAR and the IMU sensor. The thing is when I launch:

ros2 launch slam_toolbox online_async_launch.py

(after launching my gazebo and rviz launch) I should see the /map topic in RVIZ but it doesn't happen.

I know the /map topic is published by slam_toolbox and RVIZ is subscribed to it. I straight follow the instructions of this video https://www.youtube.com/watch?v=ZaiA3hWaRzE&t=611s , but I don't know why I can't see it on RVIZ.

Is anyone in the same situation? Maybe I skip some step? What is needed to use properly the package slam_toolbox?

The prove the map topic is published here: enter image description here enter image description here enter image description here

Thanks in advance!

$\endgroup$

3 Answers 3

1
$\begingroup$

I've figured out what was the issue. Slam Toolbox package works with the topic /scan by default in his file "mapper_params_online_async.yaml" (you can use your owns params if you change it) and in my URDF my LIDAR sensor sent the data on /laserscan topic. So I remapping it for /scan.

Then, in the mapper_params_online_async.yaml the default value for base_frame is base_footprint and in my robot is the base_frame so I had to change it too. After this it works properly!

Thanks Ravi and Joan!

So check the Slam params. I used this two video as a guide:

https://www.youtube.com/watch?v=ZaiA3hWaRzE&t=611s

https://www.youtube.com/watch?v=hMTxb8Y2cxI&t=268s

$\endgroup$
1
  • $\begingroup$ Also... I would check if mapping mode is localization or mapping. I think with just localization it only publishes odom and no map $\endgroup$
    – Chase
    Commented Jan 25 at 5:06
0
$\begingroup$

Need more info of the system.

Can you update the post with the config file and also provide the tf tree.

Run when you launch everything: ros2 run tf2_tools view_frames

$\endgroup$
1
  • $\begingroup$ Hi Ravi, thank you for your answer. I updated the post. $\endgroup$ Commented Jan 23 at 17:09
0
$\begingroup$

We need more information to know which can be the problem.

Be sure that the slam_toolbox is receiving the messages from odometry and laser (correct topic, check with rqt > Node graph plugin, for example).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.