Skip to content

Commit

Permalink
Properly forward the original header when decompressing image messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
rayferric committed Mar 25, 2024
1 parent 97d9fab commit bacfd77
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aruco_opencv/src/aruco_tracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,9 @@ class ArucoTracker : public rclcpp_lifecycle::LifecycleNode
{
// Decompress the image using bridge
auto image = cv_bridge::toCvCopy(img_msg, "bgr8");
callback_image(image->toImageMsg());
auto new_msg = image->toImageMsg();
new_msg->header = img_msg->header;
callback_image(new_msg);
}

void callback_image(const sensor_msgs::msg::Image::ConstSharedPtr img_msg)
Expand Down

0 comments on commit bacfd77

Please sign in to comment.