Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Software-In-The-Loop: Autonomous Surveillance Robot
9 students

Software-In-The-Loop: Autonomous Surveillance Robot

Build a surveillance robot from scratch using ROS2 Humble, Gazebo, YOLOv8, and custom navigation.
Last updated 7/2026
English

What you'll learn

  • Install and configure ROS2 Humble on Ubuntu 22.04 (or WSL2) and build a clean development workspace with all required packages and dependencies.
  • Design and launch custom Gazebo simulation worlds complete with physical obstacles, animated pedestrian actors, and overhead camera sensors.
  • Create a custom ROS2 node running YOLOv8 and apply homography to dynamically map detected target feet pixels to real-world map coordinates.
  • Path planner, a cubic-spline smoother, and an adaptive pure-pursuit/PID controller

Course content

1 section • 13 lectures • 1h 20m total length
  • Introduction6:13
  • Introduction to ROS29:01
  • Environment Setup7:44
  • ROS2 Core Concepts7:15
  • Building a Custom Gazebo Simulation World7:15
  • Mapping with Cartographer (SLAM)5:05
  • Localization with AMCL4:39
  • Vision Perception Node (YOLO)6:08
  • Homography-Based Person Coordinate Mapping6:05
  • Custom Navigation Stack7:00
  • Running the Complete System7:29
  • Conclusion and Next Steps0:05
  • Application6:58

Requirements

  • This course has been designed specifically to be welcoming to complete beginners. You do not need any prior experience with ROS2, simulation software, or computer vision to get started. Every terminal command, configuration parameter, and line of Python code is explained step-by-step from the ground up, with plain-English walkthroughs accompanying every diagram. To participate in the practical, hands-on exercises and run the active software-in-the-loop (SIL) simulation, you will need to meet the following machine and software specifications: Operating System & Environment Ubuntu 22.04 LTS (either as a native installation or running via WSL2 on Windows 10 version 2004 or later / Windows 11). ROS2 Humble Hawksbill (Desktop installation, which includes Gazebo, RViz2, and core demo packages). Hardware Specifications RAM: A absolute minimum of 8 GB, though 16 GB is highly recommended to run the Gazebo physics engine, RViz visualization, and neural network inference smoothly. Disk Space: Approximately 20 GB of free space to accommodate the OS environment, ROS2 packages, and dependencies. GPU: Optional but recommended. Having a dedicated graphics card will accelerate the YOLOv8 object detection node, but the system is designed to run successfully on a standard CPU as well. Python & Libraries The course project utilises Python 3.10+. While the setup chapters will guide you through installing these, the system relies on the following core Python libraries: `ultralytics` (for loading and running YOLOv8) `opencv-python` (for frame processing and calibration) `scipy` (for the spline-based path smoothing) `numpy` (for matrix operations and coordinate mapping) By ensuring you have a compatible machine, you can jump straight in and build this closed-loop autonomous system from scratch.

Description

This course contains the use of artificial intelligence (AI).

This course is a comprehensive, hands-on, beginner-to-advanced guide to building an Autonomous Surveillance Robot from the ground up using ROS2 Humble, Gazebo, YOLOv8, and a completely custom navigation stack. Designed for complete beginners, this project-based curriculum teaches you how to bridge the gap between computer vision and physical robotic motion by creating a fully closed-loop, Software-in-the-Loop (SIL) autonomous system.

By the end of this course, you will have built a robot that continuously monitors a scene, automatically flags suspicious human behaviour, dynamically maps the target's physical coordinates, and navigates to investigate—entirely without human intervention.

Core Course Modules & What You Will Build

