lajoiepy / cslam

Swarm-SLAM nodes (ROS 2)
https://lajoiepy.github.io/cslam_documentation/html/index.html
MIT License
39 stars 12 forks source link

[question] CSLAM language choice #29

Closed mbed92 closed 1 year ago

mbed92 commented 1 year ago

Hi

What's the reason for writing some part of the code in Python (as far as I can see there is a part of front-end, and that neighbors-handling node) and another part in C++ (another part of front-end and back-end)? Why not decide on one language?

PS. Very impressive work! There should be much more stars! :)

lajoiepy commented 1 year ago

Thanks!

It was mostly for convenience, and the availability of dependencies at the time of implementation. For example, rtabmap API is in c++, gtsam documentation is better for C++, place recognition models are in pytorch, C++ is more efficient than python for some computation, etc. I agree it would be cleaner in one language, but fortunately ROS makes it easy to interoperate between languages.

I tried to split the different computation modules into separate nodes as much as possible, so if you want to extend Swarm-SLAM and/or test new ideas, you can "easily" re-implement a node in the language of your choice to fit your needs. You only need to respect the message interface! As an example, the front-end has some C++ for stereo and rgbd, but is fully python for lidar.

Don't hesitate if you have more questions! :)

mbed92 commented 1 year ago

Thank you for the response. We're currently considering jumping into Swarm SLAM, so perhaps I'll come back later to you. Cheers :)