Teach a colour
teach_colourTrain the robot's AI to recognize a color from a camera view, so it tracks the object independently and the label works in approach, face, and wait commands.
Instructions
Teach the robot's onboard AI to detect a colour, sampled from part of the current camera view (for example a cup you spotted in a look() photo). The robot then tracks it by itself, many times a second, and its name works as a label in approach_object, face_object and wait_for. This is the colour signature from VEXcode's AI Vision Utility; the robot holds 7.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | Yes | A name for it, e.g. 'red cup' | |
| box_xyxy | Yes | Where it is in a look() photo, as [x0, y0, x1, y1] pixels of the 640×480 image. Choose a box well inside the object so only its colour is sampled. | |
| width_mm | No | The object's real width in mm, if known: lets its distance be estimated and the control panel map place it | |
| tolerance | No | normal |