Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ParamListener::try_get_params to Avoid Blocking in Real-Time Contexts #1198

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,8 @@ controller_interface::return_type JointTrajectoryController::update(
}
auto logger = this->get_node()->get_logger();
// update dynamic parameters
if (param_listener_->is_old(params_))
if (param_listener_->try_get_params(params_))
{
params_ = param_listener_->get_params();
default_tolerances_ = get_segment_tolerances(logger, params_);
// update the PID gains
// variable use_closed_loop_pid_adapter_ is updated in on_configure only
Expand Down
2 changes: 1 addition & 1 deletion pid_controller/src/pid_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ controller_interface::return_type PidController::update_and_write_commands(
const rclcpp::Time & time, const rclcpp::Duration & period)
{
// check for any parameter updates
update_parameters();
param_listener_->try_get_params(params_);

if (params_.use_external_measured_states)
{
Expand Down
Loading