A linear polymer grafted to a hard wall and underneath an AFM tip can be modelled in a lattice as a grafted lattice polymer (or self-avoiding walk) compressed underneath a piston approaching the wall. As the piston approaches the wall the increasingly confined polymer escapes from the confined region to explore conformations beside the piston. This conformational change is believed to be a phase transition in the thermodynamic limit, and has been argued to be first order, based on numerical results in reference [12]. In this paper a lattice self-avoiding walk model of the escape transition is constructed. It is proven that this model has a critical point in the thermodynamic limit corresponding to the escape transition of grafted linear polymers being compressed by a piston. This result relies on the analysis of ballistic self-avoiding walks in slits and slabs in the square and cubic lattices. Additionally, numerical estimates of the location of the escape transition critical point is reported based on Monte Carlo simulations of self-avoiding walks in slits and in slabs.