• Welcome to PiBoSo Official Forum. Please login or sign up.
 
October 18, 2025, 10:40:02 PM

Recent posts

Pages 1 ... 7 8 9 10
81
Virtual Reality / Re: Quest 3 and virtual deskto...
Last post by Chris_Beeves - August 20, 2024, 12:36:12 PM
I had the same issue, ideally PiBoSo would update the VR support so walkarounds aren't necessary.

@doubledragon, you've been messing around with VR since forever. Have you found anything that could work?
82
Virtual Reality / Quest 3 and virtual desktop
Last post by pikey - August 19, 2024, 07:32:03 PM
Hi I am hoping someone can help, the quest 3 and virtual desktop looks really weird but never did on quest 2 and Pico 4 , is there anyway to open GP bikes in openxr and bypass steam vr?
83
Plugins / Python Proxy Plugin
Last post by gaga_dreher - August 02, 2024, 11:56:35 AM
# Python Alternative to C/C++ for GP Bikes Data Reading

This script is a friendly option for those who are not fluent in C/C++. It allows you to read and display GP Bikes data using Python. Below, you'll find instructions on required libraries, installation, and how the code works.

## Required Libraries

This script uses libraries that are part of Python's standard library, so no additional installations are needed:
- ctypes
- time
- os

To install Python, you can download it from https://www.python.org/downloads/.

## Installation Instructions

