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

enable eloquent rcpputils pointer traits #14

Merged
merged 1 commit into from
Feb 12, 2020
Merged
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
7 changes: 3 additions & 4 deletions ros_controllers/src/trajectory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ Trajectory::update(std::shared_ptr<trajectory_msgs::msg::JointTrajectory> joint_
TrajectoryPointConstIter
Trajectory::sample(const rclcpp::Time & sample_time)
{
// TODO(karsten1987): Enable this for eloquent when `rclcpp::is_pointer` is used
// THROW_ON_NULLPTR(trajectory_msg_)
THROW_ON_NULLPTR(trajectory_msg_)

// skip if current time hasn't reached traj time of the first msg yet
if (time_less_than(sample_time, trajectory_start_time_)) {
Expand All @@ -75,15 +74,15 @@ Trajectory::sample(const rclcpp::Time & sample_time)
TrajectoryPointConstIter
Trajectory::begin() const
{
// THROW_ON_NULLPTR(trajectory_msg_)
THROW_ON_NULLPTR(trajectory_msg_)

return trajectory_msg_->points.begin();
}

TrajectoryPointConstIter
Trajectory::end() const
{
// THROW_ON_NULLPTR(trajectory_msg_)
THROW_ON_NULLPTR(trajectory_msg_)

return trajectory_msg_->points.end();
}
Expand Down