https://github.com/F-LAB-Systems/SITL_2021
GitHub - F-LAB-Systems/SITL_2021: This documentation will guide you on how to set up a SITL (Software in the loop) on UBUNTU 20.
This documentation will guide you on how to set up a SITL (Software in the loop) on UBUNTU 20.04 LTS with PX4-Autopilot, QGroundControl & a simulation software Gazebo11 - GitHub - F-LAB-Systems...
github.com
1. Install PX4 - Autopilot
cd ~
git clone https://github.com/PX4/PX4-Autopilot.git --recursive
cd PX4-Autopilot
bash ./Tools/setup/ubuntu.sh
2. Install Gazebo 11
cd ~
curl -sSL http://get.gazebosim.org | sh
3. Run PX4 + Gazebo 11
위 링크의 HITL Simulation 의 QGC설정을 완료 해준뒤
cd PX4-Autopilot
make px4_sitl gazebo //QuadCopter
cmake 오류는 g++ 버전과 gcc 버전이 구버전이라 그런 경우가 대부분이다.
이전 프로젝트 때문에 g++, gcc를 4.7로 선택했었는데 다시 9로 변경하였다
gazebo qgc - Google 검색
로드할 기체 환경에서 PX4 SITL 및 Gazebo를 시작하여 시뮬레이션을 실행합니다(멀티콥터, 비행기, VTOL, ... QGC Video Streaming Settings for Gazebo.
www.google.com
////
이제 QGC와 가제보를 실행하면 기체가 연결되었다는 신호가 표시된다.
그 후 미션 생성 >> 비행 시작을 하면 가제보에서 드론이 비행한다
https://www.youtube.com/watch?v=rui2Trps2yc //웨이포인트 생성시 참고 영상
이제 Mission file generator 을 실행 시켜 원하는 path의 경로 자동 생성후 시험 비행을 진행하겠다.
Mission file generator는 이전 선배들이 만든 프로그램으로 특정 산의 gpx 파일을 넣고 등산로를 선택하면
해당 경로에 waypoint를 자동으로 생성해준다.
해당 경로로 시험 비행을 하려하니 first waypoint too par away (maximum:900M)이라는 에러메세지 발생
>>이유는 기체 위치가 스위스 취리히에 잡히기 때문....(경로는 경남에 있는데)
gazebo의 gps값을 어떻게 바꿔야 하나
https://docs.px4.io/master/en/simulation/gazebo.html
Gazebo Simulation | PX4 User Guide
Gazebo Simulation Gazebo (opens new window) is a powerful 3D simulation environment for autonomous robots that is particularly suitable for testing object-avoidance and computer vision. This page describes its use with SITL and a single vehicle. Gazebo can
docs.px4.io
다음부터는 공식문서를 좀더 꼼꼼히 읽어보자 ㅜㅠ
https://github.com/PX4/PX4-user_guide/blob/master/ko/simulation/gazebo.md
GitHub - PX4/PX4-user_guide: PX4 User Guide
PX4 User Guide. Contribute to PX4/PX4-user_guide development by creating an account on GitHub.
github.com
한글 설명
비행 장소로 정상적인 임무수행이 가능해졌다
비행중인 장면인데 배경을 넣어줘야 잘 나는지 식별이 가능할듯 하다
다음번엔 gazebo에 배경을 넣고 비행 고도와 속도 조절할 예정
'project > 캡스톤 디자인' 카테고리의 다른 글
[pixhawk(px4) - jetson nano] mavlink 통신을 사용한 제어 (0) | 2022.04.15 |
---|
댓글