Monocular Obstacle Avoidance

Collision Detection and Avoidance for Autonomous Vehicles

Internship Project @ Hanlun AI

This project investigates using a simple setup consisting of an embedded computing module (NVIDIA Jetson Nano) with only a monocular camera to avoid objects and detect collisions in real-time, serving as a cost-effective alternative to systems requiring depth cameras or lidar/radar.

We use dense optical flow in OpenCV to deduce the robot's motion and infer environment structure through motion parallax. The system builds a boundary graph of obstacles based on flow magnitude thresholds, allowing the vehicle to steer towards free space and back up upon collision detection.

Platform

Built on the Donkey Car platform, featuring an HSP 94186 RC car, IMX219 wide-angle camera, PCA9685 servo driver, and NVIDIA Jetson Nano. The software stack uses Python, OpenCV, and NVIDIA's Jetrac/Jetcam libraries.

Algorithm

The algorithm processes the optical flow field to make steering and speed decisions:

Optical Flow Visualization 1 Optical Flow Visualization 4 Optical Flow Visualization 5 Optical Flow Visualization 6
Boundary and optical flow visualizations during obstacle detection.

← Back to work