Skip to content

Commit

Permalink
fix(autoware_trajectory): autoware_trajectory bug (#9475)
Browse files Browse the repository at this point in the history
fix autoware_trajectory bug

Signed-off-by: Y.Hisaki <[email protected]>
  • Loading branch information
yhisaki authored Nov 27, 2024
1 parent 5b5a93c commit f23916f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common/autoware_trajectory/src/path_point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ std::vector<PointType> Trajectory<PointType>::restore(const size_t & min_points)
points.reserve(bases.size());
for (const auto & s : bases) {
PointType p;
p.pose = Trajectory<geometry_msgs::msg::Pose>::compute(s);
p.pose = Trajectory<geometry_msgs::msg::Pose>::compute(s - start_);
p.longitudinal_velocity_mps = static_cast<float>(this->longitudinal_velocity_mps.compute(s));
p.lateral_velocity_mps = static_cast<float>(this->lateral_velocity_mps.compute(s));
p.heading_rate_rps = static_cast<float>(this->heading_rate_rps.compute(s));
Expand Down
2 changes: 1 addition & 1 deletion common/autoware_trajectory/src/path_point_with_lane_id.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ std::vector<PointType> Trajectory<PointType>::restore(const size_t & min_points)
points.reserve(bases.size());
for (const auto & s : bases) {
PointType p;
p.point = BaseClass::compute(s);
p.point = BaseClass::compute(s - start_);
p.lane_ids = lane_ids.compute(s);
points.emplace_back(p);
}
Expand Down
2 changes: 1 addition & 1 deletion common/autoware_trajectory/src/pose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ std::vector<PointType> Trajectory<PointType>::restore(const size_t & min_points)
points.reserve(bases.size());
for (const auto & s : bases) {
PointType p;
p.position = BaseClass::compute(s);
p.position = BaseClass::compute(s - start_);
p.orientation = orientation_interpolator_->compute(s);
points.emplace_back(p);
}
Expand Down

0 comments on commit f23916f

Please sign in to comment.