phoenix6.swerve.swerve_drivetrain_constants¶
Module Contents¶
- class phoenix6.swerve.swerve_drivetrain_constants.SwerveDrivetrainConstants¶
Common constants for a swerve drivetrain.
- network: phoenix6.canbus.CANBus¶
The network the swerve drive is on. Note that all devices must be on the same CAN bus.
- pigeon2_id: int = '0'¶
CAN ID of the Pigeon2 on the drivetrain.
- pigeon2_configs: None | phoenix6.configs.Pigeon2Configuration = 'None'¶
The configuration object to apply to the Pigeon2. This defaults to null. If this remains null, then the Pigeon2 will not be configured (and whatever configs are on it remain on it). If this is not null, the Pigeon2 will be overwritten with these configs.
- with_network(new_network: phoenix6.canbus.CANBus) Self¶
Modifies the network parameter and returns itself.
The network the swerve drive is on. Note that all devices must be on the same CAN bus.
- Parameters:
new_network (CANBus) – Parameter to modify
- Returns:
this object
- Return type:
- with_pigeon2_id(new_pigeon2_id: int) Self¶
Modifies the pigeon2_id parameter and returns itself.
CAN ID of the Pigeon2 on the drivetrain.
- Parameters:
new_pigeon2_id (int) – Parameter to modify
- Returns:
this object
- Return type:
- with_pigeon2_configs(new_pigeon2_configs: None | phoenix6.configs.Pigeon2Configuration) Self¶
Modifies the pigeon2_configs parameter and returns itself.
The configuration object to apply to the Pigeon2. This defaults to null. If this remains null, then the Pigeon2 will not be configured (and whatever configs are on it remain on it). If this is not null, the Pigeon2 will be overwritten with these configs.
- Parameters:
new_pigeon2_configs (None | Pigeon2Configuration) – Parameter to modify
- Returns:
this object
- Return type: