Skip to content

Address segfault in controller coordinator #68

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

Merged
merged 11 commits into from
Jul 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repos:
types_or: [c++, c]

- repo: https://github.com/BlankSpruce/gersemi
rev: 0.13.5
rev: 0.21.0
hooks:
- id: gersemi

Expand Down
2 changes: 2 additions & 0 deletions auv_control_demos/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog for package auv_control_demos

## 0.3.1 (2025-07-09)

## 0.3.0 (2025-06-07)

## 0.2.1 (2025-06-03)
Expand Down
2 changes: 1 addition & 1 deletion auv_control_demos/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package format="3">

<name>auv_control_demos</name>
<version>0.3.0</version>
<version>0.3.1</version>
<description>Example package that includes demos for using auv_controllers in individual and chained modes</description>

<maintainer email="mitchcol@oregonstate.edu">Colin Mitchell</maintainer>
Expand Down
2 changes: 2 additions & 0 deletions auv_control_msgs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog for package auv_control_msgs

## 0.3.1 (2025-07-09)

## 0.3.0 (2025-06-07)

## 0.2.1 (2025-06-03)
Expand Down
2 changes: 1 addition & 1 deletion auv_control_msgs/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package format="3">

<name>auv_control_msgs</name>
<version>0.3.0</version>
<version>0.3.1</version>
<description>Custom messages for AUV controllers</description>

<maintainer email="rakeshvivek97@gmail.com">Rakesh Vivekanandan</maintainer>
Expand Down
2 changes: 2 additions & 0 deletions auv_controllers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog for package auv_controllers

## 0.3.1 (2025-07-09)

## 0.3.0 (2025-06-07)

- Implements the controller coordinator
Expand Down
2 changes: 1 addition & 1 deletion auv_controllers/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package format="3">

<name>auv_controllers</name>
<version>0.3.0</version>
<version>0.3.1</version>
<description>Meta package for auv_controllers</description>

<maintainer email="evanp922@gmail.com">Evan Palmer</maintainer>
Expand Down
2 changes: 2 additions & 0 deletions controller_common/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog for package controller_common

## 0.3.1 (2025-07-09)

## 0.3.0 (2025-06-07)

