how to publish a list of numpy arrays

asked 2014-09-11 09:31:03 -0600

Xu gravatar image

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/T... ), but seems only work if publishing one 1d numpy array.

Thanks a lot in advance!

edit retag flag offensive close merge delete