發表文章

[Solved] ssh connection failed

Problem: C:\Users\shomin>ssh namikidrone2@192.168.8.1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the ECDSA key sent by the remote host is SHA256:MvA6+SzNldrn/8WOyMlPHDjqOWhtlIMTAj2HX0kno9A. Please contact your system administrator. Add correct host key in C:\\Users\\shomin/.ssh/known_hosts to get rid of this message. Offending ECDSA key in C:\\Users\\shomin/.ssh/known_hosts:1 ECDSA host key for 192.168.8.1 has changed and you have requested strict checking. Host key verification failed. Solution: Edit file: known_hosts located at C:\\Users\\shomin/.ssh/ Add: Host *    StrictHostKeyC...

Tuing PID parameters in QGroundcontrol (1)

圖片
[Attitude control module] [Position control module]  Tip1: Default value => Tuning P (As big as possible if no oscillation occurred ) => Tuning D (As big as possible if no oscillation occurred )  => Tuning I (Should not too big ) Tip2: Both parameters in m ulticopter attitude control  module and   multicopter position control  module influence the flight of offboard flight mode. [3] Tip3: Tuning the hovering throttle is needed if your system is overweight or too lightweight. ( Default hovering throttle is 50% ) *ADVANCED TUNING: For more robust position control of a multicopter. [4-5] Reference: [1]  无人机系统PX4视频教程:飞行PID参数调试 [2] C:\Users\shomin\Desktop\School\精華\PX4開發教學\PX4初级视频教程\第X讲:飞行PID参数调试\第X讲:飞行PID参数调试 [3]  PX4 Architectural Overview [4]  https://docs.px4.io/en/config_mc/advanced_mc_position_tuning.html [5]  https://docs.px4.io/en/advanced_config/parameter_reference.html#MPC_ACC_HOR

Build OpenCV 3.3.1 with CUDA 9.0 support

圖片
Removing OpenCV installed by JetPack before performing this script installation: $ sudo apt-get purge libopencv* [Step by step commands] $ cd ~ $ wget -O opencv.zip https://github.com/Itseez/opencv/archive/ 3.3.1 .zip $ unzip opencv.zip $ cd opencv $ wget -O opencv_contrib.zip https://github.com/Itseez/opencv_contrib/archive/ 3.3.1 .zip $ unzip opencv_contrib.zip $ mkdir build $ cd build $ cmake -D CMAKE_BUILD_TYPE=RELEASE                 -D CMAKE_INSTALL_PREFIX= /usr/local                  - D WITH_CUDA=ON                  -D ENABLE_FAST_MATH=1                 -D CUDA_FAST_MATH=1                 -D WITH_CUBLAS=1                 -D INSTALL_PYTHON_EXAMPLES=OFF          ...

Intel AERO auto flight (position control mode)

圖片
1. Build a stable visual odometry system (ex: stereo visual odometry) 2. Send the local position to flight controller follows the PX4 coordinate system [1] *PX4 coordinate system [2] : 3. Modify RC mode & position control mode parameters RC mode: 0: Stabilized mode 1: Position mode 2: Altitude mode Position control mode parameters: 4. Active stereo visual odometry system (ssh to TX2 ) and then switch to position control mode. 5. Takeoff and keep the drone manually and try to leave hand on the remote controller. Experimental result: *Parameters for LPE: 1. LPE_FUSION:   4 2. ATT_EXT_HDG_M:  1 3. LPE_VIS_XY: Min value 4. LPE_VIS_Z: Min value Reference: [1]  https://chuangrobot.blogspot.com/2018/12/communicate-with-intel-rtf-flight.html [2]  https://dev.px4.io/en/ros/external_position_estimation.html [3]  https://dev.px4.io/en/advanced/switching_state_estimators.html [4]  https://dev.px4.io/en/ros/external_positi...

Create a customized chessboard for camera calibration

1. Install libharu (1) Download source files [1] (2) Install [2] tar -xvzf libharu-X.X.X.tar.gz  cd libharu-X.X.X mkdir build cmake ../ make sudo make install make clean (3) Download chessboard creation file [3] git clone https://github.com/cgdsss/chessboard.git cd chessboard cd src cmake ../ make (4) Run the executable file ./chesssboard [grid_size(mm)] [length_grid_num] [width_grid_num]                                          (ex: sudo ./chessboard 17 11 8 ) Reference: [1]  http://libharu.org/ [2]  https://github.com/libharu/libharu/wiki/Installation [3]  https://github.com/cgdsss/chessboard

Communicate with Intel RTF flight controller using UART interface (2)

圖片
1. Upgrade firmware to px4 v1.8.1 (1) Download release version directly. [1] (2) Copy the firmware to /etc/aerofc/px4/ and do the update cd /etc/aerofc/px4/ sudo aerofc-update.sh aerofc-v1-default.px4 (3) Check firmware version sudo aero-get-version.py 2. Parameter setting using QGroundControl (presetting for connecting to drone is needed. [2] ) (1) EKF2_AID_MASK: 24 (2) EKF2_HGT_MODE: Vision (or Barometric pressure) (3) SYS_COMPANION: 921600 ( 57600 for TX2 ) *Reboot the drone after modifying parameters 3. Download example [3] git clone https://github.com/rijesha/mavlink-interface cd mavlink-interface git submodule init git submodule update 4. Connect the drone with a UART cable and check serial port name ls /dev/ttyUSB* 5. Modify port name and baudrate in main.cpp #define PORT "/dev/ttyUSB0" #define BAUD 921600 ( 57600 for TX2 ) 6. Build and then run the project make  sudo ./position_controller 7. Result As shown in the following ...

SLAM realization using a stereo camera (Intel R200 RealSense equipped on intel AERO)

1. Flashing the Intel AERO [1][2] Key: (1) Erase Yocto and use all space for Ubuntu (2) Press "shift" + "ESC" for accessing to the GRUB screen (if keyboard and mouse are frozen...) 2. Install RealSense SDK [2] 3. Install ROS [3] 4. Install RTAB-Map [4] 5. Install ORBSLAM2 (1) Pangolin (2) OpenCV (3) Eigen3 6. Make catkin workspace ▪ mkdir -p ~/catkin_ws/src ▪ cd ~/catkin_ws/src ▪ catkin_init_workspace ▪ cd ~/catkin_ws/ ▪ catkin_make 7. Install ORBSLAM2 & ROS Nodes [4] Key: Copy necessary library to correct directory. (Solution for installing ROS Nodes) [5] To do list: (1) Control the intel AERO screen remotely. (like VNC) (2) Completely understand the principle of ORBSLAM2 (3) Send SLAM information to flight controller (mavros) 8. Get camera parameters and save them in a .yaml file [4] 9. Run ORBSLAM2 roscd realsense_camera roslaunch realsense_camera r200_nodelet_rgbd.launch & rosrun ORB_SLAM2 R...