libstp.foundation ================= .. py:module:: libstp.foundation .. autoapi-nested-parse:: Python bindings for libstp-foundation Classes ------- .. autoapisummary:: libstp.foundation.ChassisVelocity libstp.foundation.Feedforward libstp.foundation.MotorCalibration libstp.foundation.PIDController libstp.foundation.PidGains libstp.foundation.Pose Functions --------- .. autoapisummary:: libstp.foundation.debug libstp.foundation.error libstp.foundation.info libstp.foundation.initialize_logging libstp.foundation.initialize_timer libstp.foundation.warn Module Contents --------------- .. py:class:: ChassisVelocity ChassisVelocity(arg0: float, arg1: float, arg2: float) .. py:attribute:: vx :type: float .. py:attribute:: vy :type: float .. py:attribute:: wz :type: float .. py:class:: Feedforward Feedforward(kS: float, kV: float, kA: float) .. py:attribute:: kA :type: float .. py:attribute:: kS :type: float .. py:attribute:: kV :type: float .. py:class:: MotorCalibration MotorCalibration(ff: Feedforward, pid: PidGains, ticks_to_rad: float, vel_lpf_alpha: float) .. py:attribute:: ff :type: Feedforward .. py:attribute:: pid :type: PidGains .. py:attribute:: ticks_to_rad :type: float .. py:attribute:: vel_lpf_alpha :type: float .. py:class:: PIDController(Kp: float, Ki: float, Kd: float) A PID controller for managing control loops. This class provides methods for tuning and executing a PID control loop with configurable proportional, integral, and derivative gains. .. py:method:: calculate(error: float) -> float Calculate the PID output for a given error. :param error: The current error in the system. :type error: float :returns: The calculated PID output, clamped to the specified range. :rtype: float .. py:class:: PidGains PidGains(kp: float, ki: float, kd: float) .. py:attribute:: kd :type: float .. py:attribute:: ki :type: float .. py:attribute:: kp :type: float .. py:class:: Pose .. py:attribute:: position :type: numpy.ndarray[numpy.float32[3, 1]] .. py:property:: heading :type: float .. py:function:: debug(message: str) -> None Log a message with severity level debug .. py:function:: error(message: str) -> None Log a message with severity level error .. py:function:: info(message: str) -> None Log a message with severity level info .. py:function:: initialize_logging() -> None Initialize and enable the logging system .. py:function:: initialize_timer() -> None Initialize the timer for elapsed time logging .. py:function:: warn(message: str) -> None Log a message with severity level warn