Sign in to follow this  
cuticle

Determining a Path through a Point in Space

Recommended Posts

cuticle    126
So I've been playing with SC2 lately and came up with an interesting way to control ship battles. Your ship is always moving through space, and to control where it goes, you select a point you want the ship to reach pretty soon in the future. So I'm thinking that when the order is made, I map out a spline using the initial position/velocity and final position, then follow it until I get to the end. The problem is that I can't figure out how to derive that spline, especially considering that I want to keep a fixed velocity and limit turn speed. Can someone help me figure out that spline? Or maybe I'm going in the wrong direction?

Share this post


Link to post
Share on other sites
hiigara    108
Do you want the Path to be optimized? If so it will be complex to solve. It's a Control Problem, an Area of Research in Robotics you may want to google for.
If you don't care whether it will be the fastest Path, then it's just a Curve Fitting problem. If you don't find any article about fitting a Spline, I suggest you try quadratic or cubic interpolation.

[Edited by - hiigara on April 26, 2010 7:15:08 PM]

Share this post


Link to post
Share on other sites
Emergent    982
The simplest thing to do would be to just use a simple steering behavior for your ship, rather than planning a spline. In particular, you're probably interested in the seek behavior.

If instead you want time-optimal bounded-curvature paths, then you want the Dubins or even Reeds-Shepp curves.

Share this post


Link to post
Share on other sites
LorenzoGatti    4442
Quote:
Original post by Emergent
The simplest thing to do would be to just use a simple steering behavior for your ship, rather than planning a spline. In particular, you're probably interested in the seek behavior.

If instead you want time-optimal bounded-curvature paths, then you want the Dubins or even Reeds-Shepp curves.


A steering behaviour on top of a rigorous dynamic model (apply limited torques and forces to maintain a certain speed and turn in the desired direction) is not only easier to implement, perfectly suitable for your requirement to constraint angular and linear velocity, and adaptable to moving/changing targets, but also always consistent and good looking: no parametrization issues, no discontinuities, no approximations other than your integration scheme.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this