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 11b7d20 commit 4927435
Showing 1 changed file with 5 additions and 3 deletions.
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 @@ -1041,9 +1041,11 @@ controller_interface::CallbackReturn JointTrajectoryController::on_activate(
cmd_timeout_ = 0.0;
}

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

return CallbackReturn::SUCCESS;
Expand Down

0 comments on commit 4927435

Please sign in to comment.