본문 바로가기
Libraries & Packages/Gazebo

[PX4] Pixhawk Simulator Installation and Running (설치 및 실행)

by yongee97 2023. 1. 12.

* Reference

- Ubuntu Development Environment

Ubuntu Development Environment | PX4 User Guide

 

Ubuntu Development Environment | PX4 User Guide

Ubuntu Development Environment The following instructions set up a PX4 development environment on the Ubuntu Linux LTS (opens new window) versions supported by PX4. This includes 18.04 (Bionic Beaver), 20.04 (Focal Fossa). The instructions also work for Ub

docs.px4.io

- ROS with gazebo simulation

ROS with Gazebo Classic Simulation | PX4 User Guide

 

ROS with Gazebo Classic Simulation | PX4 User Guide

ROS with Gazebo Classic Simulation ROS (Robot Operating System) can be used with PX4 and the Gazebo Classic simulator. It uses the MAVROS MAVLink node to communicate with PX4. The ROS/Gazebo Classic integration with PX4 follows the pattern in the diagram b

docs.px4.io

- libgstreamer install

https://github.com/PX4/PX4-Autopilot/issues/13117

 

Build error GSTREAMER · Issue #13117 · PX4/PX4-Autopilot

Describe the bug When trying to build the target make px4_sitl_default gazebo from current master, I get the following error: CMake Error: The following variables are used in this project, but they...

github.com

 

 

1. git clone

git clone https://github.com/PX4/PX4-Autopilot.git --recursive
cd PX4-Autopilot

 

2. git setting

git checkout v1.13.2
make distclean
git submodule update --recursive

 

3. Dependencies 설치

sudo apt-get install python3-pip
sudo apt-get install libgstreamer-plugins-base1.0-dev
bash ./Tools/setup/ubuntu.sh --no-sim-tools --no-nuttx
reboot

* error 발생시

pip3 install --user kconfiglib toml empy jinja2 jsonschema packaging numpy cython future

 

4. Run

make px4_sitl gazebo

 

 

5. Mavros Install

sudo apt-get install ros-melodic-mavros ros-melodic-mavros-extras

 

# .bashrc 파일 가장 아래에 추가

alias sitl='source ~/PX4-Autopilot/Tools/setup_gazebo.bash ~/PX4-Autopilot ~/PX4-Autopilot/build/px4_sitl_default &&
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:~/PX4-Autopilot &&
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:~/PX4-Autopilot/Tools/sitl_gazebo'