phoenix6.sim.pigeon2_sim_state
#
Module Contents#
- class phoenix6.sim.pigeon2_sim_state.Pigeon2SimState(device: phoenix6.hardware.core.core_pigeon2.CorePigeon2)#
Creates an object to control the state of a simulated Pigeon2.
Note the recommended method of accessing simulation features is to use Pigeon2.sim_state.
- Parameters:
device (CorePigeon2) – Device to which this simulation state is attached
- set_supply_voltage(volts: phoenix6.units.volt) phoenix6.status_code.StatusCode #
Sets the simulated supply voltage of the Pigeon2.
The minimum allowed supply voltage is 4 V - values below this will be promoted to 4 V.
- Parameters:
volts (volt) – The supply voltage in Volts
- Returns:
Status code
- Return type:
- set_raw_yaw(deg: phoenix6.units.degree) phoenix6.status_code.StatusCode #
Sets the simulated raw yaw of the Pigeon2.
Inputs to this function over time should be continuous, as user calls of Pigeon2.set_yaw will be accounted for in the callee.
The Pigeon2 integrates this to calculate the true reported yaw.
When using the WPI Sim GUI, you will notice a readonly yaw and settable rawYawInput. The readonly signal is the emulated yaw which will match self-test in Tuner and the hardware API. Changes to rawYawInput will be integrated into the emulated yaw. This way a simulator can modify the yaw without overriding hardware API calls for home-ing the sensor.
- Parameters:
deg (degree) – The yaw in degrees
- Returns:
Status code
- Return type:
- add_yaw(ddeg: phoenix6.units.degree) phoenix6.status_code.StatusCode #
Adds to the simulated yaw of the Pigeon2.
- Parameters:
ddeg (degree) – The change in position in rotations
- Returns:
Status code
- Return type:
- set_pitch(deg: phoenix6.units.degree) phoenix6.status_code.StatusCode #
Sets the simulated pitch of the Pigeon2.
- Parameters:
deg (degree) – The pitch in degrees
- Returns:
Status code
- Return type:
- set_roll(deg: phoenix6.units.degree) phoenix6.status_code.StatusCode #
Sets the simulated roll of the Pigeon2.
- Parameters:
deg (degree) – The roll in degrees
- Returns:
Status code
- Return type:
- set_angular_velocity_x(dps: phoenix6.units.degrees_per_second) phoenix6.status_code.StatusCode #
Sets the simulated angular velocity X component of the Pigeon2.
- Parameters:
dps – The X component of the angular velocity in degrees per second
- Returns:
Status code
- Return type:
- set_angular_velocity_y(dps: phoenix6.units.degrees_per_second) phoenix6.status_code.StatusCode #
Sets the simulated angular velocity Y component of the Pigeon2.
- Parameters:
dps – The Y component of the angular velocity in degrees per second
- Returns:
Status code
- Return type:
- set_angular_velocity_z(dps: phoenix6.units.degrees_per_second) phoenix6.status_code.StatusCode #
Sets the simulated angular velocity Z component of the Pigeon2.
- Parameters:
dps – The Z component of the angular velocity in degrees per second
- Returns:
Status code
- Return type: