Skip to content

Recommended Tutorials

C++, Python🔗

Learning an new programming language (or improving your skills) depends on many factors that this tutorial cannot account for.

If you have no experience at all, your 100 level programming course might be a good place to start. If you'd like more guidance ask your lead(s) and they will help you out.

If you have some experience in any programming language, you should be able to pick up most things you need by going through the tutorials and searching/LLMing things that you don't recognize.

If you'd like to go through some very comprehensive tutorials/guides before you start any UAS specific stuff here are the good ones:

Linux🔗

The previous tutorial should (I'm hoping) give you enough context to start the ROS2 tutorials. Most commands and concepts you should be able to pickup as you go.

If you'd like to go even further the most immediately relevant "Linux topics" will be sysadmin related. I don't have any recommended tutorials, but topics of note include processes package managment, networking, tailsale, udev, and systemd.

ROS2🔗

The Robot Operating System (ROS) is a set of software libraries and tools for building robot applications. From drivers and state-of-the-art algorithms to powerful developer tools, ROS has the open source tools you need for your next robotics project.

For our team ROS2 acts as the middleware the binds all of our systems together, it enables communication with the drone and is a key interface we develop against. It provides a concurrency and parallelism framework for our applications and brings a standardized pub/sub, service, and action based IPC mechanism.

Main documentation: https://docs.ros.org/en/humble/index.html

Recommend Tutorials to complete: https://docs.ros.org/en/humble/Tutorials.html

  • All of Beginner: CLI tools
    • Most of Configuring environment has been done for you if you are using the development container, but you should read it anyways to get familiar with the CLI.
      • We do not set ROS_LOCALHOST_ONLY=1 because the container is not setup for network_mode: host
  • Most of Beginner: Client libraries
    • Using colcon to build packages
    • Creating a workspace
    • Creating a package
    • Writing a simple publisher and subscriber (C++)
    • Writing a simple publisher and subscriber (Python)
    • Writing a simple service and client (C++)
    • Writing a simple service and client (Python)
    • Creating custom msg and srv files
    • Implementing custom interfaces
    • Using parameters in a class (C++)
    • Using parameters in a class (Python)

I recommend using using the uas_ws directory for your workspace as the container's .bashrc comes preconfigured to use this workspace.

The concepts page is good place to learn more about the inner workings of ROS: https://docs.ros.org/en/humble/Concepts.html

PX4🔗

PX4 is the Professional Autopilot. Developed by world-class developers from industry and academia, and supported by an active world wide community, it powers all kinds of vehicles from racing and cargo drones through to ground vehicles and submersibles.

PX4 is our chosen autopilot and contains the fundamental routines that allow the drone to fly.

The drones currently use PX4 v1.16 so select that version of the docs to get the most relevant information.

Main documentation: https://docs.px4.io/main/en/

Read the basic concepts page to get familiar with basic drone concepts: https://docs.px4.io/main/en/getting_started/px4_basic_concepts.html

We make heavy use of offboard control for our autonomy, specially we use ROS2 and the uXRCE-DDS interface, there are quite a few pages, but skim a few to get a feel for what we are working with: https://docs.px4.io/main/en/ros/offboard_control.html

In the container, PX4 has been setup in /build/PX4-Autopilot, and the MicroXRCEAgent has already been installed.

Recommended "Tutorial": https://docs.px4.io/main/en/ros2/offboard_control

  • Follow the instructions to install

We are specifically using the uXRCE-DDS bridge to communicate with the drone, see here to learn more about its implementation: https://docs.px4.io/main/en/middleware/uxrce_dds.html

Gazebo🔗

Gazebo brings a fresh approach to simulation with a complete toolbox of development libraries and cloud services to make simulation easy. Iterate fast on your new physical designs in realistic environments with high fidelity sensors streams. Test control strategies in safety, and take advantage of simulation in continuous integration tests.

PX4 has already done most of the setup for us, but if you are interested in modifying the simulation or just want to learn more, feel free to read a few pages.

Main documentation: https://gazebosim.org/docs/harmonic/tutorials/

Onboarding Project🔗

The best way to get learn the basics is by doing, as such I have scoped a smallish scale learning project that you can undertake (not for marks).

To get started create a ROS package in uas_ws/src, use the PX4 offboard docs as reference.

Requirements (purposefully open ended):

  • Software system that enables autonomous control of a drone in simulation
  • The system should:
  • Allow the drone to take off
  • Allow the drone to go to a location via local coordinates
  • Allow the drone to go to a location via global coordinates
  • Allow the drone to land
  • Can be done either in Python or C++ or both or anything you want.

Demonstrate:

  • Take off
  • The drone creates a square pattern in the sky (preprogrammed coordinates)
  • The drone creates a square pattern in the sky (generated at runtime coordinates)
  • The drone creates a shape of your choosing in the sky
  • Landing

Bonus:

  • The drone will takeoff and wait for the user to select what pattern to fly in.

These are all concepts that are used in our actual systems, by developing your own solution you will learn strong fundamentals and bring a unique perspective for the team.

Consult this wiki and the dev_env README for additional reference.