01. Pixhawk 개발환경 설치 - pineland/px4 GitHub Wiki
1. 개발환경 라이브러리 설치(Installing common dependencies)
sudo add-apt-repository ppa:george-edison55/cmake-3.x -y
sudo apt-get update
sudo apt-get install python-argparse git-core wget zip python-empy qtcreator cmake build-essential genromfs -y
2. 시뮬레이션을 위한 라이브러리 설치
sudo apt-get install ant protobuf-compiler libeigen3-dev libopencv-dev clang-3.5 lldb-3.5 -y
sudo apt-get install openjdk-8-jdk openjdk-8-jre
3. Ubuntu에 ROS kinetic 설치
- 주요 참고사이트
- DCU Labs 자료실의 ROS indego 설치(http://www.modulabs.co.kr/board_GDCH80/1562)
- Dronecode Toolchain Installation > Ubuntu/Debian Linux > ROS/Gazebo
3.1 Setup your sources.list
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
3.2 Setup your key
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net --recv-key 0xB01FA116
3.3 Installation
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install ros-kinetic-desktop-full
3.4 Initialize rosdep
sudo rosdep init
rosdep update
3.5 Setup environment variables
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
3.6 Get rosinstall
sudo apt-get install python-rosinstall
3.7 Make workspace for ROS
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
3.8 Install dependencies
sudo apt-get install python-wstool python-rosinstall-generator python-catkin-tools -y
catkin_init_workspace
3.9 Initialize wstool
wstool init ~/catkin_ws/src
3.10 Build MAVROS
3.10.1 Get source (upstream - released)
rosinstall_generator --upstream mavros | tee /tmp/mavros.rosinstall
3.10.2 Get latest released mavlink package
rosinstall_generator mavlink | tee -a /tmp/mavros.rosinstall
3.10.3 Setup workspace & install deps
wstool merge -t src /tmp/mavros.rosinstall
wstool update -t src
rosdep install --from-paths src --ignore-src --rosdistro kinetic -y
3.11 Build
catkin build
3.12 Re-source environment to reflect new packages/build environment
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc
3.13 Test ROS kinetic
3.13.1 open a new terminal
roscore
3.13.2 open a new terminal
rosrun turtlesim turtlesim_node
3.13.3 open a new terminal
rosrun turtlesim turtle_teleop_key
4. Install Gazebo
; already installed by ROS
5. Install Common dependencies
sudo add-apt-repository ppa:george-edison55/cmake-3.x -y
sudo apt-get update -y
sudo apt-get install python-argparse git git-core wget zip python-empy qtcreator cmake build-essential genromfs -y
echo 'required python packages'
sudo apt-get install python-dev -y
sudo apt-get install python-pip -y
sudo -H pip install pandas jinja2
pip install pyserial
echo 'optional python tools'
pip install pyulog
6. Firmware 다운로드 및 빌드
mkdir -p ~/src/Firmware
cd ~/src/Firmware
git clone https://github.com/PX4/Firmware.git --branch v1.2.0
make posix_sitl_default
git submodule update --init --recursive
make posix_sitl_default gazebo
7. Install Qtcreator
7.1 Install
sudo apt-get install qtcreator
7.2 Execute
qtcreator