#

介绍#

The VEX AIM Coding Robot includes prebuilt actions, or macros, that combine multiple behaviors into a single block. These macros allow the robot to perform complex tasks such as moving toward objects, detecting objects, and acting out emotions.

Below is a list of all blocks:

  • act — Makes the robot display a specific emotion such as happy, sad, or excited.

  • turn until object — Rotates the robot until the AI Vision Sensor detects a specified object.

  • move to object — Moves the robot toward a detected object.

  • get object — Moves the robot to collect a detected object.

行为#

Act 模块让机器人表现出特定的情绪。

动作堆栈块#
表现 [开心 v]

参数

描述

情绪

使机器人做出以下动作之一:

  • 快乐
  • 悲伤
  • 傻乎乎的
  • 生气
  • 兴奋

例子

开始时,表现得开心#
当开始
[React to kicking a sports ball.]
[中 v] 踢出对象
表现 [开心 v]

转动直到物体#

转动直到物体块使机器人转动直到 AI 视觉传感器检测到物体。

Note: If the robot appears to be having difficulties with detecting objects, try lowering the robot’s turn velocity with the set turn velocity block.

转动直到物体阻挡#
[右 v] 转直到发现 [运动球 v]

参数

描述

方向

转动机器人:

对象

旋转直到找到此物体:

  • 运动球
  • 橙色桶
  • 蓝色桶
  • AIM 机器人
  • AprilTag ID 0
  • AprilTag ID 1
  • AprilTag ID 2
  • AprilTag ID 3
  • AprilTag ID 4

例子

开始时,向左转直到检测到球#
当开始
[Turn left until orange barrel is detected.]
[左 v] 转直到发现 [橙色桶 v]

获取对象#

获取物体块使机器人移动以使用 AI 视觉传感器收集物体。

Note: If the robot appears to be having difficulties with detecting objects, try lowering the robot’s move and turn velocities with the set move velocity and set turn velocity blocks.

获取球堆叠块#
获得 [运动球 v]

参数

描述

对象

移动到此对象:

  • 运动球
  • 橙色桶
  • 蓝色桶

例子

开始时,接球#
当开始
[Find and kick a sports ball.]
[右 v] 转直到发现 [运动球 v]
获得 [运动球 v]
[中 v] 踢出对象

移至对象#

移动到物体块使机器人使用 AI 视觉传感器向物体移动。

Note: If the robot appears to be having difficulties with detecting objects, try lowering the robot’s move and turn velocities with the set move velocity and set turn velocity blocks.

移至阻挡#
移至 [AIM 人工智能机器人 v]

参数

描述

对象

移动到此对象:

  • AIM 机器人
  • AprilTag ID 0
  • AprilTag ID 1
  • AprilTag ID 2
  • AprilTag ID 3
  • AprilTag ID 4

例子

开始时,转移到运动球#
当开始
[Approach the closest AIM Robot.]
[右 v] 转直到发现 [AIM 人工智能机器人 v]
移至 [AIM 人工智能机器人 v]