:py:mod:`phoenix6.sim.pigeon2_sim_state` ======================================== .. py:module:: phoenix6.sim.pigeon2_sim_state Module Contents --------------- .. py:class:: 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. :param device: Device to which this simulation state is attached :type device: CorePigeon2 .. py:method:: 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. :param volts: The supply voltage in Volts :type volts: volt :returns: Status code :rtype: StatusCode .. py:method:: 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. :param deg: The yaw in degrees :type deg: degree :returns: Status code :rtype: StatusCode .. py:method:: add_yaw(ddeg: phoenix6.units.degree) -> phoenix6.status_code.StatusCode Adds to the simulated yaw of the Pigeon2. :param ddeg: The change in position in rotations :type ddeg: degree :returns: Status code :rtype: StatusCode .. py:method:: set_pitch(deg: phoenix6.units.degree) -> phoenix6.status_code.StatusCode Sets the simulated pitch of the Pigeon2. :param deg: The pitch in degrees :type deg: degree :returns: Status code :rtype: StatusCode .. py:method:: set_roll(deg: phoenix6.units.degree) -> phoenix6.status_code.StatusCode Sets the simulated roll of the Pigeon2. :param deg: The roll in degrees :type deg: degree :returns: Status code :rtype: StatusCode .. py:method:: set_angular_velocity_x(dps: phoenix6.units.degrees_per_second) -> phoenix6.status_code.StatusCode Sets the simulated angular velocity X component of the Pigeon2. :param dps: The X component of the angular velocity in degrees per second :type deg: degrees_per_second :returns: Status code :rtype: StatusCode .. py:method:: set_angular_velocity_y(dps: phoenix6.units.degrees_per_second) -> phoenix6.status_code.StatusCode Sets the simulated angular velocity Y component of the Pigeon2. :param dps: The Y component of the angular velocity in degrees per second :type deg: degrees_per_second :returns: Status code :rtype: StatusCode .. py:method:: set_angular_velocity_z(dps: phoenix6.units.degrees_per_second) -> phoenix6.status_code.StatusCode Sets the simulated angular velocity Z component of the Pigeon2. :param dps: The Z component of the angular velocity in degrees per second :type deg: degrees_per_second :returns: Status code :rtype: StatusCode