Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix empty encoding in rectified image header #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vavanade
Copy link

In ArenaCameraNode::setupRectification method cv_bridge_img_rect_->encoding is given the value of img_raw_msg_.encoding but at that time the raw msg encoding value is empty since in ArenaCameraNode::startGrabbing it is given value ( img_raw_msg_.encoding = currentROSEncoding(); ) after ArenaCameraNode::setupRectification runs so the resulting encoding in cv_bridge_img_rect_ is empty and the /arena_camera_node/image_rect topic is broadcasted with empty encoding in the messages.

Getting the encoding of the rectified images by calling currentROSEncoding fixes the problem.

In `ArenaCameraNode::setupRectification` method `cv_bridge_img_rect_->encoding` is given the value of `img_raw_msg_.encoding` but at that time the raw msg encoding value is empty since in `ArenaCameraNode::startGrabbing` it is given value ( `img_raw_msg_.encoding = currentROSEncoding();` ) after `ArenaCameraNode::setupRectification` runs so the resulting encoding in `cv_bridge_img_rect_` is empty and the `/arena_camera_node/image_rect` topic is broadcasted with empty `encoding` in the messages.

Getting the encoding of the rectified images by calling `currentROSEncoding` fixes the problem.
@cyhunblr
Copy link

LGTM

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.

2 participants