From b3c6d55e6cc19a7740991a5dc60f03eefe1f2f7c Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Mon, 18 Mar 2024 20:41:55 +0000 Subject: [PATCH 1/2] Fix pid_controller build on ROS 2 Rolling on Ubuntu 24.04 Two things are needed to make this compile: 1. Make sure to add a package.xml dependency on backward_ros, which is necessary to compile. 2. Make sure to #include , so the correct rclcpp::QoS object is chosen. With both of these in place, this package compiles cleanly on Ubuntu 24.04. Signed-off-by: Chris Lalancette --- pid_controller/package.xml | 1 + pid_controller/src/pid_controller.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/pid_controller/package.xml b/pid_controller/package.xml index 9cda85aa03..c1106a0b23 100644 --- a/pid_controller/package.xml +++ b/pid_controller/package.xml @@ -14,6 +14,7 @@ generate_parameter_library angles + backward_ros control_msgs control_toolbox controller_interface diff --git a/pid_controller/src/pid_controller.cpp b/pid_controller/src/pid_controller.cpp index 19cebbde4e..77f8b77334 100644 --- a/pid_controller/src/pid_controller.cpp +++ b/pid_controller/src/pid_controller.cpp @@ -26,6 +26,9 @@ #include "control_msgs/msg/single_dof_state.hpp" #include "controller_interface/helpers.hpp" +#include +#include + namespace { // utility From 175c4d54f3ed2a2a5a6f1ca16b04f48416c8079a Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Tue, 19 Mar 2024 12:12:04 +0000 Subject: [PATCH 2/2] Feedback from review. Signed-off-by: Chris Lalancette --- ackermann_steering_controller/package.xml | 1 + bicycle_steering_controller/package.xml | 1 + pid_controller/src/pid_controller.cpp | 4 ++-- tricycle_steering_controller/package.xml | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ackermann_steering_controller/package.xml b/ackermann_steering_controller/package.xml index 512af88534..a3183af262 100644 --- a/ackermann_steering_controller/package.xml +++ b/ackermann_steering_controller/package.xml @@ -16,6 +16,7 @@ generate_parameter_library + backward_ros control_msgs controller_interface hardware_interface diff --git a/bicycle_steering_controller/package.xml b/bicycle_steering_controller/package.xml index bc560d9bf7..6507700a5d 100644 --- a/bicycle_steering_controller/package.xml +++ b/bicycle_steering_controller/package.xml @@ -16,6 +16,7 @@ generate_parameter_library + backward_ros control_msgs controller_interface hardware_interface diff --git a/pid_controller/src/pid_controller.cpp b/pid_controller/src/pid_controller.cpp index 77f8b77334..b76926d5a0 100644 --- a/pid_controller/src/pid_controller.cpp +++ b/pid_controller/src/pid_controller.cpp @@ -26,8 +26,8 @@ #include "control_msgs/msg/single_dof_state.hpp" #include "controller_interface/helpers.hpp" -#include -#include +#include "rclcpp/rclcpp.hpp" +#include "rclcpp/version.h" namespace { // utility diff --git a/tricycle_steering_controller/package.xml b/tricycle_steering_controller/package.xml index bed6e451fa..991aca2c05 100644 --- a/tricycle_steering_controller/package.xml +++ b/tricycle_steering_controller/package.xml @@ -18,6 +18,7 @@ generate_parameter_library + backward_ros control_msgs controller_interface hardware_interface