Code Monkey home page Code Monkey logo

orb_slam2_aruco's Introduction

update

2023.08.19 In fact, I don't maintain this repository anymore, but I feel that some friends may be interested in this code. And I found out that the links of UcoSLAM and SPM-SLAM below can no longer be opened, so I put the previous information and data on the Baiduwangpan, hoping that could be useful. In addition, I really forgot some details about the code, but this code does only need some dependencies based on ORB_SLAM2 to run, and then it is reasonable to realize the initial scale correction and closed-loop correction.

其实我现在已经不维护这个仓库了,但感觉有些同学可能对这个代码感兴趣。然后才发现下面UcoSLAM和SPM-SLAM的链接已经打不开了,因此我把以前的资料和数据放在了网盘上(包括最开始SPM-SLAM放在网上的数据和我自己处理的脚本、参数文件),希望对大家有所帮助。另外,关于代码的一些细节,我是真的有点忘了,但是这个代码确实只需要基于ORB_SLAM2的一些依赖即可运行,然后讲道理是可以实现初始化的尺度校正和闭环修正等操作的。

link 链接: https://pan.baidu.com/s/1m0gLQ1aM8pWfjZNbCZRzKw 提取码: jc4i

Run

./mono_cvcam path_to_vocabulary videofile cameraparams.yml outposes ARUCO_DIC

没记错的话,spm video1-8 的ARUCO_DIC是ARUCO,samsung7_markers的ARUCO_DIC是ARUCO_MIP_25h7。


I'm now adding some new features in this program. I will open the whole source when I finish it. Please be waiting.

ORB_SLAM2_aruco

This SLAM system is based on ORB_SLAM2.

I added fiducial markers--Aruco to obtain the scale, decrease scale drift, and track in large-scale environment.

I learned a lot from UcoSLAM, and wrote the codes from my personal understanding.

map1

pic5

Function:

  1. It can initialize map by Aruco or Keypoints. If initial by Keypoints, there is a module to correct scale.(In the LocalMapping thread, I commented this code because I usually use aruco to initial map. But it still work)
  2. It can track by MapPoint and MapAruco features.
  3. It can update all features and keyframe in localMapping thread.
  4. It can detect and correct loop by MapAruco or MapPoints, and update all features in the global bundle adjustment.
  5. It can show Aruco in the map.

Notice:

The code in /Examples/Monocular/mono_cvcam.cc is come from SPM-SLAM

Citation

R. Mur-Artal, J. M. M. Montiel, and J. D. Tardos, “ORB-SLAM: a Versatile and Accurate Monocular SLAM System,” IEEE Transactions on Robotics, vol. 31, no. 5, pp. 1147–1163, 2015.

Rafael Muñoz-Salinas,Manuel J. Marín-Jiménez Manuel and Rafael Medina-Carnicer , "SPM-SLAM: Simultaneous Localization and Mapping with Squared Planar Markers", September 2018 Pattern Recognition DOI: 10.1016/j.patcog.2018.09.003

Rafael Muñoz-Salinas, R. Medina-Carnicer, "UcoSLAM: Simultaneous localization and mapping by fusion of keypoints and squared planar markers," Pattern Recognition, 2020,107193

orb_slam2_aruco's People

Contributors

carminliu avatar

Stargazers

 avatar  avatar Cheng Zhu avatar  avatar  avatar Ekko avatar Happy-ZZX avatar fanjing8 avatar  avatar  avatar  avatar sqq6666 avatar  avatar  avatar lalala123 avatar 陈露 avatar Tipriest avatar Xinyang avatar  avatar  avatar letter avatar AugustL avatar  avatar liu jiacheng avatar Zhou Wugen avatar  avatar  avatar 刘国庆, Guoqing Liu avatar JIAGANG CHEN avatar VirtualPierogi avatar  avatar  avatar Wei Yizhi avatar Ray Raven avatar  avatar weiningwei avatar Hu Zhu avatar Jimmy Yen avatar  avatar Why avatar  avatar Or Katz avatar  avatar 然 avatar  avatar  avatar leenas233 avatar  avatar Liu Yufei avatar  avatar  avatar 曹明伟,Mingwei Cao avatar  avatar

Watchers

 avatar  avatar

orb_slam2_aruco's Issues

confused about the marker

作者你好。最近我在看SPM-SLAM的论文,对里面的二维码估计相机相对位姿有点疑惑。
我的问题就是论文中的初始化过程,难道可以从一帧图像上得到相机和标记的相对位姿变换吗?这是怎么做到的呢?(不考虑所谓的Pose ambiguity ,我的意思指的就是难道可以从一张有二维码标记图片上得到相机的相对位姿吗,因为我是个初学者,这一点不太懂)

how to run this code for testing live stream from camera and all src and include files are missing

