rpng / MINS

An efficient and robust multisensor-aided inertial navigation system with online calibration that is capable of fusing IMU, camera, LiDAR, GPS/GNSS, and wheel sensors. Use cases: VINS/VIO, GPS-INS, LINS/LIO, multi-sensor fusion for localization and mapping (SLAM). This repository also provides multi-sensor simulation and data.
GNU General Public License v3.0
397 stars 67 forks source link

How to integrate loop closure? #30

Open mzahana opened 1 month ago

mzahana commented 1 month ago

Hi @WoosikLee2510 Is it possible to integrate loop closure with MINS. My goal is to use MONO VIO + loop closure.

Thanks

WoosikLee2510 commented 1 month ago

Hi, @mzahana. You can use UpdaterVicon to fuse loop closure information to filter. Say, your loop closure method in another thread detected loop closure and computed a constraint that can update the front end. You can convert the loop closure constraint to global pose information (like Vicon) with uncertainty (you may want to set a conservative value).

mzahana commented 1 month ago

Thanks @WoosikLee2510 Can the ov_secondary be used to do the loop closure and feedback to MINS?

WoosikLee2510 commented 1 month ago

Note ov_secondary does not provide information to update the front end (e.g., OpenVINS). I think it can work if you create your own publisher to publish the loop closure information and use MINS to subscribe it as global pose information.

mzahana commented 1 month ago

I see there is a topic published for the output odometry from the loop fusion node https://github.com/rpng/ov_secondary/blob/c6b9e62a8bae453a230d024b4626906f62b5fb98/loop_fusion/launch/posegraph.launch#L27

Can this be fed to MINS?

WoosikLee2510 commented 1 month ago

Sure. you can add a subscriber that subscribes (under here) to the topic with type, convert the message to vicon type, and pass it. to system. I would be careful not to make the information overconfident because the loop closure information may be highly correlated to MINS and thus can easily hurt consistency.

mzahana commented 1 month ago

I thought MINS already subscribes to vicon ? no? @WoosikLee2510

WoosikLee2510 commented 1 month ago

No, it is not implemented because full global pose information (ViCON) is not something the estimator usually has access to. In the case you do not want to implement the subscriber by yourself but have rosbag that has the pose information converted from loop closure, you can use/run ros_bag which directly reads the messages from the bag and passes to estimator.