Building the Demo

A more real approach to learn the ROS basis.

Now, we can clone a template to solve a real time project to truly demonstrate your knowledge. Let’s code!

Problem to solve

As we delve into the world of autonomous driving software development, we are faced with the daunting task of navigating complex algorithms and cutting-edge technology. Yet, here we are, confronted with a GUI that seems to have been designed by someone who learned to code in their sleep xd.

One of the key components of autonomous driving software is the ability to detect and respond to environmental stimuli, such as obstacles, traffic signals, and other vehicles.

To illustrate this concept, we will be using a GUI that simulates a simple autonomous vehicle. The vehicle is represented by a red square that moves forward and bounces off the walls. The vehicle is equipped with a sensor that detects points in front of it, represented by circles. The goal of this exercise is to use ROS2 to control the orientation of the vehicle based on the location of the nearest point detected by the sensor.

This exercise is similar to what real-world autonomous driving software does. In a self-driving car, sensors such as lidar, radar, and cameras are used to detect obstacles, pedestrians, and other vehicles. The software then analyzes this data and generates control signals to adjust the vehicle’s speed and direction to avoid collisions and reach the desired destination.

By completing this exercise, you will gain practical experience in using ROS2 to control a simulated autonomous vehicle.

Building the demo

You can give the demo a try by cloning the code, building it, and executing the launch file that starts the whole system.

$ git clone https://github.com/martimolanes/sigue_lineas
$ cd sigue_lineas
$ colcon build && source install/setup.bash
$ ros2 launch demo_launcher demo.launcher.py
Last modified March 18, 2023: Fix link to image (62e4b8e)