Welcome to GearShiftGamer Hackathon project. This overview includes everything you need to know about this project along with links to important resources and people.
The implementation of the Play-by-wire hackathon challenge https://github.com/Eclipse-SDV-Hackathon-Chapter-Two/challenge-play-by-wire
- work with the Eclipse SDV ecosystem
- learn new stuff
- networking
- having fun
- Define the inputs
- Player 1 uses the Xbox gamepad
- Player 2 uses an in-car joystick, simulated by a Raspberry Pi
- Choose a game
- Blobby Volley 2
- https://sourceforge.net/projects/blobby/
- C++ source code
- Blobby Volley 2
- Develop the solution architecture
- Define the interfaces
- Implement the necessary modules, test it
- Create the pitch slides
Role | Name |
---|---|
Team member | Lukas Langer |
Team member | Muzi Xu |
Team member | Sebastian Probst |
Team member | Ilja Stasewitsch |
Team member | Pavel Spakowski |
We use this task tracker to keep track of team tasks: https://app.slack.com/lists/T02MS1M89UH/F081NGQ3UPL
- SDV hackathon repository
- SDV product list
- Game Blobby Volley 2
- Dependencies
sudo apt-get install build-essential libsdl2-dev libphysfs-dev libboost-all-dev
- Dependencies
- Ankaios
- Ankaios Dashboard
- Kuksa
- Podman
- Python
- Visual Studio Code
- JetBrains PyCharm
- Linux OS (host OS for both Raspberry Pi's and laptop)
- C++ (game source code)
- Python 3 (adapter implementation)
- Podman (containerization of components)
- Ankaios (orchestration of the containers)
- Kuksa (communication between different nodes)
- Visual Studio Code and JetBrains PyCharm
- Xbox Gamepad
- Joystick
- Display
- Local WLAN
- 2x Raspberry Pi as
- HPC
- Door ECU
- Linux laptop with x86 processor architecture as
- Gaming unit
- Dedicated laptop for dashboard showcase
- Set the stage
- Present the business case
- Start all modules
- Use both input interfaces to play the game
- Give an outlook to perspectives
For purposes of the Hackathon challenge, a game should be chosen. The following criteria should be fulfilled:
- multiplayer
- compatible with ARM and/or x86 processor architectures (source code open in the best case)
- support for Linux
- simple controls
- good attraction potential
The game Valley Blobby 2 was chosen.
We use Kuksa gRPC client to transport signals.
We use some existing signals for transport controls from the input devices to the game.
Xbox-Controller:
Signal name | Purpose |
---|---|
Vehicle.Acceleration.Longitudinal |
Move left |
Vehicle.Acceleration.Lateral |
Move right |
Vehicle.Acceleration.Vertical |
Jump |
Adafruit-Joystick
Signal name | Purpose |
---|---|
Vehicle.AngularVelocity.Roll |
Move left |
Vehicle.AngularVelocity.Pitch |
Move right |
Vehicle.AngularVelocity.Yaw |
Jump |
Every module is set in a Docker container. The container configuration is set by corresponding .dockerfile.
We use Podman for creation of and managing the containers.
An Ankaios instance is used for container orchestration.
We use Python 3 and IDE's Visual Studio Code and JetBrains PyCharm for code developing.
We simulate keyboard controls for both players.
Player 1 uses the following keys:
Key | Purpose |
---|---|
A | Move left |
D | Move right |
W | Jump |
Player 2 uses the cursor keys:
Key | Purpose |
---|---|
← | Move left |
→ | Move right |
↑ | Jump |
We use calls for Linux tool xdotool to fake the keystrokes if corresponding signals are received.
For simulation of the human key pressing, we send every keystroke 30 times with a delay of 1 ms.
str_left = f'xdotool type --delay 1 "{30*'A'}"'
curl -sfL https://github.com/eclipse-ankaios/ankaios/releases/latest/download/install.sh | bash -
The content of [Service] /etc/systemd/system/ank-server.service has to be edited as:
[Service]
Environment="RUST_LOG=info"
ExecStart=/usr/local/bin/ank-server --insecure -a {HOST_IP_ADDRESS:25551} --startip-config /etc/ankaois/state.yaml
The content of [Service] /etc/systemd/system/ank-agent.service has to be edited as:
[Service]
Environment="RUST_LOG=info"
ExecStart=/usr/local/bin/ank-server --insecure -s {HOST_IP_ADDRESS:25551} --name {AGENT_NAME}
The content of /etc/ankaios/state.yaml
has to be edited.
Add databroker manifest in /etc/ankaios/state.yaml
:
apiVersion: v0.1
workloads:
databroker:
runtime: podman
agent: agent_databroker
runtimeConfig: |
image: ghcr.io/eclipse/kuksa.val/databroker:0.4.1
commandArgs: ["--insecure"]
commandOptions: ["--net=host"]
Add joystick manifest in /etc/ankaios/state.yaml
:
apiVersion: v0.1
workloads:
joystick:
runtime: podman
agent: agent_joy
runtimeConfig: |
image: joystick_adapter //here you have to replace with your own image path
commandArgs: ["--insecure"]
commandOptions: ["--net=host"]
Log into the host machine that runs the server.
Activate the server with command:
sudo systemctl start ank-server
Log into the host machine that runs the agent. First run
sudo systemctl start ank-agent
And then run
ank-agent -k -s {HOST_IP_ADDRESS:PORT_NUMBER} -n {AGENT_NAME}