
Hi,
The new OpenSR 2DOF+Traction Loss (TL) motion plugin is now available in the current early access version!
Key Features: Full 2DOF+TL forward kinematics (2+1-actuator support)
Actuator-ready & UDP output & Shared memory output (see the python example below)
Direct Thanos controller communication via COM port
Universal kinematics engineThe integrated engine that calculates actuator positions and outputs the data via shared memory or UDP. This plugin provides data only and does not control hardware directly (Thanos controller implementation is still experimental). A bridge application is required to send this data to your simulator controller. Motion sim manufacturers or third parties can easily create this bridge, as the complex kinematics are already handled, providing both final actuator positions and raw motion telemetry.
Note on Thanos Support:The Thanos implementation is complete and ready for use. Because we do not have a 3-actuator Thanos setup in-house, we haven't been able to validate it on physical hardware yet. We are opening this up for community feedback to ensure the implementation works perfectly across different builds.
Interested in testing?If you own a four-actuator simulator with a Thanos controller, we would love to hear your feedback. Please reply here or email tech_support [at] eksimracing [dot] org with your hardware specs (simulator model, Thanos version, actuator type, and games played) so we can track the testing results.
Disclaimer: This plugin is in Early Access and may contain bugs. As it controls physical motion hardware, please exercise caution during testing.


