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
391 stars 40 forks source link

Launch file refactor needed #33

Closed mjforan closed 4 months ago

mjforan commented 5 months ago

The parameter flow in the launch files is broken. Using cslam_experiments/launch/cslam_lidar.launch.py as an example: there are arguments robot_id, namespace, and config which are passed to child nodes launched by the file. To determine the namespace, most nodes use the namespace parameter but cslam_pose_graph_manager uses '/r'+robot_id. In the yaml file set by config there is a parameter for the pointcloud topic, but then the launch file uses '/r'+robot_id+'/pointcloud'. Also, this particular topic remapping is reversed in the launch file.

These differences make it difficult to configure the system.

lajoiepy commented 5 months ago

Not sure about the pose_graph_manager problem you pointed out. Can you submit a pull request? Or give more details?

Concerning the pointcloud topic, the remapping was a bad quick fix, I reverted this change. Thanks for catching this!

mjforan commented 5 months ago

If I set namespace to / and robot_id to 123 these are the topics I get:

/cslam/current_neighbors
/cslam/debug_optimization_result
/cslam/get_current_neighbors
/cslam/get_pose_graph
/cslam/global_descriptors
/cslam/heartbeat
/cslam/inter_robot_loop_closure
/cslam/inter_robot_matches
/cslam/intra_robot_loop_closure
/cslam/keyframe_data
/cslam/keyframe_odom
/cslam/local_descriptors
/cslam/local_descriptors_request
/cslam/local_keyframe_match
/cslam/optimized_estimates
/cslam/optimizer_state
/cslam/pose_graph
/cslam/print_current_estimates
/cslam/reference_frames
/cslam/viz/keyframe_pointcloud
/cslam/viz/pose_graph
/odom
/ouster/imu
/ouster/points
/parameter_events
/path
/r0/cslam/get_pose_graph
/r0/cslam/heartbeat
/r0/cslam/local_descriptors_request
/r0/cslam/optimized_estimates
/r0/odom
/r123/cslam/current_pose_estimate
/rosout
/tf

decentralized_pgo.cpp, line 106: "/r" + std::to_string(i) + "/cslam/optimized_estimates", 100)}); hence the one lonely /r123/ topic.

I now understand that this isn't how you're supposed to configure the system, but it's an example of how the node behavior is inconsistent with the parameters.

lajoiepy commented 4 months ago

Sorry for the delayed response and thanks for the example! I won't fix this, but I added a line in the start-up instructions to explain the expected robot ids (i.e. robot 0, 1, 2, 3, etc.).