eric-wieser/ros_numpy

ValueError: strides is not compatible with available memory

JackDeSomeTrades opened this issue · 1 comments

I am trying to subscribe to a msgfy-ied image and that is leading to a value error.

On the publisher side,

 imgpub = rospy.Publisher("/env_level/labelled_image", Image, queue_size=10)
 imgpub.publish(label_image)
def get_label_image():
        im = pilimg.open("label.png")  # Image from PIL
        label = np.asarray(im)
        print (np.shape(label))
        message = msgify(Image, label, encoding="mono8")
        message.height = np.shape(label)[1]
        message.width = np.shape(label)[0]
        return message

On the subscriber callback,

def lblimg_callback(self, lblimg_data):
      self.label_image = lblimg_data
      im = numpify(self.label_image)

Which leads to the error.

For information, np.intp is int64

Can you show the full error?