Coder Social home page Coder Social logo

pixhawk4_gazebo_simulation's Introduction

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

sudo 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

E: Unable to locate package g++-multilib E: Couldn't find any package by regex 'g++-multilib' E: Package 'gcc-multilib' has no installation candidate

 ubush.sh 실행 시 발생

bash ./ubuntu.sh --no-nuttx --no-sim-tools

ninja: build stopped: subcommand failed. Makefile:232: recipe for target 'px4_sitl_default' failed make: *** [px4_sitl_default] Error 1

 GStreamer가 설치되어 있지 않아 발생

sudo 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

pixhawk4_gazebo_simulation's People

Contributors

jeheeyu avatar

Watchers

 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.