Example of Python bridge script using the UDP:
Attention UDP Port: 33462import socket
import ctypes
import time
# --- Configuration ---
UDP_IP = "0.0.0.0"
UDP_PORT = 33462
TIMEOUT_SECONDS = 1.5
# --- Struct Definition ---
# /*
# This plugin outputs physics telemetry in a unified Left-Handed Z-Forward, Y-Up convention.
# All games are normalized to this format before being sent over UDP.
# Surge (+Z): Forward acceleration.
# Sway (+X): Force pushing to the right.
# Heave (+Y): Upward vertical force.
# Pitch (+X rot): Nose up.
# Roll (+Z rot): Tilt right.
# Yaw (+Y rot): Turn right.
# */
# struct OpenSR3DOFMotionPacket {
# uint32_t packetId;
# uint8_t paused;
# uint8_t mode; // mode 0=rear (default) mode 1=front
# uint8_t test; // testing device requested if set (bypass paused)
# uint8_t stroke; // 100mmm or 150mm
# // Direct Actuator Outputs
# float posRL // mm direct target lengths (0.0 to MaxStroke)
# float posRR
# float tractionLoss_pos; // mm dedicated traction loss/rear-slide actuator move
# // 2. THE ADVANCED DEV CHANNEL (Normalized Game Telemetry)
# double pitch_X;
# double yaw_Y;
# double roll_Z;
# // local acceleration (Z-Forward, Y-Up)
# double localAccelX;
# double localAccelY;
# double localAccelZ;
# double gForceLat; // lateral G
# double gForceVert; // vertical G
# double gForceLong; // longitudinal G
# // Rotational/Angular Velocities (Rates)
# double pitchRate_X;
# double yawRate_Y;
# double rollRate_Z;
# };
class MotionPacket2DOF(ctypes.Structure):
"""
MotionPacket2DOF, packed (no alignment padding).
match the C++ struct exactly: #pragma pack(1)
"""
_pack_ = 1
_fields_ = [
("packetId", ctypes.c_uint32),
("paused", ctypes.c_uint8),
("mode", ctypes.c_uint8),
("test", ctypes.c_uint8),
("stroke", ctypes.c_uint8),
("posRL", ctypes.c_float),
("posRR", ctypes.c_float),
("tl", ctypes.c_float),
("pitch", ctypes.c_double),
("yaw", ctypes.c_double),
("roll", ctypes.c_double),
("localAccelX", ctypes.c_double),
("localAccelY", ctypes.c_double),
("localAccelZ", ctypes.c_double),
("pitchRate", ctypes.c_double),
("yawRate", ctypes.c_double),
("rollRate", ctypes.c_double),
("gForceLat", ctypes.c_double),
("gForceVert", ctypes.c_double),
("gForceLong", ctypes.c_double),
("suspFL", ctypes.c_float),
("suspFR", ctypes.c_float),
("suspRL", ctypes.c_float),
("suspRR", ctypes.c_float),
]
# Verify size matches expected 132 bytes
assert ctypes.sizeof(MotionPacket2DOF) == 132, \
f"Struct size mismatch: got {ctypes.sizeof(MotionPacket2DOF)}, expected 132"
def main():
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
sock.bind((UDP_IP, UDP_PORT))
sock.settimeout(TIMEOUT_SECONDS)
except OSError as e:
print(f"Error binding port {UDP_PORT}: {e}")
return
expected_size = ctypes.sizeof(MotionPacket2DOF)
print(f"Listening on port {UDP_PORT}...")
print(f"Packet Size: {expected_size} bytes")
# --- UPS Calculation Variables ---
last_time = time.time()
packet_count = 0
current_ups = 0
while True:
try:
data, addr = sock.recvfrom(1024)
# 1. Update Counters
packet_count += 1
curr_time = time.time()
# 2. Check if 1 second has passed
time_diff = curr_time - last_time
if time_diff >= 1.0:
current_ups = packet_count / time_diff # Accurate calc even if > 1.0s
packet_count = 0
last_time = curr_time
# 3. Process Data
if len(data) >= expected_size:
pkt = MotionPacket2DOF.from_buffer_copy(data)
status = "PAUSED" if pkt.paused else "RUNNING"
mode = "FRONT" if pkt.mode else "REAR"
test = "TEST" if pkt.test else "NONE"
# Print Data + UPS
print(f"[UPS: {int(current_ups):<4}] ID: {pkt.packetId:<8} | {status:<7} | "
f"Mode: {mode:<5} | Check Device: {test:<4} | "
f"RL: {pkt.posRL:6.2f} | RR: {pkt.posRR:6.2f} | TL: {pkt.tl:6.2f} | "
f"Accel.X: {pkt.localAccelX:6.2f} | Accel.Y: {pkt.localAccelY:6.2f} | "
f"Accel.Z: {pkt.localAccelZ:6.2f} | YAW: {pkt.yaw:6.2f} | YAWRATE: {pkt.yawRate:6.2f}")
else:
print(f"Size Mismatch: {len(data)} bytes (expected {expected_size})")
except socket.timeout:
# If timed out, UPS is effectively 0
if current_ups > 0:
print("\n>>> PAUSED OR NO SIGNAL (UPS: 0) <<<\n")
current_ups = 0
except KeyboardInterrupt:
break
sock.close()
if __name__ == "__main__":
main()
Here is a Python script using shared memory to get the motion data, which is easy to port to any language (C++, C#, Java, etc.):
import ctypes
from ctypes import wintypes
import time
import math
# Windows API Constants
FILE_MAP_READ = 0x04
ERROR_FILE_NOT_FOUND = 2
k32 = ctypes.windll.kernel32
# --- Kernel32 Function Declarations
k32.OpenFileMappingA.restype = wintypes.HANDLE
k32.OpenFileMappingA.argtypes = [wintypes.DWORD, wintypes.BOOL, wintypes.LPCSTR]
k32.MapViewOfFile.restype = ctypes.c_void_p
k32.MapViewOfFile.argtypes = [wintypes.HANDLE, wintypes.DWORD, wintypes.DWORD, wintypes.DWORD, ctypes.c_size_t]
k32.UnmapViewOfFile.restype = wintypes.BOOL
k32.UnmapViewOfFile.argtypes = [ctypes.c_void_p]
k32.CloseHandle.restype = wintypes.BOOL
k32.CloseHandle.argtypes = [wintypes.HANDLE]
# ctypes structure definitions
class MotionPacket2DOF(ctypes.Structure):
"""
MotionPacket2DOF, packed (no alignment padding).
match the C++ struct exactly: #pragma pack(1)
"""
_pack_ = 1
_fields_ = [
("packetId", ctypes.c_uint32),
("paused", ctypes.c_uint8),
("mode", ctypes.c_uint8),
("test", ctypes.c_uint8),
("stroke", ctypes.c_uint8),
("posRL", ctypes.c_float),
("posRR", ctypes.c_float),
("tl", ctypes.c_float),
("pitch", ctypes.c_double),
("yaw", ctypes.c_double),
("roll", ctypes.c_double),
("localAccelX", ctypes.c_double),
("localAccelY", ctypes.c_double),
("localAccelZ", ctypes.c_double),
("pitchRate", ctypes.c_double),
("yawRate", ctypes.c_double),
("rollRate", ctypes.c_double),
("gForceLat", ctypes.c_double),
("gForceVert", ctypes.c_double),
("gForceLong", ctypes.c_double),
("suspFL", ctypes.c_float),
("suspFR", ctypes.c_float),
("suspRL", ctypes.c_float),
("suspRR", ctypes.c_float),
]
# Verify size matches expected 132 bytes
assert ctypes.sizeof(MotionPacket2DOF) == 132, \
f"Struct size mismatch: got {ctypes.sizeof(MotionPacket2DOF)}, expected 132"
# Reading
def read_packet(view: int) -> MotionPacket2DOF:
"""Read one packet from the mapped shared memory view."""
pkt = MotionPacket2DOF.from_address(view)
return pkt
def fmt_deg(rad: float) -> str:
return f"{math.degrees(rad):+8.2f}°"
def print_packet(pkt):
print(f" packetId: {pkt.packetId} paused: {pkt.paused} "
f"stroke: {pkt.stroke}mm")
print(f" Actuators (mm):")
print(f" A1 (RL): {pkt.posRL:8.3f} A2 (RR): {pkt.posRR:8.3f}")
print(f" TL: {pkt.tl:8.3f}")
print(f" Orientation (rad / deg):")
print(f" pitch: {pkt.pitch:+.5f} {fmt_deg(pkt.pitch)}")
print(f" yaw: {pkt.yaw:+.5f} {fmt_deg(pkt.yaw)}")
print(f" roll: {pkt.roll:+.5f} {fmt_deg(pkt.roll)}")
print(f" Acceleration (m/sē):")
print(f" X: {pkt.localAccelX:+7.3f} Y: {pkt.localAccelY:+7.3f} Z: {pkt.localAccelZ:+7.3f}")
print(f" Rates (rad/s):")
print(f" pitch: {pkt.pitchRate:+7.4f} "
f"yaw: {pkt.yawRate:+7.4f} "
f"roll: {pkt.rollRate:+7.4f}")
print(f" G-forces:")
print(f" lat: {pkt.gForceLat:+6.3f} "
f"vert: {pkt.gForceVert:+6.3f} "
f"long: {pkt.gForceLong:+6.3f}")
# print(f" Suspension (mm):")
# print(f" FL: {pkt.rawSuspData.suspFL:7.2f} FR: {pkt.rawSuspData.suspFR:7.2f}")
# print(f" RL: {pkt.rawSuspData.suspRL:7.2f} RR: {pkt.rawSuspData.suspRR:7.2f}")
print("CTRL+C to quit.")
# Main
def main():
shared_mem_name = "Local\\osr2dofmotiondata"
print(f"Waiting for {shared_mem_name}...")
while True:
# Open existing mapping
h_map = k32.OpenFileMappingW(FILE_MAP_READ, False, shared_mem_name)
if not h_map:
if ctypes.get_last_error() == ERROR_FILE_NOT_FOUND:
time.sleep(1)
continue
else:
print(f"Error opening mapping: {ctypes.get_last_error()}")
return
# Map the view
ptr = k32.MapViewOfFile(h_map, FILE_MAP_READ, 0, 0, 0)
if not ptr:
k32.CloseHandle(h_map)
return
print("Connected. Reading data...")
rate = 30 # ~30 Hz display refresh
print('\x1b[2J\x1b[H', end='')
try:
# Map the pointer to the structure
while True:
# Get the snapshot
data = MotionPacket2DOF.from_buffer_copy(ctypes.string_at(ptr, ctypes.sizeof(MotionPacket2DOF)))
print('\x1b[H', end='')
print_packet(data)
time.sleep(1.0 / rate)
except KeyboardInterrupt:
print("\nStopping...")
finally:
k32.UnmapViewOfFile(ptr)
k32.CloseHandle(h_map)
break
if __name__ == "__main__":
main()