VINS-Fusion icon indicating copy to clipboard operation
VINS-Fusion copied to clipboard

adding a NaN check for feature points

Open hbbor opened this issue 4 years ago • 12 comments

Adding a nan check for feature points in feature tracker which is causing problems with fisheye lens cameras like the Intel Realsense T265. I have checked the working of the algorithm as it works fine now with the default calibration parameter provided by intel.

hbbor avatar Apr 21 '20 08:04 hbbor

I can confirm that this works and is necessary to make VINS work with a Realsense T265 tracking camera. I had to remove the following assertion though:

https://github.com/HKUST-Aerial-Robotics/VINS-Fusion/blob/0c3206941410723b8c62b7b0c6a6189b38ae7d99/vins_estimator/src/estimator/feature_manager.cpp#L65

mintar avatar May 06 '20 13:05 mintar

That do works! But for me it requires additional inf check like this.

        if (!std::isinf(cur_un_pts[i].x) && !std::isinf(cur_un_pts[i].y) && !std::isnan(cur_un_pts[i].x) && !std::isnan(cur_un_pts[i].y))

RangerOnMars avatar Jan 02 '23 06:01 RangerOnMars

这确实有效!但对我来说,它需要像这样的额外 inf 检查。

        if (!std::isinf(cur_un_pts[i].x) && !std::isinf(cur_un_pts[i].y) && !std::isnan(cur_un_pts[i].x) && !std::isnan(cur_un_pts[i].y))

which cpp file?

zkq123456789 avatar Dec 19 '23 08:12 zkq123456789

这确实有效!但对我来说,它需要像这样的额外 inf 检查。

        if (!std::isinf(cur_un_pts[i].x) && !std::isinf(cur_un_pts[i].y) && !std::isnan(cur_un_pts[i].x) && !std::isnan(cur_un_pts[i].y))

which cpp file?

At feature_tracker.cpp ,line 261 and line 283. Wrap this extra inf check inside these for loops.

RangerOnMars avatar Dec 19 '23 11:12 RangerOnMars

这确实有效!但对我来说,它需要像这样的额外 inf 检查。

        if (!std::isinf(cur_un_pts[i].x) && !std::isinf(cur_un_pts[i].y) && !std::isnan(cur_un_pts[i].x) && !std::isnan(cur_un_pts[i].y))

which cpp file?

At feature_tracker.cpp ,line 261 and line 283. Wrap this extra inf check inside these for loops.

thank u,but this code can not slove my problem

zkq123456789 avatar Dec 19 '23 12:12 zkq123456789

这确实有效!但对我来说,它需要像这样的额外 inf 检查。

        if (!std::isinf(cur_un_pts[i].x) && !std::isinf(cur_un_pts[i].y) && !std::isnan(cur_un_pts[i].x) && !std::isnan(cur_un_pts[i].y))

which cpp file?

At feature_tracker.cpp ,line 261 and line 283. Wrap this extra inf check inside these for loops.

May I ask what platform you are running on? I am running on NX.

zkq123456789 avatar Dec 20 '23 02:12 zkq123456789

这确实有效!但对我来说,它需要像这样的额外 inf 检查。

        if (!std::isinf(cur_un_pts[i].x) && !std::isinf(cur_un_pts[i].y) && !std::isnan(cur_un_pts[i].x) && !std::isnan(cur_un_pts[i].y))

which cpp file?

At feature_tracker.cpp ,line 261 and line 283. Wrap this extra inf check inside these for loops.

May I ask what platform you are running on? I am running on NX.

On Inter NUC 11.

RangerOnMars avatar Dec 20 '23 12:12 RangerOnMars

这确实有效!但对我来说,它需要像这样的额外 inf 检查。

        if (!std::isinf(cur_un_pts[i].x) && !std::isinf(cur_un_pts[i].y) && !std::isnan(cur_un_pts[i].x) && !std::isnan(cur_un_pts[i].y))

which cpp file?

At feature_tracker.cpp ,line 261 and line 283. Wrap this extra inf check inside these for loops.

May I ask what platform you are running on? I am running on NX.

On Inter NUC 11.

thanks bro, How does vinsfusion work on the NUC platform? Is it stable?

zkq123456789 avatar Dec 21 '23 03:12 zkq123456789

这确实有效!但对我来说,它需要像这样的额外 inf 检查。

        if (!std::isinf(cur_un_pts[i].x) && !std::isinf(cur_un_pts[i].y) && !std::isnan(cur_un_pts[i].x) && !std::isnan(cur_un_pts[i].y))

which cpp file?

At feature_tracker.cpp ,line 261 and line 283. Wrap this extra inf check inside these for loops.

May I ask what platform you are running on? I am running on NX.

On Inter NUC 11.

thanks bro, How does vinsfusion work on the NUC platform? Is it stable?

Friend, can you provide your source code, thanks a lot

zkq123456789 avatar Dec 21 '23 03:12 zkq123456789

这确实有效!但对我来说,它需要像这样的额外 inf 检查。

        if (!std::isinf(cur_un_pts[i].x) && !std::isinf(cur_un_pts[i].y) && !std::isnan(cur_un_pts[i].x) && !std::isnan(cur_un_pts[i].y))

which cpp file?

At feature_tracker.cpp ,line 261 and line 283. Wrap this extra inf check inside these for loops.

May I ask what platform you are running on? I am running on NX.

On Inter NUC 11.

thanks bro, How does vinsfusion work on the NUC platform? Is it stable?

Friend, can you provide your source code, thanks a lot I am using a ROS2 distribution of VINS-Fusion, which can be found at https://github.com/zinuok/VINS-Fusion-ROS2. Here's my distribution https://github.com/tup-robomaster/TUP2023-Sentry-Nav/tree/main. You can find my source code and configuration in the VINS-Fusion-ROS2 directory.

RangerOnMars avatar Dec 21 '23 06:12 RangerOnMars

这确实有效!但对我来说,它需要像这样的额外 inf 检查。

        if (!std::isinf(cur_un_pts[i].x) && !std::isinf(cur_un_pts[i].y) && !std::isnan(cur_un_pts[i].x) && !std::isnan(cur_un_pts[i].y))

which cpp file?

At feature_tracker.cpp ,line 261 and line 283. Wrap this extra inf check inside these for loops.

May I ask what platform you are running on? I am running on NX.

On Inter NUC 11.

thanks bro, How does vinsfusion work on the NUC platform? Is it stable?

Friend, can you provide your source code, thanks a lot I am using a ROS2 distribution of VINS-Fusion, which can be found at https://github.com/zinuok/VINS-Fusion-ROS2. Here's my distribution https://github.com/tup-robomaster/TUP2023-Sentry-Nav/tree/main. You can find my source code and configuration in the VINS-Fusion-ROS2 directory.

thanks a lot,bro

zkq123456789 avatar Dec 21 '23 06:12 zkq123456789

Hello! I received this error after cloning the latest code. Is there any solution? vins_node: /home/yuan/dai_ws/src/VINS-Fusion/vins_estimator/src/estimator/feature_manager.cpp:65: bool FeatureManager::addFeatureCheckParallax(int, const std::map<int, std::vector<std::pair<int, Eigen::Matrix<double, 7, 1> > > >&, double): Assertion `id_pts.second[0].first == 0' failed.

ahjcahkl avatar Jan 11 '24 03:01 ahjcahkl