From b89697d7abd1b3ea6b07423badc2c6428c34eab5 Mon Sep 17 00:00:00 2001 From: Go Sakayori Date: Wed, 3 Jul 2024 21:57:00 +0900 Subject: [PATCH] refactor external velocity Signed-off-by: Go Sakayori --- planning/autoware_velocity_smoother/src/node.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/planning/autoware_velocity_smoother/src/node.cpp b/planning/autoware_velocity_smoother/src/node.cpp index 5c66f5b906bba..b881b68798cdc 100644 --- a/planning/autoware_velocity_smoother/src/node.cpp +++ b/planning/autoware_velocity_smoother/src/node.cpp @@ -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; @@ -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);