Inercial#

Introducción#

The VEX AIM Coding Robot has a built-in Inertial Sensor. This sensor measures how the robot is moving and turning.

The Inertial Sensor uses two parts to do this. The gyroscope measures turning, such as the robot’s heading, rotation, turn rate, and orientation. The accelerometer measures changes in motion, such as speeding up, slowing down, or stopping suddenly during a crash.

The Inertial blocks can be used to track turns, measure acceleration, detect crashes, and reset heading or rotation values.

A continuación se muestra una lista de todos los bloques:

Values — Report orientation and movement data.

  • heading — Reports the direction the robot is facing, from 0 to 359.99 degrees.

  • rotation — Reports how far the robot has turned.

  • acceleration — Reports how quickly the robot is speeding up or slowing down on the selected axis.

  • get turn rate — Reports how fast the robot is rotating on the selected axis.

  • orientation — Reports the robot’s roll, pitch, or yaw angle.

Actions — Respond to crashes or reset turn values.

Valores#

título#

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

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

El bloque de reportero de encabezado.#
rumbo en grados

Parámetros

Descripción

Este bloque no tiene parámetros.

Ejemplos

cuando empezó
[Turn right until the heading reaches 90 degrees.]
turno [derecha v]
esperar [0.05] segundos
esperar hasta <(rumbo en grados) [math_greater_than v] [90]>
detener todo movimiento

