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

Loop clousure in nav2d

asked 2019-08-04 19:14:37 -0600

imanpakii gravatar image

Hello,

I'm wondering is there any loop closure detection in nav2d? if so, how can I use it.

Thank you Iman

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2019-08-06 12:48:51 -0600

luc gravatar image

Hi Iman,

Looks like there is a version of open_karto that is inside the nav2d package on the ROS wiki:

http://wiki.ros.org/nav2d

Open karto is the underlying graph slam library used by slam_karto to do the scan matching and loop closure.

I would recommend looking in the source code here: https://github.com/skasperski/navigat... for an idea of how to pipe out the loop closure detection when running nav2d_karto.

Hopefully this helps you out!

Luc

edit flag offensive delete link more

Comments

Thank you so much for your reply. One of the biggest problems I have is, when we talk about SLAM it means doing the mapping and localize it in the same time but all the method I can see in ROS so far is not close to SLAM. For example, first with gmapping we have to make the map and after that, we need to load that map with map server and with amcl localize the robot inside this map. It's not like simultaneous. I read in some post the nav2d can do the mapping and localization at the same time. Is that true? If not, what are the package I have to use for doing real SLAM and I don't need to save the map first and localize it offline? Thank you Iman

imanpakii gravatar image imanpakii  ( 2019-08-06 13:02:45 -0600 )edit

Yes, OpenKarto is SLAM, as is gmapping and others as well. While the map is build, the robot is constantly localized. You see this because the mapper (e.g. from nav2d_karto) publishes the pose of the robot in map coordinates. (Well, it actually publishes the difference between odometry and map pose, but this is just an implementation detail). While the mapper is running, you don't need amcl. But when you stop the mapper, because your map is finished, then you need amcl to do the localization, which was done by the SLAM before.

Sebastian Kasperski gravatar image Sebastian Kasperski  ( 2019-08-08 02:38:32 -0600 )edit

The difference between SLAM and a standalone mapping and standalone localization package can be thought of like this

  • SLAM makes a map and localizes the robot in that map as a byproduct of how the mapmaking takes place. In order to create the map, an on-line optimization must take place with some idea of where the robot is in order to create that map (at least in graph slam). Since the on-line mapmaking procedure needs to have the position of the robot at various timesteps in order to create the map, localization (to some degree) is also achieved.

  • Standalone mapping requires the robot to be localized. Think about it - if the robot doesnt know where it is but it sees a bunch of sensor information, how can we place that sensor information into some kind of map structure without knowing any of the motion constraints between sensor measurements?

  • Standalone localization ...

(more)
luc gravatar image luc  ( 2019-08-16 16:44:20 -0600 )edit

Please mark my answer as correct if you find that it has helped.

luc gravatar image luc  ( 2019-08-16 16:44:59 -0600 )edit
0

answered 2019-08-08 02:47:47 -0600

Sebastian Kasperski gravatar image

As Luc pointed out, the LoopClosing is done internally by OpenKarto. It is done automatically, so you should see closures happen while you build a map with your robot. I suggest to turn on the graph visualization in RVIZ, so you see when a loop edge is added to the underlying graph. The nav2d package does not expose this function to the outside, so the only way to change the loop closing behavior is by changing OpenKarto's parameters. These are all exposed by nav2d and can be changed via the ROS parameter server.

You can find all available parameters in the OpenKarto source code:

https://github.com/skasperski/navigat...

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2019-08-04 19:14:37 -0600

Seen: 390 times

Last updated: Aug 08 '19