Dronecode - PX4 환경 구축

무인 항공기의 자율 비행을 얻으려면 Dronecode와 MAVSDK를 사용해보십시오.

목차


  • PX4 환경 구축
  • uORB Messaging
  • QGroundControl 사용(사용자 가이드)
  • MAVLink 입문
  • QGroundControl 사용자 정의 개발

  • 운영 환경


  • 우분투 18.04
  • ROS Melodic

  • PX4 환경 구축



    사용자 권한 설정, dialout 그룹에 추가
    $ sudo usermod -a -G dialout $USER
    

    사용자 권한 반영하려면 Logut and Login

    Gazebo, JMAVSim and NuttX (Pixhawk) Targets


  • Download ubuntu.sh and requirements.txt from the PX4
  • Run the ubuntu.sh to install
  • wget https://raw.githubusercontent.com/PX4/Firmware/v1.10.0/Tools/setup/ubuntu.sh
    wget https://raw.githubusercontent.com/PX4/Firmware/v1.10.0/Tools/setup/requirements.txt
    source ubuntu.sh
    

    ROS/Gazebo


  • Download ubuntu_sim_ros_melodic.sh
  • Run the ubuntu_sim_ros_melodic.sh to install

  • install ROS/Gazebo ("Melodic") for use with PX4
    $ wget https://raw.githubusercontent.com/PX4/Devguide/v1.9.0/build_scripts/ubuntu_sim_ros_melodic.sh
    
    $ source ubuntu_sim_ros_melodic.sh
    

    Downloading PX4 Source Code


    $ git clone https://github.com/PX4/Firmware.git
    

    First Build (Using the jMAVSim Simulator)



    use java 8
    $ sudo apt install openjdk-8-jdk
    $ sudo update-alternatives --config java # choose java-8
    

    PX4 Make Build Targets
    make [VENDOR_][MODEL][_VARIANT] [VIEWER_MODEL_DEBUGGER]
    VENDOR: The manufacturer of the board: px4(Pixhawk), intel, parrot, etc. 
    MODEL: The board model : sitl, fmu-v2, etc.
    VARIANT: Indicates particular configurations: rtps, lpe, default, and may be omitted.
    
    VIEWER: This is the simulator : gazebo, jmavsim
    MODEL: The vehicle model : iris (default), rover, etc.
    DEBUGGER: Debugger to use: none (default), ide, gdb, lldb, ddd, valgrind, callgrind
    

    사용 jMAVSim Simulation
    $ cd Firmware
    $ make px4_sitl jmavsim
    pxh> commander takeoff
    





    Use Gazebo Simulation
    $ make px4_sitl gazebo
    pxh> commander takeoff
    





    Fast RTPS 설치



    eProsima Fast RTPS는 RTPS(Real Time Publish Subscribe) 프로토콜입니다.

    Fast RTPS를 사용하여 PX4 uORB topics 데이터를 각 모듈간에 공유합니다.

    eProsima Fast RTPS를 사용하려면 Java(Java JDK 8 권장)가 필요합니다.

    Installation from Sources


  • foonathan_memory 설치
  • $ git clone https://github.com/foonathan/memory.git
    $ cd memory
    $ git submodule update --init --recursive
    $ mkdir build && cd build
    $ cmake -DCMAKE_CXX_FLAGS=-fPIC ..
    $ cmake --build . --target install
    
  • Fast-RTPS 설치
  • $ git clone -b master https://github.com/eProsima/Fast-RTPS
    $ mkdir Fast-RTPS/build && cd Fast-RTPS/build
    $ sudo apt-get install gradle
    $ cmake -DBUILD_JAVA=ON -DCOMPILE_EXAMPLES=ON -DPERFORMANCE_TESTS=ON -DTHIRDPARTY=ON -DCMAKE_PREFIX_PATH=/usr/local/lib/ ..
    $ make
    $ sudo make install
    

    QGroundControl 설치


    sudo usermod -a -G dialout $USER
    sudo apt-get remove modemmanager -y
    sudo apt-get install gstreamer1.0-plugins-bad gstreamer1.0-libav gstreamer1.0-gl -y
    
  • Download QGroundControl.AppImage.
  • Install (and run) using the terminal commands:
  • chmod +x ./QGroundControl.AppImage
    ./QGroundControl.AppImage  (or double click)
    



    다음 : uORB Messaging

    좋은 웹페이지 즐겨찾기