Git Product home page Git Product logo

voxl_offboard's Introduction

VOXL1 Waypoint Following - Offboard Mode

Homework 01 for the course ENAE788M: Hands-on Autonomous Aerial Robots (Spring 2023).

Using https://docs.px4.io/master/en/ros/mavros_offboard.html as reference, the code is modified to demonstrate the ModalAI VOXL drone beginning at (x: 0, y: 0, z: 10) and then follow the repeating pattern:

  • Move forward 10 virtual meters
  • Move up (heave) 15 virtual meters
  • Move left 5 virtual meters
  • Return to (0,0,10)

Simulation Demo

Actual Drone Demo

Watch the Simulation

Plots

Trajectory v/s Time Plot

3D Trajectory Plot

Developer Documentation

Dependencies

Running the Codes

  1. Open a terminal and clone the repository in the src directory of your ROS catkin workspace into a folder/package called offboard.
source /opt/ros/noetic/setup.bash
cd ~/catkin_ws/src
git clone https://github.com/adarshmalapaka/voxl_offboard.git offboard
cd ..
catkin_make 
  1. To run the waypoint tracking demo:
    • Start the PX4 jmavsim simulator:

      cd /PX4-Autopilot
      make px4_sitl_default jmavsim
      
    • Launch QGroundControl by double clicking the QGroundControl.AppImage file.

    • Perform a take-off of the drone and wait until it reaches a height of 10m.

    • Open another terminal and run the following to launch the offboard node and save the bag data:

      source /opt/ros/noetic/setup.bash
      roslaunch offboard hw1.launch savedata:=true
      

      Note: After executing the above roslaunch command, change the mode in QGroundControl from either Hold/Position to Offboard.

  2. To read the generated bag file and plot the corresponding commanded and actual trajectory of the drone:
    cd ~/catkin_ws/src/offboard/src
    python3 enae788m_plot.py
    

Package Structure

├─ CMakeLists.txt
├─ README.md
├─ bag
│  ├─ enae788m_hw1_VOXL1
│  │  ├─ mavros-local_position-pose.csv
│  │  └─ mavros-setpoint_raw-local.csv
│  └─ enae788m_hw1_VOXL1.bag                # Saved rosbag for /mavros/local_position/pose & /mavros/setpoint_raw/local
├─ launch
│  ├─ hw1.launch                            # Launch file to run enae788m_hw1.cpp and rosbag record 
│  ├─ record_data.launch
│  └─ total_launch.launch
├─ package.xml
└─ src
   ├─ enae788m_hw1.cpp                      # Code to perform waypoint tracking as given in HW1 
   ├─ enae788m_plot.py                      # Code to visualize recorded ROS topics using rosbag
   └─ offboard_example.cpp

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.