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

How to launch nav2 without prior map ?

asked 2022-06-06 04:35:01 -0500

Acwok gravatar image

updated 2022-06-06 06:14:27 -0500

Hello,

I'm trying to setup a nav2 simulation for my robot.
The bringup_launch.py expects a yaml map as input.
I don't want to provide a prior map, but if I don't provide it the robot won't move when I send a goal.
I expected that nav2 would use the global and local maps...

Is it possible to use Nav2 without a prior map ?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2022-06-06 06:40:46 -0500

ljaniec gravatar image

Yes, it is, e.g. during SLAM:

https://navigation.ros.org/tutorials/...

1- Launch Navigation2

Launch Navigation without nav2_amcl and nav2_map_server. It is assumed that the SLAM node(s) will publish to /map topic and provide the map->odom transform.

ros2 launch nav2_bringup navigation_launch.py

2- Launch SLAM

Bring up your choice of SLAM implementation. Make sure it provides the map->odom transform and /map topic. Run Rviz and add the topics you want to visualize such as /map, /tf, /laserscan etc. For this tutorial, we will use SLAM Toolbox.

ros2 launch slam_toolbox online_async_launch.py

3- Working with SLAM

Move your robot by requesting a goal through RViz or the ROS 2 CLI (...)

edit flag offensive delete link more

Comments

1

Thanks for your answer @ljaniec, but I just want to make a quick test without setting up slam.
Is it possible to use the local map instead ?

Acwok gravatar image Acwok  ( 2022-06-06 06:51:59 -0500 )edit
1

It is working. I set the map_topic (which defaults to /map) to "/global_costmap/costmap".
Thanks!

Acwok gravatar image Acwok  ( 2022-06-06 07:04:24 -0500 )edit

Hi @Acwok, I am attempting navigation without a map. Is that what you are trying to achieve? May I know what are your nav2 parameters?

MrOCW gravatar image MrOCW  ( 2022-06-10 10:21:56 -0500 )edit
1

Hi @MrOCW, I'm doing navigation without a prior map, but I still have the global_costmap and local_costmap enabled otherwise the robot cannot know where are the obstacles. I plan to do SLAM in the future but I was doing this just to try things. Here is my param file http://pastebin.fr/107286, hope it helps

Acwok gravatar image Acwok  ( 2022-06-10 10:49:33 -0500 )edit

Hi @Acwok, would you be able to send that Pastebin again? It seems it has gone dead. I'm also trying to get Nav2 working without a prior map, or any SLAM

Ãustin gravatar image Ãustin  ( 2022-08-15 14:49:13 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2022-06-06 04:35:01 -0500

Seen: 1,320 times

Last updated: Jun 06 '22