3.1. Simulation and Visualization

This section describes the workflow for developing, simulating and deploying automation solutions with the voraus.pioneer. It connects the individual components into a customer journey - from modeling 3D assets through simulating and visualizing the automation cell to deploying the same code on real hardware.

3.1.1. Overview

The voraus.pioneer provides components for simulation, visualization and programming that work together:

Component

Role in the Workflow

Documentation

voraus.pioneer Examples

Examples covering the workflow from robot control through scene visualization to process simulation.

voraus.pioneer Examples Documentation

voraus 3D Visu

Web-based 3D rendering of the automation cell. Displays models, scenes and live simulation data in the browser.

voraus 3D Visu Documentation

voraus Simulation

Physics-based simulation engine. Simulates object interactions (gripping, collisions, conveyors) and connects to the voraus.core via the same interfaces as real hardware.

voraus Simulation Documentation

voraus Robot Arm

Python library for robot programming. Provides a high-level API for controlling the robot in both simulation and real hardware environments.

voraus Robot Arm Documentation

voraus EtherCAT Python Client

voraus EtherCAT Python Client is a Python package to access EtherCAT process data.

voraus EtherCAT Python Client Documentation

voraus Simulation and voraus 3D Visu are designed to be used together, but each can also be used independently.

3.1.2. The Customer Journey

The following sections describe the typical workflow from first setup to deployment on real hardware:

  1. Step 1: Set Up the Development Environment

  2. Step 2: Model 3D Assets

  3. Step 3: Visualize the Scene

  4. Step 4: Add Simulation Physics

  5. Step 5: Develop and Test the Application

  6. Step 6: Deploy to Real Hardware

Step 1: Set Up the Development Environment

The development environment runs in Docker containers, which contain all required services (voraus.core in virtual mode, voraus 3D Visu, and your development tools). The voraus.pioneer Examples provide pre-configured environments that you can use directly:

  • Local development: Download the examples and open them in VS Code with Dev Containers. See Download and work locally.

  • Cloud-based: Access a fully configured cloud environment from your browser. See Work in the Cloud.

A typical docker-compose.yml includes the following services:

Note

For detailed instructions on setting up a virtual voraus.core, see Installation for the voraus.core in a virtual environment and Setting up the Runtime.

Step 2: Model 3D Assets

The voraus platform uses standard 3D file formats that can be exported from any modeling tool:

  • GLB / glTF - Visual representation displayed in the voraus 3D Visu

  • OBJ (Wavefront) - Physics collision meshes used by the voraus Simulation engine

  • URDF - Unified Robot Description Format for describing complex physical models with joints, links and inertia

Note

Use Blender (free and open source) or any other 3D modeling tool to create your assets. The voraus Simulation documentation provides a guide for exporting physics models (OBJ) from Blender. For visual assets (GLB), refer to the voraus 3D Visu documentation.

Each simulation object typically consists of:

  1. A GLB file for visual rendering (displayed in the browser)

  2. A URDF file referencing an OBJ mesh for the physics engine (used for collision detection, gravity, friction)

For example, a simple box model:

Listing 5 Example of defining a box model with separate visual and physics assets.
from voraus_simulation import DynamicObject

class Box(DynamicObject):
    def __init__(self, position=None, rotation=None):
        glb_path = "assets/box/box.glb"      # Visual model
        urdf_path = "assets/box/box.urdf"     # Physics model
        super().__init__(glb_path, urdf_path, position, rotation)

The voraus Simulation examples demonstrate how to define simulation models for boxes, pallets, conveyor belts and light barriers step by step.

Step 3: Visualize the Scene

With the 3D assets prepared, you can build a visual scene using the voraus 3D Visu. This allows you to load models, position them and synchronize live data - all from Python.

Loading the robot model and synchronizing joint positions:

Listing 6 Example of loading a robot model and synchronizing it with joint positions
from voraus_3d_visu import Visu
from asyncua.sync import Client

# Client for the 3D visualization server (renders the scene in the browser)
visu = Visu("http://voraus-3d-visu/")
# OPC UA client connected to the voraus.core (provides the robot's live data)
robot_client = Client("opc.tcp://voraus-core:48401/")

with visu.connection(), robot_client:
    # Load the robot model into the 3D scene
    robot = visu.add_model(model_url=robot_model_url, position=[0, 0, 0])
    # OPC UA node that exposes the current joint positions of the robot
    joint_positions_node = robot_client.get_node("ns=1;i=100111")

    while True:
        # Read the current joint positions from the voraus.core
        (joint_positions,) = robot_client.read_values([joint_positions_node])
        # Apply the joint positions to the robot model in the visualization
        visu.update(
            robot.child("CS0").rotation.z(joint_positions[0]),
            robot.child("CS1").rotation.z(joint_positions[1]),
            # ... remaining joints
        )

Adding static scene elements:

