Hi Nicolas!,
So I think you are right in that the manifolds would be setup as a constraint on acceptable states in the state space. Although in the future I could see probability outcome of a collision being modelled as a manifold of sorts and optimize on that manifold to find the optimal state to get a favorable outcome of the collision, but I digress.
I believe my state variables would be the following:
state = [car-position, car-velocity, car-orientation, car-angular_velocity, ball-pos, ball-velocity, ball-orientation, ball-angular_velocity]
car-position and ball-position are in R3, constrained by the shell of the manifold of the field and inside that manifold.
car-velocity is in R3, but constrained by { sqrt(vx^2 + vy^2 + vz^2) <= 2300 }, ball-velocity is in R3 constrained by {
sqrt(vx^2 + vy^2 + vz^2) <= 6000 }
car-orientation is a unit quaternion, ball-orientation is irrelevant and doesn't affect dynamics of the system
car-angular_velocity is in R3, but constrained by { sqrt(wx^2 + wy^2 + wz^2) <= 5.5 }, similar for the ball-angular_velocity
The first cost function I'm trying to minimize is: [given an initial car and ball state, minimize{(car-position - ball-position)^2 + (tf - t0) } ]by changing the inputs over time.
But I need to keep in mind that the system has two "dynamic states", one flying and one driving and specifically when transitioning from the driving dynamic state to the flying dynamic state, the velocity of the system increases immediately normal to the manifold it's driving on (this is referred to as a jump, there is also a double jump, but I think once I can model a jump a double jump should be fairly easy). And the system can also "land" back onto the manifold to change back to the driving state which has a different set of dynamical equations from the flying state. Also to make it clear the ball will undergo standard projectile motion and undergo elastic collision when it collides with the field manifold (the collision I would like to model, but I believe this comes up as a discontinuity so I think I'll start by not modelling this unless this type of discontinuity is easy to model).
I think showing a small video will maybe help visualize what I imagine. I've attached it as a gif (example traj.gif). In this case this is not an optimal trajectory by any means but just to show what the field looks like and the dynamics as well as the transition from driving to flying. In this case the ball is in the center of the field and not moving, but in reality the ball will be moving through the air in some way which the car is to intercept. Also you can see that there is an acceleration due to throttle as well as a separate acceleration due to "boost" which can be used both when driving or flying (i just happened to show an example where I didn't use boost while driving).
I hope I was able to provide you with what you were asking, if this is too complex to start, the first problem to tackle could be just driving to some point on the manifold in minimum time given some initial state and some desired final state (removing the ball from the equation and removing driving-flying state transition as well).
Best,
Michael Giglia