Spline Profile
SplineProfile
Spline profile saving several values such as velocity, acceleration and jerk for interpolation at arc length. Note that this spline profile uses a downsampled reference path that only goes from initial state to goal state.
Source code in commonroad_velocity_planner/spline_profile.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
|
acceleration_profile: np.ndarray
property
Returns:
Type | Description |
---|---|
ndarray
|
(n,) acceleration profile per point |
acceleration_spline: CubicSpline
property
Returns:
Type | Description |
---|---|
CubicSpline
|
(n,) acceleration spline |
goal_velocity: float
property
Returns:
Type | Description |
---|---|
float
|
goal velocity |
jerk_profile: np.ndarray
property
Returns:
Type | Description |
---|---|
ndarray
|
(n,) jerk profile per point |
path_length_per_point: np.ndarray
property
Returns:
Type | Description |
---|---|
ndarray
|
(n,) interpoint arc length |
velocity_profile: np.ndarray
property
Returns:
Type | Description |
---|---|
ndarray
|
(n,) velocity profile per foint |
velocity_spline: CubicSpline
property
Returns:
Type | Description |
---|---|
CubicSpline
|
velocity polyspline for interpolating between points |
__init__(path_length_per_point, velocity_profile, acceleration_profile=None, goal_velocity=0.01)
Spline profile saving several values such as velocity, acceleration and jerk for interpolation at arc length.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path_length_per_point
|
ndarray
|
arc length at point |
required |
velocity_profile
|
ndarray
|
velocity profile as np.ndarray |
required |
acceleration_profile
|
ndarray
|
acceleration profile as np.ndarray |
None
|
goal_velocity
|
float
|
default goal velocity. |
0.01
|
Source code in commonroad_velocity_planner/spline_profile.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
|
interpolate_acceleration_at_arc_lenth(s, goal_acceleration=0)
Interpoalte acceleration at arc length
Parameters:
Name | Type | Description | Default |
---|---|---|---|
s
|
[ndarray]
|
arc |
required |
goal_acceleration
|
float
|
after the goal, this acceleration is taken |
0
|
Returns:
Type | Description |
---|---|
[ndarray]
|
interpolation acceleration as np.ndarry |
Source code in commonroad_velocity_planner/spline_profile.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
|
interpolate_velocity_at_arc_lenth(s, clip_min=0.0, goal_velocity=None)
Interpoalte velocity at arc length
Parameters:
Name | Type | Description | Default |
---|---|---|---|
s
|
[ndarray]
|
arc |
required |
clip_min
|
float
|
clip at minimum value |
0.0
|
goal_velocity
|
float
|
after the goal, this velocity is taken |
None
|
Returns:
Type | Description |
---|---|
[ndarray]
|
interpolation velocity as np.ndarry |
Source code in commonroad_velocity_planner/spline_profile.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
|