Skip to content

Commit

Permalink
Call activate() of traj_contr_
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich committed Dec 6, 2023
1 parent 188facc commit de738e6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion joint_trajectory_controller/src/joint_trajectory_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ controller_interface::return_type JointTrajectoryController::update(
}
if (traj_contr_)
{
// set start time of trajectory to traj_contr_
// switch RT buffer of traj_contr_
traj_contr_->start();
}
}
Expand Down Expand Up @@ -1038,6 +1038,14 @@ controller_interface::CallbackReturn JointTrajectoryController::on_activate(
{
cmd_timeout_ = 0.0;
}

// activate traj_contr_, e.g., update gains
if (traj_contr_ && traj_contr_->activate() == false)
{
RCLCPP_ERROR(get_node()->get_logger(), "Error during trajectory controller activation.");
return CallbackReturn::ERROR;
}

return CallbackReturn::SUCCESS;
}

Expand Down

0 comments on commit de738e6

Please sign in to comment.