Closed ericlai0323 closed 1 month ago
This is the error message.
[ERROR] [1706936026.447987]: Error processing request: cannot reshape array of size 921600 into shape (360,640,3)
['Traceback (most recent call last):\n', ' File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_service.py", line 633, in _handle_request\n response = convert_return_to_response(self.handler(request), self.response_class)\n', ' File "/home/ericlai/testdynamicvins_ws/src/yolo_ros/src/yolo_bridge/yolo_bridge.py", line 67, in request_handle\n img0 = rnp.numpify(req.image)\n', ' File "/opt/ros/noetic/lib/python3/dist-packages/ros_numpy/registry.py", line 42, in numpify\n return conv(msg, *args, **kwargs)\n', ' File "/opt/ros/noetic/lib/python3/dist-packages/ros_numpy/image.py", line 72, in image_to_numpy\n data = np.fromstring(msg.data, dtype=dtype).reshape(shape)\n', 'ValueError: cannot reshape array of size 921600 into shape (360,640,3)\n']
[ERROR] [1706936026.449774164]: Service call failed: service [/yolo_service] responded with an error: error processing request: cannot reshape array of size 921600 into shape (360,640,3)
Hi, it seems that the width and height didn't set right. As 921600 looks like 480x640x3.
I'm facing an issue when using ZED2. I've configured various parameters, but upon execution, I encounter an error. The problem seems to be related to the image format conversion when YOLO frontend receives the image. Could you please provide any solutions or insights regarding this error?
Thank you!!
Below is my config and launch file: