Skip to content

About

Python wrapper for NavX library

Topics

Resources

Stars

3 stars

Watchers

4 watching

Forks

Repository files navigation

robotpy-navx

Python bindings for StudicaLib 2027.0.0-alpha-1, supporting Studica NavX3 sensors over CAN and USB.

Note

The RobotPy project is not associated with or endorsed by kauailabs or Studica Robotics.

Documentation

Quick start

import navx

imu = navx.Navx.usb()  # Discover a NavX3 on any USB port
# Alternatively, select a SystemCore USB port:
# imu = navx.Navx.usb(navx.UsbPort.USB1)
# Or open CAN device ID 0 on CAN_S0:
# imu = navx.Navx(0)

yaw = imu.getYaw()  # degrees, or None if unavailable
if yaw is not None:
    print(yaw)

Getters return None when readings are unavailable, stale, or not enabled for streaming. Commands return navx.Status; compare with navx.Status.OK. See the USB example for a complete robot program.

This release requires RobotPy 2027 and replaces the legacy sensor API. Older SPI/I2C sensor interfaces and their simulation examples are no longer included.

License

The original NavX software is available under the MIT license, as is this.

About

Python wrapper for NavX library

Topics

Resources

Stars

3 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages