Ask Your Question

Revision history [back]

I too am very interested and have approached this in a 'hack' sort of way as my 1st cut but hope to implement a true ROS node with Pixy as my next step. I am not suggesting this is clean, I am only putting it forth as an unclean alternative that some may benefit from till a clean solution is devised.

My solution is that I have hacked the linux (Raspberry PI) hello code to stuff it's results to shared memory segment. My current ROS node then inspects this shared memory with both processes only accessing the shared memory segment using a system V semaphore so it is safe for the producer (hello code) and consumer (ROS node). My ROS node then inspects memory and passes what it finds over via a ROS topic to my main node which is the end consumer of the Pixy object recognition data. All this then means the pixy.h and pixydef.h includes and a definition of the named shared memory segment of my own .h file are all the ROS node need see as it compiles. This works but I agree is a bit of a 'hack' if you will as I have to start the pixy converted 'hello' process outside of my roslaunch config file.

Just a thought and maybe it will be a reasonable short term solution for others in the mean time as we strive to get the code to operate as a true ROS node which of course is the 'right' way to deal with this issue.