# Semanic SLAM Paper、Bug、Debug ....
# 思宇筆
# DynaSLAM
---
DynaSLAM vs ORBSLAM2相比結果
作者利用TMU(慕尼黑工業大學)DATASER當作groundtruth
在下圖中,誤差中位數來看明顯比原本ORBSLMA2還要好

由於此篇論利用mask-rcnn將動態物體進行慮除,慮除後將動態障礙物用黑色的mask所遮住,並且利用inpaint演算法填補動態障礙物

原始影像

利用mask-rcnn計算出動態障礙物候,在進行inpaint

我想這裡是個問題,因為椅子始終沒影移動但是顏色被改變
TMU DATASER:https://vision.in.tum.de/data/datasets/rgbd-dataset/download
* 安裝dynaSLAM過程中,此篇參考文獻是比較完整的,但不確保完全沒問題,但安裝順序按照此文章是沒有問題的
https://pse.is/3bjvwx
> [name=沈柏志]這個我有把他跟https://github.com/appliedAI-Initiative/orb_slam_2_ros 整合在一起,編譯可以過,只是我沒有測試能不能跑,那時候幫志哲他們整合的
* 下載OpenCV2.4.11,你若已經下載過其他版本的opencv,這會導致嚴的問題,建議先刪除其他版本
利用make uninstall ... 在原本的build資料夾裡刪除
下載過程可以follow此網址但必須注意cmake是否要使用cuda
https://gist.github.com/SoonminHwang/e010ec8fd6de8a1c2c4d5d5ff854109b
當在進行cmake時遇到
`CMake Error: CUDA_nppi_LIBRARY (ADVANCED)`
請在cmake指令後面設定編譯參數
```
cmake WITH_CUDA=OFF CMAKE_INSTALL_PREFIX=/usr/local..
cmake (關閉cuda) (make install安裝路徑)
```

當進行make install後會在你當初cmake時CMAKE_INSTALL_PREFIX路徑下安裝此"路徑檔",".so執行檔"...
可參考此篇中的cmake: https://pse.is/3ca34q
* 下載DynaSLAM
DynaSLAM website
```
git clone https://bertabescos.github.io/DynaSLAM/
```
下載完後不要急著編譯!
MaskDynaSLAM指定opencv2.4.11
YOLODynaSLAM指定opencv3.4.11

```
./build.sh
```
我是最新板會遇到此問題,請將cmakefile最後三句註解
此問題就是因為作者在最新版本中沒有給mono_carla.cc檔案,因此註解調即可

* 下載mask_rcnn_coco.h5權重資料,下載完後放入 ..../DynaSLAM/src/python 中
我是用第一個資源,點開即可下載
-https://github.com/matterport/Mask_RCNN/releases/download/v2.0/mask_rcnn_coco.h5
-https://github.com/matterport/Mask_RCNN/releases/tag/v2.0
* 下載連結程式, 放入你的TUM DASTSET中
可參考此篇文章https://zhuanlan.zhihu.com/p/119422186
1.打開連結複製程式碼 2.創建 associate.py檔案 3.貼上程式碼
https://pse.is/3cl923
現在執行以下程式,創立.txt檔案,txt檔案內為rgb檔案和depth檔案對齊
也就是說depath1會跟rgb1一起輸入當作fram1的input data
`python associate.py <change_to_your_path>/rgb.txt <change_to_your_path>/depth.txt > associations.txt`
* 下載cocodataset
```
git clone https://github.com/waleedka/coco.git
cd coco/PythonAPI
sudo make
```
編譯完成後將coco/PythonAPI 資料夾中的 pycocotools 移動到和權重相同的資料夾..../DynaSLAM/src/python
https://github.com/cocodataset/cocoapi
* 接下來要用作者提供的check.py檢查mask-rcnn是否運作正常
首先請先修改你的路徑 COCO_MODEL_PATH
`COCO_MODEL_PATH = os.path.join(ROOT_DIR, "<change_to_your_path>/mask_rcnn_coco.h5")`

# DynaSLAM debud
https://blog.csdn.net/qq_42938987/article/details/83795217
**opencv2.4.11**
https://gist.github.com/SoonminHwang/e010ec8fd6de8a1c2c4d5d5ff854109b
切換opencv版本
https://blog.csdn.net/lql0716/article/details/54565579
**cmake設定**
https://reurl.cc/3Ne5gR
**CMake Error at CMakeLists.txt:150 (add_executable):
Cannot find source file**:
https://blog.csdn.net/lexiaoxiaoxiao/article/details/101561416
compute-20
https://askubuntu.com/questions/960238/nvcc-fatal-unsupported-gpu-architecture-compute-20
```
nImages: 1352
Loading Mask R-CNN. This could take a while...
Importing Mask R-CNN Settings...
Segmentation fault (core dumped)
```
https://github.com/BertaBescos/DynaSLAM/issues/10
其他可能的bug
https://blog.csdn.net/ljl1015ljl/article/details/100749835
# Edge computer Adlink
adlinktech
https://www.adlinktech.com/en/ROS2-Solution
ROScube-X
https://www.adlinktech.com/Products/ROS2_Solution/ROS2_Controller/ROScube-X?Lang=en#tab-24643
ROScube-X 是基於AGX電腦
https://reurl.cc/3Nxq90
omparison of ROS-Based Monocular Visual SLAM Methods: DSO, LDSO, ORB-SLAM2 and DynaSLAM
https://link.springer.com/chapter/10.1007/978-3-030-60337-3_22
# DynSLAM
---
Simultaneous Localization and Mapping in Dynamic Environments
大型動態城市環境的基於立體聲的密集映射算法,重建了靜態背景,運動對象和可能運動但當前靜止的對象
**實例**感知語義分割和稀疏場景流將對象分類為背景,移動或潛在移動,從而確保系統能夠對可能從靜態轉換為動態的對象
作者的網站 Author's website.(include paper, video,source code github)
https://siegedog.com/dynslam/

# RDS-SLAM
---
RDS-SLAM: Realtime Demo Using Kinect (Mask R-CNN)
https://www.youtube.com/watch?v=-peAZEO6Bbo&feature=youtu.be&ab_channel=LuckyRobot
paper
https://ieeexplore.ieee.org/document/9318990