config
BatteryControlConfiguration
dataclass
¶
BatteryControlConfiguration(
*,
name: str = "battery_control",
on_expander: bool = True,
reset_pin: int = 15,
status_pin: int = 13
)
Configuration for the battery control of the Feldfreund robot.
Defaults
name: 'battery_control' on_expander: True reset_pin: 15 status_pin: 13
BluetoothConfiguration
dataclass
¶
BluetoothConfiguration(
*,
name: str = "bluetooth",
pin_code: int | None | Literal["default"] = "default"
)
Configuration for the Lizard Bluetooth module.
Defaults
name: 'bluetooth' pin_code: 'default'
BmsConfiguration
dataclass
¶
BmsConfiguration(
*,
name: str = "bms",
on_expander: bool = True,
rx_pin: int = 26,
tx_pin: int = 27,
baud: int = 9600,
num: int = 2,
battery_low_threshold: float = 15.0
)
Configuration for the bms of the Feldfreund robot.
Defaults
name: 'bms' on_expander: True rx_pin: 26 tx_pin: 27 baud: 9600 num: 2 battery_low_threshold: 15.0
BumperConfiguration
dataclass
¶
BumperConfiguration(
*,
pin_front_top: int | None,
pin_front_bottom: int | None,
pin_back: int | None,
name: str = "bumper",
on_expander: bool = True
)
Configuration for the bumper of the Feldfreund robot.
Defaults
name: 'bumper' on_expander: True
CameraConfiguration
dataclass
¶
CameraConfiguration(
*,
main: CameraSlotConfig | list[CameraSlotConfig] | None,
front: CameraSlotConfig | None,
back: CameraSlotConfig | None,
left: CameraSlotConfig | None = None,
right: CameraSlotConfig | None = None
)
Container of named camera slots for a Feldfreund robot.
main may be a single CameraSlotConfig or a list of them. The list form configures
multiple main cameras; CameraProvider.main then refers to the first, while
CameraProvider.mains exposes all of them.
Defaults
left: None right: None
CameraSlotConfig
dataclass
¶
CameraSlotConfig(
*,
camera_id: str,
fps: int = 10,
rotation: ImageRotation = ImageRotation.NONE,
crop: Rectangle | None = None,
calibration: Calibration | None = None,
image_size: ImageSize | None = None,
auto_connect: bool = True
)
Base configuration shared by all camera types.
width and height are derived properties: they come from
calibration.intrinsics.size when a calibration is provided,
otherwise from image_size. At least one of the two must be set.
rotation and crop are only applied for display purposes and do not affect the actual captured images.
auto_connect set to False keeps the camera disconnected until the connection is
requested explicitly, for example with the switch in the camera developer UI.
Defaults
fps: 10 rotation: ImageRotation.NONE crop: None calibration: None image_size: None auto_connect: True
CanConfiguration
dataclass
¶
CanConfiguration(
*,
name: str = "can",
on_expander: bool = False,
rx_pin: int = 32,
tx_pin: int = 33,
baud: int = 1000000
)
Configuration for the can of the Feldfreund robot.
Defaults
name: 'can' on_expander: False rx_pin: 32 tx_pin: 33 baud: 1_000_000
EstopConfiguration
dataclass
¶
EstopConfiguration(
*,
name: str = "estop",
pin_front: int = 34,
pin_back: int = 35
)
Configuration for the estop of the Feldfreund robot.
Defaults
name: 'estop' pin_front: 34 pin_back: 35
FeldfreundConfiguration
dataclass
¶
FeldfreundConfiguration(
*,
robot_id: str,
robot_footprint: RobotFootprint = RobotFootprint(),
battery_control: BatteryControlConfiguration = BatteryControlConfiguration(),
bluetooth: BluetoothConfiguration = BluetoothConfiguration(),
bms: BmsConfiguration = BmsConfiguration(),
bumper: BumperConfiguration | None = None,
can: CanConfiguration = CanConfiguration(),
cameras: CameraConfiguration | None = None,
driver: DriveParameters = create_drive_parameters(),
estop: EstopConfiguration = EstopConfiguration(),
flashlight: (
FlashlightConfiguration
| FlashlightMosfetConfiguration
| None
) = None,
gnss: GnssConfiguration | None = None,
headlights: HeadlightsConfiguration | None = None,
implement: ImplementConfiguration | None = None,
imu: ImuConfiguration | None = None,
robot_brain: RobotBrainConfiguration,
wheels: TracksConfiguration
)
Main configuration for a Feldfreund robot combining all module configurations.
FlashlightConfiguration
dataclass
¶
FlashlightConfiguration(
*,
name: str = "flashlight",
on_expander: bool = True,
front_pin: int = 12,
back_pin: int = 23,
ledc_timer: int = 0,
front_ledc_channel: int = 0,
back_ledc_channel: int = 1,
duty_cycle: float = 1.0
)
Configuration for the flashlight of the Feldfreund robot.
The LEDC channels must not collide with other PwmOutputs on the same chip.
Defaults
name: 'flashlight' on_expander: True front_pin: 12 back_pin: 23 ledc_timer: 0 front_ledc_channel: 0 back_ledc_channel: 1 duty_cycle: 1.0
FlashlightMosfetConfiguration
dataclass
¶
FlashlightMosfetConfiguration(
*,
name: str = "flashlight_mosfet",
on_expander: bool = True,
pin: int = 2
)
Configuration for the mosfet based flashlight of the Feldfreund robot.
Deprecated: only used on U4. Not built into any new robot; do not extend.
Defaults
name: str = 'flashlight_mosfet' on_expander: True pin: 2
GnssConfiguration
dataclass
¶
GnssConfiguration(
*,
x: float = 0.041,
y: float = -0.255,
z: float = 0.6225,
yaw: float = 0.0
)
Configuration for the GNSS of the Feldfreund robot.
X, Y, Z are the position of the main GNSS antenna. The yaw is the direction to the auxiliary antenna. It should be 90°, but the offset is configured in the Septentrio software.
Defaults
x: 0.041 y: -0.255 z: 0.6225 yaw: 0.0
HeadlightsConfiguration
dataclass
¶
HeadlightsConfiguration(
*,
name: str = "headlights",
on_expander: bool = False,
left_pin: int = 5,
right_pin: int = 4,
ledc_timer: int = 1,
left_ledc_channel: int = 2,
right_ledc_channel: int = 3,
left_duty_cycle: float = 1.0,
right_duty_cycle: float = 1.0
)
Configuration for the headlights of the Feldfreund robot that are controlled via pwm.
Defaults
name: 'headlights' on_expander: False left_pin: 5 right_pin: 4 ledc_timer: 1 left_ledc_channel: 2 right_ledc_channel: 3 left_duty_cycle: 1.0 right_duty_cycle: 1.0
ImplementConfiguration
dataclass
¶
ImplementConfiguration(
*,
lizard_name: str,
display_name: str,
offset: Pose3d = Pose3d.zero(),
work_radius: float
)
Base configuration for all implements.
Defaults
offset: Pose3d.zero
ImuConfiguration
dataclass
¶
ImuConfiguration(
*,
name: str = "imu",
offset_rotation: Rotation = Rotation.zero(),
min_gyro_calibration: float = 1.0
)
Configuration for the IMU of the Feldfreund robot.
Defaults
name: 'imu' offset_rotation: Rotation.zero min_gyro_calibration: 1.0
MjpegCameraConfig
dataclass
¶
MjpegCameraConfig(
*,
camera_id: str,
fps: int = 10,
rotation: ImageRotation = ImageRotation.NONE,
crop: Rectangle | None = None,
calibration: Calibration | None = None,
image_size: ImageSize | None = None,
auto_connect: bool = True,
ip: str = "192.168.42.3",
username: str = "root",
password: str
)
Bases: CameraSlotConfig
Configuration for an MJPEG camera.
The password can be added to the .env file as MJPEG_CAMERA_PASSWORD and then used with secrets.py.
Defaults
ip: '192.168.42.3' username: 'root'
ODriveTracksConfiguration
dataclass
¶
ODriveTracksConfiguration(
*,
name: str = "wheels",
is_left_reversed: bool = False,
is_right_reversed: bool = False,
width: float = 0.502,
left_back_can_address: int = 0,
right_back_can_address: int = 256,
left_front_can_address: int = 512,
right_front_can_address: int = 768,
odrive_version: int = 4,
tooth_count: int = 15,
pitch: float = 0.033,
motor_gear_ratio: float = 12.52,
has_temperature_sensor: bool = False
)
Bases: TracksConfiguration
Configuration for ODrive-based tracks with four motors (front/back, left/right).
Defaults
left_back_can_address: 0x000 right_back_can_address: 0x100 left_front_can_address: 0x200 right_front_can_address: 0x300 odrive_version: 4 tooth_count: 15 pitch: 0.033 motor_gear_ratio: 12.52 has_temperature_sensor: False
RobotBrainConfiguration
dataclass
¶
RobotBrainConfiguration(
*,
name: str,
enable_esp_on_startup: bool = False,
nand: bool = False,
swap_pins: bool = False,
heartbeat_interval: float = 0.5,
supported_lizard_versions: str | None = None
)
Configuration for the robot brain of the Feldfreund robot.
There are different versions of the Robot Brain's electronics. Make sure to configure the correct parameters for your Robot Brain.
Also have a look the documentation of the espresso.py script. https://github.com/zauberzeug/lizard/blob/main/espresso.py
Defaults
enable_esp_on_startup: False nand: False swap_pins: False heartbeat_interval: 0.5 supported_lizard_versions: None
supported_lizard_versions is a PEP 440 version specifier like '<0.14.0' restricting which
Lizard versions can be downloaded and flashed. None allows all versions.
RobotFootprint
dataclass
¶
RobotFootprint(
*,
front: float = 0.5295,
rear: float = 0.343,
left: float = 0.33274,
right: float = 0.33274
)
Physical extent of the robot as distances from the center of motion.
The center of motion is not necessarily the geometric center of the robot frame. Each value represents the distance from the center of motion to that edge.
Defaults
front: 0.5295 rear: 0.343 left: 0.33274 right: 0.33274
corners_at_pose ¶
corners_at_pose(pose: Pose) -> list[Point]
Return the 4 footprint corners at the given pose, rotated by the pose's yaw.
Order: front-left, front-right, rear-right, rear-left.
RtspCameraConfig
dataclass
¶
RtspCameraConfig(
*,
camera_id: str,
fps: int = 10,
rotation: ImageRotation = ImageRotation.NONE,
crop: Rectangle | None = None,
calibration: Calibration | None = None,
image_size: ImageSize | None = None,
auto_connect: bool = True,
mac: str,
ip: str,
codec: Literal["h264", "h265"] = "h265",
substream: int = 0
)
TracksConfiguration
dataclass
¶
TracksConfiguration(
*,
name: str = "wheels",
is_left_reversed: bool = False,
is_right_reversed: bool = False,
width: float = 0.502
)
Base configuration for Feldfreund tracks.
Defaults
name: 'wheels' is_left_reversed: False is_right_reversed: False width: 0.502
UsbCameraConfig
dataclass
¶
UsbCameraConfig(
*,
camera_id: str,
fps: int = 10,
rotation: ImageRotation = ImageRotation.NONE,
crop: Rectangle | None = None,
calibration: Calibration | None = None,
image_size: ImageSize | None = None,
auto_connect: bool = True,
auto_exposure: bool = True
)