Introduction to Unity Robotics and Simulation Pro · Module 1 of 5
What Unity brings to robotics, what the Simulation Pro package contains, and how to get a robot into the Editor from a URDF file.
By the end of this module you will have a new Unity 6 project with Simulation Pro installed, its samples imported, and a Panda robot arm imported from URDF, configured, and standing still in Play mode.
Unity Robotics is not a single product. It is a set of packages that turn Unity from a game engine into a simulation engine for robots. This course covers one of them: Simulation Pro, referred to as SimPro from here on.
The reason to simulate a robot in Unity is that the Editor is already good at the things a robot test rig needs:
| What Unity gives you | Why it matters for robotics |
|---|---|
| Prefab-based environments | Build a warehouse, a factory floor, or an obstacle course, then drop the same robot into each one |
| Physics simulation | The robot's joints, wheels, and contacts behave without you writing a dynamics model |
| Rendering | Simulated cameras see a real image, not an approximation |
| Digital twin workflows | Bring an existing physical site into Unity and capture data against it |
| ML-Agents | Use the Scene as a training environment, with simulated sensors in the training loop |
The typical use is to test a robot's behaviour in the Editor before deploying it to hardware — import a factory robot, simulate its sensor feeds, and watch it perform its task.
SimPro is a package that adds functionality to the Unity Editor. Its core features:
| Feature | What it does |
|---|---|
| URDF import | Turns a URDF robot description into Unity GameObjects, meshes, and ArticulationBodies |
| Messaging | C# classes for ROS 2 message types, plus publisher and subscriber base classes |
| ROS connector | A live TCP connection to a ROS 2 environment — or a Dummy Connection that fakes one |
| Sensors | Prefab sensors (camera, LiDAR, IMU, joint) that publish simulated data |
| Clock | Control over how simulation time advances relative to real time |
| Coordinates | Conversion between Unity's coordinate system and ROS's |
| Visualization | In-Editor UI and Scene gizmos for inspecting the messages going in and out |
| Linux headless | Running the simulation without a display. Not covered in this course. |
Modules 1–3 work entirely against a Dummy Connection, which stands in for a ROS 2 environment so you can build and test without one. Module 4 replaces it with a live ROS 2 connection running on an Ubuntu virtual machine.
Note: This course does not cover setting up ROS 2 itself. A later course in the robotics learning pathway covers that.
Unity Engine Unity Scene ROS 2 environment
──────────── ─────────── ─────────────────
Rendering Robot prefab Robot software
Physics ├─ Virtual sensors ◄────► Nodes
└─ C# controllers Logging
Connector
The engine handles rendering and physics. The Scene holds the robot prefab with its virtual sensors and C# controller scripts. The ROS 2 environment runs the actual robot software and logs data. All three share data through the connector.
Create a new Unity project. The course project is named Introduction to Robotics and SimPro, set to
Local project, with no source control provider.
Simulation Pro is supported on Unity 6.3 and newer. Use 6.3 or later to follow along.
Navigate to the Package Manager and add the Simulation Pro package using its technical name.
The samples are Scenes you will use throughout Module 3, so import them now.
- Go to Window > Package Management > Package Manager.
- Select the All Samples tab.
- Scroll to the Simulation Pro entries.
The available samples:
| Sample | Used in this course |
|---|---|
| Simulation Pro Basic | Yes — Module 3 uses these Scenes |
| Simulation Pro Advanced | No |
| Prebuilt LiDAR Sensors | Yes — models of real brand-name LiDAR units |
| ZED Cameras | No |
Import Simulation Pro Basic and Prebuilt LiDAR Sensors.
- The project opens without Console errors.
- The Project panel contains a
Samplesfolder with the Basic and Prebuilt LiDAR sample content.
URDF — Unified Robot Description Format — is the standard file format for describing a robot: its links, its joints, the limits on those joints, and the meshes that represent them. If you model robots in software like OnShape or SolidWorks, you export URDF and bring the model into Unity with its constraints intact.
The importer runs automatically. Drag a URDF file into the Assets folder and it imports. There is nothing else to press. You can adjust settings after the fact if needed.
| The importer reads | The importer creates |
|---|---|
| Mesh information | Meshes, through decomposition |
| Links | Colliders |
| Joints | An ArticulationBody tree |
| Materials | URP materials |
| Sensors | Sensor prefabs |
An ArticulationBody is Unity's physics component for jointed machinery. Each joint gets one, with its constraint and rotation type taken from the URDF.
XACRO files. If your URDF is in XACRO format, convert it to pure URDF using ROS before importing. The importer does not process XACRO.
- Right-click in Assets and create a folder named
URDF Files. - Double-click into it.
- From the course assets, drag the
Pandafolder intoURDF Files.
The import happens on drop. Expand the imported object and you will find the arm built out of Unity meshes, colliders, and ArticulationBodies, with every joint's constraints and rotation type already configured from the URDF.
The Panda comes in bright pink. This is a render pipeline mismatch, and it has a specific cause.
The URDF importer converts materials based on the mesh files referenced by the URDF, and it primarily
handles .STL. Open the Panda's visual folder and you will see the meshes are .DAE
files instead.
The fix is an Editor script included with the course assets:
- In the course project assets, find the
Editorfolder containingURDFURPMaterialFixer. - Drag the whole
Editorfolder into your project's Assets.
Unity compiles and runs the script on import, and the materials convert to standard URP materials automatically.
Open the script and read it. If your own robot's materials import incorrectly, this is the pattern to copy.
- The Panda appears in the Scene view in white and grey, not pink.
- Its Hierarchy shows a chain of joints ending at the hand and finger joints.
Press Play now and the arm will immediately glitch. The URDF's damping values do not translate into stable Unity physics, so you set them yourself.
Expand the Panda's joint hierarchy all the way down to the hand joint and the finger joints.
- On the base, set it to immovable.
- On every joint from joint 1 down, set:
| Property | Value |
|---|---|
| Linear damping | 10000 |
| Angular damping | 1000 |
| Joint friction | 1000 |
This is repetitive. It is done by hand in the video for clarity, but a short editor script that walks the ArticulationBody chain and writes these three values is worth writing for a real project.
A robot whose own colliders collide with each other behaves strangely — links fight each other at the joints. Turn that off with a layer:
- Select the root
Pandaobject. - Create a new layer named
robot. - Assign the Panda to the
robotlayer, choosing Yes, change children when prompted. - Go to Edit > Project Settings > Physics.
- In the collision matrix, uncheck
robot/robot.
Press Play.
- The arm holds its pose instead of thrashing.
- The base does not move.
- The Console has no red errors.
The Panda is now a set of ordinary Unity components. From here you can attach sensors to it, send and receive ROS 2 messages about it, or write custom scripts to drive its joints directly.
Next: Module 2 — Messages, which covers nodes, topics, and the publisher/subscriber pattern, and gets Unity sending and receiving its first messages.







