Unity Simulation Setup

Hello everyone,
IITB Mars Rover Team here

We would like to share the simulation pipeline we have built in Unity that integrates with ROS2, providing a more advanced and flexible simulation environment compared to Gazebo.

Additional features you get using Unity as compared to previous Gazebo Based solutions:

• Photorealistic visuals: Unity provides high-quality rendering (PBR materials, advanced lighting, HDR, shadows, reflections), creating far more realistic environments than Gazebo. This allows for better testing of computer vision, AI/ML algorithms and sensor models with lighting and textures closer to real-world conditions.

• Better performance: Gazebo often struggles with performance in large-scale simulations (e.g., the ERC world mesh file) due to heavy CPU load and limited rendering optimizations. Unity, being GPU-optimized, handles large meshes, complex environments, and high quality textures while providing high frame rate even on mid-range hardware.

• Simpler world building & asset management: Unity’s asset store, and editor make creating, importing, and managing complex worlds much easier compared to Gazebo. Terrain generation, vegetation, obstacles, and environmental details can be added quickly, making the simulation more realistic and easily adaptable for various scenarios.

We have shared this Unity simulation on our GitHub with a complete guide on setting up Unity and running the simulation. You can directly import this project and start using the ROS2 topics for mapping, autonomous navigation and computer vision.

Suggestions and feedback are most welcome.

Thanks
Rishabh
IITB Mars Rover Team

5 Likes

Hi,

Just a friendly reminder that husarion_ugv_ros (and most husarion repos) is licensed under the Apache 2.0 license. If you copy any files from this repository to another repo, please make sure to follow the terms of the Apache 2.0 license.

This includes providing appropriate attribution, and it’s best to add a comment in the file itself or include a note in the NOTICE file of your project.