File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -499,7 +499,10 @@ void ControllerManager::init_controller_manager()
499499 // Get parameters needed for RT "update" loop to work
500500 if (is_resource_manager_initialized ())
501501 {
502- resource_manager_->import_joint_limiters (robot_description_);
502+ if (enforce_command_limits_)
503+ {
504+ resource_manager_->import_joint_limiters (robot_description_);
505+ }
503506 init_services ();
504507 }
505508 else
@@ -621,7 +624,10 @@ void ControllerManager::robot_description_callback(const std_msgs::msg::String &
621624
622625void ControllerManager::init_resource_manager (const std::string & robot_description)
623626{
624- resource_manager_->import_joint_limiters (robot_description_);
627+ if (enforce_command_limits_)
628+ {
629+ resource_manager_->import_joint_limiters (robot_description_);
630+ }
625631 if (!resource_manager_->load_and_initialize_components (robot_description, update_rate_))
626632 {
627633 RCLCPP_WARN (
@@ -2880,11 +2886,7 @@ controller_interface::return_type ControllerManager::update(
28802886 // To publish the activity of the failing controllers and the fallback controllers
28812887 publish_activity ();
28822888 }
2883-
2884- if (enforce_command_limits_)
2885- {
2886- resource_manager_->enforce_command_limits (period);
2887- }
2889+ resource_manager_->enforce_command_limits (period);
28882890
28892891 // there are controllers to (de)activate
28902892 if (switch_params_.do_switch )
You can’t perform that action at this time.
0 commit comments