Skip to content

Commit

Permalink
Merge branch 'master' into mv/speed_limiter
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich authored Dec 2, 2024
2 parents 1b69fc9 + 36068e1 commit ad9b3e6
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 ad9b3e6

Please sign in to comment.