hbanzhaf / steering_functions

Apache License 2.0
229 stars 94 forks source link

Extra loops in a u-turn case - reloaded #6

Closed jcsantamaria closed 5 years ago

jcsantamaria commented 5 years ago

Hi Holger,

This new case generate unnecessary loops.

`

// construct cc dubins engine
CC_Dubins_State_Space cc_dubins_forwards_ss(0.481125176, 0.0218166150, 1.0, true);

// initial start
steer::State start(0.0,-18.288, 3.1415927410125732, 0.0, 1.0);
steer::State goal(0.0, 0.0, 0.0, 0.0, 0.0);

std::vector<steer::State> path = cc_dubins_forwards_ss.get_path(start, goal);

` The resulting path has extra loops: image

hbanzhaf commented 5 years ago

Hi Juan, Thank you for the update. So the path that you have visualized is composed of a CC turn (deflection = 1.736pi), a straight line, and another CC turn (deflection = 0.7359pi). As described in https://github.com/hbanzhaf/steering_functions/issues/5#issuecomment-504178604, a valid elementary path only exists for deflections smaller than 1.462595458pi. That's the reason why in your case, the steering function selects a regular CC turn at the beginning (vehicle is steered to maximum curvature) and an elementary path at the end. From my point of view, the path seems to be correct. To convince yourself, you can also try to visualize a regular CC turn offline with deflection = 1.736pi and the given curvature and curvature rate constraints.

jcsantamaria commented 5 years ago

Hi Holger, Yes, I agree this solution is a feasible path. I guess I was expecting more of the traditional "bulb" turn for a full 180 deflection (ie. the kind of turn seen in the solutions to issue #4 and #5).