Hey, i would like to know how to run this code for live images from camera, also why are the files missing for src and include file and after adding the necessory files from original ORBSLAM3 repo i am getting this issue
In file included from /usr/include/eigen3/Eigen/Core:363,
from /usr/include/eigen3/Eigen/LU:11,
from /home/nazneen/slam/projects/ORB_SLAM2_aruco/Thirdparty/Sophus/sophus/so2.hpp:12,
from /home/nazneen/slam/projects/ORB_SLAM2_aruco/Thirdparty/Sophus/sophus/se2.hpp:7,
from /home/nazneen/slam/projects/ORB_SLAM2_aruco/Thirdparty/Sophus/sophus/geometry.hpp:7,
from /home/nazneen/slam/projects/ORB_SLAM2_aruco/include/Frame.h:28,
from /home/nazneen/slam/projects/ORB_SLAM2_aruco/include/MapAruco.h:9,
from /home/nazneen/slam/projects/ORB_SLAM2_aruco/src/MapAruco.cc:6:
/usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
162 | EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
| ^~~~~~~~~~
/home/nazneen/slam/projects/ORB_SLAM2_aruco/src/MapAruco.cc: In member function ‘void ORB_SLAM3::MapAruco::UpdateTcmByKF(ORB_SLAM3::KeyFrame*, size_t)’:
/home/nazneen/slam/projects/ORB_SLAM2_aruco/src/MapAruco.cc:96:25: error: ‘class ORB_SLAM3::KeyFrame’ has no member named ‘mvMarkers’
96 | cv::Mat rvec = pKF->mvMarkers[idx].Rvec;
| ^~~~~~~~~
/home/nazneen/slam/projects/ORB_SLAM2_aruco/src/MapAruco.cc:98:17: error: ‘class ORB_SLAM3::KeyFrame’ has no member named ‘mvMarkers’
98 | mtcm = pKF->mvMarkers[idx].Tvec;
| ^~~~~~~~~
/home/nazneen/slam/projects/ORB_SLAM2_aruco/src/MapAruco.cc: In member function ‘void ORB_SLAM3::MapAruco::SetBadFlag()’:
/home/nazneen/slam/projects/ORB_SLAM2_aruco/src/MapAruco.cc:254:14: error: ‘class ORB_SLAM3::KeyFrame’ has no member named ‘EraseMapArucoMatch’; did you mean ‘EraseMapPointMatch’?
254 | pKF->EraseMapArucoMatch(mit->second);
| ^~~~~~~~~~~~~~~~~~
| EraseMapPointMatch
/home/nazneen/slam/projects/ORB_SLAM2_aruco/src/MapAruco.cc:256:12: error: ‘class ORB_SLAM3::Map’ has no member named ‘EraseMapAruco’
256 | mpMap->EraseMapAruco(this);
| ^~~~~~~~~~~~~
/home/nazneen/slam/projects/ORB_SLAM2_aruco/src/MapAruco.cc: In member function ‘cv::Point3f ORB_SLAM3::MapAruco::get3DPointsLocalRefSystem(size_t)’:
/home/nazneen/slam/projects/ORB_SLAM2_aruco/src/MapAruco.cc:57:1: warning: control reaches end of non-void function [-Wreturn-type]
57 | }
| ^
make[2]: *** [CMakeFiles/ORB_SLAM2.dir/build.make:427: CMakeFiles/ORB_SLAM2.dir/src/MapAruco.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:105: CMakeFiles/ORB_SLAM2.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

slam cant initialize

Hi,I try to use SPM dataset "video7" to run this program, but it cant initialize. I also tried other datasets such as Euroc, Kitti.
I have tried mono_cvcam and mono_marker, but neither of them worked.
When I use mono_marker, I use my own way to convert the mp4 video to picture datasets. So I guess there may be a problem with my dataset.
Would you please to share your dataset with me? You can send it to my email [email protected] or other ways.Thank you so much.
(My English is poor, so please forgive me for any offence)

The "err" is always so big.
It shows
"
err = 7.91659e+06
R21.size() = 3
err = 346302
err = 299009
err = 771470
R21.size() = 3
err = 347766
err = 788299
err = 6.20385e+06
R21.size() = 3
0.000645
err = 1.00668e+06
R21.size() = 1
R21.size() = 0
"

作者您好

  学长or学姐您好,我是一名大四学生,最近我运行了您的代码,共遇到下面几个问题(也在尝试更改,但是本人技术太菜,不一定改的出来):

1、触发闭环校正后,marker的标记位置没有随着地图的校正而校正。
2、在重定位之后,marker的标记的位置会发生错乱。
3、在移动速度过快,或者处于转向过程中识别到的二维码位姿误差较大。
4、录制的视频数据集时间过长会发生段错误。
5、使用Aruco初始化的误差较大,可以通过更改err的阈值来实现,但是在图像中只有一个Aruco码的时候初始化不了,测试发现使用较多的Aruco码可以加大初始化的成功率。
6、学弟还是比较喜欢使用之前的方法进行初始化,在创建初始化函数中,您删除了尺度校正的代码,经过运行发现,在刚初始化后识别二维码误差距离误差较大(您的校正在局部建图函数中),所以还是应该添加回来。
上面便是我近期运行的情况总结,我也更改了部分代码,可能上述问题并不会出现在您的代码中。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.