Skip to content

Commit 4927435

Browse files
Call activate() of traj_contr_
1 parent 11b7d20 commit 4927435

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

joint_trajectory_controller/src/joint_trajectory_controller.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ controller_interface::return_type JointTrajectoryController::update(
220220
}
221221
if (traj_contr_)
222222
{
223-
// set start time of trajectory to traj_contr_
223+
// switch RT buffer of traj_contr_
224224
traj_contr_->start();
225225
}
226226
}
@@ -1041,9 +1041,11 @@ controller_interface::CallbackReturn JointTrajectoryController::on_activate(
10411041
cmd_timeout_ = 0.0;
10421042
}
10431043

1044-
if (traj_contr_)
1044+
// activate traj_contr_, e.g., update gains
1045+
if (traj_contr_ && traj_contr_->activate() == false)
10451046
{
1046-
traj_contr_->activate();
1047+
RCLCPP_ERROR(get_node()->get_logger(), "Error during trajectory controller activation.");
1048+
return CallbackReturn::ERROR;
10471049
}
10481050

10491051
return CallbackReturn::SUCCESS;

0 commit comments

Comments
 (0)