An agent for Upkie that combines wheeled balancing with inverse kinematics computed by Pinker.
This agent uses pixi to manage its Python environment, both on your machine and on your Upkie. The first installation compiles Pinker's C extension, which takes a few seconds.
Start a simulation spine:
./start_simulation.shThen, in a separate terminal, run the agent:
pixi run agentTo visualize the inverse kinematics of the legs in a Viser browser tab, run instead:
pixi run agent-vizThe Viser panel has a crouch height slider that works like the directional pad of the gamepad.
Upload the agent to your robot (this assumes there is an upkie host in your SSH configuration):
make uploadThen, start the pi3hat spine on the robot and run the agent from there:
$ ssh upkie
user@upkie:~$ cd pinker_balancer
user@upkie:pinker_balancer$ pixi run agentOnce the agent is running, you can direct your Upkie using the game controller 🎮
- Left joystick: go forward or backward
- Right joystick: turn left or right
- Directional pad: down to crouch, up to stand up
- Right button: (B on an Xbox controller, red circle on a PS4 controller) emergency stop 🚨 all motors will turn off