Code Monkey home page Code Monkey logo

bulnabi_px4's Introduction

불나비 PX4

본 레포는 불나비의 PX4 개발을 위해 제작되었으며, PX4-AutoPilot의 v1.14.0 버전을 그대로 가져온 것이다. PX4 코드를 직접 변형할 예정이라면 아래 가이드라인을 꼭 따라야 한다.

개발 환경

1.Ubuntu 20.04
2. ROS2 foxy

기본 설치 가이드라인

사용을 위해서는, 다음 과정을 거친다.

  1. 현재 있는 Bulnabi-SNU repository를 fork 버튼을 이용해 본인 계정으로 fork한다.
  2. 본인 계정 repository로 fork를 했다면, 본인의 local computer 디렉토리에서 git clone https://github.com/본인이름!!!/Bulnabi_PX4.git 명령어를 활용해 본인의 local computer로 clone한다. (초록 Code 라는 버튼 누르면 https 주소가 나옴)
  3. clone을 했다면 본인 컴퓨터 폴더에 Bulnabi_PX4라는 폴더가 생성되었을 것이다.
cd Bulnabi_PX4

명령어를 사용해 Bulnabi_PX4 폴더 안으로 들어간다.

  1. 여기서 잘 연동이 되었는지 git remote -v 라는 명령어를 사용해 확인해 볼 수 있을 것이다. origin 뒤에 본인 계정의 주소가 뜰 것이다. 이제, 협업을 위해 Bulnabi-SNU/Bulnabi_PX4를 upstream으로 추가할 것이다. upstream은 불나비의 공식 PX4가 있는 곳이라고 생각하면 된다.
git remote add upstream https://github.com/Bulnabi-SNU/Bulnabi_PX4.git

Bulnabi 공식 레포가 upstream으로 잘 등록되었다면,

git remote -v

라는 명령어를 실행하면 다음과 같이 출력될 것이다.

origin	https://github.com/jangminhyuk/Bulnabi_PX4.git (fetch)  
origin	https://github.com/jangminhyuk/Bulnabi_PX4.git (push)  
upstream	https://github.com/Bulnabi-SNU/Bulnabi_PX4.git (fetch)  
upstream	https://github.com/Bulnabi-SNU/Bulnabi_PX4.git (push)  
  1. 이제 upstream의 tag를 가져온다.
git fetch --tags upstream
  1. 여기까지 잘 따라왔다면, 현재 있는 폴더 (Bulnabi_PX4)에서
bash ./Tools/setup/ubuntu.sh

를 실행한다. 조금 시간이 걸린 뒤에 완료가 되면, ubuntu를 로그아웃했다가 다시 접속하면 된다.

  1. 다시 접속한 뒤에 cd Bulnabi_PX4라는 명령어를 통해 다시 Bulnabi_PX4 폴더로 들어온다. 이후, 시뮬레이션 피피티 나온 대로 잘 따라해서,
make px4_sitl gazebo-classic

위 명령이 문제 없이 실행되면 된다.

협업 가이드라인

이제 본인 컴퓨터에서 코딩 등 작업을 마친 뒤에는 git add 어쩌구, git commit -m "어쩌구", git push origin release/1.14(또는 본인 branch 명) 등의 과정을 거쳐 본인 계정의 레포에 업로드를 하게 된다. 업로드 뒤에는 본인 레포에 들어가면 Pull-Request라는 버튼이 활성화 되는데, 이때 리뷰어를 지정해서 올리고, 리뷰어가 ok하면 본인의 작업물을 Bulnabi-SNU/Bulnabi_PX4에 merge하게 된다. commit을 할 때는 메시지에 본인이 어떤 부분을 왜 어떻게 수정했는지를 자세히 서술할 수 있도록 한다. Git 관련 사항 (Conflict)등은 인터넷에서 꼭 충분히 학습을 하도록 한다. 이후에는 시뮬레이션 세미나 ppt 나온 그대로 따라해보면 좋을 것 같다. 또한, 코드를 push하기 전에

make tests

라는 명령어를 실행해, 모든 test를 통과하는지 확인을 하도록 한다.

100% tests passed, 0 tests failed out of 139

자주 쓰는 Git 명령어 및 각자 검색해서 공부해야 할 명령어

git branch (현재 branch 알려줌) git checkout (다른 branch로 이동함) git log -5 (최근 5개 커밋을 보여줌)
git status
git pull과 git fetch, merge의 차이 git conflict을 해결하는 방법 (원격 저장소의 내용과 내 컴퓨터 작업물이 다르다면? 어떻게 해결하는지?)

기체에 펌웨어를 업로드 하는 방법

px4를 직접 건드리는 팀이 아니라도, 기체에 펌웨어를 업로드 하는 부분은 알고 있어야 한다. 위의 과정을 따라 Bulnabi_PX4를 설치했다면, 그것을 픽스호크 위에 올린 뒤에 본인들의 작업물(Companion computer활용한 부분 포함)과 충돌이 일어나지는 않는지 확인해야 한다. 기존에는 QGround Control을 연결한 뒤, Vehicle Setting -> Firmware에 들어간 뒤, USB를 뺐다가 다시 끼면 Stable한 px4 버전이 자동으로 픽스호크 보드에 업로드가 되었다. 이제는, Bulnabi_px4를 사용할 것이기 때문에 위 방법 대신 아래와 같은 방법을 사용한다. 우선

cd Bulnabi_PX4

