Skip to content

Commit

Permalink
apply to master API (#13)
Browse files Browse the repository at this point in the history
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
  • Loading branch information
Karsten1987 authored Feb 6, 2020
1 parent 9001021 commit cd459c7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ros_controllers/src/trajectory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ Trajectory::update(std::shared_ptr<trajectory_msgs::msg::JointTrajectory> joint_
TrajectoryPointConstIter
Trajectory::sample(const rclcpp::Time & sample_time)
{
THROW_ON_NULLPTR(trajectory_msg_)
// TODO(karsten1987): Enable this for eloquent when `rclcpp::is_pointer` is used
// 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 @@ -74,15 +75,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

0 comments on commit cd459c7

Please sign in to comment.