Coordinate Systems for Unreal Engine Simulation in Robotics System Toolbox
Robotics System Toolbox™ enables you to simulate your robot scenario in a virtual environment that uses the Unreal Engine® from Epic Games®.
This topic explains the coordinate system conventions used by Unreal Engine and how they relate to the coordinate systems used by Robotics System Toolbox when simulating robots in 3D environments based in Unreal Engine. Understanding these conventions enables accurate specification of robot base poses, interpretation of simulation results, and exchange of pose data between Robotics System Toolbox and Unreal Engine.
Note
Simulating models in the 3D visualization environment requires Simulink® 3D Animation™.
Unreal Engine World Coordinate System
The Unreal Engine environment uses a left-hand rule world coordinate system with axes fixed in an inertial reference frame. All actors in the Unreal Engine scene, including simulated robots, are positioned and oriented relative to this world frame.
The table defines the Unreal Engine world axes:
| Axis | Description |
|---|---|
| X | Forward direction of the vehicle |
| Y | Extends to the right of the vehicle, parallel to the ground plane |
| Z | Extends upwards |
The origin of the world coordinate system is defined by the Unreal Engine scene.
The Unreal Engine simulation environment uses the rotation conventions listed in this table:
| Rotation | Description |
|---|---|
| Roll | Right-handed (clockwise) rotation about X-axis |
| Pitch | Right-handed (clockwise) rotation about Y-axis |
| Yaw | Left-handed rotation (counterclockwise) about Z-axis |
Because yaw follows a left-handed convention while roll and pitch follow right-handed conventions, orientation values from Unreal Engine require transformation before Robotics System Toolbox interprets them using right-handed robotics conventions.
Robot Coordinate System
Robotics System Toolbox uses a right-hand rule world coordinate system. The robot coordinate system is a body-fixed frame that moves with the robot and defines the reference axes for translation and rotation.
The Simulation 3D Robot block represents the robot pose using:
Translation — A three-element vector, [x, y, z], that specifies the robot base position along the world X, Y, and Z axes, in meters.
Rotation — A three-element vector, [yaw, pitch, roll], that specifies the robot base orientation as clockwise rotations about the Z, Y, and X axes, respectively, in radians.
All rotation values follow right-handed rotation conventions consistent with Robotics System Toolbox.
Mapping Between Unreal Engine and Robotics System Toolbox
A pose in Unreal Engine is typically expressed as (x, y, z, roll, pitch, yaw).
To represent the same physical pose in Robotics System Toolbox, the pose maps as (x, -y, z, -yaw, pitch, roll).
This mapping accounts for the following differences:
Coordinate system handedness — Unreal Engine uses a left-handed coordinate system, while Robotics System Toolbox uses a right-handed coordinate system. Negating the Y axis reconciles this difference.
Orientation ordering — Unreal Engine specifies orientation as [roll, pitch, yaw], whereas Robotics System Toolbox represents orientation as [yaw, pitch, roll), corresponding to rotations about the Z, Y, and X axes.
Applying this mapping ensures consistent interpretation of robot position and orientation across both environments.
Relationship Between World and Robot Coordinate Systems
During simulation, the robot coordinate system defines the position and orientation of the robot relative to the Unreal Engine world coordinate system.
The Simulation 3D Robot block uses this relationship to:
Place the robot correctly within the Unreal Engine scene.
Update robot motion based on base pose and joint configuration inputs.
Output ground-truth robot base translation and rotation in the Robotics System Toolbox coordinate system.
The Simulation 3D Physics Dump Truck and Simulation 3D Physics Backhoe blocks follow the same coordinate system conventions. However, these blocks update vehicle motion based on throttle and steering angle inputs, rather than base pose and joint configuration inputs. Understanding this relationship is essential when specifying initial robot or vehicle poses, controlling their mobility, and interpreting pose outputs from Unreal Engine–based simulations.
See Also
Simulation 3D Robot | Simulation 3D Physics Dump Truck | Simulation 3D Physics Backhoe