Skip to content
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: 6 additions & 1 deletion ur_controllers/src/passthrough_trajectory_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@

#include <controller_interface/controller_interface.hpp>
#include <rclcpp/logging.hpp>
#include <rclcpp/version.h>
#include <builtin_interfaces/msg/duration.hpp>
#include <lifecycle_msgs/msg/state.hpp>

Expand Down Expand Up @@ -327,8 +328,12 @@ controller_interface::return_type PassthroughTrajectoryController::update(const
scaling_factor_ = scaling_state_interface_->get().get_value();
}

#if RCLCPP_VERSION_MAJOR >= 17
active_trajectory_elapsed_time_ += period * scaling_factor_;

#else
// This is kept for Humble compatibility
active_trajectory_elapsed_time_ = active_trajectory_elapsed_time_ + period * scaling_factor_;
#endif
// RCLCPP_INFO(get_node()->get_logger(), "Elapsed trajectory time: %f. Scaling factor: %f, period: %f",
// active_trajectory_elapsed_time_.seconds(), scaling_factor_, period.seconds());

Expand Down
Loading