## 0.2.1 (2025-06-03)
Expand Down
5 changes: 3 additions & 2 deletions controller_common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ target_sources(
PRIVATE src/common.cpp
PUBLIC
FILE_SET HEADERS
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include
FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/controller_common/common.hpp
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include
FILES
${CMAKE_CURRENT_SOURCE_DIR}/include/controller_common/common.hpp
)
target_compile_features(controller_common PUBLIC cxx_std_23)
target_link_libraries(
Expand Down
2 changes: 1 addition & 1 deletion controller_common/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package format="3">

<name>controller_common</name>
<version>0.3.0</version>
<version>0.3.1</version>
<description>Common interfaces for controllers used in this project</description>

<maintainer email="evanp922@gmail.com">Evan Palmer</maintainer>
Expand Down
4 changes: 4 additions & 0 deletions controller_coordinator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog for package controller_coordinator

## 0.3.1 (2025-07-09)

- Addresses a lifetime bug in the coordinator service responses.

## 0.3.0 (2025-06-07)

- Implements a simple service endpoint for activating and deactivating a
Expand Down
7 changes: 2 additions & 5 deletions controller_coordinator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,8 @@ target_link_libraries(
)

install(
TARGETS
controller_coordinator
controller_coordinator_parameters
DESTINATION
lib/controller_coordinator
TARGETS controller_coordinator controller_coordinator_parameters
DESTINATION lib/controller_coordinator
)

ament_package()
2 changes: 1 addition & 1 deletion controller_coordinator/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package format="3">

<name>controller_coordinator</name>
<version>0.3.0</version>
<version>0.3.1</version>
<description>A high-level node used to load and activate/deactivate control systems</description>

<maintainer email="evanp922@gmail.com">Evan Palmer</maintainer>
Expand Down
20 changes: 11 additions & 9 deletions controller_coordinator/src/coordinator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,18 @@ ControllerCoordinator::ControllerCoordinator()
activate_system_service_ = this->create_service<std_srvs::srv::SetBool>(
"~/activate",
[this](
const std::shared_ptr<rmw_request_id_t> /*request_header*/,
const std::shared_ptr<std_srvs::srv::SetBool::Request> request,
const std::shared_ptr<std_srvs::srv::SetBool::Response> response) {
const std::shared_ptr<rmw_request_id_t> /*request_header*/, // NOLINT
const std::shared_ptr<std_srvs::srv::SetBool::Request> request, // NOLINT
const std::shared_ptr<std_srvs::srv::SetBool::Response> 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<controller_manager_msgs::srv::SetHardwareComponentState>::SharedFuture result_response) {
[this, response](rclcpp::Client<controller_manager_msgs::srv::SetHardwareComponentState>::SharedFuture
result_response) { // NOLINT
const auto & result = result_response.get();
if (result->ok) {
RCLCPP_INFO(this->get_logger(), "Successfully activated thruster hardware interface"); // NOLINT
Expand All @@ -108,7 +108,8 @@ ControllerCoordinator::ControllerCoordinator()
switch_controller_client_->async_send_request(
activate_controllers_request_,
[this,
&response](rclcpp::Client<controller_manager_msgs::srv::SwitchController>::SharedFuture result_response) {
response](
rclcpp::Client<controller_manager_msgs::srv::SwitchController>::SharedFuture result_response) { // NOLINT
const auto & result = result_response.get();
if (result->ok) {
RCLCPP_INFO(this->get_logger(), "Successfully activated controllers"); // NOLINT
Expand All @@ -124,8 +125,8 @@ ControllerCoordinator::ControllerCoordinator()
// deactivate the hardware interface
hardware_client_->async_send_request(
deactivate_hardware_request_,
[this, &response](
rclcpp::Client<controller_manager_msgs::srv::SetHardwareComponentState>::SharedFuture result_response) {
[this, response](rclcpp::Client<controller_manager_msgs::srv::SetHardwareComponentState>::SharedFuture
result_response) { // NOLINT
const auto & result = result_response.get();
if (result->ok) {
RCLCPP_INFO(this->get_logger(), "Successfully deactivated thruster hardware interface"); // NOLINT
Expand All @@ -140,7 +141,8 @@ ControllerCoordinator::ControllerCoordinator()
switch_controller_client_->async_send_request(
deactivate_controllers_request_,
[this,
&response](rclcpp::Client<controller_manager_msgs::srv::SwitchController>::SharedFuture result_response) {
response](
rclcpp::Client<controller_manager_msgs::srv::SwitchController>::SharedFuture result_response) { // NOLINT
const auto & result = result_response.get();
if (result->ok) {
RCLCPP_INFO(this->get_logger(), "Successfully deactivated controllers"); // NOLINT
Expand Down
2 changes: 2 additions & 0 deletions end_effector_trajectory_controller/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog for package controller_common

## 0.3.1 (2025-07-09)

## 0.3.0 (2025-06-07)

## 0.2.1 (2025-06-03)
Expand Down
8 changes: 4 additions & 4 deletions end_effector_trajectory_controller/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ target_sources(
PRIVATE src/end_effector_trajectory_controller.cpp src/trajectory.cpp
PUBLIC
FILE_SET HEADERS
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include
FILES
${CMAKE_CURRENT_SOURCE_DIR}/include/end_effector_trajectory_controller/end_effector_trajectory_controller.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/end_effector_trajectory_controller/trajectory.hpp
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include
FILES
${CMAKE_CURRENT_SOURCE_DIR}/include/end_effector_trajectory_controller/end_effector_trajectory_controller.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/end_effector_trajectory_controller/trajectory.hpp
)
target_compile_features(end_effector_trajectory_controller PUBLIC cxx_std_23)
target_link_libraries(
Expand Down
2 changes: 1 addition & 1 deletion end_effector_trajectory_controller/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package format="3">

<name>end_effector_trajectory_controller</name>
<version>0.3.0</version>
<version>0.3.1</version>
<description>End effector trajectory tracking controller for UVMS control</description>

<maintainer email="evanp922@gmail.com">Evan Palmer</maintainer>
Expand Down
2 changes: 2 additions & 0 deletions ik_solvers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog for package ik_solvers

## 0.3.1 (2025-07-09)

## 0.3.0 (2025-06-07)

## 0.2.1 (2025-06-03)
Expand Down
10 changes: 5 additions & 5 deletions ik_solvers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ target_sources(
PRIVATE src/solver.cpp
PUBLIC
FILE_SET HEADERS
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include
FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/ik_solvers/solver.hpp
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include
FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/ik_solvers/solver.hpp
)
target_link_libraries(
solver_base
Expand All @@ -52,9 +52,9 @@ target_sources(
PRIVATE src/task_priority_solver.cpp src/pseudoinverse.cpp
PUBLIC
FILE_SET HEADERS
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include
FILES
${CMAKE_CURRENT_SOURCE_DIR}/include/ik_solvers/task_priority_solver.hpp
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include
FILES
${CMAKE_CURRENT_SOURCE_DIR}/include/ik_solvers/task_priority_solver.hpp
)
target_compile_features(ik_solvers PUBLIC cxx_std_23)
target_link_libraries(
Expand Down
2 changes: 1 addition & 1 deletion ik_solvers/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package format="3">

<name>ik_solvers</name>
<version>0.3.0</version>
<version>0.3.1</version>
<description>Inverse kinematics solvers used for whole-body control</description>

<maintainer email="evanp922@gmail.com">Evan Palmer</maintainer>
Expand Down
2 changes: 2 additions & 0 deletions thruster_allocation_matrix_controller/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog for package thruster_allocation_matrix_controller

## 0.3.1 (2025-07-09)

## 0.3.0 (2025-06-07)

## 0.2.1 (2025-06-03)
Expand Down
6 changes: 3 additions & 3 deletions thruster_allocation_matrix_controller/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ target_sources(
PRIVATE src/thruster_allocation_matrix_controller.cpp
PUBLIC
FILE_SET HEADERS
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include
FILES
${CMAKE_CURRENT_SOURCE_DIR}/include/thruster_allocation_matrix_controller/thruster_allocation_matrix_controller.hpp
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include
FILES
${CMAKE_CURRENT_SOURCE_DIR}/include/thruster_allocation_matrix_controller/thruster_allocation_matrix_controller.hpp
)
target_compile_features(thruster_allocation_matrix_controller PUBLIC cxx_std_23)
target_link_libraries(
Expand Down
2 changes: 1 addition & 1 deletion thruster_allocation_matrix_controller/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package format="3">

<name>thruster_allocation_matrix_controller</name>
<version>0.3.0</version>
<version>0.3.1</version>
<description>Thruster allocation matrix controller used to convert wrench commands into thrust commands</description>

<maintainer email="evanp922@gmail.com">Evan Palmer</maintainer>
Expand Down
2 changes: 2 additions & 0 deletions thruster_controllers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog for package thruster_controllers

## 0.3.1 (2025-07-09)

## 0.3.0 (2025-06-07)

## 0.2.1 (2025-06-03)
Expand Down
10 changes: 5 additions & 5 deletions thruster_controllers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ target_sources(
src/gz_passthrough_controller.cpp
PUBLIC
FILE_SET HEADERS
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include
FILES
${CMAKE_CURRENT_SOURCE_DIR}/include/thruster_controllers/polynomial_thrust_curve_controller.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/thruster_controllers/rotation_rate_controller.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/thruster_controllers/gz_passthrough_controller.hpp
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include
FILES
${CMAKE_CURRENT_SOURCE_DIR}/include/thruster_controllers/polynomial_thrust_curve_controller.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/thruster_controllers/rotation_rate_controller.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/thruster_controllers/gz_passthrough_controller.hpp
)
target_compile_features(thruster_controllers PUBLIC cxx_std_23)
target_link_libraries(
Expand Down
2 changes: 1 addition & 1 deletion thruster_controllers/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package format="3">

<name>thruster_controllers</name>
<version>0.3.0</version>
<version>0.3.1</version>
<description>A collection of thruster controllers for AUV control</description>

<maintainer email="evanp922@gmail.com">Evan Palmer</maintainer>
Expand Down
2 changes: 2 additions & 0 deletions topic_sensors/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog for package topic_sensors

## 0.3.1 (2025-07-09)

## 0.3.0 (2025-06-07)

## 0.2.1 (2025-06-03)
Expand Down
5 changes: 3 additions & 2 deletions topic_sensors/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ target_sources(
PRIVATE src/odom_sensor.cpp
PUBLIC
FILE_SET HEADERS
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include
FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/topic_sensors/odom_sensor.hpp
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include
FILES
${CMAKE_CURRENT_SOURCE_DIR}/include/topic_sensors/odom_sensor.hpp
)
target_compile_features(topic_sensors PUBLIC cxx_std_23)
target_link_libraries(
Expand Down
2 changes: 1 addition & 1 deletion topic_sensors/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package format="3">

<name>topic_sensors</name>
<version>0.3.0</version>
<version>0.3.1</version>
<description>Sensor plugins used to write ROS 2 messages to state interfaces</description>

<maintainer email="evanp922@gmail.com">Evan Palmer</maintainer>
Expand Down
2 changes: 2 additions & 0 deletions velocity_controllers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog for package velocity_controllers

## 0.3.1 (2025-07-09)

## 0.3.0 (2025-06-07)

## 0.2.1 (2025-06-03)
Expand Down
8 changes: 4 additions & 4 deletions velocity_controllers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ target_sources(
src/adaptive_integral_terminal_sliding_mode_controller.cpp
PUBLIC
FILE_SET HEADERS
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include
FILES
${CMAKE_CURRENT_SOURCE_DIR}/include/velocity_controllers/integral_sliding_mode_controller.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/velocity_controllers/adaptive_integral_terminal_sliding_mode_controller.hpp
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include
FILES
${CMAKE_CURRENT_SOURCE_DIR}/include/velocity_controllers/integral_sliding_mode_controller.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/velocity_controllers/adaptive_integral_terminal_sliding_mode_controller.hpp
)
target_compile_features(velocity_controllers PUBLIC cxx_std_23)
target_link_libraries(
Expand Down
2 changes: 1 addition & 1 deletion velocity_controllers/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package format="3">

<name>velocity_controllers</name>
<version>0.3.0</version>
<version>0.3.1</version>
<description>A collection of velocity controllers for underwater vehicles</description>

<maintainer email="evanp922@gmail.com">Evan Palmer</maintainer>
Expand Down
2 changes: 2 additions & 0 deletions whole_body_controllers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog for package whole_body_controllers

## 0.3.1 (2025-07-09)

## 0.3.0 (2025-06-07)

## 0.2.1 (2025-06-03)
Expand Down
6 changes: 3 additions & 3 deletions whole_body_controllers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ target_sources(
PRIVATE src/ik_controller.cpp
PUBLIC
FILE_SET HEADERS
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include
FILES
${CMAKE_CURRENT_SOURCE_DIR}/include/whole_body_controllers/ik_controller.hpp
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include
FILES
${CMAKE_CURRENT_SOURCE_DIR}/include/whole_body_controllers/ik_controller.hpp
)
target_compile_features(whole_body_controllers PUBLIC cxx_std_23)
target_link_libraries(
Expand Down
Loading