Skip to content

Commit

Permalink
fix(autoware_frenet_planner): fix build error (autowarefoundation#8807)
Browse files Browse the repository at this point in the history
fix:build error

Signed-off-by: kobayu858 <[email protected]>
  • Loading branch information
kobayu858 authored Sep 9, 2024
1 parent d5f7339 commit c99ea5d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@

namespace autoware::frenet_planner
{
/// @brief generate trajectories relative to the reference for the given initial state and sampling
/// parameters
std::vector<Trajectory> generateTrajectories(
const autoware::sampler_common::transform::Spline2D & reference_spline,
const FrenetState & initial_state, const SamplingParameters & sampling_parameters);
/// @brief generate paths relative to the reference for the given initial state and sampling
/// parameters
std::vector<Path> generatePaths(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,27 @@

namespace autoware::frenet_planner
{
// cppcheck-suppress unusedFunction
std::vector<Trajectory> generateTrajectories(
const autoware::sampler_common::transform::Spline2D & reference_spline,
const FrenetState & initial_state, const SamplingParameters & sampling_parameters)
{
std::vector<Trajectory> trajectories;
trajectories.reserve(sampling_parameters.parameters.size());
for (const auto & parameter : sampling_parameters.parameters) {
auto trajectory = generateCandidate(
initial_state, parameter.target_state, parameter.target_duration,
sampling_parameters.resolution);
trajectory.sampling_parameter = parameter;
calculateCartesian(reference_spline, trajectory);
std::stringstream ss;
ss << parameter;
trajectory.tag = ss.str();
trajectories.push_back(trajectory);
}
return trajectories;
}

std::vector<Path> generatePaths(
const autoware::sampler_common::transform::Spline2D & reference_spline,
const FrenetState & initial_state, const SamplingParameters & sampling_parameters)
Expand Down

0 comments on commit c99ea5d

Please sign in to comment.