The project is divided into four tightly integrated core modules, each responsible for a distinct part of the autonomous pipeline:

  1. Custom Simulation Environment (Gazebo): You will design a custom, physics-based 3D Gazebo world modelling an indoor urban locality, complete with boundary walls, internal rooms, animated pedestrian actors following scripted trajectories, and a fixed overhead surveillance camera.

  2. AI-Powered Perception Node (YOLOv8): You will write a custom ROS2 node that subscribes to the live overhead camera feed and runs YOLOv8n to detect people. It uses pixel-velocity thresholding to classify their activity as Walking, Running, or Staying in real time.

  3. Homography-Based Coordinate Mapping: Instead of relying on rigid, hardcoded goals, you will implement a homography projection matrix (H) using OpenCV to map 2D image pixels (the detected person's foot point at floor level) to real-world map coordinates (x, y). The target is dynamically snapped to a configurable spatial grid and published as a navigation goal.

  4. Custom Navigation Stack (No Nav2): You will completely bypass the standard Nav2 navigation stack. Instead, you will build a modular three-stage custom navigation pipeline from scratch:

    • Stage 1: IA* Path Planner: Computes a collision-free route around obstacles using a manually defined obstacle map.

    • Stage 2: Cubic-Spline Path Smoother: Converts jagged waypoints into a continuous, drivable curve using arc-length parameterisation.

    • Stage 3: Adaptive Controller: Fuses Pure-Pursuit and PID-style damping to steer the TurtleBot3 Waffle robot smoothly and accurately to the target.

Why This Course Is Unique

  • True Closed-Loop Autonomy: Learn how to build a reactive system where a visual event (a person staying still for more than 5 seconds) automatically triggers a robot to navigate, investigate, and resume patrol without any manual scripting.

  • Bypassing the Nav2 Black Box: Rather than plugging pre-packaged navigation nodes together, you will write the path planner, smoother, and motor velocity controller yourself, giving you deep, mathematical insights into robotic control theory and motion planning.

  • Grounded in Localisation: You will master AMCL (Adaptive Monte Carlo Localisation) strictly for robot pose estimation, fusing wheel odometry with a pre-built map to close the control loop.

  • Designed for Complete Beginners: No prior ROS2 experience is required. The course provides full code files, line-by-line explanations, and plain-English walkthroughs for every single terminal command, XML configuration, and architectural diagram.

Originality and Use of Artificial Intelligence (AI)

The educational framework, technical concepts, software architecture, implementation methodology, engineering decisions, practical examples, source code, and accompanying technical manual presented in this course are the original work of our team.

Artificial intelligence (AI) was used only as an assistive tool during course production. AI assisted with tasks such as language refinement, technical writing support, narration, and video production. All technical concepts, software architecture, algorithms, engineering decisions, implementation methodology, source code, instructional design, and technical validation were conceived, developed, reviewed, and verified by our team.

Who this course is for:

  • This course is designed as a beginner-to-advanced guide, making it ideal for a wide spectrum of learners—ranging from those with zero prior robotics experience to advanced developers looking to build custom control loops. The core groups of learners who will find this course highly valuable include: 1. Complete Beginners & Robotics Students Who they are: Students, hobbyists, or software developers who are completely new to the Robot Operating System (ROS2) but eager to learn through a practical project. Why it's for them: The entire project is designed from the ground up. Every terminal command, configuration file, and Python script is explained line-by-line with plain-English walkthroughs accompanying every diagram. Beginners can bypass the steep learning curve of ROS2 and confidently build a complex, working system on their own machine without prior experience. 2. Aspiring Autonomous Vehicle & Navigation Engineers Who they are: Robotics learners who want to understand the mathematical and algorithmic "machinery" behind robot movement, rather than just plugging in pre-packaged tools. Why it's for them: Instead of relying on the standard Nav2 navigation framework, this course guides learners through constructing a completely custom three-stage navigation stack from scratch. They will gain deep, practical experience building an IA path planner, a cubic-spline path smoother, and an adaptive Pure-Pursuit/MPC hybrid controller. 3. Computer Vision & AI Developers Who they are: Machine learning and vision developers who want to move beyond static image detection and see how their models perform in dynamic, active robotic environments. Why it's for them: The course bridges the gap between raw object detection and physical action. Learners will write a custom ROS2 perception node to run YOLOv8, classify human activity in real time, and implement a homography-based coordinate mapping pipeline. This teaches them how to translate visual pixel coordinates into real-world, dynamic navigation goals. 4. Software-in-the-Loop (SIL) & Simulation Engineers Who they are: Embedded systems developers, software engineers, and automotive software professionals looking to design and test autonomous systems safely in simulated worlds. Why it's for them: The course offers hands-on training in building custom, physics-based Gazebo environments—complete with boundary walls, animated pedestrian actors, and overhead camera sensors. Learners will master the design of closed-loop systems, tracing data from Gazebo sensor topics, through YOLO and AMCL, and down to motor velocity commands on `/cmd_vel`.