diff --git a/auv_control_demos/CHANGELOG.md b/auv_control_demos/CHANGELOG.md index 7876c3d..414eb18 100644 --- a/auv_control_demos/CHANGELOG.md +++ b/auv_control_demos/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog for package auv_control_demos +## 0.3.3 (2025-07-29) + ## 0.3.2 (2025-07-22) ## 0.3.1 (2025-07-09) diff --git a/auv_control_demos/package.xml b/auv_control_demos/package.xml index 329e540..1ff1551 100644 --- a/auv_control_demos/package.xml +++ b/auv_control_demos/package.xml @@ -3,7 +3,7 @@ auv_control_demos - 0.3.2 + 0.3.3 Example package that includes demos for using auv_controllers in individual and chained modes Colin Mitchell diff --git a/auv_control_msgs/CHANGELOG.md b/auv_control_msgs/CHANGELOG.md index 21d5616..60ff528 100644 --- a/auv_control_msgs/CHANGELOG.md +++ b/auv_control_msgs/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog for package auv_control_msgs +## 0.3.3 (2025-07-29) + ## 0.3.2 (2025-07-22) ## 0.3.1 (2025-07-09) diff --git a/auv_control_msgs/package.xml b/auv_control_msgs/package.xml index 674044f..5f3f9c5 100644 --- a/auv_control_msgs/package.xml +++ b/auv_control_msgs/package.xml @@ -3,7 +3,7 @@ auv_control_msgs - 0.3.2 + 0.3.3 Custom messages for AUV controllers Rakesh Vivekanandan diff --git a/auv_controllers/CHANGELOG.md b/auv_controllers/CHANGELOG.md index f305f3e..df22f0a 100644 --- a/auv_controllers/CHANGELOG.md +++ b/auv_controllers/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog for package auv_controllers +## 0.3.3 (2025-07-29) + ## 0.3.2 (2025-07-22) ## 0.3.1 (2025-07-09) diff --git a/auv_controllers/package.xml b/auv_controllers/package.xml index 27a3d1a..f63b720 100644 --- a/auv_controllers/package.xml +++ b/auv_controllers/package.xml @@ -3,7 +3,7 @@ auv_controllers - 0.3.2 + 0.3.3 Meta package for auv_controllers Evan Palmer diff --git a/controller_common/CHANGELOG.md b/controller_common/CHANGELOG.md index 995af80..da37424 100644 --- a/controller_common/CHANGELOG.md +++ b/controller_common/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog for package controller_common +## 0.3.3 (2025-07-29) + ## 0.3.2 (2025-07-22) ## 0.3.1 (2025-07-09) diff --git a/controller_common/package.xml b/controller_common/package.xml index 5528922..a295412 100644 --- a/controller_common/package.xml +++ b/controller_common/package.xml @@ -3,7 +3,7 @@ controller_common - 0.3.2 + 0.3.3 Common interfaces for controllers used in this project Evan Palmer diff --git a/controller_coordinator/CHANGELOG.md b/controller_coordinator/CHANGELOG.md index e7823f1..18e641d 100644 --- a/controller_coordinator/CHANGELOG.md +++ b/controller_coordinator/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog for package controller_coordinator +## 0.3.3 (2025-07-29) + +- Enabled activating and deactivating multiple hardware interfaces. + ## 0.3.2 (2025-07-22) ## 0.3.1 (2025-07-09) diff --git a/controller_coordinator/package.xml b/controller_coordinator/package.xml index 8199a1c..badcffe 100644 --- a/controller_coordinator/package.xml +++ b/controller_coordinator/package.xml @@ -3,7 +3,7 @@ controller_coordinator - 0.3.2 + 0.3.3 A high-level node used to load and activate/deactivate control systems Evan Palmer diff --git a/controller_coordinator/src/coordinator.cpp b/controller_coordinator/src/coordinator.cpp index 4ae6662..811c573 100644 --- a/controller_coordinator/src/coordinator.cpp +++ b/controller_coordinator/src/coordinator.cpp @@ -29,10 +29,8 @@ namespace coordinator ControllerCoordinator::ControllerCoordinator() : rclcpp::Node("controller_coordinator"), - activate_hardware_request_(std::make_shared()), - deactivate_hardware_request_(std::make_shared()), - activate_controllers_request_(std::make_shared()), - deactivate_controllers_request_(std::make_shared()) + activate_controllers_request_(std::make_shared()), + deactivate_controllers_request_(std::make_shared()) { param_listener_ = std::make_shared(this->get_node_parameters_interface()); params_ = param_listener_->get_params(); @@ -60,11 +58,23 @@ ControllerCoordinator::ControllerCoordinator() wait_for_service(switch_controller_client_, switch_controller_name); // pre-configure the hardware activation/deactivation requests - activate_hardware_request_->name = params_.hardware_interface; - activate_hardware_request_->target_state.id = lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE; - - deactivate_hardware_request_->name = params_.hardware_interface; - deactivate_hardware_request_->target_state.id = lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE; + activate_hardware_requests_.reserve(params_.hardware_interfaces.size()); + std::ranges::transform( + params_.hardware_interfaces, std::back_inserter(activate_hardware_requests_), [](const std::string & name) { + auto request = std::make_shared(); + request->name = name; + request->target_state.id = lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE; + return request; + }); + + deactivate_hardware_requests_.reserve(params_.hardware_interfaces.size()); + std::ranges::transform( + params_.hardware_interfaces, std::back_inserter(deactivate_hardware_requests_), [](const std::string & name) { + auto request = std::make_shared(); + request->name = name; + request->target_state.id = lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE; + return request; + }); // pre-configure the controller activation/deactivation requests activate_controllers_request_->activate_controllers = params_.controller_sequence; @@ -87,24 +97,23 @@ ControllerCoordinator::ControllerCoordinator() const std::shared_ptr response) { // NOLINT response->success = true; if (request->data) { - RCLCPP_INFO(this->get_logger(), "Activating thruster hardware interface and controllers"); // NOLINT - - // activate the hardware interface - hardware_client_->async_send_request( - activate_hardware_request_, - [this, response](rclcpp::Client::SharedFuture - result_response) { // NOLINT - const auto & result = result_response.get(); - if (result->ok) { - RCLCPP_INFO(this->get_logger(), "Successfully activated thruster hardware interface"); // NOLINT - } else { - RCLCPP_ERROR(this->get_logger(), "Failed to activate thruster hardware interface"); // NOLINT - response->success = false; - response->message = "Failed to activate thruster hardware interface"; - } - }); - - // activate the controllers + RCLCPP_INFO(this->get_logger(), "Activating hardware interfaces and controllers"); // NOLINT + for (const auto & activate_request : activate_hardware_requests_) { + hardware_client_->async_send_request( + activate_request, + [logger = this->get_logger(), response, activate_request]( + rclcpp::Client::SharedFuture + result_response) { // NOLINT + const auto & result = result_response.get(); + if (result->ok) { + RCLCPP_INFO(logger, "Successfully activated %s", activate_request->name.c_str()); // NOLINT + } else { + RCLCPP_ERROR(logger, "Failed to activate %s", activate_request->name.c_str()); // NOLINT + response->success = false; + response->message = "Failed to activate " + activate_request->name; + } + }); + } switch_controller_client_->async_send_request( activate_controllers_request_, [this, @@ -120,24 +129,25 @@ ControllerCoordinator::ControllerCoordinator() } }); } else { - RCLCPP_INFO(this->get_logger(), "Deactivating controllers and thruster hardware interface"); // NOLINT - - // deactivate the hardware interface - hardware_client_->async_send_request( - deactivate_hardware_request_, - [this, response](rclcpp::Client::SharedFuture - result_response) { // NOLINT - const auto & result = result_response.get(); - if (result->ok) { - RCLCPP_INFO(this->get_logger(), "Successfully deactivated thruster hardware interface"); // NOLINT - } else { - RCLCPP_ERROR(this->get_logger(), "Failed to deactivate thruster hardware interface"); // NOLINT - response->success = false; - response->message = "Failed to deactivate thruster hardware interface"; - } - }); - - // deactivate the controllers + RCLCPP_INFO(this->get_logger(), "Deactivating controllers and hardware interfaces"); // NOLINT + for (const auto & deactivate_request : deactivate_hardware_requests_) { + hardware_client_->async_send_request( + deactivate_request, + [this, response, deactivate_request]( + rclcpp::Client::SharedFuture + result_response) { // NOLINT + const auto & result = result_response.get(); + if (result->ok) { + RCLCPP_INFO( + this->get_logger(), "Successfully deactivated %s", deactivate_request->name.c_str()); // NOLINT + } else { + RCLCPP_ERROR( + this->get_logger(), "Failed to deactivate %s", deactivate_request->name.c_str()); // NOLINT + response->success = false; + response->message = "Failed to deactivate " + deactivate_request->name; + } + }); + } switch_controller_client_->async_send_request( deactivate_controllers_request_, [this, diff --git a/controller_coordinator/src/coordinator.hpp b/controller_coordinator/src/coordinator.hpp index cc37083..e07ee92 100644 --- a/controller_coordinator/src/coordinator.hpp +++ b/controller_coordinator/src/coordinator.hpp @@ -44,7 +44,7 @@ class ControllerCoordinator : public rclcpp::Node private: // we need clients to: - // 1. activate/deactivate the hardware + // 1. activate/deactivate the hardware interfaces // 2. activate/deactivate the controllers std::shared_ptr> hardware_client_; std::shared_ptr> switch_controller_client_; @@ -54,10 +54,13 @@ class ControllerCoordinator : public rclcpp::Node // pre-configure the activate/deactivate service messages // these won't change, so we can set them up once - std::shared_ptr activate_hardware_request_; - std::shared_ptr deactivate_hardware_request_; - std::shared_ptr activate_controllers_request_; - std::shared_ptr deactivate_controllers_request_; + using HardwareRequest = controller_manager_msgs::srv::SetHardwareComponentState::Request; + std::vector> activate_hardware_requests_; + std::vector> deactivate_hardware_requests_; + + using ControllerRequest = controller_manager_msgs::srv::SwitchController::Request; + std::shared_ptr activate_controllers_request_; + std::shared_ptr deactivate_controllers_request_; std::shared_ptr param_listener_; controller_coordinator::Params params_; diff --git a/controller_coordinator/src/coordinator_parameters.yaml b/controller_coordinator/src/coordinator_parameters.yaml index f932f7e..4631451 100644 --- a/controller_coordinator/src/coordinator_parameters.yaml +++ b/controller_coordinator/src/coordinator_parameters.yaml @@ -1,8 +1,8 @@ controller_coordinator: - hardware_interface: - type: string - description: The name of the hardware interface to activate/deactivate. - default_value: "" + hardware_interfaces: + type: string_array + description: A list of hardware interfaces to activate/deactivate. + default_value: [] controller_sequence: type: string_array diff --git a/end_effector_trajectory_controller/CHANGELOG.md b/end_effector_trajectory_controller/CHANGELOG.md index 43a5783..e4cb19b 100644 --- a/end_effector_trajectory_controller/CHANGELOG.md +++ b/end_effector_trajectory_controller/CHANGELOG.md @@ -1,4 +1,6 @@ -# Changelog for package controller_common +# Changelog for package end_effector_trajectory_controller + +## 0.3.3 (2025-07-29) ## 0.3.2 (2025-07-22) diff --git a/end_effector_trajectory_controller/package.xml b/end_effector_trajectory_controller/package.xml index 6a40245..f18d2fc 100644 --- a/end_effector_trajectory_controller/package.xml +++ b/end_effector_trajectory_controller/package.xml @@ -3,7 +3,7 @@ end_effector_trajectory_controller - 0.3.2 + 0.3.3 End effector trajectory tracking controller for UVMS control Evan Palmer diff --git a/ik_solvers/CHANGELOG.md b/ik_solvers/CHANGELOG.md index c5c35bc..d5a8501 100644 --- a/ik_solvers/CHANGELOG.md +++ b/ik_solvers/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog for package ik_solvers +## 0.3.3 (2025-07-29) + ## 0.3.2 (2025-07-22) ## 0.3.1 (2025-07-09) diff --git a/ik_solvers/package.xml b/ik_solvers/package.xml index c2f653f..6a82be2 100644 --- a/ik_solvers/package.xml +++ b/ik_solvers/package.xml @@ -3,7 +3,7 @@ ik_solvers - 0.3.2 + 0.3.3 Inverse kinematics solvers used for whole-body control Evan Palmer diff --git a/thruster_allocation_matrix_controller/CHANGELOG.md b/thruster_allocation_matrix_controller/CHANGELOG.md index 33cb1c3..0251b25 100644 --- a/thruster_allocation_matrix_controller/CHANGELOG.md +++ b/thruster_allocation_matrix_controller/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog for package thruster_allocation_matrix_controller +## 0.3.3 (2025-07-29) + ## 0.3.2 (2025-07-22) - Replaces the deprecated `unlockAndPublish` API with `try_publish` diff --git a/thruster_allocation_matrix_controller/package.xml b/thruster_allocation_matrix_controller/package.xml index 231f27a..3606543 100644 --- a/thruster_allocation_matrix_controller/package.xml +++ b/thruster_allocation_matrix_controller/package.xml @@ -3,7 +3,7 @@ thruster_allocation_matrix_controller - 0.3.2 + 0.3.3 Thruster allocation matrix controller used to convert wrench commands into thrust commands Evan Palmer diff --git a/thruster_controllers/CHANGELOG.md b/thruster_controllers/CHANGELOG.md index 97942e3..59054f3 100644 --- a/thruster_controllers/CHANGELOG.md +++ b/thruster_controllers/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog for package thruster_controllers +## 0.3.3 (2025-07-29) + ## 0.3.2 (2025-07-22) - Replaces the deprecated `unlockAndPublish` API with `try_publish` diff --git a/thruster_controllers/package.xml b/thruster_controllers/package.xml index bb9022d..02ea338 100644 --- a/thruster_controllers/package.xml +++ b/thruster_controllers/package.xml @@ -3,7 +3,7 @@ thruster_controllers - 0.3.2 + 0.3.3 A collection of thruster controllers for AUV control Evan Palmer diff --git a/topic_sensors/CHANGELOG.md b/topic_sensors/CHANGELOG.md index a33abf2..45389b3 100644 --- a/topic_sensors/CHANGELOG.md +++ b/topic_sensors/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog for package topic_sensors +## 0.3.3 (2025-07-29) + ## 0.3.2 (2025-07-22) ## 0.3.1 (2025-07-09) diff --git a/topic_sensors/package.xml b/topic_sensors/package.xml index 4109c28..e60ea6e 100644 --- a/topic_sensors/package.xml +++ b/topic_sensors/package.xml @@ -3,7 +3,7 @@ topic_sensors - 0.3.2 + 0.3.3 Sensor plugins used to write ROS 2 messages to state interfaces Evan Palmer diff --git a/velocity_controllers/CHANGELOG.md b/velocity_controllers/CHANGELOG.md index 831408f..921d571 100644 --- a/velocity_controllers/CHANGELOG.md +++ b/velocity_controllers/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog for package velocity_controllers +## 0.3.3 (2025-07-29) + ## 0.3.2 (2025-07-22) - Replaces the deprecated `unlockAndPublish` API with `try_publish` diff --git a/velocity_controllers/package.xml b/velocity_controllers/package.xml index 4fecfac..06d39cc 100644 --- a/velocity_controllers/package.xml +++ b/velocity_controllers/package.xml @@ -3,7 +3,7 @@ velocity_controllers - 0.3.2 + 0.3.3 A collection of velocity controllers for underwater vehicles Evan Palmer diff --git a/whole_body_controllers/CHANGELOG.md b/whole_body_controllers/CHANGELOG.md index 57e5742..9a2248d 100644 --- a/whole_body_controllers/CHANGELOG.md +++ b/whole_body_controllers/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog for package whole_body_controllers +## 0.3.3 (2025-07-29) + ## 0.3.2 (2025-07-22) - Replaces the deprecated `unlockAndPublish` API with `try_publish` diff --git a/whole_body_controllers/package.xml b/whole_body_controllers/package.xml index fd60c6c..ad2a866 100644 --- a/whole_body_controllers/package.xml +++ b/whole_body_controllers/package.xml @@ -3,7 +3,7 @@ whole_body_controllers - 0.3.2 + 0.3.3 Whole-body controllers for underwater vehicle manipulator systems Evan Palmer