Pros Vision Sensor errno 33

Hello all. I’m having an issue with the vision sensor. I am copy and pasting code from the official pros website tutorial and I continue to get the errno 33 error and I have no clue how to solve it. Code posted below. Please let me know if there some crucial piece of information that would help.

Capture

Could you copy the full error.

You do have a variable called errno which doesn’t seem to have been defined (Through it could be something pros defined). Also not sure what 33 means…

Edit: Ignore what I said
errno tutorialspoint.com

see the man page for errno

errno 33 is EDOM. you can usually find what that means by printing the output of strerror, like so:

printf("%s\n", strerror(errno));

In this case, you would have gotten something like “Mathematics argument out of domain of function” as an output.

You will also get useful results from googling something like “errno 33”.

Anyway, if we take a look at the documentation for vision_get_by_size, we can see that EDOM signifies “size_id is greater than the number of available objects.” Since you’re requesting the zeroth object, this in turn means that there are no objects detected.

4 Likes

also, for future reference, please prefer to post questions like this in the #edr-technical-support:pros-support category

2 Likes

Ok, that makes sense. and I’ll make sure to post it to the more fitting category next time.
So since it isn’t seeing any objects, even when I point it at random objects, what does the vision sensor define as an object? Or how could I create my own objects for it to identify?

At that point, it sounds like a problem with the configuration of the signatures. How are you doing that? In my experience, setting that up has been notoriously finnicky

In all honesty I just copy pasted and hoped it worked. So I have no configuration. What would be the best way to configure the signatures?

So the code you posted above is all you have? In that case, it’s no wonder it’s not detecting anything.

Check out this function to set signatures using data from the vex vision utility. If you installed PROS using the windows installer, the vision utility should also have been installed. Upon opening that you can use it to train the sensor to detect signatures, after which you should be able to copy (there’s a button at the bottom right, iirc) pretty much directly into the function I linked above.

2 Likes

This gives you an idea on how to set up the signatures.


However, there is no need to use VCS, you can use the utility that installs with PROS and then use the signature_from_utility function.

2 Likes

Thanks so much for your help!