ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Not really a direct answer, but:
[..] TypeError: buffer is too small for requested array
These kind of errors are typically caused by the input byte array (in this case: img_msg.data
) not having the expected layout, and thus not the required number of bytes to successfully convert into the desired dtype
. That or the input array is really too small, for instance because of an incorrect assumption on image size / depth. See the Converting between ROS images and OpenCV images tutorial for some info on image encodings.
I'm not too familiar with imgmsg_to_cv2(..)
, but could it be that the images coming from your camera are not actually in the format that it expects?
The Bumblebee Reverse engineering Calibration question (and in particular the answer by William) also could be interesting.
2 | No.2 Revision |
Not really a direct answer, but:
[..] TypeError: buffer is too small for requested array
These kind of errors are typically caused by the input byte array (in this case: img_msg.data
) not having the expected layout, and thus not the required number of bytes to successfully convert into the desired dtype
. That or the input array is really too small, for instance because of an incorrect assumption on image size / depth. See the Converting between ROS images and OpenCV images tutorial for some info on image encodings.
I'm not too familiar with imgmsg_to_cv2(..)
, but could it be that the images coming from your camera are not actually in the format that it cv_bridge
expects?
The Bumblebee Reverse engineering Calibration question (and in particular the answer by William) also could be interesting.