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

fix(motion_utils): fix build error (#5404) #982

Merged
merged 1 commit into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
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
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
Loading