Convert Float32MultiArray msg to numpy ndarray

asked 2019-01-25 15:31:08 -0500

rupertbayern gravatar image

Hello,

my node subscribes to a list with std_msgs/Float32MultiArray[] messages. The list has 3 elements. Each element is a Float32MultiArray[] and has a dimension of (512,512)

This never changes. I need to feed this message to another programm. But this programm requires numpy ndarrays as input as it uses the numpy.tobytes() function. Therefore I need to convert this Multiarray message to a numpy ndarray. What is the best way to do this?

Thanks

edit retag flag offensive close merge delete

Comments

Can you check whether the packages/solutions mentioned in #q301200 work for you?

gvdhoorn gravatar imagegvdhoorn ( 2019-01-27 03:07:26 -0500 )edit