types
PID Calibration Models
Data types, enums, and dataclasses for the PID calibration tool.
CommandKind
#
Bases: Enum
Determines which command protocol a PID type uses.
Source code in cogip/tools/firmware_pid_calibration/types.py
28 29 30 31 32 33 34 35 36 37 | |
layout_path
property
#
Path to the graph layout YAML file for this command kind.
MotionKind
#
Bases: Enum
Determines which motion strategy a PID type uses.
Source code in cogip/tools/firmware_pid_calibration/types.py
21 22 23 24 25 | |
PidGains
dataclass
#
PID gains (Kp, Ki, Kd) for a single controller.
Source code in cogip/tools/firmware_pid_calibration/types.py
127 128 129 130 131 132 133 134 135 136 137 | |
copy()
#
Create a copy of the gains.
Source code in cogip/tools/firmware_pid_calibration/types.py
135 136 137 | |
PidType
#
Bases: Enum
Types of PID controllers.
Each member is the single source of truth for: - label: human-readable name (also used as telemetry graph plot title) - description: longer explanation - param_names: (kp_name, ki_name, kd_name) for firmware parameters - controller: PB_ControllerEnum to activate - command_kind: whether to use pose or speed commands - motion_kind: which MotionKind to use for calibration - default_distance: default test distance in mm or deg (pose types only) - default_speed: default test speed in mm/s or deg/s (speed types only) - default_duration_ms: default speed command duration in ms (speed types only)
The index is auto-computed from declaration order (1-based).
Source code in cogip/tools/firmware_pid_calibration/types.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | |
choices()
classmethod
#
Return list of valid index choices as strings.
Source code in cogip/tools/firmware_pid_calibration/types.py
116 117 118 119 | |
from_index(index)
classmethod
#
Get PidType by its index number.
Source code in cogip/tools/firmware_pid_calibration/types.py
108 109 110 111 112 113 114 | |
table_rows()
classmethod
#
Return table rows: (index, label, description).
Source code in cogip/tools/firmware_pid_calibration/types.py
121 122 123 124 | |