Scout is a quad rotor UAV capable of autonomous navigation in small spaces without the use of GNSS signals. This is accomplished using a combination of SLAM and low level control algorithms for local and global positioning.
The base level of this repo is designed to follow the format of a ROS2 Project.
All code is encapsulated within ROS nodes within the src folder.
Project documentation can found under docs, while most other docs are placed with the code they are documenting.
Scripts, including build and launch scripts, can be found under scripts, while Python Launch files can be found under launch.
Finally, the PCB design is available under PCB_Scout, and embedded code is placed under src/control_board
- ROS2 Humble
- arm-none-eabi-gcc
- CLANG/CLANG-15
- RViZ
- Liftoff Steam Game (for running the simulation)
The ROS build is handled by the build.sh script and the top level Makefile.
To build the ROS nodes, run:
makeTo generate a clean build, run:
make clean allBy default, the ROS build system is only configured to build the specified nodes for the current target system, set by the system HOSTNAME.
Package names listed under PKGS_COMMON will be built on all systems.
Some packages are platform specific, and thus are specified under PKGS_{PLATFORM}.
To add a platform, add a new hostname declaration, a new platform specific package list, and adjust the if condition at the bottom of build.sh
The embedded code is not built with the ROS nodes. Do not attempt to add the embedded code to the ROS build system. ROS will struggle to comprehend the cross compilation and linking used in the embedded codebase.
To build the embedded code, refer to the top level Makefile within the Firmware folder.
After installing arm-none-eabi-gcc, the embedded code can typically be built and flashed with:
make build
# For Flashing using the Linux Open Source st-flash tool
make st-flash-lin
# For Flashing using the ST utility on Windows
make st-flash-win
# For Flashing using a black magic probe
make BlackMagic-flashBuilding on Windows:
When building on Windows -w- VS Code, incorrectly configured environment variables can cause build environment to default to MSVC rather than the arm-none-eabi compiler.
This will cause the build to fail.
To resolve this error, either remove the MSVC compiler, or use the CMakeLists plugin within VS Code to correctly configure the compiler to arm-none-eabi-gcc.
Hardware In the Loop testing is possible through the Liftoff FPV Flight simulator. First, download and install Liftoff from the Steam Store. After installing, follow the directions within Jchisholm/LiftoffSimulator to build and install the required modifications.
Basic simulation is possible without installing the modifications, however, LiDAR data, along with the simulation/lidarstreams node will fail to function.
After Liftoff has been configured, launch the simulator, followed by the sim_rviz.py Launch Script.
This script can be launched with:
ros2 launch ./launch/sim_rviz.pyAfter launching, RViZ should display the drone, along with simulated LiDAR data. Note that with the current state of the simulation mod, the LiDAR data is directly correlated to the in-game camera angle. Therefore, for accurate testing, set the in-game camera angle to zero (0).
The highest level control algorithms. Not designed to run in real-time (ROS cannot handle real-time scheduling).
Low Level Collision Avoidance and flight control algorithms. The Control Board handles real-time flight kinematics based off of LiDAR data and feedback from the FC.
The INAV project was used as the firmware for the flight controller. The INAV stack handles the lowest level of flight kinematic control and motor control.
- SpeedyBeeF405 V4 FC
- SpeedyBee 65A 3-6S ESC
- 10" Frame
- 800KVA Motors
- Jetson Nano
- Quad Core Cortex-A57
- Nvidia Maxwell GPU (256 Cuda Cores)
- Ubuntu 22.04.5 LTS "Jammy Jellyfish"