mtlazaro / cg_mrslam

A ROS package that implements a multi-robot SLAM system using the condensed graphs approach
BSD 3-Clause "New" or "Revised" License
85 stars 32 forks source link

How to display the merged map #9

Closed Gaoee closed 6 years ago

Gaoee commented 6 years ago

Hi, I have run the project on computer. But when I want to display the merged map of the two robots in RVIZ, there is not option for me select. Is that any wrong I have made? Look forward to your reply, thank you.

mtlazaro commented 6 years ago

Hi @Gaoee our approach for multi-robot SLAM is distributed. Robots work on their own reference frame and from time to time, when they meet they add some information from others. In order to avoid duplicity of information they only share a "condensed" version of it.

For these reasons It is not possible to visualize the merged map during execution. You can reconstruct the global map after the execution from the individual g2o graphs and thanks to the relations established between them with the following procedure: $ cat map-robot0.g2o map-robot1.g2o .... map-robotn.g2o > map-merged.g2o Open map-merged.g2o with an editor and remove all lines containing FIX EXCEPT but one. This keyword under a VERTEX_SE2 is used to say that vertex is the origin in the map. But in the merged map we need only ONE origin so we need only one fixed vertex.

You can then open map-merged.g2o with g2o_viewer. From here you can optimize and save the optimized graph.

I hope I helped with your question.

woshidaye commented 6 years ago

Hi@Gaoee I didn't generate the corresponding '.g2o' file when I ran 'Example of use'. How do you realize it? I hope to get your answer, thank you.

mtlazaro commented 6 years ago

Hi,

you should see the generated g2o file in the folder where you launch the command only if you used the "-o filename.go" option as shown in the example.

Best, Mayte.

El jue., 19 jul. 2018 a las 11:22, woshidaye (notifications@github.com) escribió:

Hi@Gaoee I didn't generate the corresponding '.g2o' file when I ran 'Example of use'. How do you realize it? I hope to get your answer, thank you.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mtlazaro/cg_mrslam/issues/9#issuecomment-406213043, or mute the thread https://github.com/notifications/unsubscribe-auth/AE_wAQuvsczaptipyrQE0HGzNWDQarYFks5uIE_bgaJpZM4VKxpa .