터미널에서 위 명령어를 통해 Bulnabi_PX4 폴더로 이동한다. 그 뒤에, 픽스호크 보드 제품 버전에 맞는 명령어를 실행한다. https://docs.px4.io/main/en/dev_setup/building_px4.html

make px4_fmu-v6x_default

build가 완료되면, 다음 명령어를 통해 upload 진행.

make px4_fmu-v6x_default upload

그럼 bootloader 어쩌고라는 말이 뜰 텐데, 그 다음 usb를 뺐다가 끼면 기체에 우리의 Bulnabi_PX4 펌웨어가 업로드되게 된다. 그 이후는 기존에 QGroundControl 사용 방법과 동일하다. (펌웨어는 이미 업로드했으므로, 그 부분을 제외하고)

Tip

유용한 단축키 및 명령어

  • 터미널에 복사 및 붙여넣기를 할 때는 단순히 ctrl+C,V 키가 먹히지 않는다. 리눅스 터미널에서는 ctrl+shift + C, V 명령어를 사용해 복사 붙여넣기를 진행해야 한다.
  • Terminal 대신 terminator 라는 프로그램(?)을 활용하면 더욱 편리하다. 설치는 sudo apt install terminator를 통해 진행한다. terminator 창에서 ctrl+shift+E 를 하면 좌우 분할이 되고, ctrl+shift+O 를 하면 상하 분할이 된다.

Git 현재 branch 이름 표시하는 방법

현재 git을 처음 설치한 상태면, 현재 내가 어떤 branch에 있는지를 매번 git branch 명령어를 통해 확인해야한다. 아래 링크를 참고해서 bashrc에 추가를 하면 항상 현재 브랜치 명을 표시해줘서 편리하다. 혹시 gedit(그냥 메모장 같은 것)이 설치되어 있지 않으면

sudo apt install gedit

그 다음, gedit,이나 vim 등의 에디터를 사용해 ~/.bashrc 파일을 연다.

sudo gedit ~/.bashrc

맨 아래에 아래 내용을 추가한다.

parse_git_branch() {
     git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "

터미널을 재시작하고, git이 연동되어 있는 폴더에 들어가면 자동으로 현재 브랜치 명을 표시해줄 것이다.

PX4 Drone Autopilot

Releases DOI

Nuttx Targets SITL Tests

Discord Shield

This repository holds the PX4 flight control solution for drones, with the main applications located in the src/modules directory. It also contains the PX4 Drone Middleware Platform, which provides drivers and middleware to run drones.

PX4 is highly portable, OS-independent and supports Linux, NuttX and MacOS out of the box.

Building a PX4 based drone, rover, boat or robot

The PX4 User Guide explains how to assemble supported vehicles and fly drones with PX4. See the forum and chat if you need help!

Changing code and contributing

This Developer Guide is for software developers who want to modify the flight stack and middleware (e.g. to add new flight modes), hardware integrators who want to support new flight controller boards and peripherals, and anyone who wants to get PX4 working on a new (unsupported) airframe/vehicle.

Developers should read the Guide for Contributions. See the forum and chat if you need help!

Weekly Dev Call

The PX4 Dev Team syncs up on a weekly dev call.

Note The dev call is open to all interested developers (not just the core dev team). This is a great opportunity to meet the team and contribute to the ongoing development of the platform. It includes a QA session for newcomers. All regular calls are listed in the Dronecode calendar.

Maintenance Team

Note: This is the source of truth for the active maintainers of PX4 ecosystem.

Sector Maintainer
Founder Lorenz Meier
Architecture Daniel Agar / Beat Küng
State Estimation Mathieu Bresciani / Paul Riseborough
OS/NuttX David Sidrane
Drivers Daniel Agar
Simulation Jaeyoung Lim
ROS2 Beniamino Pozzan
Community QnA Call Ramon Roche
Documentation Hamish Willee
Vehicle Type Maintainer
Multirotor Matthias Grob
Fixed Wing Thomas Stastny
Hybrid VTOL Silvan Fuhrer
Boat x
Rover x

See also maintainers list (px4.io) and the contributors list (Github). However it may be not up to date.

Supported Hardware

Pixhawk standard boards and proprietary boards are shown below (discontinued boards aren't listed).

For the most up to date information, please visit PX4 user Guide > Autopilot Hardware.

Pixhawk Standard Boards

These boards fully comply with Pixhawk Standard, and are maintained by the PX4-Autopilot maintainers and Dronecode team

Manufacturer supported

These boards are maintained to be compatible with PX4-Autopilot by the Manufacturers.

Community supported

These boards don't fully comply industry standards, and thus is solely maintained by the PX4 publc community members.

Experimental

These boards are nor maintained by PX4 team nor Manufacturer, and is not guaranteed to be compatible with up to date PX4 releases.

Project Roadmap

Note: Outdated

A high level project roadmap is available here.

Project Governance

The PX4 Autopilot project including all of its trademarks is hosted under Dronecode, part of the Linux Foundation.

Dronecode Logo Linux Foundation Logo

 

bulnabi_px4's People

Contributors

lorenzmeier avatar dagar avatar bkueng avatar julianoes avatar thomasgubler avatar maetugr avatar priseborough avatar drton avatar davids5 avatar px4dev avatar bresch avatar mcharleb avatar jgoppert avatar sfuhrer avatar tsc21 avatar romanbapst avatar andreasantener avatar stifael avatar kamilritz avatar px4buildbot avatar kd0aij avatar mhkabir avatar jaeyoung-lim avatar sjwilks avatar mcsauder avatar pavel-kirienko avatar sanderux avatar mrivi avatar petervdperk-nxp avatar carlolsson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.