robotpy_toolkit_7407.utils package

Submodules

robotpy_toolkit_7407.utils.color module

class robotpy_toolkit_7407.utils.color.Color

Bases: object

BLUE = '\x1b[94m'
BOLD = '\x1b[1m'
CYAN = '\x1b[96m'
DARKCYAN = '\x1b[36m'
END = '\x1b[0m'
GREEN = '\x1b[92m'
PURPLE = '\x1b[95m'
RED = '\x1b[91m'
UNDERLINE = '\x1b[4m'
YELLOW = '\x1b[93m'
class robotpy_toolkit_7407.utils.color.NoColor

Bases: object

BLUE = ''
BOLD = ''
CYAN = ''
DARKCYAN = ''
END = ''
GREEN = ''
PURPLE = ''
RED = ''
UNDERLINE = ''
YELLOW = ''

robotpy_toolkit_7407.utils.logger module

class robotpy_toolkit_7407.utils.logger.Logger(logging_config=None)

Bases: object

classmethod log_error(msg: str, header=None, frame=None, traceback_length: int = 5) str

Logs errors

classmethod log_info(msg: str, header=None, frame=None, traceback_length: int = 5) str

Logs info

classmethod log_warning(msg: str, header=None, frame=None, traceback_length: int = 5) str

Logs errors

classmethod print_function_call(params=None, header='') str

Prints function calls and details associated with the call

robotpy_toolkit_7407.utils.logger.error(msg: str, header=None, frame=None, traceback_length: int = 5) str

Logs errors

robotpy_toolkit_7407.utils.logger.get_default_logging()
robotpy_toolkit_7407.utils.logger.info(msg: str, header=None, frame=None, traceback_length: int = 5) str

Logs info

robotpy_toolkit_7407.utils.logger.warn(msg: str, header=None, frame=None, traceback_length: int = 5) str

Logs errors

robotpy_toolkit_7407.utils.logger.warning(msg: str, header=None, frame=None, traceback_length: int = 5) str

Logs errors

robotpy_toolkit_7407.utils.math module

robotpy_toolkit_7407.utils.math.bounded_angle_diff(theta_from: float, theta_too: float) float

Finds the bounded (from -π to π) angle difference between two unbounded angles

robotpy_toolkit_7407.utils.math.clamp(val: float, _min: float, _max: float)

Clamps a value between a min and max

Args:

val (float): value to clamp _min (float): min value _max (float): max value

Returns:

float: clamped value

robotpy_toolkit_7407.utils.math.ft_to_m(ft: float)

Converts feet to meters

Args:

ft (float): feet (float)

Returns:

float: meters (float)

robotpy_toolkit_7407.utils.math.inches_to_talon_sensor_units(inches: float, low_gear: bool) float

Converts inches to sensor units

Args:

inches (float): inches as a float low_gear (float): low gear as a bool

Returns:

sensor units as a float

robotpy_toolkit_7407.utils.math.meters_to_talon_sensor_units(meters: float, low_gear: bool) float

Converts meters to sensor units

Args:

meters (float): meters as a float low_gear (float): low gear as a bool

Returns:

sensor units as a float

robotpy_toolkit_7407.utils.math.rotate_vector(x: float, y: float, theta: float) tuple[float, float]
robotpy_toolkit_7407.utils.math.talon_sensor_units_to_inches(sensor_units: float, low_gear: bool) float

Converts sensor units to inches

Args:

sensor_units (float): sensor units as a float low_gear (bool): low gear as a bool

Returns:

inches as a float

robotpy_toolkit_7407.utils.math.talon_sensor_units_to_meters(sensor_units: float, low_gear: bool) float

Converts sensor units to meters

Args:

sensor_units (float): sensor units as a float low_gear (bool): low gear as a bool

Returns:

meters as a float

robotpy_toolkit_7407.utils.units module

Module contents