Skip to content

Commit

Permalink
fix(motion_utils): fix build error (autowarefoundation#5404) (#982)
Browse files Browse the repository at this point in the history
Signed-off-by: Fumiya Watanabe <[email protected]>
  • Loading branch information
rej55 authored Oct 25, 2023
1 parent 3c8a8c7 commit a1beca1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ class VehicleStopChecker : public VehicleStopCheckerBase

protected:
rclcpp::Subscription<Odometry>::SharedPtr sub_odom_;
Odometry::SharedPtr odometry_ptr_;
Odometry::ConstSharedPtr odometry_ptr_;

private:
static constexpr double velocity_buffer_time_sec = 10.0;
void onOdom(const Odometry::SharedPtr msg);
void onOdom(const Odometry::ConstSharedPtr msg);
};

class VehicleArrivalChecker : public VehicleStopChecker
Expand All @@ -74,9 +74,9 @@ class VehicleArrivalChecker : public VehicleStopChecker

rclcpp::Subscription<Trajectory>::SharedPtr sub_trajectory_;

Trajectory::SharedPtr trajectory_ptr_;
Trajectory::ConstSharedPtr trajectory_ptr_;

void onTrajectory(const Trajectory::SharedPtr msg);
void onTrajectory(const Trajectory::ConstSharedPtr msg);
};
} // namespace motion_utils

Expand Down
4 changes: 2 additions & 2 deletions common/motion_utils/src/vehicle/vehicle_state_checker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ VehicleStopChecker::VehicleStopChecker(rclcpp::Node * node)
std::bind(&VehicleStopChecker::onOdom, this, _1));
}

void VehicleStopChecker::onOdom(const Odometry::SharedPtr msg)
void VehicleStopChecker::onOdom(const Odometry::ConstSharedPtr msg)
{
odometry_ptr_ = msg;

Expand Down Expand Up @@ -128,7 +128,7 @@ bool VehicleArrivalChecker::isVehicleStoppedAtStopPoint(const double stop_durati
th_arrived_distance_m;
}

void VehicleArrivalChecker::onTrajectory(const Trajectory::SharedPtr msg)
void VehicleArrivalChecker::onTrajectory(const Trajectory::ConstSharedPtr msg)
{
trajectory_ptr_ = msg;
}
Expand Down

0 comments on commit a1beca1

Please sign in to comment.