Python Library for XGO-Rider
Project description
xgo-toolkit
A modified version of XGO-PythonLib, aim to support recent Raspberry Pi OS (bookworm) on XGO-Rider / Rider-Pi, and to have more options for usage.
XGO-PythonLib
XGO2 has built-in motion libraries for controlling the movement and various features of the machine dog, including battery level, firmware version, and servo angle. The motion library enables users to control translation and pose movement, as well as single servo and single-leg movement. The education library facilitates camera, screen, key, microphone, and speaker operations, as well as commonly used AI functions such as gesture recognition, face detection, emotional recognition, and age and gender recognition. The detailed instructions for use of the library are as follows.
PythonLib included xgolib.py and xgoedu.py
Install instructions
-
Burn the latest Raspberry Pi OS Lite (64-bit, Debian bookworm) with rpi-imager, ensure you have set up Wi-Fi, hostname (e.g.
rpi4-dev) and login (e.g.pi). -
Plug the sdcard to XGO-Rider, and connect it via ssh
ssh pi@rpi4-dev
- Install following system packages for building sound card support
sudo apt install git build-essential linux-headers-rpi-v8
- Setup soundcard driver
cd ~
git clone https://github.com/jozolab/WM8960-Audio-HAT-bookworm
cd WM8960-Audio-HAT-bookworm
sudo ./install.sh
- Install required python libraries and packages
sudo apt install mplayer python3-serial python3-opencv python3-pil python3-pip
- Run this library to system:
sudo pip install --upgrade xgo-toolkit --break-system-packages
- Reboot
sudo reboot
Examples
Perform gesture recognition on the current camera and press the "c" key to exit.
from xgo_toolkit import XGOEDU
XGO_edu = XGOEDU()
while True:
result=XGO_edu.gestureRecognition()
print(result)
if XGO_edu.xgoButton("c"):
break
XGO library example
from xgo_toolkit import XGO
dog = XGO('xgorider')
dog.action(1)
Change Log
[0.1.6] - 2025-01-05
- Forked from original [0.3.5] to xgo-toolkit [0.1.6]
- add auto download files in model to home directory
- Remove all hardcoded path in XGOEDU
- Refactor files to a single module
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xgo_toolkit-0.1.6.tar.gz.
File metadata
- Download URL: xgo_toolkit-0.1.6.tar.gz
- Upload date:
- Size: 28.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
431a4d2651c715b398669ffc7287e35457ebbae1eae3f387ea89c9008875ab22
|
|
| MD5 |
295169fcf88546488b82c22fc2bcd939
|
|
| BLAKE2b-256 |
feab1f746478aae56fa5df54b7fbd071b37b663ed1da03ad44cfd64d3d7510b3
|
File details
Details for the file xgo_toolkit-0.1.6-py3-none-any.whl.
File metadata
- Download URL: xgo_toolkit-0.1.6-py3-none-any.whl
- Upload date:
- Size: 27.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
254abd68b7034ac846a278f2590ecd11b644abea858ba6b9b2b4ec5b00faf4f2
|
|
| MD5 |
5ff213cc54bbc7101900b5bdeda9d6e6
|
|
| BLAKE2b-256 |
cd8dff77de1d9be791b578a97a77cdd035ef8636ce34e310093f3654e4966d84
|