def ref_cb(msg): global odom vehicle_pub.publish(PoseStamped(pose=msg.pose.pose, header=msg.header)) odom = msg