Ask Your Question
0

Is it possible to run a navigation with nav2 and rviz only?

asked 2020-02-18 11:07:25 -0500

lorenzo gravatar image

I am using the navigation2 package and I want to run a simulation with ONLY the map furnished by the map_server, and visualize all on rviz. I do not have any laser scan or anything similar. The localization of the robot is custom and correctly provided based on cmd_vel integration over time. The simulation I want to run is feasible? Or I must need something simulating the laser scan.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-02-18 12:49:39 -0500

Carl D gravatar image

The laser scan serves two purposes in navigation:

  1. It is used by the costmap to detect obstacles so the robot doesn't hit them. If you have no obstacles that aren't on your map, or if you have some other way of avoiding obstacles, you do not need the laser scan.

  2. It is used by AMCL to detect where we really are on the map. It provides corrections between the odom frame, which is (roughly) the integration of the cmd_vel over time, and the map frame. If your cmd_vel integration is perfect and doesn't drift, you do not need AMCL and do not need the laser scan. This might work in simulation, but probably won't work in the real world with imperfect sensors and imperfect robot motion. Overtime, the integration and the real-world are certain to diverge.

However, for testing purposes, if you want to try this, I think there is nothing you need to do except make sure you have something publishing the map->odom transform. AMCL should not interfere; if there are no /scan messages, it shouldn't publish any transforms, I believe. And costmap will still work if no scans are received.

In the long run, if you want to continue to run this way, you should make a custom launch file based on the nav2_bringup/localization_launch.py that does not launch AMCL and change the costmap parameters, so it does not use the obstacle layer.

edit flag offensive delete link more

Comments

Do I need exactly a transform from map -> odom? Or is it enough that is indirectly defined? To understand better, if I give the following transforms:

world -> map

map -> base_link

base_link -> odom

is enough or not?

lorenzo gravatar image lorenzo  ( 2020-02-19 02:49:26 -0500 )edit

Yes. That is OK.

Carl D gravatar image Carl D  ( 2020-02-19 10:30:08 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

3 followers

Stats

Asked: 2020-02-18 11:07:25 -0500

Seen: 471 times

Last updated: Feb 18 '20