@@ -32,7 +32,7 @@ PathGenerator::PathGenerator(
32
32
{
33
33
}
34
34
35
- PredictedPath PathGenerator::generatePathForNonVehicleObject (const TrackedObject & object)
35
+ PredictedPath PathGenerator::generatePathForNonVehicleObject (const TrackedObject & object) const
36
36
{
37
37
return generateStraightPath (object);
38
38
}
@@ -143,13 +143,13 @@ PredictedPath PathGenerator::generatePathForLowSpeedVehicle(const TrackedObject
143
143
return path;
144
144
}
145
145
146
- PredictedPath PathGenerator::generatePathForOffLaneVehicle (const TrackedObject & object)
146
+ PredictedPath PathGenerator::generatePathForOffLaneVehicle (const TrackedObject & object) const
147
147
{
148
148
return generateStraightPath (object);
149
149
}
150
150
151
151
PredictedPath PathGenerator::generatePathForOnLaneVehicle (
152
- const TrackedObject & object, const PosePath & ref_paths, const double speed_limit)
152
+ const TrackedObject & object, const PosePath & ref_paths, const double speed_limit) const
153
153
{
154
154
if (ref_paths.size () < 2 ) {
155
155
return generateStraightPath (object);
@@ -178,7 +178,7 @@ PredictedPath PathGenerator::generateStraightPath(const TrackedObject & object)
178
178
}
179
179
180
180
PredictedPath PathGenerator::generatePolynomialPath (
181
- const TrackedObject & object, const PosePath & ref_path, const double speed_limit)
181
+ const TrackedObject & object, const PosePath & ref_path, const double speed_limit) const
182
182
{
183
183
// Get current Frenet Point
184
184
const double ref_path_len = motion_utils::calcArcLength (ref_path);
@@ -210,7 +210,8 @@ PredictedPath PathGenerator::generatePolynomialPath(
210
210
}
211
211
212
212
FrenetPath PathGenerator::generateFrenetPath (
213
- const FrenetPoint & current_point, const FrenetPoint & target_point, const double max_length)
213
+ const FrenetPoint & current_point, const FrenetPoint & target_point,
214
+ const double max_length) const
214
215
{
215
216
FrenetPath path;
216
217
const double duration = time_horizon_;
@@ -252,7 +253,7 @@ FrenetPath PathGenerator::generateFrenetPath(
252
253
}
253
254
254
255
Eigen::Vector3d PathGenerator::calcLatCoefficients (
255
- const FrenetPoint & current_point, const FrenetPoint & target_point, const double T)
256
+ const FrenetPoint & current_point, const FrenetPoint & target_point, const double T) const
256
257
{
257
258
// Lateral Path Calculation
258
259
// Quintic polynomial for d
@@ -278,7 +279,7 @@ Eigen::Vector3d PathGenerator::calcLatCoefficients(
278
279
}
279
280
280
281
Eigen::Vector2d PathGenerator::calcLonCoefficients (
281
- const FrenetPoint & current_point, const FrenetPoint & target_point, const double T)
282
+ const FrenetPoint & current_point, const FrenetPoint & target_point, const double T) const
282
283
{
283
284
// Longitudinal Path Calculation
284
285
// Quadric polynomial
@@ -296,7 +297,7 @@ Eigen::Vector2d PathGenerator::calcLonCoefficients(
296
297
}
297
298
298
299
PosePath PathGenerator::interpolateReferencePath (
299
- const PosePath & base_path, const FrenetPath & frenet_predicted_path)
300
+ const PosePath & base_path, const FrenetPath & frenet_predicted_path) const
300
301
{
301
302
PosePath interpolated_path;
302
303
const size_t interpolate_num = frenet_predicted_path.size ();
@@ -356,7 +357,8 @@ PosePath PathGenerator::interpolateReferencePath(
356
357
}
357
358
358
359
PredictedPath PathGenerator::convertToPredictedPath (
359
- const TrackedObject & object, const FrenetPath & frenet_predicted_path, const PosePath & ref_path)
360
+ const TrackedObject & object, const FrenetPath & frenet_predicted_path,
361
+ const PosePath & ref_path) const
360
362
{
361
363
PredictedPath predicted_path;
362
364
predicted_path.time_step = rclcpp::Duration::from_seconds (sampling_time_interval_);
@@ -385,7 +387,7 @@ PredictedPath PathGenerator::convertToPredictedPath(
385
387
}
386
388
387
389
FrenetPoint PathGenerator::getFrenetPoint (
388
- const TrackedObject & object, const PosePath & ref_path, const double speed_limit)
390
+ const TrackedObject & object, const PosePath & ref_path, const double speed_limit) const
389
391
{
390
392
FrenetPoint frenet_point;
391
393
const auto obj_point = object.kinematics .pose_with_covariance .pose .position ;
0 commit comments