惯性陀螺仪传感器#

介绍#

The VEX V5 Inertial Sensor and Gyro Sensor can measure how a robot is turning.

The Inertial Sensor uses two parts to measure motion. The gyroscope measures turning, such as heading, rotation, gyro rate, and orientation. The accelerometer measures changes in motion, such as speeding up or slowing down along the x, y, and z axes.

The Gyro Sensor measures turning only. It can report heading and rotation values, but it does not report acceleration or orientation.

Inertial or Gyro Sensor blocks will only appear when the sensor is configured independently in the Devices window, not as part of a drivetrain configuration.

以下是可用模块列表:

Inertial Sensing — Use values from a configured Inertial Sensor.

  • Inertial acceleration – Reports how quickly the Inertial Sensor is speeding up or slowing down on the selected axis.

  • Inertial gyro rate – Reports how fast the Inertial Sensor is rotating on the selected axis.

  • Inertial orientation – Reports the Inertial Sensor’s roll, pitch, or yaw angle.

Inertial/Gyro Sensing — Work with heading and rotation values.

惯性加速度#

Acceleration is how quickly the sensor is speeding up or slowing down. The Inertial acceleration reporter block reports the acceleration of the Inertial Sensor on the selected axis, from -4.0 G to 4.0 G.

A G is a unit used to measure acceleration. 1 G is about the acceleration you feel from gravity while sitting still.

The value can be positive or negative depending on the direction of acceleration on the selected axis. The axis options are x, y, and z.

**注意:**此模块仅适用于惯性传感器。

([Inertial 1 v] [X v] 轴加速度值)

范围

描述

设备

要使用的惯性传感器,在“设备”窗口中进行配置。

The axis to measure acceleration on:

  • x
  • y
  • z

惯性陀螺仪速率#

Gyro rate is how fast the Inertial Sensor is rotating. The Inertial gyro rate reporter block reports the current rotation speed of the Inertial Sensor on the selected axis in degrees per second \(dps\).

The value can be positive or negative depending on the direction the sensor is rotating on that axis.

**注意:**此模块仅适用于惯性传感器。

([Inertial 1 v] [X v] 轴陀螺仪角速度)

范围

描述

设备

要使用的惯性传感器,在“设备”窗口中进行配置。

The axis to report gyro rate on:

  • x
  • y
  • z

惯性定向#

Orientation is the Inertial Sensor’s current angle on a selected turning axis. The Inertial orientation reporter block reports the roll, pitch, or yaw of the Inertial Sensor, from -180.00 to 180.00 degrees.

Roll, pitch, and yaw describe different ways the sensor can tilt or turn.

**注意:**此模块仅适用于惯性传感器。

([Inertial 1 v] [横滚 v] 偏转角度值)

范围

描述

设备

要使用的惯性传感器,在“设备”窗口中进行配置。

角度

The orientation angle to report:

  • roll
  • pitch
  • yaw

校准惯性/陀螺仪#

The calibrate Inertial/Gyro stack block calibrates the configured Inertial or Gyro Sensor.

Calibration helps the sensor measure turns correctly. Keep the sensor still during calibration. If the sensor moves during calibration, heading, rotation, gyro rate, and orientation values may not measure correctly.

The project will wait until calibration is done before the next block in the stack runs.

校准 [Inertial 1 v]

范围

描述

设备

在“设备”窗口中配置要使用的惯性传感器或陀螺仪传感器。

设置惯性/陀螺仪航向#

A heading is the direction the sensor is facing, measured in degrees from 0 to 359.99. The set Inertial/Gyro heading stack block changes the sensor’s current heading to a new heading value.

For example, if the sensor has turned to face right, setting the heading to 0 degrees makes that right-facing position the new 0 degrees. Then the sensor can track other headings based on that new direction.

设定 [Inertial 1 v] 归位为 [0] 度

参数

描述

设备

在“设备”窗口中配置要使用的惯性传感器或陀螺仪传感器。

标题

The heading value, in degrees, to set for the sensor. This can be a value from 0 to 359.99.

设置惯性/陀螺仪旋转#

Rotation is how much the sensor has turned, measured in degrees. Unlike heading, rotation can increase past 359.99 degrees or decrease below 0 degrees. At the beginning of a project, the rotation value is set to 0 degrees. The set Inertial/Gyro rotation stack block changes the sensor’s current rotation to a new value.

For example, if the sensor has made two full turns to the right, its rotation value will be 720 degrees. Setting the rotation to 0 degrees will reset that rotation from 720 to 0 degrees. Then the sensor can track rotations based on that new value.

设定 [Inertial 1 v] 转向为 [0] 度

参数

描述

设备

在“设备”窗口中配置要使用的惯性传感器或陀螺仪传感器。

旋转

The rotation value, in degrees, to set for the sensor. This can be an integer or a decimal.

惯性/陀螺仪航向#

A heading is the direction the sensor is facing, measured in degrees from 0 to 359.99. The Inertial/Gyro heading reporter block reports the sensor’s current heading.

The starting heading is 0 degrees. If the sensor turns past 359.99 degrees, the heading wraps back to 0 degrees.

([Inertial 1 v] 归位角度值)

参数

描述

设备

在“设备”窗口中配置要使用的惯性传感器或陀螺仪传感器。

惯性/陀螺旋转#

Rotation is how much the sensor has turned, measured in degrees. Unlike heading, rotation can increase past 359.99 degrees or decrease below 0 degrees. At the beginning of a project, the rotation value is set to 0 degrees. The Inertial/Gyro rotation reporter block reports the sensor’s current rotation.

Turning right increases the rotation, and turning left decreases the rotation. For example, making two full turns to the right will report a rotation of 720 degrees. Turning one full turn to the left from 0 degrees will report a rotation of -360 degrees.

([Inertial 1 v] 转向角度值)

参数

描述

设备

在“设备”窗口中配置要使用的惯性传感器或陀螺仪传感器。