You can use the VEX IQ AI Vision Sensor to help you identify game objects (Pins and Beams) on the VIQRC 25-26 Mix & Match Playground in VEXcode VR using AI Classifications.
If you are familiar with the physical version of the IQ AI Vision Sensor, you will know that the physical sensor also has the ability to report information about AprilTags and configured Color Signatures. Because no robot configuration is needed in VEXcode VR and no AprilTags are present on the VIQRC 25-26 Mix & Match Field, the virtual sensor reports information only on the pre-configured Game Elements: Beams, Red Pins, Blue Pins, and Orange Pins.
AI Vision in VIQRC Mix & Match Virtual Skills
The IQ AI Vision Sensor is a camera that can automatically identify and differentiate between Game Elements, allowing your robot to autonomously orient itself toward specific objects. The sensor comes pre-trained to recognize this year's VIQRC Mix & Match Game Elements, so it will automatically detect Pins and Beams.
To detect these objects, the VEX AI Vision Sensor is mounted on the front of the robot on the lift pointed down towards the field (as shown here).
Gathering AI Vision Data
You can view data being reported by the IQ AI Vision Sensor through the Snapshot Window, Monitor Console, or Print Console in VEXcode VR.
To view the Snapshot Window and see the data the IQ AI Vision Sensor is reporting, select the AI Vision button.
Select the AI Vision button again to hide the Snapshot Window.
The Snapshot Window appears in the upper left corner of the Playground Window, is highlighted in a red box, and identifies all Game Elements within the sensor's field of view.
For each detected object, it displays key data including classification, center X and center Y coordinates, and width and height.
Explanations of the types of data reported by the IQ AI Vision Sensor, including their related VEXcode commands, can be found in the Blocks and Python VEX API.
Those commands can be used in the Monitor and/or Print Consoles to help visualize the data from each snapshot that is taken while your project is running. Learn more about using the Monitor and Print Consoles with Blocks, with Python, or Using the Print Console.
Using Huey's Sensors Together
The IQ AI Vision Sensor can be combined with other sensors on the robot to complete tasks around the Field. A full list of the sensors on the virtual version of Huey can be found on this page of the VEX API. These are just a few ideas to help you get started with your code:
- Use the IQ AI Vision Sensor to find and target on a Game Element, then use the Distance Sensor to pick up the object.
- Use the IQ AI Vision Sensor to find and target on multiple Game Elements, then use the Optical Sensor to determine the color of the bottom Pin in the claw before placing.
Remember that additional information about specific commands, the VIQRC Mix & Match Field, and the Hero Bot, Huey, can be found in the VEX API and in the built-in Help in VEXcode VR (Blocks and Python).