function [img,pose] = ExampleHelperSignFollowingProcessMsg(imgMsg,odomMsg)
% Extracts image and pose data from ROS 2 messages
% Copyright 2019 The MathWorks, Inc.

% Extract image -- assumes image size (640 x 480) and encoding (rgb8) are known
img = permute(reshape(imgMsg.data,[3 640 480]),[3 2 1]);

% Extract 2D pose
ori = odomMsg.pose.pose.orientation;
eul = quat2eul([ori.w, ori.x, ori.y, ori.z]);
pose = [odomMsg.pose.pose.position.x; ...
        odomMsg.pose.pose.position.y; ... 
        eul(1)];

end

