<< return to Pixycam.com

No blocks found with get_blocks.py

Hi everyone,

I can’t get pixy to track anything using a python script. I followed this example:
http://cmucam.org/projects/cmucam5/wiki/Building_libpixyusb_as_a_Python_module_on_Linux

and got the python script to run. I added in some code to print a message to confirm that it is getting to the while loop (i.e. it’s not getting stuck at pixy_get_blocks as some posts on here had). Other than what I added in, the only output I get is the first print statement: “Pixy Python SWIG Example – Get Blocks”.

I’m using a CMUcam5 Pixy with a Raspberry Pi 3 running NOOBS.

I’ve used PixyMon on a windows computer to get an idea of what to expect from the program and learn how to teach pixy different signatures, so I’m fairly familiar with that.

I also got the pixy to track objects as expected through the Pi using terminal commands, following this example:
http://www.cmucam.org/projects/cmucam5/wiki/Hooking_up_Pixy_to_a_Raspberry_Pi

The trouble just seems to occur when I try using python.

Any help would be greatly appreciated.

Hello Luke,
Sorry for the problem. Did you get the hello_pixy example working?

http://cmucam.org/projects/cmucam5/wiki/Hooking_up_Pixy_to_a_Raspberry_Pi

Edward

Hi Edward,

Yes, I got hello_pixy working without a problem.

Luke

Hi Luke,
I’m just guessing, but maybe there is a regression(?) We’ll try to reproduce on our end.

Edward

Hi Edward,

I’m not sure what a regression is in this context, but I appreciate you looking into it. Anything else I can try? Again, I did get the Pixy to find blocks as expected in the hello_pixy example; it’s just when I switched to Python that the errors occurred.

Luke

Hello Luke,
The developer that added Python support will take a look in the next couple of days on a Rpi 3 and the latest NOOBS. We’ll get back to you soon.

Edward

Luke,

Questions:

What version (git commit) of the pixy git respository are you using?

What firmware version is on your pixy?

Could you post your python code somewhere?

Thanks,
John