1. Install Python:
   Download and install Python from the official website (https://www.python.org/downloads/).

2. Save the script:
   Save the provided script as `gpbikes_data_reader.py`.

## How the Code Works

This Python script reads data from a shared memory object created by the GP Bikes simulator and prints the data in a user-friendly format. The script repeatedly updates the output every second, showing real-time information. You can change the update rate; the maximum output is 50 Hz.

### Key Sections of the Script

1. **Import Libraries**:
   The script starts by importing necessary libraries: `ctypes`, `time`, and `os`.

2. **Define Data Structures**:
   The script defines several data structures using Python's `ctypes` to match the data layout expected from the GP Bikes shared memory.

3. **Windows API Functions**:
   The script uses Windows API functions to access the shared memory object.

4. **Constants and File Mapping**:
   The script defines constants and opens the file mapping object created by GP Bikes.

5. **Map View of File**:
   The script maps a view of the file into the address space of the current process.

6. **Clear Console Function**:
   A helper function `clear_console` is defined to clear the console screen before updating the data display.

7. **Main Loop**:
   The main loop of the script continuously reads data from the shared memory and prints it to the console. The output includes rider name, bike ID, bike name, category, track ID, track name, track length, number of gears, max RPM, limiter, shift RPM, engine optimal temperature, engine temperature alarm, max fuel, suspension max travel, steer lock, type, current lap time, and RPM.

8. **Clean Up**:
   The script includes a `finally` block to unmap the view of the file and close the file handle, ensuring proper cleanup.

### Configuring the Sample Rate

To change the sample rate of the data output, create a file called `proxy.ini` in the "plugins" folder where GP Bikes is installed. Add the following lines to the file:

[params]
sample_rate = 50

The default sample rate is 10 Hz. For more information, refer to the forum post: https://forum.piboso.com/index.php?topic=34.15.

### Running the Script

1. Open a terminal or command prompt.
2. Navigate to the directory where you saved `gpbikes_data_reader.py`.
3. Run the script using Python:
python gpbikes_data_reader.py
or
py gpbikes_data_reader.py

The script will start displaying GP Bikes data in the console, updating every second (or at the configured sample rate).

## Notes

- Ensure that GP Bikes is running and the shared memory object is available.
- This script is designed to run on Windows as it uses Windows API functions.

I hope this Python alternative makes it easier for you to work with GP Bikes data. If you have any questions or need further assistance, feel free to ask in the forum.

Code:

import ctypes
from ctypes import wintypes
import time
import os

# Define the data structures
class SPluginsBikeEvent_t(ctypes.Structure):
    _fields_ = [
        ("m_szRiderName", ctypes.c_char * 100),
        ("m_szBikeID", ctypes.c_char * 100),
        ("m_szBikeName", ctypes.c_char * 100),
        ("m_iNumberOfGears", ctypes.c_int),
        ("m_iMaxRPM", ctypes.c_int),
        ("m_iLimiter", ctypes.c_int),
        ("m_iShiftRPM", ctypes.c_int),
        ("m_fEngineOptTemperature", ctypes.c_float),
        ("m_afEngineTemperatureAlarm", ctypes.c_float * 2),
        ("m_fMaxFuel", ctypes.c_float),
        ("m_afSuspMaxTravel", ctypes.c_float * 2),
        ("m_fSteerLock", ctypes.c_float),
        ("m_szCategory", ctypes.c_char * 100),
        ("m_szTrackID", ctypes.c_char * 100),
        ("m_szTrackName", ctypes.c_char * 100),
        ("m_fTrackLength", ctypes.c_float),
        ("m_iType", ctypes.c_int),
    ]

class SPluginsBikeSession_t(ctypes.Structure):
    _fields_ = [
        ("m_iSession", ctypes.c_int),
        ("m_iConditions", ctypes.c_int),
        ("m_fAirTemperature", ctypes.c_float),
        ("m_fTrackTemperature", ctypes.c_float),
        ("m_szSetupFileName", ctypes.c_char * 100),
    ]

class SPluginsBikeData_t(ctypes.Structure):
    _fields_ = [
        ("m_iRPM", ctypes.c_int),
        ("m_fEngineTemperature", ctypes.c_float),
        ("m_fWaterTemperature", ctypes.c_float),
        ("m_iGear", ctypes.c_int),
        ("m_fFuel", ctypes.c_float),
        ("m_fSpeedometer", ctypes.c_float),
        ("m_fPosX", ctypes.c_float), ("m_fPosY", ctypes.c_float), ("m_fPosZ", ctypes.c_float),
        ("m_fVelocityX", ctypes.c_float), ("m_fVelocityY", ctypes.c_float), ("m_fVelocityZ", ctypes.c_float),
        ("m_fAccelerationX", ctypes.c_float), ("m_fAccelerationY", ctypes.c_float), ("m_fAccelerationZ", ctypes.c_float),
        ("m_aafRot", (ctypes.c_float * 3) * 3),
        ("m_fYaw", ctypes.c_float), ("m_fPitch", ctypes.c_float), ("m_fRoll", ctypes.c_float),
        ("m_fYawVelocity", ctypes.c_float), ("m_fPitchVelocity", ctypes.c_float), ("m_fRollVelocity", ctypes.c_float),
        ("m_fPitchRel", ctypes.c_float), ("m_fRollRel", ctypes.c_float),
        ("m_afSuspLength", ctypes.c_float * 2),
        ("m_afSuspVelocity", ctypes.c_float * 2),
        ("m_iCrashed", ctypes.c_int),
        ("m_fSteer", ctypes.c_float),
        ("m_fInputThrottle", ctypes.c_float),
        ("m_fThrottle", ctypes.c_float),
        ("m_fFrontBrake", ctypes.c_float),
        ("m_fRearBrake", ctypes.c_float),
        ("m_fClutch", ctypes.c_float),
        ("m_afWheelSpeed", ctypes.c_float * 2),
        ("m_aiWheelMaterial", ctypes.c_int * 2),
        ("m_aafTreadTemperature", (ctypes.c_float * 3) * 2),
        ("m_afBrakePressure", ctypes.c_float * 2),
        ("m_fSteerTorque", ctypes.c_float),
        ("m_iPitLimiter", ctypes.c_int),
        ("m_iECUMode", ctypes.c_int),
        ("m_szEngineMapping", ctypes.c_char * 3),
        ("m_iTractionControl", ctypes.c_int),
        ("m_iEngineBraking", ctypes.c_int),
        ("m_iAntiWheeling", ctypes.c_int),
        ("m_iECUState", ctypes.c_int),
        ("m_fRiderLRLean", ctypes.c_float),
    ]

class SPluginsBikeLap_t(ctypes.Structure):
    _fields_ = [
        ("m_iLapNum", ctypes.c_int),
        ("m_iInvalid", ctypes.c_int),
        ("m_iLapTime", ctypes.c_int),
        ("m_iBest", ctypes.c_int),
    ]

class SPluginsBikeSplit_t(ctypes.Structure):
    _fields_ = [
        ("m_iSplit", ctypes.c_int),
        ("m_iSplitTime", ctypes.c_int),
        ("m_iBestDiff", ctypes.c_int),
    ]

class SProxyData_t(ctypes.Structure):
    _fields_ = [
        ("m_iVersion", ctypes.c_int),
        ("m_iState", ctypes.c_int),
        ("m_sEvent", SPluginsBikeEvent_t),
        ("m_sSession", SPluginsBikeSession_t),
        ("m_sLap", SPluginsBikeLap_t),
        ("m_iSplit", ctypes.c_int),
        ("m_sSplit", SPluginsBikeSplit_t),
        ("m_sData", SPluginsBikeData_t),
        ("m_fTime", ctypes.c_float),
        ("m_fPos", ctypes.c_float),
        ("m_fCurLapTime", ctypes.c_float),
    ]

# Windows API functions
OpenFileMapping = ctypes.windll.kernel32.OpenFileMappingW
OpenFileMapping.restype = wintypes.HANDLE
OpenFileMapping.argtypes = [wintypes.DWORD, wintypes.BOOL, wintypes.LPCWSTR]

MapViewOfFile = ctypes.windll.kernel32.MapViewOfFile
MapViewOfFile.restype = wintypes.LPVOID
MapViewOfFile.argtypes = [wintypes.HANDLE, wintypes.DWORD, wintypes.DWORD, wintypes.DWORD, ctypes.c_size_t]

UnmapViewOfFile = ctypes.windll.kernel32.UnmapViewOfFile
UnmapViewOfFile.restype = wintypes.BOOL
UnmapViewOfFile.argtypes = [wintypes.LPCVOID]

CloseHandle = ctypes.windll.kernel32.CloseHandle
CloseHandle.restype = wintypes.BOOL
CloseHandle.argtypes = [wintypes.HANDLE]

# Constants
FILE_MAP_READ = 0x0004
szName = "Local\\GPBProxyObject"

# Open the file mapping object.
hMapFile = OpenFileMapping(FILE_MAP_READ, False, szName)
if not hMapFile:
    print("Could not open file mapping object ({})".format(ctypes.GetLastError()))
    exit(1)

# Map a view of the file mapping into the address space of the current process.
pData = MapViewOfFile(hMapFile, FILE_MAP_READ, 0, 0, ctypes.sizeof(SProxyData_t))
if not pData:
    print("Could not map view of file ({})".format(ctypes.GetLastError()))
    CloseHandle(hMapFile)
    exit(1)

# Cast the pointer to our structure type
pProxyData = ctypes.cast(pData, ctypes.POINTER(SProxyData_t))

def clear_console():
    os.system('cls' if os.name == 'nt' else 'clear')

try:
    while True:
        clear_console()
        print("Rider Name:", pProxyData.contents.m_sEvent.m_szRiderName.decode())
        print("Bike ID:", pProxyData.contents.m_sEvent.m_szBikeID.decode())
        print("RPM:", pProxyData.contents.m_sData.m_iRPM)

        # Add other fields as needed...

        time.sleep(1)

finally:
    # Clean up
    UnmapViewOfFile(pData)
    CloseHandle(hMapFile)


84
General Discussion / Re: Steam version
Last post by Vladimir - July 27, 2024, 06:42:45 AM
Quote from: PiBoSo on January 03, 2020, 08:58:22 PMThe plan is to release WRS on Steam in 2020.

It is not yet guaranteed that it will possible to convert a standalone license to a Steam key, but the plan is to allow the conversion, as already done for Kart Racing Pro and MX Bikes.
Please 2024
85
Support / Re: VR head tracking off cente...
Last post by mdlp - July 20, 2024, 09:31:36 AM
Hi Nihil,

I get something similar when using SteamVR.  The only option that gives good mileage with my Quest is Airlink, and specifically with 'QuestLink set as the active OpenXR runtime' within 'Settings'-->'General' in the Oculus client software.

Mark.
86
Support / VR head tracking off center - ...
Last post by Nihil - July 18, 2024, 10:51:19 PM
Hi, I've been having this issue for over a year -
In VR it seems the perspective, FOV or tracking is not centered,
Everything looks like "Fisheye" camera, where screen center is ok but edges are stretched,
And head movement is very strange.

Everything was fine until Virtual Desktop switched to OpenVR a while back,
But!
Issue is same in both SteamVR and Oculus VR,
Using Virtual Desktop, AirLink and Oculus Link,
In Quest 2 and Quest Pro.

Tried re-installing, fresh demo profile, deleted all local files.. no bueno.

I thought an update of GP-bikes or Virtual Desktop will fix it, so I waited..
But still same issue.

Thanks for your help!
87
Tracks / Looking for Schleizer Dreieck
Last post by Patrick - July 18, 2024, 06:01:33 PM
Its Germanys oldest Motorcycle Racetrack. I`m looking for it for training purpose, cause i`m going racing there. Thanx in advance! Pat#23
88
Javiliyors' Mods / SBK24 v1.0
Last post by javiliyors - July 02, 2024, 08:46:54 AM
SBK24 v1.0 MOD



SBK24 v1.0 MOD INFO:
==================================================

Superbike World Championship (also known as WorldSBK, SBK, World Superbike, WSB, or WSBK) is a silhouette-class road racing series based on heavily modified production motorcycles, also known as superbike racing.

The championship was founded in 1988. The Superbike World Championship consists of a series of rounds held on permanent racing facilities. Each round has two full length races and, from 2019, an additional ten-lap sprint race known as the Superpole race. The results of all three races are combined to determine two annual World Championships, one for riders and one for manufacturers.

The motorcycles that race in the championship are tuned versions of motorcycles available for sale to the public, by contrast with MotoGP where purpose built machines are used. MotoGP is the motorcycle world's equivalent of Formula One, whereas Superbike racing is similar to sports car racing.

Europe is Superbike World Championship's traditional centre and leading market. However, rounds have been held in the United States, Malaysia, New Zealand, Canada, Japan, Argentina, Australia, Russia, Qatar, Thailand, and South Africa and the series plans on keeping extra-European circuits in rotation. An Indonesian race was also proposed for the 2008 season, but this was later cancelled by the FIM, though it was later introduced in the 2021 season.

The championship is regulated by the FIM, the international governing body of motorcycle racing. As of 2013 the championship is organised by Dorna.

The 2022 Superbike World Championship is the 35th season of the Superbike World Championship. Toprak Razgatlıoğlu has come into the season as the defending world champion.





Thanks to Tyren14 from the overtake.gg community and Bunta Fujiwara for the work done on the skins.

LITE VERSION ARE INCLUDED


-------------------------------------------------------------------------------

Join to Discord https://discord.gg/C9AgeYU

-----------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------------------

If you´ve got to much money and you dont know what to do with it, donations are welcome. Thank you
89
General Discussion / Re: GP Bikes beta21c
Last post by teoser - June 24, 2024, 07:46:58 AM
Ho, this PC Is ok for GP bikers?
Processore: AMD Ruben 5 5500U with Radeon Graphic 2.10 GHz
Ram: 8gb
Sistema operativo a 64bit
90
Virtual Reality / Re: GP Bikes Virtual Reality S...
Last post by Chris_Beeves - June 18, 2024, 07:56:21 PM
Ok, so in the properties of the shortcut you can set the URL.

For regular launch set:
steam://rungameid/848050.

That should probably already work.

For OculusVR set:
steam://launch/848050/othervr

For SteamVR set:
steam://launch/848050/vr

Note that the URL says 'launch' rather than rungameid for VR
Pages 1 ... 7 8 9 10