Skip to content

Simulation

Albert Wang edited this page May 15, 2025 · 2 revisions

The entirety of the Driverless project relies on a simulation for testing the validity of algorithms. It is obvious that real-world testing and tuning will be required. However, simulations provide a great starting point both for new members to learn about Driverless and a way for senior members to quickly prototype new functionality to the driverless project.

Currently, MFE Driverless operates using two simulators:

  1. FS-Driverless-Simulator from the Formula Student community
  2. IPG CarMaker (currently under development)

To learn more about each, click on the links attached to them.

FS-Driverless-Simulator Basics and Setup

The Formula-Student community spent years getting an Unreal Engine simulation which works with ROS & ROS2. This is great for us because the MFE Driverless architecture stack is built on top of ROS2 middleware (DDS). The simulator can directly insert topic data into the ROS2 middleware layer, and the rest of our autonomous code and receive data and operate on it.

OS Requirements:

  • Windows 10+
  • Ubuntu 22.04 LTS or above LTS versions

Installing Binaries

We recommend installing the binaries for your desired operating system. You have the option of building the sim from source, but we don't recommend this option as this takes lots of space and configuration. To install using binaries follow these following steps:

  1. Clone our fork repository of the sim from here. Make sure you clone the repo at your root folder ~/. The simulator operates on absolute paths for configuration. This is an oversight from the developers, but pretty easy to work around. The settings.json file describes the configuration for the car and sensors.

  2. Install the pre-existing binaries from here. Drag & drop the contents of the extracted file into the repo you cloned earlier.

  3. At this point, your repository at ~/Formula-Student-Driverless-Simulator will look like (for Linux users). For Windows users, you will have a different executable instead of FSDS.sh

.
├── AirSim
├── config
├── docker
├── docs
├── Engine
├── FSDS.sh
├── FSOnline
├── LICENSE
├── Manifest_NonUFSFiles_Linux.txt
├── maps
├── mkdocs.yml
├── operator
├── python
├── README.md
├── ros
├── ros2
├── settings.json
├── simulator
└── UE4Project
  1. Verify that you have ROS2 installed first in your computer (sorry, Windows users). If not verify that you at least have a Docker container with ROS2 installed. If you are using a Docker container, perform the following steps in your Docker container.
  • Side note for Docker users: Clone the our fork repo in the root of your Docker container as well. This /ros2 workspace in the repository is crucial when setting up the bridge between the sim and the rest of our code.
  1. Execute colcon build --symlink-install while in the root project directory of the simulator. This will create a /install folder where you can source important commands from.

  2. Run source /ros2/install/setup.bash to source the important message definitions for the simulator to pass data.

  3. Linux Users, execute chmod +x ./FSDS.sh to give your user permissions to run the sim then, ./FSDS.sh. For windows users, run FSDS.exe. You should have the simulator running now.

  4. Run ros2 run fsds_ros2_bridge fsds_ros2_bridge manual_node:=true, which will connect a bridge with the simulator. Make sure you are in the game in the simulator and not just the menu. Select a random map to get started.

  5. Congrats, your sensor data should be in the ROS2 DDS layer. You can now launch your ROS2 code (in the same environment) to process incoming sensor data!

Clone this wiki locally