I've done this to some extent in a commercial multibody code. I've been modelling basic control above walking pace for quite a while using a PID controller on steer torque and with roll angle as a target. With relaxation in the tires, it takes a little more tuning but without it, it works very easily.
I also hooked in throttle and brake torques and I can set a front wheel spindle height target for a wheelie, rear wheel spindle target height for a stoppie (endo).
What was much more interesting was that I was able to drift the motorcycle using a target rear wheel spin state with no real modifications to the basic controller, even to the point of lifting the front wheel crossed up. If you drop the spin state target mid drift, the bike high-sides and if you are too greedy based on the current lean angle, the bike low sides. It all played out very uncontroversially. Which is not to say I can do it in real life...
Damian