Skip to content

Commit

Permalink
fix(resample): remove duplicated poinnt before resampling
Browse files Browse the repository at this point in the history
Signed-off-by: Takamasa Horibe <[email protected]>
  • Loading branch information
TakaHoribe committed Sep 14, 2023
1 parent 87e9ebf commit 096f1ca
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions common/motion_utils/src/resample/resample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,16 @@ std::vector<geometry_msgs::msg::Point> resamplePointVector(
}

std::vector<geometry_msgs::msg::Pose> resamplePoseVector(
const std::vector<geometry_msgs::msg::Pose> & points,
const std::vector<geometry_msgs::msg::Pose> & points_raw,
const std::vector<double> & resampled_arclength, const bool use_akima_spline_for_xy,
const bool use_lerp_for_z)
{
// Remove overlap points for resampling
const auto points = motion_utils::removeOverlapPoints(points_raw);

// validate arguments
if (!resample_utils::validate_arguments(points, resampled_arclength)) {
return points;
return points_raw;
}

std::vector<geometry_msgs::msg::Point> position(points.size());
Expand Down

0 comments on commit 096f1ca

Please sign in to comment.