   Steering question - arrive at angle?
  Hi everyone,I'm trying to tackle a problem I thought would be straight forward but turn out to be quite a headache. I'm trying to simulate a car switching lanes, and want the motion to be as natural as possible. The player does not control the car's motion, it only presses the right/left keys and the car switches to the lane on the right/left. Since my car is actually modeled with wheels/steering (in box2d) I need to calculate the appropriate steering angle on each frame so it will get from point A (lane 1) to point B (lane 2), and it's important that it ends up in a 100% straight heading forward (so it will continue it's motion forward after the lane switch is complete). My question is how would you go about achieving this? Is there a way to use the "arrive" steering behavior to my advantage here, and make sure the the object ends up at a certain angle when he arrives?Thanks!   
  Is your car the simple Dubins modeldx/dt = v cos(theta)dy/dt = v sin(theta)dtheta/dt = omegawhere u = (v, omega) is your control input?  Or the Reeds-Shepp model?  Or something more complicated?  Personally, in order to help I find a model of the formdx/dt = f(x, u)(where u is a control input), extremely helpful for talking about these problems.[Edited by - Emergent on May 17, 2010 1:28:43 PM];  i'm sorry, but I'm afraid I'm not familiar with the theory behind the car model I'm using. Here's the reference code I'm using:http://www.emanueleferonato.com/2009/04/06/two-ways-to-make-box2d-cars/If you can point me to relevant reading material that would help, a google search came up with some very heavy weight academic articles I couldn't really wrap my head around. Thanks for helping out :)   ;  It seems like it would be difficult for me to write down an exact model for the ODEs that Box2d is solving there, but I also think that the Reeds-Shepp model probably captures everything of interest, so it's probably good enough for our purposes (of designing a controller).  It is,(from here).I'll post some thoughts on how to control this a bit later...   ;  I don't know if this is too advanced, but you may want to try using the approach outlined in section 2.3 of this document, for the car illustrated on p.181 (p.12 of the PDF).  Once you have the system in chained form, it is linear and you can design a stabilizing controller for it by e.g. pole placement.I'm afraid that I'm pushing you into material that's frankly too advanced though... I may be able to walk you through it later, or maybe somebody else can come along and suggest something simpler...   ;  It is too advanced I'm afraid. Thanks for the in depth reply and your assistance so far :)I'm actually making progress on my own and may provide a solution if I can make it work well. I'd still appreciate any help/advice from others though.