-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
invalidThis doesn't seem rightThis doesn't seem right
Description
Looking at the AI Vision documentation here: https://api.vex.com/aim/home/python/AI_Vision.html#exists
I can't make sense of the "exists" attribute. In the section on ball detection, the example code does this:
# Move forward if a sports ball is detected
while True:
ball = robot.vision.get_data(SPORTS_BALL)
if ball[0].exists:
robot.move_for(10, 0)
wait(50, MSEC)
But if there is no sports ball detected, get_data will return an empty list [ ], so ball[0] will cause an error.
Also, looking at the source code, the "exists" attribute is only mentioned once in the code, in aim.py, where it is set to True.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
invalidThis doesn't seem rightThis doesn't seem right