Git Product home page Git Product logo

cmos's Introduction

CMOS: Containerized Mobile Sensing Simulation

This repo contains instructions and demo code for PX4 flight simulation in our containerized environment. A simple offboard control example is provided. To deploy this framework in container, click here.

Software installation and configuration

  • ROS Docker container and its installed packages
  • PX4 configuration:
    • Get px4-autopilot codebase, git clone https://github.com/PX4/PX4-Autopilot.git --recursive
    • Run setup bash script, bash ./PX4-Autopilot/Tools/setup/ubuntu.sh
    • Manually install kconfig-frontends by building from source
  • QGC:QGroundControl
    • sudo apt-get install fuse
    • sudo apt-get install libpulse-dev
    • sudo usermod -a -G dialout $USER
    • sudo apt-get remove modemmanager -y
    • Manually download QGC appimage
  • PX4 for gazebo
    • sudo apt install libgazebo9-dev
  • Build PX4 firmwire from source code
    • Get Firmwire source code git clone https://github.com/PX4/Firmware.git
    • cd Firmware
    • Build firmwire by running make rostest or make px4_sitl_default
  • Others:
    • sudo apt install gstreamer1.0-plugins-bad gstreamer1.0-libav gstreamer1.0-gl -y
    • pip3 install px4tools
    • It is highly recommended to install gnome-terminal (or any terminal you like) in container so we can launch multi terminals within the container's shell `.
    • Remember to save your change in docker by running docker commit <container_ID> <name>:<tag>

Demo steps

  1. First, run docker container:
docker exec --user [USER_NAME] -it [CONTAINER_ID] bash

use Docker ps command to get CONTAINER_ID

  1. Run commands in multipler terminals:
  • terminal 1: roslaunch mavros px4.launch fcu_url:="udp://:[email protected]:14557"
  • terminal 2: launch QGroundControl yourQGCpath/QGroundControl.AppImage
  • terminal 3: launch gazebo visual interface make px4_sitl_default gazebo
  • terminal 4: launch test script, in "px4sim/mavros-demo", run python3 mission_test.py MC_mission_box.plan
  • terminal 5: rqt

Note that you need to turn on the Xserver for all users by typing "xhost +" on terminal 3 and/or others.

  1. for Mavros diagnostics
rostopic echo /diagnostics -n1

TODO: https://github.com/Jaeyoung-Lim/mavros_controllers

References:

  1. https://gaas.gitbook.io/guide/software-realization-build-your-own-autonomous-drone/build-your-own-autonomous-drone-e01-offboard-control-and-gazebo-simulation
  2. https://www.youtube.com/watch?v=rxt0aBnBeJI

cmos's People

Contributors

vieloooo avatar yangece 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.