railOmniverse

"We believe, this is the best approach so far, as it allows us
smooth train movement that can still derail in extreme conditions;
and also gives us the freedom to tweak some parameters to
influence speed changes based on variables like different
weather conditions or different load weights in the train."
[1]

- Jose Minguez, DB Systel GmbH
WheelFrame on tracks.

Railroad simulation holds profound importance in modern transportation and logistics by providing a virtual testing ground for the intricate interplay of tracks, switches, and rolling stock. It serves as a crucial tool for engineers and developers to fine-tune and optimize railway systems, ensuring efficiency, safety, and cost-effectiveness. Physically realistic simulations allow for comprehensive scenario analysis, predictive maintenance, and the exploration of innovative solutions, ultimately contributing to the advancement and sustainability of rail infrastructure.

The challenges begin with a wise decision on what to simulate. Should each wheel be individually simulated colliding with a track rod, or would a simpler collision shape do better? Perhaps a more coarse-grained simulation approach is warranted. How should switches be navigated? Designing tracks, with their ribbon-shaped geometry requires careful consideration, and what about simulating derailment? Countless decisions about modeling tracks and trains in code need to be made correctly - every single time. Using a library that pre-solves these problems is essential. With the right library, you aren't starting your simulation project tomorrow; you started years ago when we began developing the trax library.

railOmniverse is a C++ extension for the NVIDIA Omniverse environment that facilitates the simulation of railroads using NVIDIA PhysX. It was developed in collaboration with Deutsche Bahn [2][3] (DB) by Trend Verlag [4] (Trend) based on Trend's trax library.

To operate a train on a track, you first need tracks and switches. We've defined custom USD prims for these entities, allowing them to be created from DB-provided sample data using the functionality of the trax library. The key connecting element between the tracks and a wheel frame is the TrackJoint. After numerous experiments, the trax library was designed to omit simulating the intricate physical details of each spinning wheel but instead focus on maintaining a per-bogie granularity.

When dealing with a wheel frame and its connections to the main body of a rolling stock in Omniverse, users can leverage the utilities provided by the platform. For instance, rotational joints can be employed for bogie hinges, and distance joints for couplings between wagons. The wheel frame itself is represented by a PhysX body equipped with a TrackJoint, similar to any other PhysX joint. This implies that the new elements introduced by railOmniverse can seamlessly integrate with all the standard simulation tools utilized in Omniverse and PhysX.

Integration into NVIDIA PhysX was achieved by utilizing the custom joint interface to PhysX provided by NVIDIA within Omniverse. The implementation of the TrackJoint mirrors the approach used for built-in joints, such as rotational or spherical joints. This involves defining a series of constraints for relative translational and rotational velocities, which are then provided to the PhysX engine for direct use by the solver [5].

Numerous experiments were conducted both by Trend and later by DB, exploring collisions of various kinds, additional forces, positional corrections, etc., in attempts to confine train movement to the track. However, these approaches consistently compromised the realism of the simulation and often led to stability issues. The introduction of the TrackJoint provided a robust solution. Even the train's drive can be implemented as a constraint, seamlessly integrating a motor model that encompasses acceleration, braking, and friction into the simulation. This model accommodates virtually all types of propulsion engines, along with their gearboxes and wheel configurations, simulated by a traction force characteristic curve tailored to the specifics of a particular rolling stock.

PhysX, with its focus on relative velocities in the solver, allows for tracks to not be restricted to the static environment, but also can be attached to a physical body. This opens up possibilities such as turntables or trains running on other rolling stock, like adapter wagons or a train ferry ship.

Diagram of the project

The OpenUSD format proved to be an effective medium for collaboration between DB and Trend. Leveraging the schema mechanism, we defined and registered new primitives for tracks, switches, the TrackJoint, and various aspects of the motor model. This facilitated simultaneous development on both ends. For instance, DB provided track geometry data using Omniverse Bezier BasisCurves, while Trend expanded the system with a specialized spline curve, parametrized by arc length, enabling its use in simulations with the TrackJoint.

In ensuring seamless integration into Omniverse, access to sample code, particularly the "samples-physx-sdk" kit [6], and valuable advice from Ales Borovicka (NVIDIA) were instrumental for our development.

The Israeli diplomat Abba Eban is quoted, stating that men and nations act wisely when they have exhausted all other possibilities. [7] This sentiment mirrors the software development process. And that is why we need libraries so that not everybody has to explore every possibility, but only somebody. These libraries should be shared, and that's where Omniverse comes in; it is a rendering, simulating, economic environment for sharing, thanks to its robust extension system.

Currently, we are contemplating further development to incorporate additional functionality from the trax library into the railOmniverse extension. We plan to release a public version of railOmniverse in the beginning of 2024. For in-depth information, we maintain a detailed text called the "trax book" [8], outlining the basic principles used by the trax library. Additionally, there is a summary in the article "The Trax Track library" [9]. Updates on the development of railOmniverse can be found in Chapter 12 of the "trax book" [10].

If you have any questions or suggestions, please feel free to contact us. We are eager to learn about your use cases. For the railOmniverse newsletter, send an email to horstmann.marc@trendverlag.de with the subject keyword 'railNewsletter'.

Contact

Trend Verlag has been developing railroad simulations for the consumer market for over 25 years. We have collaborated with various sections of DB in the past, whether in railroad visualization or with the Bahn Shop to sell Trend products.


Trend Verlag, Leo-Wohleb-Str. 8 · D-79098 Freiburg.
https://www.eepshopping.de
Marc-Michael Horstmann
horstmann.marc@trendverlag.de

Marc-Michael Horstmann

References

[1] Building a Digital Twin of the German Rail Network to Deliver Next-Generation Railway Systems. GTC Digital Spring, March 2023
[2] DB Netz AG (Digitale Schiene)
[3] DB Systel GmbH
[4] Trend Redaktions- und Verlagsgesellschaft mbH, Freiburg
[5] The TrackJoint
[6] Samples Physx SDK, Ales Borovicka, NVIDIA
[7] quoteinvestigator.com
[8] Trax Book
[9] The Trax Track Library, 2023. Marc-Michael Horstmann, Trend Verlag
[10] railOmniverse