Skip to content

Commit

Permalink
fix(autoware_behavior_path_planner_common): fix passedByValue (autowa…
Browse files Browse the repository at this point in the history
…refoundation#8209)

* fix:clang format

Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>

* fix:passedByValue

Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>

* fix:passedByValue

Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>

---------

Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
  • Loading branch information
kobayu858 committed Jul 26, 2024
1 parent 7ba01a9 commit 5c01a9a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ MarkerArray createFootprintMarkerArray(
const std::string && ns, const int32_t & id, const float & r, const float & g, const float & b);

MarkerArray createPointsMarkerArray(
const std::vector<Point> points, const std::string & ns, const int32_t id, const float r,
const std::vector<Point> & points, const std::string & ns, const int32_t id, const float r,
const float g, const float b);

MarkerArray createPoseMarkerArray(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,16 @@ PathWithLaneId convertWayPointsToPathWithLaneId(
std::vector<size_t> getReversingIndices(const PathWithLaneId & path);

std::vector<PathWithLaneId> dividePath(
const PathWithLaneId & path, const std::vector<size_t> indices);
const PathWithLaneId & path, const std::vector<size_t> & indices);

void correctDividedPathVelocity(std::vector<PathWithLaneId> & divided_paths);

bool isCloseToPath(const PathWithLaneId & path, const Pose & pose, const double distance_threshold);

// only two points is supported
std::vector<double> splineTwoPoints(
std::vector<double> base_s, std::vector<double> base_x, const double begin_diff,
const double end_diff, std::vector<double> new_s);
const std::vector<double> & base_s, const std::vector<double> & base_x, const double begin_diff,
const double end_diff, const std::vector<double> & new_s);

std::vector<Pose> interpolatePose(
const Pose & start_pose, const Pose & end_pose, const double resample_interval);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ MarkerArray createFootprintMarkerArray(
}

MarkerArray createPointsMarkerArray(
const std::vector<Point> points, const std::string & ns, const int32_t id, const float r,
const std::vector<Point> & points, const std::string & ns, const int32_t id, const float r,
const float g, const float b)
{
auto marker = createDefaultMarker(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ std::vector<size_t> getReversingIndices(const PathWithLaneId & path)
}

std::vector<PathWithLaneId> dividePath(
const PathWithLaneId & path, const std::vector<size_t> indices)
const PathWithLaneId & path, const std::vector<size_t> & indices)
{
std::vector<PathWithLaneId> divided_paths;

Expand Down Expand Up @@ -445,8 +445,8 @@ bool isCloseToPath(const PathWithLaneId & path, const Pose & pose, const double

// only two points is supported
std::vector<double> splineTwoPoints(
std::vector<double> base_s, std::vector<double> base_x, const double begin_diff,
const double end_diff, std::vector<double> new_s)
const std::vector<double> & base_s, const std::vector<double> & base_x, const double begin_diff,
const double end_diff, const std::vector<double> & new_s)
{
assert(base_s.size() == 2 && base_x.size() == 2);

Expand Down

0 comments on commit 5c01a9a

Please sign in to comment.