發表文章

Introduction to PX4 firmware

1. Basic concept [1-2]: Operating system: NuttX PX4FMU (STM32F427): 主處理器 PX4IO (STM32F100): 協處理器 (Code: Firmware/src/modules/px4iofirmware)            *PX4IO firmware is automatically wrote by the PX4FMU Bootloader:  PX4FMU, PX4IO 啟動前會運行的程式(初始化) The processing entrance of PX4 flight controller after the bootloader: Firmware/ROMFS/px4fmu_common/init.d/ rcS (啟動腳本: 指定想要啟動那些模組,如果有定義的模組,在rcS中start即可使用) 2. Some of important folder for development Src: we can find all source code here. Src/Drivers: including all sensors' driver. Src/Exmaples: including some simple examples for developers. ( Good one for beginner: px4_simple_app ) Src/ Modules : the core of px4, including all modules used in the flight controller. Src/Systemcmds: including all commands for flight controller. Mavlink: we can modify and add mavlink message here. (mavlink topic are messages passed from GCS or companion computer to px4) Cmake/configs: Including various compili...

[Solved] attitiude estimator not running -check system boo

Error reported while calibrating sensor. Solution: Access into Nuttx shell using Mission Planner run " attitude_estimator_q start " in the NuttX Shell. *Mavlink console commands: [3] Reference: [1]  http://ardupilot.org/dev/docs/interfacing-with-pixhawk-using-the-nsh.html [2]  https://groups.google.com/forum/#!topic/px4users/gxZ3xY9xwbQ [3]  https://dev.px4.io/v1.9.0/en/middleware/modules_command.html

[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