MIT-SPARK / Kimera-VIO-ROS

ROS wrapper for Kimera-VIO
BSD 2-Clause "Simplified" License
362 stars 150 forks source link

Running Kimera-VIO loop closure and the rest of Kimera pipeline with external odometry and depth image #176

Open MikeDmytrenko opened 1 year ago

MikeDmytrenko commented 1 year ago

Greetings developers! I'm trying to run Hydra using a ZED camera from which I take the TF with odometry as well as depth image for mesh building. The problem I'm running into is that I'm not able to understand how can I run with the loop closure enabled.

I do not want to rely on ZED to perform its loop closure, so I'd like to run Kimera-VIO-ROS loop closure with pose graph publishing for the rest of the Hydra pipeline using odometry and depth images (and RGB) coming from the ZED camera. Can you please point me in the right direction of how can I do it and if it's even possible?

The reason I'm doing it this way is that the pose estimate (as well as a point cloud) coming from Kimera-VIO is much worse than what I get from the ZED camera directly, so I'm hoping to utilize the good results I already have, but with an addition of loop closures which is compatible with the rest of the pipeline.

Million thanks in advance!

marcusabate commented 1 year ago

Since the LCD module is built into the Kimera library's pipeline directly and not implemented as a separate ROS node, this would require either a change at the Kimera-VIO library level or a ROS wrapper for just the LCD module.

You can implement this as a new Pipeline in Kimera (see this file) and modify the inputs to the LoopClosureDetector object to match what you're expecting. This would be a pretty code-intensive change.

The better option would be to write a small ROS node that just spins up Kimera-VIO's LCD module. I did something similar years ago for testing here but note that this package is very out of date and not likely to work ootb. You can use it as a guide to develop your own though.