MISTLab / Swarm-SLAM

Sparse Decentralized Collaborative Simultaneous Localization and Mapping Framework for Multi-Robot Systems
https://lajoiepy.github.io/cslam_documentation/html/index.html
MIT License
435 stars 44 forks source link

PGO is not working properly on custom dataset #17

Closed TwiceMao closed 1 year ago

TwiceMao commented 1 year ago

I tried to modify the launch and yaml files, based on rtabmap_rgbd_odometry.launch and cslam_rgbd.launch.py. Use custom RGBD to Ros bag2 file. It looks like rgbd_odometry works, but strangely, pose graph optimization doesn't.

image

image

image

lajoiepy commented 1 year ago

Can you give more details? Why do you think the pose graph optimization doesn't work? I suggest using rqt_graph to visualize the nodes and topics. Chez if they are all connected. Then use ros2 topic hz or ros2 topic echo or ros2 node info to check if all the topics are publishing.

TwiceMao commented 1 year ago

@lajoiepy I tried your suggestion recently but it didn't work. Because from the information output on the screen, the odometry of /r0 and /r1 failed to work normally at the same time, and PGO also failed to work normally. I have been modifying your code for a long time, but because of my limited ability, I still can't get a set of code that works normally.

My customized cslam-experiments launch and config code are obtained by modifying the following files in your Github:

src\cslam_experiments\config\ kitti_stereo.yaml
src\cslam_experiments\launch\cslam\ cslam_rgbd.launch.py
src\cslam_experiments\launch\ datasets_experiments\kitti_stereo.launch
src\cslam_experiments\launch\odometry\ rtabmap_rgbd_odometry.launch.py
src\cslam_experiments\launch\sensors\ bag_kitti.launch.py

The script that launches my above code is ros2 launch cslam_experiments dataset_office0.launch.py

My customized cslam-experiments launch and config code download links are here: https://drive.google.com/file/d/1KG69LlxYO53YyoCMJsjj9Xi76F3eaSEt/view?usp=sharing

The dataset used is the RGB-Depth frames of 2 robots customized by me. The Google Drive download links for the ros2 bag files of the 2 RGB-D sequences (1500 frames each) I used are here: https://drive.google.com/file/d/1aDvPWSELRzMTh0-OiluYxClS9Y9G76tv/view?usp=sharing

https://drive.google.com/file/d/1KpHfVcdtEnHWo3OCPdGm0n5RkY6Qmezv/view?usp=sharing

In the ros2 bag, the message format of my depth map is 32FC1, and the depth scale is 1.

When running the codes, the directories of the two ros2 bag folders should be as follows: data\rgbd_office_0\ rgbd_office_00 data\rgbd_office_0\ rgbd_office_01 Thx!!!

lajoiepy commented 1 year ago

I am sorry that your are facing challenges running our code.

I strongly suggest to first focus on odometry, without launching Swarm-SLAM. Swarm-SLAM needs, as input, a stable and reasonably accurate odometry to work. The examples we provide leverage RTAB-Map for odometry, but I suggest trying other odometry softwares if this one does not work.

Once you have odometry working properly with your dataset, you could then try to run Swarm-SLAM.