cuando empezó
[Display the robot's heading as it is rotated by hand.]
para siempre
Limpiar la fila [1] de la pantalla
Coloque el cursor en la fila [1] columna [1] en la pantalla
imprimir (rumbo en grados) en la pantalla ▶
esperar [0.05] segundos

rotación#

Rotation is how much the robot 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 rotation reporter block reports the robot’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.

El bloque de reportero de Rotación.#
(rotación en grados)

Parámetros

Descripción

Este bloque no tiene parámetros.

Ejemplo

cuando empezó
[Print the rotation value as the robot turns.]
girar [derecha v] por [480] grado ◀ y no esperes
para siempre
pantalla clara
Coloque el cursor en la fila [1] columna [1] en la pantalla
imprimir (rotación en grados) en la pantalla ▶

aceleración#

Acceleration is how quickly the robot is speeding up or slowing down. The acceleration reporter block reports the robot’s acceleration along the selected axis, from -4.00 G to 4.00 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. On AIM, the axis options are named for directions on the robot: forward, rightward, and downward.

El bloque de reportero de aceleración.#
(aceleración del eje [adelante v] en g :: custom-controller-inertial-timer)

Parámetros

Descripción

eje

The axis to measure acceleration on:

  • forward
  • rightward
  • downward

Se muestra un dispositivo sensor VEX con tres flechas de colores que indican la dirección. Una flecha roja con la etiqueta HACIA LA DERECHA apunta diagonalmente hacia arriba a la izquierda, una flecha verde con la etiqueta HACIA ADELANTE apunta diagonalmente hacia arriba a la derecha, y una flecha azul con la etiqueta HACIA ABAJO apunta directamente hacia abajo desde el centro.

Ejemplo

cuando empezó
[Show the change in acceleration as the robot begins to move.]
Coloque el cursor en la fila [4] columna [1] en la pantalla
imprimir (unirse [Resting: ] (aceleración del eje [hacia la derecha v] en g :: custom-controller-inertial-timer)) en la pantalla ▶
Colocar el cursor en la siguiente fila de la pantalla
esperar [0.5] segundos
mover [derecha v] por [50] [mm v] ◀ y no esperes
esperar [0.1] segundos
imprimir (unirse [Startup: ] (aceleración del eje [hacia la derecha v] en g :: custom-controller-inertial-timer)) en la pantalla ▶

obtener velocidad de giro#

Turn rate is how fast the robot is rotating. The get turn rate reporter block reports the robot’s current rotation speed along the selected axis in degrees per second \(dps\), as an integer.

The value can be positive or negative depending on the direction the robot is rotating on that axis. The image below uses arrows to show the direction of positive rotation for roll, pitch, and yaw.

Se muestra un dispositivo sensor VEX con tres flechas de colores que indican sus ejes de rotación. Una flecha roja, "Inclinación", apunta diagonalmente hacia arriba a la izquierda; una flecha verde, "Alabeo", apunta diagonalmente hacia arriba a la derecha; y una flecha azul, "Guiñada", apunta directamente hacia abajo desde el centro.

El bloque de reportero Obtener tasa de turnos.#
(Obtener la velocidad de giro del eje [guiñada v] en dps)

Parámetros

Descripción

eje

The axis to report turn rate on:

  • roll
  • pitch
  • yaw

Ejemplo

cuando empezó
[Observe the yaw turn rate as the robot turns.]
girar [derecha v] por [180] grado ◀ y no esperes
para siempre
pantalla clara
Coloque el cursor en la fila [1] columna [1] en la pantalla
imprimir (Obtener la velocidad de giro del eje [guiñada v] en dps) en la pantalla ▶

orientación#

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

Roll, pitch, and yaw describe different ways the robot can tilt or turn. The image below uses arrows to show the direction of positive rotation for roll, pitch, and yaw.

Se muestra un dispositivo sensor VEX con tres flechas de colores que indican sus ejes de rotación. Una flecha roja, "Inclinación", apunta diagonalmente hacia arriba a la izquierda; una flecha verde, "Alabeo", apunta diagonalmente hacia arriba a la derecha; y una flecha azul, "Guiñada", apunta directamente hacia abajo desde el centro.

El bloque de reportero de Orientación.#
orientación de [guiñada v] en grados

Parámetros

Descripción

eje

The orientation axis to report:

  • roll
  • pitch
  • yaw

Ejemplo

cuando empezó
[Display the robot's orientation as it is rotated by hand.]
para siempre
Limpiar la fila [1] de la pantalla
Coloque el cursor en la fila [1] columna [1] en la pantalla
imprimir (orientación de [rollo v] en grados) en la pantalla ▶
esperar [0.05] segundos

Comportamiento#

cuando se estrelló#

The when crashed hat block runs the attached stack when the robot detects a sudden impact or collision. Crash detection uses the accelerometer and the current crash sensitivity.

El bloque de sombreros cuando se estrelló.#
cuando se estrelló

Parámetros

Descripción

Este bloque no tiene parámetros.

Ejemplo

cuando empezó
[Start moving forward.]
establecer la velocidad de movimiento al [100]%
movimiento [adelante v]

cuando se estrelló
[Respond when a crash is detected.]
detener todo movimiento
reproducir sonido [choque v] ▶

establecer la sensibilidad al choque#

The set crash sensitivity stack block adjusts how much sudden acceleration is needed for the robot to detect a crash.

El bloque de pila de sensibilidad a fallos establecido.#
Establezca la sensibilidad al choque en [bajo v]

Parámetros

Descripción

sensibilidad

How sensitive the robot is when detecting crashes:

  • low — Detects stronger impacts only.
  • medium — Detects moderate impacts.
  • high — Detects smaller impacts.

Ejemplo

cuando empezó
[Move slowly with high crash sensitivity.]
establecer la velocidad de movimiento al [35]%
Establezca la sensibilidad al choque en [alto v]
movimiento [adelante v]

cuando se estrelló
[Respond when a crash is detected.]
detener todo movimiento
reproducir sonido [choque v] ▶

restablecer el encabezado#

The reset heading stack block resets the robot’s current heading to 0 degrees. After this block runs, the direction the robot is currently facing becomes the new 0-degree heading.

El bloque de pila de encabezado Restablecer.#
restablecer el encabezado

Parámetros

Descripción

Este bloque no tiene parámetros.

Ejemplo

cuando empezó
[Face left before turning around.]
girar hacia el rumbo [270] grados ▶
restablecer el encabezado
esperar [1] segundos
girar hacia el rumbo [180] grados ▶

restablecer rotación#

The reset rotation stack block resets the robot’s current rotation value to 0 degrees. After this block runs, the robot tracks future turns from the new 0-degree rotation value.

El bloque de pila de rotación de reinicio.#
restablecer rotación

Parámetros

Descripción

Este bloque no tiene parámetros.

Ejemplo

cuando empezó
[Turn for 480 degrees before resetting rotation.]
girar [derecha v] por [480] grado ▶
restablecer rotación
para siempre
pantalla clara
Coloque el cursor en la fila [1] columna [1] en la pantalla
imprimir (rotación en grados) en la pantalla ▶