Skip to content

Commit 379ccbc

Browse files
committed
Adding scurve function to take smoother step as function of normalized position
1 parent 9593300 commit 379ccbc

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

GEMstack/onboard/planning/longitudinal_planning.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
DEBUG = False # Set to False to disable debug output
1212

13+
def scurve(x):
14+
x = np.clip(x, 0.0, 1.0)
15+
return 6 * x**5 - 15 * x**4 + 10 * x**3
1316

1417
def generate_dense_points(points: List[Tuple[float, float]], density: int = 10) -> List[Tuple[float, float]]:
1518
if not points:

0 commit comments

Comments
 (0)