function f = vehicle_center(state, P)
% compute a vehicle frame using its road frame
% and lane ey-offset

road = P.roads(state.road_id);
lane = road.lanes(state.lane_id);
fh = road.frame*[state.x;
                 state.ey;
                 1];
f = fh(1:2);