https://robotec.ai/wp-content/uploads/2020/04/ros-hero.jpg

Simulation module: ROS2-Unity3D

We developed a ROS2 module that allows to integrate the Robot Operating System 2 with Unity3D for performance-oriented AV/ADAS simulation.

Challenge

The importance of simulation for the development of autonomous vehicles and other robots is well understood. As we were creating a simulation based on the Unity3D engine for one of our customers, our goal was to interface with ROS, a middleware and package library which offers a lot of added value for robotic projects. The vehicle automation that we were developing together was to run on ROS2 and it was our goal for the simulation to provide data at the same standard and to work with the same perception, location and path planning algorithms.

ROS and Unity3D don’t easily mix because the programming languages, key concepts and coordinate frames are all different. The problem was temporarily addressed by a third-party bridge, which connected both worlds through WebSockets. Apart from only working with the old version of ROS, the bridge had significant reliability and communication issues. Since our simulation involves multiple vehicles and high-resolution sensors, performance of communication is essential. The bridge was failing even with 20% of our minimal requirements and the issue was at the core of its design. We clearly needed something much better.

Solution

We have developed a high-performance communication module for Unity3D, based on our advanced fork of ROS2 C# client. The results not only met our expectations but exceeded them:

  • The performance of communication increased by approximately 800 times!
  • We were able to support all standard as well as custom messages with message generation.
  • Our module is easily reusable between simulation projects.

Ask us for a demo.

Expertise fields

  • Robotics, ROS2, C++
  • Simulation, Unity3D, C#
  • AV automation

Also check

  • Interior sensing

    Generation of driver monitoring ground truth dataset – distraction

    Prepared and applied full laboratory setup for generating highly accurate ground truth datasets for vehicle interior sensing including driver monitoring in reference to distraction detection. We used a high-end motion capture system in the manufactured vehicle mock-up.

    Read more
  • Interior sensing

    Generation of driver monitoring ground truth dataset – drowsiness

    Dedicated driving simulator dataset collection campaign for generating ground truth datasets drowsiness detection. Our team applied a combination of eye closure metrics, driving performance and physiological data analysis (ECG and EEG).

    Read more