Listing 7 Example of adding static scene elements to the 3D visualization
visu.add_model(model_path="assets/pallet/pallet.glb", position=[0.65, 0.10, 0.11])
visu.add_model(model_path="assets/conveyor/conveyor.glb", position=[-0.95, -0.70, 0])

Open http://localhost:8077 in your browser to see the 3D scene. While the Python client connects to the 3D Visu server via its internal Docker hostname (http://voraus-3d-visu/), the server publishes its web interface on localhost:8077, which is why the browser uses this address. The voraus 3D Visu supports live updates via WebSockets, so any changes made from Python appear immediately.

For more details, see:

Step 4: Add Simulation Physics

While visualization renders the scene, the voraus Simulation adds physical behavior - gravity, collisions, friction, and constraints. The simulation engine (based on PyBullet) runs alongside the visualization and connects to the voraus.core via the same OPC UA interface that a real system would use.

Initialize the simulation with visualization:

Listing 8 Example of initializing the simulation with visualization
from voraus_simulation import Simulation
from voraus_3d_visu import Visu

simulation = Simulation(
    frequency=50,
    visualization=Visu("http://voraus-3d-visu/", clear_all=True)
)

with simulation.run():
    # Objects created here participate in the physics simulation
    # and are automatically rendered in the 3D visualization
    ...

Key simulation concepts:

  • StaticObject - Objects that do not move (e.g., pallets, ground planes). They participate in collision detection but are not affected by forces.

  • DynamicObject - Objects that are affected by physics (e.g., boxes that can be gripped, pushed or dropped). Their position and orientation are automatically updated in the visualization.

  • Constraint - Used to attach objects to each other (e.g., simulating a gripper holding a box).

  • ray_test - Detect whether objects are present between two points (e.g., simulating a light barrier).

The voraus Simulation examples build up the simulation model step by step:

  1. Box Model - Dynamic objects with physics

  2. Robot Model - Robot visualization and synchronization

  3. TCP Model - Tool center point with grasping

  4. Conveyor Model - Conveyor belt with velocity control

  5. Light Barrier Model - Ray-based sensor simulation

  6. Pallet Model - Static pallet object

  7. Pick and Place Simulation - Combining all models into a complete simulation

Step 5: Develop and Test the Application

The application code you write against the simulation is identical to the code that runs on real hardware. The voraus.core runs in virtual mode and exposes the same OPC UA interface as in production. Digital inputs and outputs, robot motions, and sensor signals all work the same way.

Writing the application with voraus Robot Arm:

Listing 9 Example of an application controlling the robot using the voraus Robot Arm library
from voraus_robot_arm import VorausIndustrialRobotArm, JointPose

robot = VorausIndustrialRobotArm()

with robot.connect("voraus-core", 48401):
    robot.enable()
    robot.move_ptp(JointPose(0, -1.57, 1.57, -1.57, -1.57, 0)).result()

This code works identically against:

  • The virtual voraus.core in your Docker-based simulation environment

  • The real voraus.core controlling physical hardware

The voraus.pioneer Examples demonstrate the complete pick-and-place workflow:

  1. Control Robot - Controlling the robot via Python

  2. Scene Visualization - Building the visual scene

  3. Gripper Simulation - Simulating physical interactions

  4. Process Simulation - Complete process with conveyor, light barrier and palletizing

Step 6: Deploy to Real Hardware

When the application has been validated in simulation, switching to real hardware requires no code changes in the application itself:

  1. Replace the virtual voraus.core with a real voraus.core installation on the Industrial PC (see Installation for the voraus.core).

  2. If co-simulation is not required during normal operation, the simulation script does not have to be deployed or executed.

  3. Optionally keep the 3D visualization - the voraus 3D Visu can also run against the real voraus.core to provide a live 3D view of the running system.

  4. Deploy the application using the same mechanism as during development (see Deployment Example for Docker-based deployment).

Note

The same OPC UA interface is used in both environments. The switch from simulation to real hardware is a configuration change, not a code change. Set VORAUS__robot__isVirtual to False, point the application to the real voraus.core IP address and check the voraus Robot Control Deployment Example for the real-time settings.

Where to Find More Information

Topic

Where to Look

Getting started with examples

voraus.pioneer Examples - Cloud or local setup, ready-to-run pick-and-place example

3D visualization basics

voraus 3D Visu Server and Client - Installation, adding objects, live updates

Visualization examples

Robot Example, Transforms, Configuration

Simulation model creation

Pick and Place Examples - Step-by-step model building

Exporting 3D models

Blender Export Guide - Creating OBJ physics models

Robot programming Python library

voraus Robot Arm and voraus EtherCAT Python Client - Python libraries for application programming

Virtual voraus.core setup

Installation for the voraus.core in a virtual environment - Docker-based virtual system

Deploying to real hardware

Deployment Example - Docker-based deployment configuration