Dolphin, the GameCube and Wii emulator - Forums

Full Version: python script gyroscope/accelerometer interface
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
GOAL: I have a python script that generates some IMU data (position, velocity, and acceleration, linear and angular) I would like this to interface with dolphin to provide accelerometer and gyroscope data to the emulated game.


For now I tried to:
- emulate a controller but it doesn't seem to work since all the libraries I found only allow to simulate button click and a few things more. 
- tried with evdev, but failed quite miserably (Since I would still have to emulate the IMU data of a controller and I tried a few times but failed)
- had a look to pipe, but the page doesn't talk about gyroscope or accelerometer.

Any help on how I should proceed is helpful! :,)
Unfortunately the "Pipes" backend is artificially limited to those specific input names. You can repurpose the axes for gyro/accel/etc and re-bind them within the controller config as you please, but you're going to run out of inputs to work with.

It's on my TODO list to give "Pipes" more functionality, but there's probably only 3 people in the world that actually use it, so it's low priority. Wink

Currently, you might have the best time making a "DSU Server" for dolphin to connect to. It's a fairly simple protocol and maybe a python version already exists somewhere?
(03-23-2024, 06:49 AM)Billiard26 Wrote: [ -> ]Unfortunately the "Pipes" backend is artificially limited to those specific input names. You can repurpose the axes for gyro/accel/etc and re-bind them within the controller config as you please, but you're going to run out of inputs to work with.

It's on my TODO list to give "Pipes" more functionality, but there's probably only 3 people in the world that actually use it, so it's low priority. Wink

Currently, you might have the best time making a "DSU Server" for dolphin to connect to. It's a fairly simple protocol and maybe a python version already exists somewhere?

Thanks for the reply, in the end I was able to pass the signal through one of the other available Axis (probable not the best). Unfortunately it's very noisy since it's a double derivation from a 3d position of an object so I was wondering is there any way to bypass accelerometer and gyroscope and give to the game (such as wii sport resort) directly 3d position and 3d orientation?
(03-27-2024, 07:53 PM)LionFish Wrote: [ -> ][...] is there any way to bypass accelerometer and gyroscope and give to the game (such as wii sport resort) directly 3d position and 3d orientation?

Dolphin does not currently expose a way to do that. The "Tilt" mappings are similar to orientation, but it's not really what you are looking for.