If you're experiencing issues with your AI Vision Sensor, consult the sections below to identify the cause and find the appropriate solution for your specific problem.
Problem: AI Vision Sensor won't connect to VEXcode
When configuring the AI Vision Sensor in VEXcode, the window will not show the AI Vision Sensor's view and will display the "No AI Vision Sensor Connected" message.
Potential Causes
- The AI Vision Sensor isn't properly connected to the computer.
- Your web browser or VEXcode does not have camera permissions to access the AI Vision Sensor.
- The AI Vision Sensor will not connect to VEXcode while Visual Studio Code is open.
Solutions
Solution for Potential Cause 1
If your AI Vision Sensor isn't properly connected to your computer, check your cable connection to your computer. For more information on how to connect your AI Vision Sensor to your computer, refer to these articles for connecting to Web-based and App-based VEXcode V5.
Solution for Potential Cause 2
If your web browser or VEXcode does not have camera permissions, the AI Vision Sensor will not be able to connect.
To fix this, refer to the following articles:
App-based
- Allow Camera Permissions for AI Vision Sensor on Windows in App-based VEXcode V5
- Allow Camera Permissions for AI Vision Sensor on macOS in App-based VEXcode V5
Web-based
Solution for Potential Cause 3
When the AI Vision Sensor is connected to a computer with VS Code already open, it automatically establishes a connection with VS Code first. Since the AI Vision Sensor can only maintain one connection at a time, this prevents it from connecting to VEXcode. You'll be able to see the AI Vision Sensor appearing in the VEX VS Code Extension once it connects to VS Code.
The AI Vision Sensor will show when attempting to connect within Web-based VEXcode V5, but selecting Connect will do nothing.
To solve this issue, close the VS Code application and reconnect your AI Vision Sensor. If you are using App-based VEXcode V5, the AI Vision Sensor will connect automatically.
Problem: The AI Vision Sensor is not detecting correctly during projects
Potential Cause
In projects, the V5 Brain depends on frequent snapshots for current AI Vision Sensor data. Without regular updates, the Brain may use outdated information.
When a robot or object moves too quickly, it can pass by the AI Vision Sensor before a new snapshot can be captured.
Solution
To mitigate this problem, consider two approaches:
Reduce the Wait block's time to capture snapshots more often. This allows the AI Vision Sensor to collect data more frequently as movement occurs.
Reduce the robot's speed to allow the AI Vision Sensor to take more snapshots during movement, increasing the amount of data collected.
Problem: Vision Utility is tinted an incorrect color
Potential Cause
The AI Vision Sensor's view can become tinted if it is obstructed by an object when it is connected to the computer, or when the AI Vision Utility is left open for too long.
Solution
To fix this, disconnect and reconnect the AI Vision Sensor to your computer.
This will trigger the AI Vision Sensor's auto-white balance feature, which activates each time the device is powered on.
Problem: Detecting unintended objects in the background
Potential Causes
- The AI Vision Sensor is not angled towards the field.
- There are objects in the background that the AI Vision can see.
- The Color Signature is not specific enough and it is picking up nearby similar colors.
- The lighting in the field is inconsistent.
Solutions
Solution for Potential Cause 1
Check the mounted position of your AI Vision Sensor. For optimal performance, mount it angled downward toward the field. This ensures it detects only objects within the field, not surrounding areas.
Solution for Potential Cause 2
Visual interference around the AI Vision Sensor can cause detection errors. Objects in the surrounding area (such as posters or clothing) that match the desired Color Signature may be mistakenly identified by the sensor. For more information on minimizing visual interference in your field setup, refer to Setting up Your Classroom Environment for Using the AI Vision Sensor.
Solution for Potential Cause 3
If a Color Signature is not configured with a wide enough Hue and/or Saturation level, it will not detect an object's Color Signature correctly, or it will detect colors that belong to incorrect objects. Read Configuring Color Signatures with the AI Vision Sensor in VEXcode V5 or watch Adjusting a Color Signature on PD+ for more information on how to configure a Color Signature so the AI Vision Sensor will accurately detect the desired color.
Solution for Potential Cause 4
Lighting conditions can significantly affect a color's hue and saturation. When configuring a Color Signature, the values will change depending on the current amount of light currently on the object.
If the amount of light changes, the same Color Signature may not be detected as accurately.
To fix this, ensure that where the AI Vision Sensor's Color Signature is being configured is the same as where the sensor will be used on the field, so the Color Signature detection remains consistent.