VEX V5 Python API
|
Use the inertial class to control the inertial sensor. More...
Inherits vex.Device.
Public Member Functions | |
def | __init__ (self, index) |
Creates a new inertial object on the port specified. More... | |
def | start_calibration (self) |
Starts recalibration of the inertial sensor. More... | |
def | is_calibrating (self) |
Returns True while the inertial sensor is performing a requested recalibration, changing to false once recalibration has completed. More... | |
def | calibrate (self) |
Recalibration of the inertial sensor. More... | |
def | reset_heading (self) |
Reset the heading of the sensor to 0. More... | |
def | reset_rotation (self) |
Reset the rotation angle of the sensor to 0. More... | |
def | set_heading (self, value, rotationUnits=RotationUnits.DEG) |
brief Set the inertial sensor heading to a new value More... | |
def | set_rotation (self, value, rotationUnits=RotationUnits.DEG) |
def | angle (self, rotationUnits=RotationUnits.DEG) |
Gets the angle (yaw angle) of the inertial sensor. More... | |
def | roll (self, rotationUnits=RotationUnits.DEG) |
Gets the roll angle of the inertial sensor. More... | |
def | pitch (self, rotationUnits=RotationUnits.DEG) |
Gets the pitch angle of the inertial sensor. More... | |
def | yaw (self, rotationUnits=RotationUnits.DEG) |
Gets the yaw angle of the inertial sensor. More... | |
def | orientation (self, orientationType, rotationUnits=RotationUnits.DEG) |
Gets an orientation angle of the inertial sensor. More... | |
def | heading (self, rotationUnits=RotationUnits.DEG) |
Gets the heading (yaw angle as 0-360 deg) of the inertial sensor. More... | |
def | rotation (self, rotationUnits=RotationUnits.DEG) |
Gets the absolute angle (yaw angle without limits) of the inertial sensor. More... | |
def | gyro_rate (self, axisType, velocityUnits=VelocityUnits.RPM) |
Gets the inertial sensor raw gyro data in specified units. More... | |
def | acceleration (self, axisType) |
Gets the inertial sensor raw acceleration data in G. More... | |
def | type (self) |
Get the device type. More... | |
def | installed (self) |
Gets the status of what is installed. More... | |
def | value (self) |
Use the inertial class to control the inertial sensor.
def vex.Inertial.__init__ | ( | self, | |
index | |||
) |
Creates a new inertial object on the port specified.
index | The port index for this motor. The index is zero based. |
Reimplemented from vex.Device.
def vex.Inertial.start_calibration | ( | self | ) |
Starts recalibration of the inertial sensor.
def vex.Inertial.is_calibrating | ( | self | ) |
Returns True while the inertial sensor is performing a requested recalibration, changing to false once recalibration has completed.
def vex.Inertial.calibrate | ( | self | ) |
Recalibration of the inertial sensor.
Blocks until calibration is complete.
def vex.Inertial.reset_heading | ( | self | ) |
Reset the heading of the sensor to 0.
def vex.Inertial.reset_rotation | ( | self | ) |
Reset the rotation angle of the sensor to 0.
def vex.Inertial.set_heading | ( | self, | |
value, | |||
rotationUnits = RotationUnits.DEG |
|||
) |
brief Set the inertial sensor heading to a new value
value | The new heading for the inertial sensor |
rotationUnits | The rotation unit for the angle |
def vex.Inertial.set_rotation | ( | self, | |
value, | |||
rotationUnits = RotationUnits.DEG |
|||
) |
def vex.Inertial.angle | ( | self, | |
rotationUnits = RotationUnits.DEG |
|||
) |
Gets the angle (yaw angle) of the inertial sensor.
rotationUnits | The measurement unit for the inertial device. |
def vex.Inertial.roll | ( | self, | |
rotationUnits = RotationUnits.DEG |
|||
) |
Gets the roll angle of the inertial sensor.
rotationUnits | the measurement unit for the inertial sensor. |
def vex.Inertial.pitch | ( | self, | |
rotationUnits = RotationUnits.DEG |
|||
) |
Gets the pitch angle of the inertial sensor.
rotationUnits | The measurement unit for the inertial device. |
def vex.Inertial.yaw | ( | self, | |
rotationUnits = RotationUnits.DEG |
|||
) |
Gets the yaw angle of the inertial sensor.
rotationUnits | The measurement unit for the inertial sensor. |
def vex.Inertial.orientation | ( | self, | |
orientationType, | |||
rotationUnits = RotationUnits.DEG |
|||
) |
Gets an orientation angle of the inertial sensor.
orientationType | The orientation axis to recover, roll, pitch or yaw. |
rotationUnits | The measurement unit for the inertial sensor. |
def vex.Inertial.heading | ( | self, | |
rotationUnits = RotationUnits.DEG |
|||
) |
Gets the heading (yaw angle as 0-360 deg) of the inertial sensor.
rotationUnits | The measurement unit for the inertial sensor. |
def vex.Inertial.rotation | ( | self, | |
rotationUnits = RotationUnits.DEG |
|||
) |
Gets the absolute angle (yaw angle without limits) of the inertial sensor.
rotationUnits | The measurement unit for the inertial sensor. |
def vex.Inertial.gyro_rate | ( | self, | |
axisType, | |||
velocityUnits = VelocityUnits.RPM |
|||
) |
Gets the inertial sensor raw gyro data in specified units.
axisType | the inertial sensor axis to use |
velocityUnits | The units return value |
def vex.Inertial.acceleration | ( | self, | |
axisType | |||
) |
Gets the inertial sensor raw acceleration data in G.
axisType | the inertial sensor axis to use |
|
inherited |
Get the device type.
|
inherited |
Gets the status of what is installed.
|
inherited |