Skip to content

2022ESWContest-webOS-3023/Drone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Pixhawk4 Gazebo Simulation



Environment

 OS : Ubuntu.18.04
 ROS : Melodic

Installation

Toolchain & ROS

wget https://raw.githubusercontent.com/PX4/Devguide/master/build_scripts/ubuntu_sim_ros_melodic.sh
bash ubuntu_sim_ros_melodic.sh

MAVROS

sudo apt-get update
sudo apt-get install ros-melodic-mavros ros-melodic-mavros-extras
wget https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh
sudo bash ./install_geographiclib_datasets.sh   
sudo apt-get install python-catkin-tools python-rosinstall-generator -y

rosinstall_generator --rosdistro kinetic mavlink | tee /tmp/mavros.rosinstall
rosinstall_generator --upstream mavros | tee -a /tmp/mavros.rosinstall

// catkin Init
cd ~/catkin_ws
catkin init
wstool init src

// Work Path Depedancy
wstool merge -t src /tmp/mavros.rosinstall
wstool update -t src -j4
rosdep install --from-paths src --ignore-src -y
catkin build

MAVLINK

sudo apt-get install python3-pip
pip3 install --user future
sudo apt-get install python3-tk
git clone https://github.com/mavlink/mavlink.git --recursive

 MAVLINk 관련 Install 후 Path 적용 필요

vi ~/.bashrc

// 맨 하단에 추가
export PYTHONPATH=/home/jhy/mavlink
source ~/.bashrc 
echo $PYTHONPATH

 mavlink Folder Path 적용

PX4

mkdir PX4
cd PX4
git clone https://github.com/PX4/PX4-Autopilot.git --recursive
bash ./PX4-Autopilot/Tools/setup/ubuntu.sh
cd PX4-Autopilot
git pull
git submodule update
sudo apt-get upgrade libignition-math2

GStreamer

apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio

Python Package

pip3 install empy
pip3 install --user pyros-genmsg
pip3 install --user toml

Error Note

Error in REST Request

 Gazebo Version에 관한 오류로 config.yaml 파일 수정 필요함

cd /home/jhy/.ignition/fuel
vi config.yaml

 config.yaml 내 url 수정

before

---
# The list of servers.
servers:
  -
    name: osrf
    url: https://api.ignitionfuel.org

  # -
    # name: another_server
    # url: https://myserver

# Where are the assets stored in disk.
# cache:
#   path: /tmp/ignition/fuel

after

---
# The list of servers.
servers:
  -
    name: osrf
    url: https://api.ignitionrobotics.org

  # -
    # name: another_server
    # url: https://myserver

# Where are the assets stored in disk.
# cache:
#   path: /tmp/ignition/fuel

EXCEPTION: Unable to start server[bind: Address already in use]. There is probably another Gazebo process running.

 Gazebo Process가 실행되어 있어 발생

killall gzserver

Catkin workspace /home/jhy/catkin_ws is already initialized. No action taken.

 catkin init 오류

catkin clean
catkin config --extend /opt/ros/melodic

error could not find a version that satisfies the requirement sympy

 requirements.txt 내 sympy version 오류

vi /PX4-Autopilot/Tools/setup/requirements.txt
sympy delete

There already is a workspace config file .rosinstall at

wstool update -j 4 -t src

no rule to make target px4_sitl gazebo

 px4 make 시 빌드 발생

  1. GStreamer Download

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published