This article is about my Final Year Project (I will refer it as FYP) at Nanyang Technological University. In this FYP, a radar is attached to a small UAV and the radar is used to detect the object and maneuver around the obstacle, not just a simple sense and avoid algorithm.

The UAV Test Platform used for FYP

As you know, UAV, usually known as a drone, is used in increasing number of situations in recently. Initially only used in military, now there has been an increase in personal usage of drone for casual entertainment, cinematography, racing and many more. Most notable ones are the hobby and cinematography drones make by DJI. There also has been an increase in commercial usage of drones, such as delivery, land or building surveying and even indoor warehouse monitoring. However, this also means there is an increasing number of drone crash as usage in risky locations such as inside construction area or warehouse. Hence, there is a need for an advanced collision avoidance method that enables easy navigation in these environments.

For this FYP, IWR1443Boost module made by Texas Instrument was used to detect. Using the IC IWR1443, this radar costs almost 500 SGD, but capable to create a 3D map of the obstacles. An example ROS package is also provided which also include collision-free navigation with a TurtleBot UGV.



The Frontside and Backside of IWR1443 Module

Photo of the TurtleBot Test Platform used by Texas Instrument

In this article, I will cover briefly how the algorithm work. If you are interested in the full details, you can read my report here. You can also the code for the algorithm in this GitHub link along with the installation process. You can also find the documentation of the radar here and here. I recommend that you read more about the Robot Operating System and move base navigation for ROS. Please note that I am not quite familiar with using GitHub and have uploaded the entire Catkin work folder for my FYP. However, it does allow the project to be replicated immediately, providing that the MAVROS package also added. If you have any issue, you can contact me at kwidjaja002@e.ntu.edu.sg, via GitHub, or Reddit. Please note that I am not working on this project anymore.

Hardware Implementation

The hardwares used are:

UAV frameset (Radio Receiver, Safety Switch)

Pixhack v3 flight controller running PX4 firmware

UP-Squared Single Board Computer with Pentium N4200 and 4GB RAM

IWR1443 millimeter wave Radar

TerraRanger One IR sensor for altitude measurement

PX4FLOW optical flow camera for localization

The Hardware is configured according to the following diagram.

Hardware Architecture Diagram of the UAV Test System

The system is divided into 2 parts, onboard system where the flight controller handles the data and offboard where the UP Squared handle the computation.

Offboard system handles tasks such as:

Radar Mapping (Voxel Grid, 3D occupancy map)

Obstacle Map creation (Costmap)

Path planning and sending velocity command (Move_base)

While the onboard systems handles:

UAV flight. It can either receive command manually from the radio control or velocity command from the off-board system.

Localization. The localization is sent back to the offboard system for path planning and mapping purpose.

Software Implementation

Software wise, the system is divided into 3 parts; Obstacle map creation, Path planning, and UAV control.

Obstacle map is created by first filtering the radar output to remove output caused by outliers, air disturbance or floor. Hence, only solid vertical objects are mapped. Then by using the odometry form the flight controller, a 3D occupancy map is created. This map can be saved or passed to the next step for navigation. The 3D map output is combined with a previously saved map to create a 3D map of the obstacle.

The Two Boxes used for The Mapping Test

3D Map of the Obstacles along with Parts of the Surrounding

Next, the 3D map is converted into 2D costmap. Costmap is basically a map showing the risk of collision, the location of the obstacle has the highest risk or cost and as it gets further from the obstacle, the cost goes down.

2D Costmap Generated from the 3D Occupancy Map at 0.01-meter Resolution

The planner inside the move_ base package then takes the costmap and creates a path that has the path to the desired goal that has the least cost. Hence avoiding the obstacle. Then the planner sends velocity command to control the UAV. However, the velocity command is only in 2D and since the UAV will slightly drift around, even when the vertical and horizontal velocity is set to 0, a closed loop P control is added to allow prevent this drift.

The Blue Path Generated by The Planner with Costmap

Software Architecture Diagram of the UAV Test System

Test Results (Video)

Several tests are done by setting the local planner parameters as variables and other parameters as constant. The video below uses this following values:

Costmap common parameters: Conversion resolution = 0.12 meter Obstacle Layer radius = 5 meter

Inflation Layer: Inscribed_radius = 0.4 meter Cost_scaling_factor = 3.5 Inflation_radius = 0.5 meter

Global planner lethal_cost = 200 (default = 253) neutral_cost = 30 (default = 50)

Local Planner path_distance_bias = 38 goal_distance_bias = 0.01 occdist_scale = 0.1



You can read the report I have written or the ROS tutorial for more details.

Video of Indoor and Outdoor Server

Conclusion

Overall, the UAV was able to fly through obstacle well in indoor condition. However, more tuning needed for the outdoor situation. Further testing can be done to also improve flight stability and obstacle detection reliability.