Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into scaled_jtc
Browse files Browse the repository at this point in the history
  • Loading branch information
fmauch committed Dec 3, 2024
2 parents c56ce2b + 36068e1 commit b395104
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ class HardwareInterfaceAdapter<hardware_interface::HW_IF_EFFORT>
// Time since the last call to update
const auto period = std::chrono::steady_clock::now() - last_update_time_;
// Update PIDs
double command = pid_->computeCommand(error_position, error_velocity, period.count());
double command =
pid_->computeCommand(error_position, error_velocity, static_cast<uint64_t>(period.count()));
command = std::min<double>(
fabs(max_allowed_effort), std::max<double>(-fabs(max_allowed_effort), command));
joint_handle_->get().set_value(command);
Expand Down

0 comments on commit b395104

Please sign in to comment.