ethz-asl / segmap

A map representation based on 3D segments
BSD 3-Clause "New" or "Revised" License
1.07k stars 393 forks source link

Multi-robot SLAM error #148

Open JamesLXZ opened 5 years ago

JamesLXZ commented 5 years ago

Hi @smauq , I encoutered two problems while making mulit-robot slam demonstration. First of all, I use your remap.py file to remap rosbags in ~/.segmap.

$ python remap_bag.py -i '/home/james/.segmap/kitti/2011_10_03_drive_27.bag' -o '/home/james/.segmap/kitti/2011_10_03_na0_drive_27.bag' -p /na0

The Error is show blow, and it still generated a new bag file and it can be used in your code.So I'm confused whether the new bag file is successfully generated or it has some potential errors.

Processing input bagfile:  /home/james/.segmap/kitti/2011_10_03_drive_27.bag
  Writing to output bagfile:  /home/james/.segmap/kitti/2011_10_03_na0_drive_27.bag
              Adding prefix:  /na0
Closing output bagfile and exit...
Traceback (most recent call last):
  File "remap_bag.py", line 64, in <module>
    traceback.print_exc()
NameError: name 'traceback' is not defined

Then I change the path of bag file to newly generated file in file "/home/james/segmap_ws/src/segmap/segmapper/launch/kitti/cnn_kitti_loop_closure.launch " <arg name="bag_file" value="$(env HOME)/.segmap/kitti/2011_10_03_drive_na0_27.bag"/> And I change number_of_robots: in the file "/home/james/segmap_ws/src/segmap/segmapper/launch/kitti/cnn_kitti_loop_closure.yaml" from 1 to 2.

After that I run the launch file roslaunch segmapper cnn_kitti_loop_closure.launch to start demostration, it reported errors below:

[ERROR] [1560214472.139599346]: Tried to advertise a service that is already advertised in this node [/segmapper/get_laser_track]
[ERROR] [1560214472.139637172]: Tried to advertise a service that is already advertised in this node [/segmapper/export_trajectory]

I only open 1 rosbag file and the SLAM can run at the beginning, but it can't run segmatch part which resulted to process dead. I wondered it is because I only open 1 rosbag file to and to services of robot make a confliction to make this error. Please tell me if I am wrong, thank you very much!