Skip to content

Commit

Permalink
fix(crosswalk): don't use vehicle stop checker to remove unnecessary …
Browse files Browse the repository at this point in the history
…callback (autowarefoundation#9234) (#1630)

Signed-off-by: satoshi-ota <[email protected]>
Co-authored-by: Satoshi OTA <[email protected]>
  • Loading branch information
takayuki5168 and satoshi-ota authored Nov 8, 2024
1 parent 7d609fa commit f3fb4fa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,6 @@ CrosswalkModule::CrosswalkModule(

collision_info_pub_ =
node.create_publisher<tier4_debug_msgs::msg::StringStamped>("~/debug/collision_info", 1);

vehicle_stop_checker_ = std::make_unique<autoware::motion_utils::VehicleStopChecker>(&node);
}

bool CrosswalkModule::modifyPathVelocity(PathWithLaneId * path, StopReason * stop_reason)
Expand Down Expand Up @@ -1389,8 +1387,7 @@ void CrosswalkModule::planStop(
bool CrosswalkModule::checkRestartSuppression(
const PathWithLaneId & ego_path, const std::optional<StopFactor> & stop_factor) const
{
const auto is_vehicle_stopped = vehicle_stop_checker_->isVehicleStopped();
if (!is_vehicle_stopped) {
if (!planner_data_->isVehicleStopped()) {
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "autoware/behavior_velocity_crosswalk_module/util.hpp"

#include <autoware/behavior_velocity_planner_common/scene_module_interface.hpp>
#include <autoware/motion_utils/vehicle/vehicle_state_checker.hpp>
#include <autoware/universe_utils/geometry/boost_geometry.hpp>
#include <autoware/universe_utils/system/stop_watch.hpp>
#include <autoware_lanelet2_extension/regulatory_elements/crosswalk.hpp>
Expand Down Expand Up @@ -466,8 +465,6 @@ class CrosswalkModule : public SceneModuleInterface
// Debug
mutable DebugData debug_data_;

std::unique_ptr<autoware::motion_utils::VehicleStopChecker> vehicle_stop_checker_{nullptr};

// Stop watch
StopWatch<std::chrono::milliseconds> stop_watch_;

Expand Down

0 comments on commit f3fb4fa

Please sign in to comment.