21 custom_interfaces::msg::Pose vehicle_state;
22 vehicle_state.x = msg.pose.pose.position.x;
23 vehicle_state.y = msg.pose.pose.position.y;
24 vehicle_state.theta = atan2(2.0f * (msg.pose.pose.orientation.w * msg.pose.pose.orientation.z +
25 msg.pose.pose.orientation.x * msg.pose.pose.orientation.y),
26 msg.pose.pose.orientation.w * msg.pose.pose.orientation.w +
27 msg.pose.pose.orientation.x * msg.pose.pose.orientation.x -
28 msg.pose.pose.orientation.y * msg.pose.pose.orientation.y -
29 msg.pose.pose.orientation.z * msg.pose.pose.orientation.z);