Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

how to publish a list of numpy arrays

Hello,

I have trouble when publishing a list of numpy arrays (results got from cv2.findContours function), e.g.: [array([[[100, 70]], [[90, 70]], ...], dtype=int32), array(...., dtype=int32), ....]

Is there any good way to publish the whole list? Like:

Header header
NumpyArray[] data

I tried the tutorial for using numpy with rospy (http://wiki.ros.org/rospy_tutorials/Tutorials/numpy), but seems only work if publishing one 1d numpy array.

Thanks a lot in advance!