Skip to content

varundevsukhil/reimagined-octo-fiesta

Repository files navigation

Freefly Systems Technical Challenge

Read this document: The Challenge Question.

Project Description

This project is built using PX4 and uXRCE-DDS bridge to ROS2 Humble. I chose this method over directly implementing using MAVSDK-Python because I believe ROS2 provides additional considerations for safety-critical applications such as autonomous robots (such as UAVs) where the points of software failure can be compartmentalized without making breaking changes downstream on my local machine or upstream with changes to the PX4 stack itself. This project package should work indefinitely if all the build instructions are followed for the duration of the respective module's support timelines.

Docs

This repository has multiple supporting docs to demonstrate the results of this project when it was executed on the author's computer. The following is a brief summary:

  1. System design document

  2. Video 1: screen capture of the Gazebo simulator and the mission visualizer

  3. Video 2: screen capture of the mission progression using the QGroundControl GCS

  4. The mission waypoint file (with header description) - change waypoints as needed and recompile the project

  5. Flight logs:

    1. The log ulg file
    2. The log bag file - use plotjuggler to visualize this.
    3. Link to the PX4 logs hosted online
    4. Copy of the flight review
    5. Copy of the PID analysis

Build

First, follow the instructions from the ROS2 User Guide in the official PX4 development website. Once you've built the ROS2 workspace, the rest of the installation and setup guide is entirely optional. Navigate to the src directory of your ROS2 workspace (eg: ros2_ws) and clone this repository using:

user@computer:<path/to/ros2_ws/src>$ git clone [email protected]:varundevsukhil/reimagined-octo-fiesta.git

Navigate back to the root of your ROS2 workspace, and execute the following command:

user@computer:<path/to/ros2_ws/>$ colcon build --packages-select freefly_challenge

If you see an output similar to the following in your terminal, then the build process is complete:

Starting >>> freefly_challenge
Finished <<< freefly_challenge [0.59s]          

Summary: 1 package finished [0.66s]

If the build process fails, contact the author with the error logs.

Testing

For testing this project, we are going to use four applications that will have to be run in their own terminals.

  1. The uXRCE DDS agent. This application allows for bi-directional communications between the PX4 flight stack and the ROS2 middleware libraries (including the project in this repository). Use the following command to start the DDS agent:
user@computer:~$ MicroXRCEAgent udp4 -p 8888
  1. The PX4 SITL (software-in-the-loop) application. This project uses the default x500 quadcopter model in a blank Gazebo world for simplicity. Navigate to the root directory of the PX4 stack on your local computer and use the following command to start the simulator:
user@computer:<path/to/px4-root-directory/>$ make px4_sitl gz_x500
  1. The QGroundControl, or QGC, is the GCS software system commonly used with the PX4 flight control stack. It is generally a single executable .AppImage that can be launched as a normal application. This software can be downloaded from the official source.

  2. Finally, the technical challenge project (which includes a visualizer, a GUI interface, and the mission node) can be launched using a single ROS2 launch file provided in this repository using the following command:

user@computer:~$ ros2 launch freefly_challenge mission.launch.py

The mission software for this technical challenge has a 10 second delayed start to allow you to adjust the positions of the application windows (if you find this necessary). Sit back, and enjoy the show! The default mission is to trace the letters FS as a tribute to Freefly Systems. The following is a plot that shows (top) the arming state of the aircraft, (middle) the navigation state of the aircraft, and (bottom) the {x, y, z} position tuple in the local coordinate frame where the aircraft's origin for the current mission is set to the location it is armed at.

About Me

Varundev Sukhil is a computer engineer and a roboticist.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages