From c42f0eaa543a993fc56ca4eae906501add60c3c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Fr=C3=B6hlich?= Date: Fri, 1 Sep 2023 19:03:23 +0200 Subject: [PATCH] Use direct vector access Co-authored-by: Sai Kishor Kothakota --- joint_trajectory_controller/src/joint_trajectory_controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/joint_trajectory_controller/src/joint_trajectory_controller.cpp b/joint_trajectory_controller/src/joint_trajectory_controller.cpp index 979dc4c3f8..9320c8e59d 100644 --- a/joint_trajectory_controller/src/joint_trajectory_controller.cpp +++ b/joint_trajectory_controller/src/joint_trajectory_controller.cpp @@ -1537,7 +1537,7 @@ void JointTrajectoryController::update_pids() for (size_t i = 0; i < dof_; ++i) { const auto & gains = params_.gains.joints_map.at(params_.joints[i]); - if (pids_.at(i)) + if (pids_[i]) { // update PIDs with gains from ROS parameters pids_[i]->setGains(gains.p, gains.i, gains.d, gains.i_clamp, -gains.i_clamp);