Skip to content

Commit

Permalink
fix(lane_change, pull_over): fix predicted path size is small case (#517
Browse files Browse the repository at this point in the history
)

* fix(lane_change):fix predicted path size is small case

* fix(pull_over):fix predicted path size is small case
  • Loading branch information
1222-takeshi committed Mar 22, 2022
1 parent 7978610 commit 8a00f2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ bool isLaneChangePathSafe(
const auto & obj = dynamic_objects->objects.at(i);
std::vector<PredictedPath> predicted_paths;
if (ros_parameters.use_all_predicted_path) {
predicted_paths.resize(obj.kinematics.predicted_paths.size());
std::copy(
obj.kinematics.predicted_paths.begin(), obj.kinematics.predicted_paths.end(),
predicted_paths.begin());
Expand Down Expand Up @@ -425,6 +426,7 @@ bool isLaneChangePathSafe(
const auto & obj = dynamic_objects->objects.at(i);
std::vector<PredictedPath> predicted_paths;
if (ros_parameters.use_all_predicted_path) {
predicted_paths.resize(obj.kinematics.predicted_paths.size());
std::copy(
obj.kinematics.predicted_paths.begin(), obj.kinematics.predicted_paths.end(),
predicted_paths.begin());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ bool isPullOverPathSafe(
const auto & obj = dynamic_objects->objects.at(i);
std::vector<PredictedPath> predicted_paths;
if (ros_parameters.use_all_predicted_path) {
predicted_paths.resize(obj.kinematics.predicted_paths.size());
std::copy(
obj.kinematics.predicted_paths.begin(), obj.kinematics.predicted_paths.end(),
predicted_paths.begin());
Expand Down Expand Up @@ -459,6 +460,7 @@ bool isPullOverPathSafe(
const auto & obj = dynamic_objects->objects.at(i);
std::vector<PredictedPath> predicted_paths;
if (ros_parameters.use_all_predicted_path) {
predicted_paths.resize(obj.kinematics.predicted_paths.size());
std::copy(
obj.kinematics.predicted_paths.begin(), obj.kinematics.predicted_paths.end(),
predicted_paths.begin());
Expand Down

0 comments on commit 8a00f2b

Please sign in to comment.