File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -1514,6 +1514,20 @@ void ControllerManager::activate_controllers(
1514
1514
hardware_interface::lifecycle_state_names::ACTIVE,
1515
1515
lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE);
1516
1516
controller->release_interfaces ();
1517
+ {
1518
+ // Now prepare and perform the stop interface switching as this is needed for exclusive
1519
+ // interfaces
1520
+ if (
1521
+ !command_interface_names.empty () &&
1522
+ (!resource_manager_->prepare_command_mode_switch ({}, command_interface_names) ||
1523
+ !resource_manager_->perform_command_mode_switch ({}, command_interface_names)))
1524
+ {
1525
+ RCLCPP_ERROR (
1526
+ get_logger (),
1527
+ " Error switching back the interfaces in the hardware as the controller activation "
1528
+ " failed." );
1529
+ }
1530
+ }
1517
1531
return ;
1518
1532
}
1519
1533
You can’t perform that action at this time.
0 commit comments