Giter Club home page Giter Club logo

px4-gz-docker's Introduction

px4-gz-docker

Docker files needed to build images for px4_sitl simulation in ROS2 and Gazebo

The ./work directory setup

run ./get_src.sh to clone each repo

work/
┣ px4/
┣ ros2_ws/
┃ ┗ src/
┃   ┣ px4_msgs/
┃   ┣ px4-offboard/
┃   ┗ ros_gz/
┗ .gitignore

Please build ros_gz from source. see ros-gz

Build and run

To build the image

docker compose build

To run multiple drones

./run_dev.sh

To access the shell of each service, in two different terminals run

Terminal 1: docker exec -u user -it px4_gz-px4_gz-1 terminator

To start px4_sitl and ros2 offboard control, split each terminator into 3 panels and run

  1. cd px4 && make px4_sitl to build px4_sitl first. (This only need to be built once in one of the container shells)
    PX4_SYS_AUTOSTART=4001 PX4_GZ_MODEL=x500 ./build/px4_sitl_default/bin/px4 -i 1 to start px4_sitl instance 1 with x500 in gz-garden.

  2. MicroXRCEAgent udp4 -p 8888 to start DDS agent for communication with ROS2

Environment Variables

  • PX4_GZ_MODEL Name of the px4 vehicle model to spawn in gz
  • PX4_GZ_MODEL_POSE Spawn pose of the vehicle model, must used with PX4_GZ_MODEL
  • PX4_MICRODDS_NS Namespace assigned to the sitl vehicle, normally associated with px4 instances, but can be set mannually
  • ROS_DOMAIN_ID Separate each container into its own domain (Is it still necessary since each SITL instance has a unique namespace?)

px4-gz-docker's People

Contributors

melodylylin avatar

Stargazers

Dennis Baldwin avatar VibSin avatar mhcho1994 avatar Worawis Sribunma 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.