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)

Signed-off-by: satoshi-ota <[email protected]>
  • Loading branch information
satoshi-ota authored and MasatoSaeki committed Nov 11, 2024
1 parent 77ac8ca commit ebba16e
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 @@ -199,8 +199,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 ebba16e

Please sign in to comment.