發表文章

3D printer 操作步驟 (Lab)

1. 用3ds Max 畫要印的物件,輸出為.STL檔。 2. 於3D printer旁的電腦開啟待印檔案。(UP!) 3. 3D printer Power ON,並連接電腦(USB Port)。 4. 初始化校正。 5. 更換顏色。(取出&插入,測試到顏色正常輸出為止: プリンター設定) 6. 移動物件列印位置。(盡量不要在螺絲孔上) 7. 預覽列印。(可更改輸出設定,如密度) 8. 開始列印。(可忽略跳出警告視窗) 9. 一旦開始列印後即可拔出連接線。

Linux command, C++

1. argc, argv (C++) Reference:  argc-argv.html 2. cp (copy file or folder to another directory) (Linux) Reference:  cp-command 3. vector (C++) Reference:  Vector 4. assert (C++) ex: assert(iTotalNumber < 1000); Means若 iTotalNumber < 1000 則程式可以繼續執行;若iTotalNumber >= 1000 ,則會秀出維護錯誤訊息的字串,並結束程式。 5. chmod (Linux) Revise file property. (chmod 777 file) Reference:  chmod ,  chmod2 6. rm (Linux) For deleting files, folders... Reference:  rm 7. readlink Find file's path ex: readlink -f file.txt 8. clone Copy a data without possibility of interfacing to original parameter. Reference:  clone() 9. Iterator Reference:  iterator 10. reserve Reference:  reserve 11. erase Reference:  erase 12. Gaussian distribution noise Reference:  Gaussian noise 13. const 可用於修飾函數傳遞參數,在函數內不可被改變。 Reference:  const 14. Meaning of "make -jn" Denotes how many threads you w...

OpenCV

1. size Reference:  OpenCV基本結構(Point、Size、Rect等) 2. stereoRectify Computes rectification transforms for each head of a calibrated stereo camera. 3. resize resize(input_img, output_img, cv::Size(), scale, scale); 4. at Reference:  像素巡訪(at、ptr) 5. Rodrigues Reference:  Introduction to Rodrigues 6. Extract specific Mat region cv::Rect. cv::Range Reference:  获取Mat图像的ROI区域 ,  https://www.cnblogs.com/adong7639/p/4360225.html 7. Mat fomat  Reference:  影像格式(Mat) 8. GaussianBlur Reference:  OpenCV高斯平滑

Visual odometry step by step ( ZED stereo camera )

1. Initial setting:  Install OpenCV extra modules  Setting nsight environment (include and lib path)  Confirm ZED Serial number (/usr/local/zed/tools/ ZED Explorer )  Key in ZED SN to get camera matrix and rectified images 後來改成用ZED SDK得到camera matrix (每次run程式時,回傳值都有一點誤差,可能是環境溫度等等造成)  Open ZED Camera and get real-time rectified images Reference: Homepage zed-examples zed&opencv zed-opencv-native 2. Feature matching / Stereo matching: Convert ZED source images to grayscale images Declare an OpenCV matcher (ex: BFMatcher )  Search match points between two images (left and right) Storing keypoints into vectors  Using RANSAC method to find good stereo matching points ( findHomography OpenCV Fundamental matrix function ) Draw and Display good stereo matching points according  RANSAC_mask   Reference: 立体匹配算法(Stereo Matching)及其在OpenCV中的应用 OpenCV Stereo Matching の性能比較 Viulib tutorial_feature_flann_matche...

ROS installation errors and solutions

圖片
Q1. The following packages have unmet dependencies: ros-kinetic-desktop-full : Depends: ros-kinetic-desktop but it is not going to be installed Depends: ros-kinetic-perception but it is not going to be installed Depends: ros-kinetic-simulators but it is not going to be installed Depends: ros-kinetic-urdf-tutorial but it is not going to be installed E: Unable to correct problems, you have held broken packages. Solution: Reset system setting (Software Updater) sudo rm /etc/apt/sources.list sudo software-properties-gtk Pick your options (Choose all options of Download from the internet, Download from Main server , Other software: delete "duplicates" as following picture) Close and reload (upgrade) Reference:  https://askubuntu.com/questions/760896/how-can-i-fix-apt-error-w-target-packages-is-configured-multiple-times ,  https://blog.csdn.net/xiangxianghehe/article/details/78483799 Q2. binary-arm64/Packages 404 Not Found Solution: apt-get remove .*:arm64...

Install OpenCV's extra modules

圖片
[Install OpenCV's extra modules] Key: OpenCV and OpenCV contrib's version should be the same. (ex:3.3.1) (1) Download OpenCV 3.3.1 and OpenCV contrib 3.3.1 (Even OpenCV has been installed through Jetpack) (2) Put OpenCV contrib 3.3.1 folder into OpenCV 3.3.1 folder (3) Create a build folder and cd to the directory (4) Command: $ cmake -DOPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules <opencv_source_directory> $ make -j5 (5) Open cmake GUI (cmake-gui) (6) Follow the step2-7, extra source files and libraries should be correctly installed at /usr/local/include & /usr/local/lib Reference:  opencv_contrib ,  安裝OpenCV + OpenCV_Contrib ,  jetsonhacks

Visual odometry for drone's navigation

[Concept] Considering a drone is currently at a position P(i), at time step i. A waypoint to be achieved at the next time step is W(i+1) 1. Calculating position error between W(i+1) and P(i). 2. Position error fed into a PID controller that generates a velocity command V(i). 3. Calculating velocity error between V(i) and current velocity from visual odometry algorithm. 4. Velocity error fed into another PID controller to get an appropriate roll, pitch, yaw and throttle outputs. Reference: [1] Strydom, Reuben, Saul Thurrowgood, and Mandyam V. Srinivasan. "Visual odometry: autonomous uav navigation using optic flow and stereo." Proceedings of Australasian Conference on Robotics and Automation. 2014. [Intel AERO] Connecting Lidar Lite Range Finder: https://github.com/intel-aero/aero-optical-flow https://docs.px4.io/en/flight_controller/intel_aero.html ROS: 05-Autonomous-drone-programming-with-ROS http://wiki.ros.org/rtabmap_ros  ( Section: Stereo Outd...