File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
joint_trajectory_controller/src Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -738,7 +738,7 @@ controller_interface::CallbackReturn JointTrajectoryController::on_configure(
738738 params_.controller_plugin .c_str (), ex.what ());
739739 return CallbackReturn::FAILURE;
740740 }
741- if (! traj_contr_->initialize (get_node ()))
741+ if (traj_contr_->initialize (get_node ()) == false )
742742 {
743743 RCLCPP_FATAL (
744744 logger,
@@ -1023,6 +1023,14 @@ controller_interface::CallbackReturn JointTrajectoryController::on_activate(
10231023 }
10241024 rt_is_holding_.writeFromNonRT (true );
10251025
1026+ // update gains of PID controller
1027+ if (use_closed_loop_pid_adapter_)
1028+ {
1029+ trajectory_msgs::msg::JointTrajectory traj;
1030+ traj.points .push_back (state_current_);
1031+ traj_contr_->computeGains (traj);
1032+ }
1033+
10261034 return CallbackReturn::SUCCESS;
10271035}
10281036
You can’t perform that action at this time.
0 commit comments