Global Trajectory
GlobalTrajectory
dataclass
Output class, containing the reference path, with velocity and acceleration profile as well as all information of the CR reference_path it was generated with.
Source code in commonroad_velocity_planner/global_trajectory.py
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 |
|
check_integrity()
Checks integrity of data class
Source code in commonroad_velocity_planner/global_trajectory.py
62 63 64 65 66 67 68 69 70 71 72 73 |
|
get_closest_idx(point)
Get idx of closest point on global trajectory
Parameters:
Name | Type | Description | Default |
---|---|---|---|
point
|
ndarray
|
(2,) numpy array |
required |
Returns:
Type | Description |
---|---|
int
|
index |
Source code in commonroad_velocity_planner/global_trajectory.py
75 76 77 78 79 80 81 82 83 |
|
get_closest_point(point)
Get idx and coords of closest point on global trajectory
Parameters:
Name | Type | Description | Default |
---|---|---|---|
point
|
ndarray
|
|
required |
Returns:
Type | Description |
---|---|
Tuple[int, ndarray]
|
|
Source code in commonroad_velocity_planner/global_trajectory.py
85 86 87 88 89 90 91 92 |
|
get_velocity_at_position_with_lookahead(position, lookahead_s=2.0)
Get velocity at position. Uses closest point of global trajectory
Parameters:
Name | Type | Description | Default |
---|---|---|---|
position
|
ndarray
|
(2,) position array |
required |
Returns:
Type | Description |
---|---|
float
|
velocity |
Source code in commonroad_velocity_planner/global_trajectory.py
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 |
|
factory_from_reference_path_and_velocity_profile(reference_path, velocity_planning_problem, velocity_profile)
Factory method from cr reference_path and velocity profile.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
reference_path
|
ReferencePath
|
|
required |
velocity_planning_problem
|
VelocityPlanningProblem
|
|
required |
velocity_profile
|
SplineProfile
|
|
required |
Returns:
Type | Description |
---|---|
GlobalTrajectory
|
|
Source code in commonroad_velocity_planner/global_trajectory.py
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 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
|