Skip to content

Conversation

Cryst4L9527
Copy link

@Cryst4L9527 Cryst4L9527 commented Oct 28, 2022

In addition, considering the error when transferring the information and other noise, we mutate some of the image message and there will be a crash like following:

maze_solver:
Traceback (most recent call last):
  File "/opt/ros/foxy/lib/python3.8/site-packages/cv_bridge/core.py", line 191, in imgmsg_to_cv2
    res = cvtColor2(im, img_msg.encoding, desired_encoding)
RuntimeError: OpenCV(4.2.0) ../modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'

It's because of a mutation of the message's width and height data, causing the cvtColor2 memset a zero-size src to transfer.
Although it may be hard to happen in a stable simulation environment, we hope it can be addressed as a robust feature.

@Cryst4L9527
Copy link
Author

Maybe you can just confirm this? Just a small change of codes for better robustness, it won't change the main functions of this program.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant