[ros-users] 2d numpy arr msgs?

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
Delete this message
Reply to this message
Author: Floris van Breugel
Date:  
To: ros-users
Subject: [ros-users] 2d numpy arr msgs?
Hi folks,

Is there a way to publish 2D numpy arrays as messages (using python)? I went
through the numpy tutorial for rospy but it seems to only work for 1D
arrays. I suppose one could reshape the 2D array to be 1D, and pass the
shape as another message, and then reconstruct it on the other side, but
maybe there's a more efficient way to do it? Or that functionality could be
added to numpy_msg.py?
http://www.ros.org/wiki/rospy_tutorials/Tutorials/numpy

Thanks!

- Floris



--
Floris van Breugel
Caltech Graduate Student
Control and Dynamical Systems
(925) 963 8280

Wildlife and Landscape Photographer
Galleries: http://www.ArtInNaturePhotography.com/
Blog: http://www.ArtInNaturePhotography.com/wordpress/
2010 CALENDARS! Now available on my website!