Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(velocity_smoother): change method to take data for external velocity #7810

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions planning/autoware_velocity_smoother/src/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ void VelocitySmootherNode::onCurrentTrajectory(const Trajectory::ConstSharedPtr
// receive data
current_odometry_ptr_ = sub_current_odometry_.takeData();
current_acceleration_ptr_ = sub_current_acceleration_.takeData();
external_velocity_limit_ptr_ = sub_external_velocity_limit_.takeData();
external_velocity_limit_ptr_ = sub_external_velocity_limit_.takeNewData();
const auto operation_mode_ptr = sub_operation_mode_.takeData();
if (operation_mode_ptr) {
operation_mode_ = *operation_mode_ptr;
Expand Down Expand Up @@ -455,9 +455,6 @@ void VelocitySmootherNode::onCurrentTrajectory(const Trajectory::ConstSharedPtr
calcExternalVelocityLimit();
updateDataForExternalVelocityLimit();

// ignore current external velocity limit next time
external_velocity_limit_ptr_ = nullptr;

// For negative velocity handling, multiple -1 to velocity if it is for reverse.
// NOTE: this process must be in the beginning of the process
is_reverse_ = isReverse(input_points);
Expand Down
Loading