<< return to Pixycam.com

Using rosserial with Pixy

Hi , can someone teach me how to use rosserial with Pixy? I’m clueless how to use publisher-subscriber nodes with Pixy. Thanks in advance.

I can help you with the Pixy side of things. What do you need help understanding?

Scott

Hi scott , thanks for the reply.

Well , what i am trying to understand is how the signatures are being calculated. Is there a specific code to execute the action? I need to use this calculation to put it into ros so that it can display what signatures are being detected.

Hope you can help in this one too :slight_smile: Cheers mate !

When detecting an object on Pixy, the signatures are used in the M0 core of the NXP processor to determine if the given pixels are in the color signature. This is performed as the pixel data is read from the camera sensor and then stored in shared memory. This memory is ready by the M4 core for sending to the outside world.

Is this what you were looking for? Please let me know what else I can help with.

Scott

Hi Scott , can you explain what the following header files are for?

Thank you so much in advance.

Pixy.h , PixyI2C.h , PixyUART.h TPixy.h and SPI.h

Hi,

Those header files contain the Pixy Arduino library code. They define how to interface with the different communication methods and what format the data is in when it is sent serially. For example, PixyI2C.h is the Arduino code that handles communicating with Pixy over the I2C interface.

SPI.h defines the methods that are used on the Pixy side for communicating over the SPI communication protocol.

Scott

Hi Scott

May I know that in the Arduino programming files, what is used to detect and output the signatures? Thanks :slight_smile:

Hi,

Arduino actually receives these signatures from Pixy over one of the communication protocols (UART, I2C, SPI, etc.). So none of the Pixy Arduino library source files contains code that performs the detection. Instead it just contains the code for communicating with the Pixy hardware.

The detection code is actually on the M0 side of the processor, which is also in the Github project.

Scott

Hi Scott, thanks for the reply.

Is there therefore anyway to extract the detection code which is responsible for the signature from the MO side of the processor?

Hi,

Are you looking for the run-lengths that are generated on the M0 side? Or you’re wanting to see the actual source code? If you want to see the code, you can find it on our “Github project”:https://github.com/charmedlabs/pixy/blob/master/device/libpixy/frame_m0.c.

Thanks.

Scott