WPILib

repository·main·Indexed 23 days ago

https://github.com/wpilibsuite/allwpilib

A collection of core libraries (HAL, Commands, WPIMath, etc.) used to create robot programs for Systemcore, primarily supporting FRC and FTC teams. It includes the DataLog binary logging format, the Epilogue annotation-based telemetry library, and various Python wrappers such as robotpy-apriltag, robotpy-commands-v2, and robotpy-hal.

Tokens
47.7K
Snippets
74
Records
295
Agent score
80%

What's inside WPILib

  1. What is epilogue-processor?

    main

    Epilogue is a Java annotation-based telemetry library designed to simplify interactions with WPILib's telemetry and logging facilities, specifically targeting NetworkTables and DataLog.

    While the core library provides the annotations, the epilogue-processor subproject specifically provides the annotation processor responsible for generating the necessary code to automate the publishing and logging of data based on those annotations.

  2. What is epilogue-runtime?

    main
    Epilogue is a Java annotation-based telemetry library designed to simplify interactions with WPILib's telemetry and logging facilities, specifically targeting NetworkTables and DataLog. It allows developers to use annotations to automatically handle telemetry data in robot projects. This specific subproject, epilogue-runtime, provides the runtime library required to configure and execute the behavior of code generated by the Epilogue annotation processor.
  3. Overview of the Robot Hardware Interface WebSockets API

    main

    The Robot Hardware Interface WebSockets API is a standard interface for transmitting robot hardware interface state over a network. It is designed to allow 3rd party software to interface with a robot program running in a desktop environment.

    Typical connection patterns include:

    • Robot Program (Desktop) $\leftrightarrow$ Simulation Engine
    • Robot Program (Desktop) $\leftrightarrow$ Physical Robot
    • Robot Program (Desktop) $\leftrightarrow$ Simulation Dashboard GUI

    This API provides a text-based network interface to the 'hardware' interface layer, lowering the barrier to entry for developing tools that interact with robot hardware state without requiring custom C++ simulation plugins.

  4. Overview of wpimath

    main

    The wpimath package provides a suite of utilities for robot control and motion planning. Key capabilities include:

    • Robot Control: Feedforward and feedback control mechanisms.
    • State Estimation: Filters, Kalman filters, and other estimation techniques.
    • Geometry: 2D and 3D geometry utilities.
    • Kinematics: Kinematic models and calculations.
    • Trajectory Planning: Trajectory generation and trajectory optimization.
  5. Use wpiannotations for compile-time static analysis

    main
    The wpiannotations library provides a collection of annotations designed for use in WPILib and WPILib robot projects. When used in conjunction with the javacPlugin, these annotations enable compile-time static analysis. This allows you to place constraints on your code to prevent common mistakes by having the compiler emit errors when specific error patterns are detected.
  6. Use javacPlugin for static analysis in WPILib projects

    main
    The javacPlugin is a Java compiler plugin designed for use in WPILib and WPILib robot projects. When used in conjunction with wpiannotations, it performs static analysis on source code to enforce constraints defined by specific annotations. Its primary purpose is to reduce user errors by catching violations of these constraints during the compilation process, within the limits of what static analysis can detect.
  7. Understand the WPILib project structure

    main

    The WPILib repository is organized into several key functional areas depending on whether you are looking for high-level robot logic or low-level hardware abstraction:

    • WPILibJ and WPILibC: These directories contain the core high-level framework and hardware/robot classes used for interacting with hardware and the Driver Station. This is the primary location for most robot project development.
    • hal/: Contains the Hardware Abstraction Layer (HAL) code. It is subdivided into:
      • hal/cpp: Platform-independent code shared between Systemcore and simulation.
      • hal/sim: Code designed to run on a computer for simulation.
      • hal/systemcore: Code designed to run on the robot's Systemcore.
    • src/test/: Located under C++ and Java subprojects, these directories contain test code executed via GitHub Actions.
    • upstream_utils/: Contains scripts used for updating third-party code copies within the repository.