{"id":27761,"library":"g29py","title":"G29Py","description":"Python driver for Logitech G29/G920 steering wheel and pedals. Provides a simple interface to read wheel angle, pedal positions, button states, and force feedback. Version 0.0.14, updated sporadically.","status":"active","version":"0.0.14","language":"python","source_language":"en","source_url":"https://github.com/nicknisi/g29py","tags":["g29","g920","logitech","racing-wheel","hid","force-feedback"],"install":[{"cmd":"pip install g29py","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required to communicate with G29 over USB HID.","package":"hidapi","optional":false},{"reason":"Used for math operations on axis values.","package":"numpy","optional":false}],"imports":[{"note":"Direct import of 'g29' does not exist.","wrong":"import g29","symbol":"G29","correct":"from g29py.g29 import G29"},{"note":"G29FFB is in a separate submodule.","wrong":"from g29py import G29FFB","symbol":"G29FFB","correct":"from g29py.ffb import G29FFB"}],"quickstart":{"code":"import time\nfrom g29py.g29 import G29\nwheel = G29()\nif wheel.init():\n    print('Wheel connected')\n    for _ in range(50):\n        wheel.poll()\n        print(f\"Angle: {wheel.get_steering():.2f}, Throttle: {wheel.get_throttle():.2f}\")\n        time.sleep(0.05)\n    wheel.close()\nelse:\n    print('Failed to initialize G29')","lang":"python","description":"Initialize G29, poll data, and print steering wheel angle and throttle position."},"warnings":[{"fix":"Run script with sudo or add a udev rule (see repository README).","message":"On Linux, you may need root permissions or udev rules to access the HID device. Without proper permissions the init() call will fail silently.","severity":"gotcha","affected_versions":"<1.0.0"},{"fix":"Multiply by the max rotation angle (e.g., 900) to get degrees.","message":"The function 'get_steering()' returns value in range [-1.0, 1.0] but older documentation mentioned degree angles.","severity":"deprecated","affected_versions":"0.0.12 - 0.0.14"},{"fix":"Call wheel.set_ffb(strength) inside the loop after poll().","message":"Force feedback (FFB) requires calling wheel.set_ffb() after each poll cycle, not just once. Many users forget and wonder why no force is felt.","severity":"gotcha","affected_versions":">=0.0.10"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use 'from g29py.g29 import G29'.","cause":"Wrong import path. The class is in the g29 submodule.","error":"AttributeError: module 'g29py' has no attribute 'G29'"},{"fix":"Run as root/sudo, or add udev rules. Verify wheel is connected and in PS4/PC mode.","cause":"Insufficient permissions to access the HID device, or wheel not plugged in.","error":"hidapi.HIDException: Failed to open device"},{"fix":"Close any program that may have claimed the HID interface.","cause":"Another process (like a game) is already using the wheel.","error":"OSError: [Errno 16] Device or resource busy"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}