From 6631270667ceaf3c26f55bc24788589633e9f859 Mon Sep 17 00:00:00 2001 From: Henry Moore Date: Sun, 21 Jul 2024 02:56:09 -0600 Subject: [PATCH] Unused header cleanup (#1627) --- .../controller_interface.hpp | 1 - .../controller_interface_base.hpp | 1 - .../semantic_components/range_sensor.hpp | 1 - .../src/controller_interface.cpp | 6 - .../src/controller_interface_base.cpp | 1 - .../test_chainable_controller_interface.hpp | 5 +- .../test/test_controller_interface.hpp | 1 - .../test/test_controller_with_options.cpp | 1 - .../test/test_controller_with_options.hpp | 2 - .../test/test_force_torque_sensor.hpp | 4 +- controller_interface/test/test_imu_sensor.hpp | 4 +- .../test_semantic_component_interface.hpp | 3 +- .../controller_manager/controller_manager.hpp | 6 - .../controller_manager/controller_spec.hpp | 3 +- controller_manager/src/controller_manager.cpp | 2 - controller_manager/src/ros2_control_node.cpp | 2 - .../test/controller_manager_test_common.hpp | 4 - .../test/test_controller/test_controller.cpp | 1 - .../test/test_controller/test_controller.hpp | 1 - .../test_controller_failed_init.cpp | 5 - .../test_controller_failed_init.hpp | 5 +- .../test/test_controller_manager.cpp | 2 - .../test/test_controller_manager_srvs.cpp | 1 - ...test_controller_manager_with_namespace.cpp | 3 - .../test_controller_with_interfaces.cpp | 5 - .../test_controller_with_interfaces.hpp | 7 +- ...llers_chaining_with_controller_manager.cpp | 3 - .../test/test_hardware_management_srvs.cpp | 1 - .../test/test_load_controller.cpp | 2 +- .../test/test_release_interfaces.cpp | 2 - .../test/test_spawner_unspawner.cpp | 1 - .../include/hardware_interface/actuator.hpp | 3 +- .../hardware_interface/actuator_interface.hpp | 3 +- .../hardware_interface/async_components.hpp | 3 - .../hardware_interface/component_parser.hpp | 1 - .../include/hardware_interface/handle.hpp | 2 - .../hardware_component_info.hpp | 1 - .../hardware_interface/lexical_casts.hpp | 4 - .../hardware_interface/resource_manager.hpp | 5 +- .../include/hardware_interface/sensor.hpp | 4 +- .../hardware_interface/sensor_interface.hpp | 3 +- .../include/hardware_interface/system.hpp | 4 +- .../hardware_interface/system_interface.hpp | 3 +- .../types/lifecycle_state_names.hpp | 2 - .../mock_components/generic_system.hpp | 1 + hardware_interface/src/actuator.cpp | 1 - hardware_interface/src/component_parser.cpp | 1 - hardware_interface/src/lexical_casts.cpp | 4 + .../src/mock_components/generic_system.cpp | 4 +- hardware_interface/src/resource_manager.cpp | 1 - .../mock_components/test_generic_system.cpp | 1 - .../test/test_component_interfaces.cpp | 1 - .../test_force_torque_sensor.cpp | 1 - .../test_imu_sensor.cpp | 1 - .../test_single_joint_actuator.cpp | 1 - .../test_two_joint_system.cpp | 1 - .../test/test_inst_hardwares.cpp | 3 - hardware_interface/test/test_macros.cpp | 4 +- .../test/test_components/test_actuator.cpp | 1 - .../test/test_components/test_sensor.cpp | 1 - .../test/test_components/test_system.cpp | 1 - .../test/test_resource_manager.hpp | 3 +- .../joint_limits/joint_limiter_interface.hpp | 1 - .../joint_limits/joint_limits_rosparam.hpp | 2 +- .../joint_limits/joint_saturation_limiter.hpp | 3 - joint_limits/src/joint_saturation_limiter.cpp | 1 - .../test/joint_limits_rosparam_test.cpp | 5 +- joint_limits/test/joint_limits_urdf_test.cpp | 3 +- .../test/test_joint_saturation_limiter.hpp | 1 - .../components_urdfs.hpp | 2 - .../transmission_interface/accessor.hpp | 1 + .../differential_transmission.hpp | 1 - .../four_bar_linkage_transmission.hpp | 1 + .../include/transmission_interface/handle.hpp | 2 - .../transmission_interface/transmission.hpp | 2 - .../src/differential_transmission_loader.cpp | 3 - .../four_bar_linkage_transmission_loader.cpp | 3 - .../src/simple_transmission_loader.cpp | 3 - .../differential_transmission_loader_test.cpp | 2 - ...r_bar_linkage_transmission_loader_test.cpp | 2 - .../four_bar_linkage_transmission_test.cpp | 1 - .../test/simple_transmission_loader_test.cpp | 2 - .../test/simple_transmission_test.cpp | 1 - .../test/test_transmission_parser.cpp | 441 ------------------ 84 files changed, 40 insertions(+), 598 deletions(-) delete mode 100644 transmission_interface/test/test_transmission_parser.cpp diff --git a/controller_interface/include/controller_interface/controller_interface.hpp b/controller_interface/include/controller_interface/controller_interface.hpp index 17f39c8478..43fd269803 100644 --- a/controller_interface/include/controller_interface/controller_interface.hpp +++ b/controller_interface/include/controller_interface/controller_interface.hpp @@ -16,7 +16,6 @@ #define CONTROLLER_INTERFACE__CONTROLLER_INTERFACE_HPP_ #include -#include #include #include "controller_interface/controller_interface_base.hpp" diff --git a/controller_interface/include/controller_interface/controller_interface_base.hpp b/controller_interface/include/controller_interface/controller_interface_base.hpp index cfaf4a9799..9eaee9f15b 100644 --- a/controller_interface/include/controller_interface/controller_interface_base.hpp +++ b/controller_interface/include/controller_interface/controller_interface_base.hpp @@ -25,7 +25,6 @@ #include "hardware_interface/loaned_command_interface.hpp" #include "hardware_interface/loaned_state_interface.hpp" -#include "rclcpp/rclcpp.hpp" #include "rclcpp/version.h" #include "rclcpp_lifecycle/lifecycle_node.hpp" diff --git a/controller_interface/include/semantic_components/range_sensor.hpp b/controller_interface/include/semantic_components/range_sensor.hpp index baa9022c75..e4af8b7f86 100644 --- a/controller_interface/include/semantic_components/range_sensor.hpp +++ b/controller_interface/include/semantic_components/range_sensor.hpp @@ -15,7 +15,6 @@ #ifndef SEMANTIC_COMPONENTS__RANGE_SENSOR_HPP_ #define SEMANTIC_COMPONENTS__RANGE_SENSOR_HPP_ -#include #include #include diff --git a/controller_interface/src/controller_interface.cpp b/controller_interface/src/controller_interface.cpp index 0f11bba71c..a039501aa1 100644 --- a/controller_interface/src/controller_interface.cpp +++ b/controller_interface/src/controller_interface.cpp @@ -14,14 +14,8 @@ #include "controller_interface/controller_interface.hpp" -#include -#include -#include #include -#include "hardware_interface/types/lifecycle_state_names.hpp" -#include "lifecycle_msgs/msg/state.hpp" - namespace controller_interface { ControllerInterface::ControllerInterface() : ControllerInterfaceBase() {} diff --git a/controller_interface/src/controller_interface_base.cpp b/controller_interface/src/controller_interface_base.cpp index 6b87ba5cda..db9fb99d81 100644 --- a/controller_interface/src/controller_interface_base.cpp +++ b/controller_interface/src/controller_interface_base.cpp @@ -19,7 +19,6 @@ #include #include -#include "hardware_interface/types/lifecycle_state_names.hpp" #include "lifecycle_msgs/msg/state.hpp" namespace controller_interface diff --git a/controller_interface/test/test_chainable_controller_interface.hpp b/controller_interface/test/test_chainable_controller_interface.hpp index f9684c27fd..a9a581d3bb 100644 --- a/controller_interface/test/test_chainable_controller_interface.hpp +++ b/controller_interface/test/test_chainable_controller_interface.hpp @@ -15,14 +15,13 @@ #ifndef TEST_CHAINABLE_CONTROLLER_INTERFACE_HPP_ #define TEST_CHAINABLE_CONTROLLER_INTERFACE_HPP_ +#include + #include #include -#include "gmock/gmock.h" - #include "controller_interface/chainable_controller_interface.hpp" #include "hardware_interface/handle.hpp" -#include "rclcpp_lifecycle/node_interfaces/lifecycle_node_interface.hpp" constexpr char TEST_CONTROLLER_NAME[] = "testable_chainable_controller"; constexpr double INTERFACE_VALUE = 1989.0; diff --git a/controller_interface/test/test_controller_interface.hpp b/controller_interface/test/test_controller_interface.hpp index 426890220a..b90be419c7 100644 --- a/controller_interface/test/test_controller_interface.hpp +++ b/controller_interface/test/test_controller_interface.hpp @@ -16,7 +16,6 @@ #define TEST_CONTROLLER_INTERFACE_HPP_ #include "controller_interface/controller_interface.hpp" -#include "rclcpp_lifecycle/node_interfaces/lifecycle_node_interface.hpp" constexpr char TEST_CONTROLLER_NAME[] = "testable_controller_interface"; diff --git a/controller_interface/test/test_controller_with_options.cpp b/controller_interface/test/test_controller_with_options.cpp index 1e22239215..5829bcbcdd 100644 --- a/controller_interface/test/test_controller_with_options.cpp +++ b/controller_interface/test/test_controller_with_options.cpp @@ -17,7 +17,6 @@ #include #include #include "ament_index_cpp/get_package_prefix.hpp" -#include "rclcpp/rclcpp.hpp" class FriendControllerWithOptions : public controller_with_options::ControllerWithOptions { diff --git a/controller_interface/test/test_controller_with_options.hpp b/controller_interface/test/test_controller_with_options.hpp index fc909df361..d16f0fe0d8 100644 --- a/controller_interface/test/test_controller_with_options.hpp +++ b/controller_interface/test/test_controller_with_options.hpp @@ -16,11 +16,9 @@ #define TEST_CONTROLLER_WITH_OPTIONS_HPP_ #include -#include #include #include "controller_interface/controller_interface.hpp" -#include "hardware_interface/types/lifecycle_state_names.hpp" namespace controller_with_options { diff --git a/controller_interface/test/test_force_torque_sensor.hpp b/controller_interface/test/test_force_torque_sensor.hpp index b26517a90c..148d0fbabd 100644 --- a/controller_interface/test/test_force_torque_sensor.hpp +++ b/controller_interface/test/test_force_torque_sensor.hpp @@ -19,12 +19,12 @@ #ifndef TEST_FORCE_TORQUE_SENSOR_HPP_ #define TEST_FORCE_TORQUE_SENSOR_HPP_ +#include + #include #include #include -#include "gmock/gmock.h" - #include "semantic_components/force_torque_sensor.hpp" // implementing and friending so we can access member variables diff --git a/controller_interface/test/test_imu_sensor.hpp b/controller_interface/test/test_imu_sensor.hpp index 801a425546..4b73ed7821 100644 --- a/controller_interface/test/test_imu_sensor.hpp +++ b/controller_interface/test/test_imu_sensor.hpp @@ -19,12 +19,12 @@ #ifndef TEST_IMU_SENSOR_HPP_ #define TEST_IMU_SENSOR_HPP_ +#include + #include #include #include -#include "gmock/gmock.h" - #include "semantic_components/imu_sensor.hpp" // implementing and friending so we can access member variables diff --git a/controller_interface/test/test_semantic_component_interface.hpp b/controller_interface/test/test_semantic_component_interface.hpp index 1996ddd193..bd00493915 100644 --- a/controller_interface/test/test_semantic_component_interface.hpp +++ b/controller_interface/test/test_semantic_component_interface.hpp @@ -19,11 +19,12 @@ #ifndef TEST_SEMANTIC_COMPONENT_INTERFACE_HPP_ #define TEST_SEMANTIC_COMPONENT_INTERFACE_HPP_ +#include + #include #include #include "geometry_msgs/msg/wrench.hpp" -#include "gmock/gmock.h" #include "semantic_components/semantic_component_interface.hpp" // implementing and friending so we can access member variables diff --git a/controller_manager/include/controller_manager/controller_manager.hpp b/controller_manager/include/controller_manager/controller_manager.hpp index 393c0e64f9..2f326ff302 100644 --- a/controller_manager/include/controller_manager/controller_manager.hpp +++ b/controller_manager/include/controller_manager/controller_manager.hpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -42,17 +41,12 @@ #include "controller_manager_msgs/srv/unload_controller.hpp" #include "diagnostic_updater/diagnostic_updater.hpp" -#include "hardware_interface/handle.hpp" #include "hardware_interface/resource_manager.hpp" #include "pluginlib/class_loader.hpp" #include "rclcpp/executor.hpp" #include "rclcpp/node.hpp" -#include "rclcpp/node_interfaces/node_logging_interface.hpp" -#include "rclcpp/node_interfaces/node_parameters_interface.hpp" -#include "rclcpp/parameter.hpp" -#include "rclcpp/rclcpp.hpp" #include "std_msgs/msg/string.hpp" namespace controller_manager diff --git a/controller_manager/include/controller_manager/controller_spec.hpp b/controller_manager/include/controller_manager/controller_spec.hpp index d13e9c56bd..9ce1aab8b6 100644 --- a/controller_manager/include/controller_manager/controller_spec.hpp +++ b/controller_manager/include/controller_manager/controller_spec.hpp @@ -19,11 +19,10 @@ #ifndef CONTROLLER_MANAGER__CONTROLLER_SPEC_HPP_ #define CONTROLLER_MANAGER__CONTROLLER_SPEC_HPP_ -#include #include #include #include -#include "controller_interface/controller_interface.hpp" +#include "controller_interface/controller_interface_base.hpp" #include "hardware_interface/controller_info.hpp" namespace controller_manager diff --git a/controller_manager/src/controller_manager.cpp b/controller_manager/src/controller_manager.cpp index 2c564fe659..48dbbc720a 100644 --- a/controller_manager/src/controller_manager.cpp +++ b/controller_manager/src/controller_manager.cpp @@ -14,7 +14,6 @@ #include "controller_manager/controller_manager.hpp" -#include #include #include #include @@ -24,7 +23,6 @@ #include "controller_manager_msgs/msg/hardware_component_state.hpp" #include "hardware_interface/types/lifecycle_state_names.hpp" #include "lifecycle_msgs/msg/state.hpp" -#include "rclcpp/rclcpp.hpp" #include "rclcpp/version.h" #include "rclcpp_lifecycle/state.hpp" diff --git a/controller_manager/src/ros2_control_node.cpp b/controller_manager/src/ros2_control_node.cpp index 6dd7d72fb2..7addaf6cee 100644 --- a/controller_manager/src/ros2_control_node.cpp +++ b/controller_manager/src/ros2_control_node.cpp @@ -12,14 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include #include #include #include #include #include "controller_manager/controller_manager.hpp" -#include "rclcpp/rclcpp.hpp" #include "realtime_tools/thread_priority.hpp" using namespace std::chrono_literals; diff --git a/controller_manager/test/controller_manager_test_common.hpp b/controller_manager/test/controller_manager_test_common.hpp index 8b6bd91376..72326e8c6c 100644 --- a/controller_manager/test/controller_manager_test_common.hpp +++ b/controller_manager/test/controller_manager_test_common.hpp @@ -22,22 +22,18 @@ #include #include #include -#include #include #include "controller_interface/controller_interface.hpp" #include "controller_manager/controller_manager.hpp" -#include "controller_manager_msgs/srv/list_hardware_interfaces.hpp" #include "controller_manager_msgs/srv/switch_controller.hpp" -#include "rclcpp/rclcpp.hpp" #include "rclcpp/utilities.hpp" #include "std_msgs/msg/string.hpp" #include "ros2_control_test_assets/descriptions.hpp" -#include "test_controller_failed_init/test_controller_failed_init.hpp" namespace { diff --git a/controller_manager/test/test_controller/test_controller.cpp b/controller_manager/test/test_controller/test_controller.cpp index 625d7ed90f..7e3419fbc9 100644 --- a/controller_manager/test/test_controller/test_controller.cpp +++ b/controller_manager/test/test_controller/test_controller.cpp @@ -15,7 +15,6 @@ #include "test_controller.hpp" #include -#include #include #include "lifecycle_msgs/msg/state.hpp" diff --git a/controller_manager/test/test_controller/test_controller.hpp b/controller_manager/test/test_controller/test_controller.hpp index bf183c7bad..4e5f827cd0 100644 --- a/controller_manager/test/test_controller/test_controller.hpp +++ b/controller_manager/test/test_controller/test_controller.hpp @@ -15,7 +15,6 @@ #ifndef TEST_CONTROLLER__TEST_CONTROLLER_HPP_ #define TEST_CONTROLLER__TEST_CONTROLLER_HPP_ -#include #include #include diff --git a/controller_manager/test/test_controller_failed_init/test_controller_failed_init.cpp b/controller_manager/test/test_controller_failed_init/test_controller_failed_init.cpp index 1b2276bf3c..673b9bd8bd 100644 --- a/controller_manager/test/test_controller_failed_init/test_controller_failed_init.cpp +++ b/controller_manager/test/test_controller_failed_init/test_controller_failed_init.cpp @@ -14,11 +14,6 @@ #include "test_controller_failed_init.hpp" -#include -#include - -#include "lifecycle_msgs/msg/transition.hpp" - namespace test_controller_failed_init { TestControllerFailedInit::TestControllerFailedInit() : controller_interface::ControllerInterface() diff --git a/controller_manager/test/test_controller_failed_init/test_controller_failed_init.hpp b/controller_manager/test/test_controller_failed_init/test_controller_failed_init.hpp index 3f24df4e29..bd17e0ead4 100644 --- a/controller_manager/test/test_controller_failed_init/test_controller_failed_init.hpp +++ b/controller_manager/test/test_controller_failed_init/test_controller_failed_init.hpp @@ -15,10 +15,7 @@ #ifndef TEST_CONTROLLER_FAILED_INIT__TEST_CONTROLLER_FAILED_INIT_HPP_ #define TEST_CONTROLLER_FAILED_INIT__TEST_CONTROLLER_FAILED_INIT_HPP_ -#include -#include - -#include "controller_manager/controller_manager.hpp" +#include "controller_interface/controller_interface.hpp" #include "controller_manager/visibility_control.h" namespace test_controller_failed_init diff --git a/controller_manager/test/test_controller_manager.cpp b/controller_manager/test/test_controller_manager.cpp index 3e2f91e91a..5093250dfe 100644 --- a/controller_manager/test/test_controller_manager.cpp +++ b/controller_manager/test/test_controller_manager.cpp @@ -15,11 +15,9 @@ #include #include #include -#include #include #include "controller_manager/controller_manager.hpp" -#include "controller_manager_msgs/srv/list_controllers.hpp" #include "controller_manager_test_common.hpp" #include "lifecycle_msgs/msg/state.hpp" #include "test_controller/test_controller.hpp" diff --git a/controller_manager/test/test_controller_manager_srvs.cpp b/controller_manager/test/test_controller_manager_srvs.cpp index 4fdfe3fb9f..af04cc5406 100644 --- a/controller_manager/test/test_controller_manager_srvs.cpp +++ b/controller_manager/test/test_controller_manager_srvs.cpp @@ -22,7 +22,6 @@ #include "controller_manager_test_common.hpp" #include "controller_interface/controller_interface.hpp" -#include "controller_manager/controller_manager.hpp" #include "controller_manager_msgs/srv/list_controller_types.hpp" #include "controller_manager_msgs/srv/list_controllers.hpp" #include "controller_manager_msgs/srv/list_hardware_interfaces.hpp" diff --git a/controller_manager/test/test_controller_manager_with_namespace.cpp b/controller_manager/test/test_controller_manager_with_namespace.cpp index b83eca0c55..58d22f4eed 100644 --- a/controller_manager/test/test_controller_manager_with_namespace.cpp +++ b/controller_manager/test/test_controller_manager_with_namespace.cpp @@ -15,13 +15,10 @@ #include #include #include -#include #include #include "controller_manager/controller_manager.hpp" -#include "controller_manager_msgs/srv/list_controllers.hpp" #include "controller_manager_test_common.hpp" -#include "lifecycle_msgs/msg/state.hpp" #include "test_controller/test_controller.hpp" using ::testing::_; diff --git a/controller_manager/test/test_controller_with_interfaces/test_controller_with_interfaces.cpp b/controller_manager/test/test_controller_with_interfaces/test_controller_with_interfaces.cpp index 86f3c8b76c..d5695e41e5 100644 --- a/controller_manager/test/test_controller_with_interfaces/test_controller_with_interfaces.cpp +++ b/controller_manager/test/test_controller_with_interfaces/test_controller_with_interfaces.cpp @@ -14,11 +14,6 @@ #include "test_controller_with_interfaces.hpp" -#include -#include - -#include "lifecycle_msgs/msg/transition.hpp" - namespace test_controller_with_interfaces { TestControllerWithInterfaces::TestControllerWithInterfaces() diff --git a/controller_manager/test/test_controller_with_interfaces/test_controller_with_interfaces.hpp b/controller_manager/test/test_controller_with_interfaces/test_controller_with_interfaces.hpp index 96aaed11ce..ed083c17cb 100644 --- a/controller_manager/test/test_controller_with_interfaces/test_controller_with_interfaces.hpp +++ b/controller_manager/test/test_controller_with_interfaces/test_controller_with_interfaces.hpp @@ -15,11 +15,8 @@ #ifndef TEST_CONTROLLER_WITH_INTERFACES__TEST_CONTROLLER_WITH_INTERFACES_HPP_ #define TEST_CONTROLLER_WITH_INTERFACES__TEST_CONTROLLER_WITH_INTERFACES_HPP_ -#include -#include - -#include "controller_interface/visibility_control.h" -#include "controller_manager/controller_manager.hpp" +#include "controller_interface/controller_interface.hpp" +#include "controller_manager/visibility_control.h" namespace test_controller_with_interfaces { diff --git a/controller_manager/test/test_controllers_chaining_with_controller_manager.cpp b/controller_manager/test/test_controllers_chaining_with_controller_manager.cpp index 946ffbb4dc..4a81f3bf12 100644 --- a/controller_manager/test/test_controllers_chaining_with_controller_manager.cpp +++ b/controller_manager/test/test_controllers_chaining_with_controller_manager.cpp @@ -19,12 +19,9 @@ #include #include -#include "controller_interface/controller_interface.hpp" #include "controller_manager/controller_manager.hpp" -#include "controller_manager_msgs/srv/list_controllers.hpp" #include "controller_manager_test_common.hpp" #include "lifecycle_msgs/msg/state.hpp" -#include "rclcpp/parameter.hpp" #include "test_chainable_controller/test_chainable_controller.hpp" #include "test_controller/test_controller.hpp" diff --git a/controller_manager/test/test_hardware_management_srvs.cpp b/controller_manager/test/test_hardware_management_srvs.cpp index 2704368789..c7b67e0cfe 100644 --- a/controller_manager/test/test_hardware_management_srvs.cpp +++ b/controller_manager/test/test_hardware_management_srvs.cpp @@ -22,7 +22,6 @@ #include "controller_manager/controller_manager.hpp" #include "controller_manager_msgs/msg/hardware_component_state.hpp" -#include "controller_manager_msgs/srv/list_controllers.hpp" #include "controller_manager_msgs/srv/set_hardware_component_state.hpp" #include "hardware_interface/types/lifecycle_state_names.hpp" #include "lifecycle_msgs/msg/state.hpp" diff --git a/controller_manager/test/test_load_controller.cpp b/controller_manager/test/test_load_controller.cpp index ed443ea3d4..19d34c0c11 100644 --- a/controller_manager/test/test_load_controller.cpp +++ b/controller_manager/test/test_load_controller.cpp @@ -19,11 +19,11 @@ #include #include -#include "controller_interface/controller_interface.hpp" #include "controller_manager/controller_manager.hpp" #include "controller_manager_test_common.hpp" #include "lifecycle_msgs/msg/state.hpp" #include "test_controller/test_controller.hpp" +#include "test_controller_failed_init/test_controller_failed_init.hpp" using test_controller::TEST_CONTROLLER_CLASS_NAME; using ::testing::_; diff --git a/controller_manager/test/test_release_interfaces.cpp b/controller_manager/test/test_release_interfaces.cpp index 3ee141edaa..c0305324b6 100644 --- a/controller_manager/test/test_release_interfaces.cpp +++ b/controller_manager/test/test_release_interfaces.cpp @@ -14,11 +14,9 @@ #include #include -#include #include #include -#include "controller_interface/controller_interface.hpp" #include "controller_manager/controller_manager.hpp" #include "controller_manager_test_common.hpp" #include "lifecycle_msgs/msg/state.hpp" diff --git a/controller_manager/test/test_spawner_unspawner.cpp b/controller_manager/test/test_spawner_unspawner.cpp index a9e915dba6..7680d8270c 100644 --- a/controller_manager/test/test_spawner_unspawner.cpp +++ b/controller_manager/test/test_spawner_unspawner.cpp @@ -19,7 +19,6 @@ #include #include -#include "controller_interface/controller_interface.hpp" #include "controller_manager/controller_manager.hpp" #include "controller_manager_test_common.hpp" #include "lifecycle_msgs/msg/state.hpp" diff --git a/hardware_interface/include/hardware_interface/actuator.hpp b/hardware_interface/include/hardware_interface/actuator.hpp index 3a1d7a5974..3534d9f587 100644 --- a/hardware_interface/include/hardware_interface/actuator.hpp +++ b/hardware_interface/include/hardware_interface/actuator.hpp @@ -19,12 +19,13 @@ #include #include +#include "hardware_interface/actuator_interface.hpp" #include "hardware_interface/handle.hpp" #include "hardware_interface/hardware_info.hpp" #include "hardware_interface/types/hardware_interface_return_values.hpp" #include "hardware_interface/visibility_control.h" #include "rclcpp/duration.hpp" -#include "rclcpp/logging.hpp" +#include "rclcpp/logger.hpp" #include "rclcpp/node_interfaces/node_clock_interface.hpp" #include "rclcpp/time.hpp" #include "rclcpp_lifecycle/state.hpp" diff --git a/hardware_interface/include/hardware_interface/actuator_interface.hpp b/hardware_interface/include/hardware_interface/actuator_interface.hpp index 88b36d460b..b637068fe3 100644 --- a/hardware_interface/include/hardware_interface/actuator_interface.hpp +++ b/hardware_interface/include/hardware_interface/actuator_interface.hpp @@ -15,7 +15,6 @@ #ifndef HARDWARE_INTERFACE__ACTUATOR_INTERFACE_HPP_ #define HARDWARE_INTERFACE__ACTUATOR_INTERFACE_HPP_ -#include #include #include @@ -25,7 +24,7 @@ #include "hardware_interface/types/lifecycle_state_names.hpp" #include "lifecycle_msgs/msg/state.hpp" #include "rclcpp/duration.hpp" -#include "rclcpp/logging.hpp" +#include "rclcpp/logger.hpp" #include "rclcpp/node_interfaces/node_clock_interface.hpp" #include "rclcpp/time.hpp" #include "rclcpp_lifecycle/node_interfaces/lifecycle_node_interface.hpp" diff --git a/hardware_interface/include/hardware_interface/async_components.hpp b/hardware_interface/include/hardware_interface/async_components.hpp index 73495c92f8..0504419b38 100644 --- a/hardware_interface/include/hardware_interface/async_components.hpp +++ b/hardware_interface/include/hardware_interface/async_components.hpp @@ -17,15 +17,12 @@ #include #include -#include #include #include "hardware_interface/actuator.hpp" #include "hardware_interface/sensor.hpp" #include "hardware_interface/system.hpp" #include "lifecycle_msgs/msg/state.hpp" -#include "rclcpp/duration.hpp" -#include "rclcpp/node.hpp" #include "rclcpp/time.hpp" namespace hardware_interface diff --git a/hardware_interface/include/hardware_interface/component_parser.hpp b/hardware_interface/include/hardware_interface/component_parser.hpp index d5d999cca8..38ca0cf89d 100644 --- a/hardware_interface/include/hardware_interface/component_parser.hpp +++ b/hardware_interface/include/hardware_interface/component_parser.hpp @@ -16,7 +16,6 @@ #define HARDWARE_INTERFACE__COMPONENT_PARSER_HPP_ #include -#include #include #include "hardware_interface/hardware_info.hpp" diff --git a/hardware_interface/include/hardware_interface/handle.hpp b/hardware_interface/include/hardware_interface/handle.hpp index 1aea017754..dc536e51be 100644 --- a/hardware_interface/include/hardware_interface/handle.hpp +++ b/hardware_interface/include/hardware_interface/handle.hpp @@ -16,10 +16,8 @@ #define HARDWARE_INTERFACE__HANDLE_HPP_ #include -#include #include "hardware_interface/macros.hpp" -#include "hardware_interface/visibility_control.h" namespace hardware_interface { diff --git a/hardware_interface/include/hardware_interface/hardware_component_info.hpp b/hardware_interface/include/hardware_interface/hardware_component_info.hpp index e7d47bcaa4..092ed21000 100644 --- a/hardware_interface/include/hardware_interface/hardware_component_info.hpp +++ b/hardware_interface/include/hardware_interface/hardware_component_info.hpp @@ -19,7 +19,6 @@ #ifndef HARDWARE_INTERFACE__HARDWARE_COMPONENT_INFO_HPP_ #define HARDWARE_INTERFACE__HARDWARE_COMPONENT_INFO_HPP_ -#include #include #include diff --git a/hardware_interface/include/hardware_interface/lexical_casts.hpp b/hardware_interface/include/hardware_interface/lexical_casts.hpp index 042361e392..dd69dad7a6 100644 --- a/hardware_interface/include/hardware_interface/lexical_casts.hpp +++ b/hardware_interface/include/hardware_interface/lexical_casts.hpp @@ -15,10 +15,6 @@ #ifndef HARDWARE_INTERFACE__LEXICAL_CASTS_HPP_ #define HARDWARE_INTERFACE__LEXICAL_CASTS_HPP_ -#include -#include -#include -#include #include #include "hardware_interface/visibility_control.h" diff --git a/hardware_interface/include/hardware_interface/resource_manager.hpp b/hardware_interface/include/hardware_interface/resource_manager.hpp index 313debcf58..065ecabed9 100644 --- a/hardware_interface/include/hardware_interface/resource_manager.hpp +++ b/hardware_interface/include/hardware_interface/resource_manager.hpp @@ -27,11 +27,10 @@ #include "hardware_interface/loaned_state_interface.hpp" #include "hardware_interface/sensor.hpp" #include "hardware_interface/system.hpp" +#include "hardware_interface/system_interface.hpp" #include "hardware_interface/types/hardware_interface_return_values.hpp" -#include "hardware_interface/types/lifecycle_state_names.hpp" -#include "lifecycle_msgs/msg/state.hpp" #include "rclcpp/duration.hpp" -#include "rclcpp/node.hpp" +#include "rclcpp/node_interfaces/node_logging_interface.hpp" #include "rclcpp/time.hpp" namespace hardware_interface diff --git a/hardware_interface/include/hardware_interface/sensor.hpp b/hardware_interface/include/hardware_interface/sensor.hpp index d8e55aa4ad..4126910d44 100644 --- a/hardware_interface/include/hardware_interface/sensor.hpp +++ b/hardware_interface/include/hardware_interface/sensor.hpp @@ -17,15 +17,15 @@ #include #include -#include #include #include "hardware_interface/handle.hpp" #include "hardware_interface/hardware_info.hpp" +#include "hardware_interface/sensor_interface.hpp" #include "hardware_interface/types/hardware_interface_return_values.hpp" #include "hardware_interface/visibility_control.h" #include "rclcpp/duration.hpp" -#include "rclcpp/logging.hpp" +#include "rclcpp/logger.hpp" #include "rclcpp/node_interfaces/node_clock_interface.hpp" #include "rclcpp/time.hpp" #include "rclcpp_lifecycle/state.hpp" diff --git a/hardware_interface/include/hardware_interface/sensor_interface.hpp b/hardware_interface/include/hardware_interface/sensor_interface.hpp index 79f689d0c6..2cff8b2a3a 100644 --- a/hardware_interface/include/hardware_interface/sensor_interface.hpp +++ b/hardware_interface/include/hardware_interface/sensor_interface.hpp @@ -15,7 +15,6 @@ #ifndef HARDWARE_INTERFACE__SENSOR_INTERFACE_HPP_ #define HARDWARE_INTERFACE__SENSOR_INTERFACE_HPP_ -#include #include #include @@ -25,7 +24,7 @@ #include "hardware_interface/types/lifecycle_state_names.hpp" #include "lifecycle_msgs/msg/state.hpp" #include "rclcpp/duration.hpp" -#include "rclcpp/logging.hpp" +#include "rclcpp/logger.hpp" #include "rclcpp/node_interfaces/node_clock_interface.hpp" #include "rclcpp/time.hpp" #include "rclcpp_lifecycle/node_interfaces/lifecycle_node_interface.hpp" diff --git a/hardware_interface/include/hardware_interface/system.hpp b/hardware_interface/include/hardware_interface/system.hpp index 1ca4260750..9308872ef8 100644 --- a/hardware_interface/include/hardware_interface/system.hpp +++ b/hardware_interface/include/hardware_interface/system.hpp @@ -17,15 +17,15 @@ #include #include -#include #include #include "hardware_interface/handle.hpp" #include "hardware_interface/hardware_info.hpp" +#include "hardware_interface/system_interface.hpp" #include "hardware_interface/types/hardware_interface_return_values.hpp" #include "hardware_interface/visibility_control.h" #include "rclcpp/duration.hpp" -#include "rclcpp/logging.hpp" +#include "rclcpp/logger.hpp" #include "rclcpp/node_interfaces/node_clock_interface.hpp" #include "rclcpp/time.hpp" #include "rclcpp_lifecycle/state.hpp" diff --git a/hardware_interface/include/hardware_interface/system_interface.hpp b/hardware_interface/include/hardware_interface/system_interface.hpp index 8e41438ba5..f9173fb754 100644 --- a/hardware_interface/include/hardware_interface/system_interface.hpp +++ b/hardware_interface/include/hardware_interface/system_interface.hpp @@ -15,7 +15,6 @@ #ifndef HARDWARE_INTERFACE__SYSTEM_INTERFACE_HPP_ #define HARDWARE_INTERFACE__SYSTEM_INTERFACE_HPP_ -#include #include #include @@ -25,7 +24,7 @@ #include "hardware_interface/types/lifecycle_state_names.hpp" #include "lifecycle_msgs/msg/state.hpp" #include "rclcpp/duration.hpp" -#include "rclcpp/logging.hpp" +#include "rclcpp/logger.hpp" #include "rclcpp/node_interfaces/node_clock_interface.hpp" #include "rclcpp/time.hpp" #include "rclcpp_lifecycle/node_interfaces/lifecycle_node_interface.hpp" diff --git a/hardware_interface/include/hardware_interface/types/lifecycle_state_names.hpp b/hardware_interface/include/hardware_interface/types/lifecycle_state_names.hpp index f51f64f836..fcc21031d6 100644 --- a/hardware_interface/include/hardware_interface/types/lifecycle_state_names.hpp +++ b/hardware_interface/include/hardware_interface/types/lifecycle_state_names.hpp @@ -17,8 +17,6 @@ #ifndef HARDWARE_INTERFACE__TYPES__LIFECYCLE_STATE_NAMES_HPP_ #define HARDWARE_INTERFACE__TYPES__LIFECYCLE_STATE_NAMES_HPP_ -#include - namespace hardware_interface { namespace lifecycle_state_names diff --git a/hardware_interface/include/mock_components/generic_system.hpp b/hardware_interface/include/mock_components/generic_system.hpp index fbb8547ab1..7987780ba0 100644 --- a/hardware_interface/include/mock_components/generic_system.hpp +++ b/hardware_interface/include/mock_components/generic_system.hpp @@ -25,6 +25,7 @@ #include "hardware_interface/system_interface.hpp" #include "hardware_interface/types/hardware_interface_return_values.hpp" #include "hardware_interface/types/hardware_interface_type_values.hpp" +#include "hardware_interface/visibility_control.h" using hardware_interface::return_type; diff --git a/hardware_interface/src/actuator.cpp b/hardware_interface/src/actuator.cpp index 7e50c07eb0..66419402f8 100644 --- a/hardware_interface/src/actuator.cpp +++ b/hardware_interface/src/actuator.cpp @@ -14,7 +14,6 @@ #include "hardware_interface/actuator.hpp" -#include #include #include #include diff --git a/hardware_interface/src/component_parser.cpp b/hardware_interface/src/component_parser.cpp index 938deeb0fb..42432dda8d 100644 --- a/hardware_interface/src/component_parser.cpp +++ b/hardware_interface/src/component_parser.cpp @@ -13,7 +13,6 @@ // limitations under the License. #include -#include #include #include #include diff --git a/hardware_interface/src/lexical_casts.cpp b/hardware_interface/src/lexical_casts.cpp index 940beb6d0f..f9bdbedb57 100644 --- a/hardware_interface/src/lexical_casts.cpp +++ b/hardware_interface/src/lexical_casts.cpp @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include +#include +#include + #include "hardware_interface/lexical_casts.hpp" namespace hardware_interface diff --git a/hardware_interface/src/mock_components/generic_system.cpp b/hardware_interface/src/mock_components/generic_system.cpp index 67f9ed56da..abe36ba262 100644 --- a/hardware_interface/src/mock_components/generic_system.cpp +++ b/hardware_interface/src/mock_components/generic_system.cpp @@ -20,14 +20,12 @@ #include #include #include -#include #include #include -#include "hardware_interface/component_parser.hpp" #include "hardware_interface/lexical_casts.hpp" #include "hardware_interface/types/hardware_interface_type_values.hpp" -#include "rcutils/logging_macros.h" +#include "rclcpp/logging.hpp" namespace mock_components { diff --git a/hardware_interface/src/resource_manager.cpp b/hardware_interface/src/resource_manager.cpp index a6eadd49fe..4c990526fc 100644 --- a/hardware_interface/src/resource_manager.cpp +++ b/hardware_interface/src/resource_manager.cpp @@ -33,7 +33,6 @@ #include "hardware_interface/sensor_interface.hpp" #include "hardware_interface/system.hpp" #include "hardware_interface/system_interface.hpp" -#include "hardware_interface/types/hardware_interface_type_values.hpp" #include "lifecycle_msgs/msg/state.hpp" #include "pluginlib/class_loader.hpp" #include "rcutils/logging_macros.h" diff --git a/hardware_interface/test/mock_components/test_generic_system.cpp b/hardware_interface/test/mock_components/test_generic_system.cpp index c90bc85055..15d24fc7e7 100644 --- a/hardware_interface/test/mock_components/test_generic_system.cpp +++ b/hardware_interface/test/mock_components/test_generic_system.cpp @@ -28,7 +28,6 @@ #include "lifecycle_msgs/msg/state.hpp" #include "rclcpp/node.hpp" #include "rclcpp_lifecycle/state.hpp" -#include "ros2_control_test_assets/components_urdfs.hpp" #include "ros2_control_test_assets/descriptions.hpp" namespace diff --git a/hardware_interface/test/test_component_interfaces.cpp b/hardware_interface/test/test_component_interfaces.cpp index 42ccdae8fa..986c32d37b 100644 --- a/hardware_interface/test/test_component_interfaces.cpp +++ b/hardware_interface/test/test_component_interfaces.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include "hardware_interface/actuator.hpp" diff --git a/hardware_interface/test/test_hardware_components/test_force_torque_sensor.cpp b/hardware_interface/test/test_hardware_components/test_force_torque_sensor.cpp index 47b19f9769..ff57d6a63d 100644 --- a/hardware_interface/test/test_hardware_components/test_force_torque_sensor.cpp +++ b/hardware_interface/test/test_hardware_components/test_force_torque_sensor.cpp @@ -14,7 +14,6 @@ #include #include -#include #include #include "hardware_interface/sensor_interface.hpp" diff --git a/hardware_interface/test/test_hardware_components/test_imu_sensor.cpp b/hardware_interface/test/test_hardware_components/test_imu_sensor.cpp index 9997466106..bb41f16228 100644 --- a/hardware_interface/test/test_hardware_components/test_imu_sensor.cpp +++ b/hardware_interface/test/test_hardware_components/test_imu_sensor.cpp @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/hardware_interface/test/test_hardware_components/test_single_joint_actuator.cpp b/hardware_interface/test/test_hardware_components/test_single_joint_actuator.cpp index 390056d990..dacbf308fa 100644 --- a/hardware_interface/test/test_hardware_components/test_single_joint_actuator.cpp +++ b/hardware_interface/test/test_hardware_components/test_single_joint_actuator.cpp @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include #include #include "hardware_interface/actuator_interface.hpp" diff --git a/hardware_interface/test/test_hardware_components/test_two_joint_system.cpp b/hardware_interface/test/test_hardware_components/test_two_joint_system.cpp index fe06a64223..5942f14d42 100644 --- a/hardware_interface/test/test_hardware_components/test_two_joint_system.cpp +++ b/hardware_interface/test/test_hardware_components/test_two_joint_system.cpp @@ -13,7 +13,6 @@ // limitations under the License. #include -#include #include #include "hardware_interface/system_interface.hpp" diff --git a/hardware_interface/test/test_inst_hardwares.cpp b/hardware_interface/test/test_inst_hardwares.cpp index ddd3aea0ad..62b80dae61 100644 --- a/hardware_interface/test/test_inst_hardwares.cpp +++ b/hardware_interface/test/test_inst_hardwares.cpp @@ -15,11 +15,8 @@ #include #include "hardware_interface/actuator.hpp" -#include "hardware_interface/actuator_interface.hpp" #include "hardware_interface/sensor.hpp" -#include "hardware_interface/sensor_interface.hpp" #include "hardware_interface/system.hpp" -#include "hardware_interface/system_interface.hpp" class TestInstantiationHardwares : public ::testing::Test { diff --git a/hardware_interface/test/test_macros.cpp b/hardware_interface/test/test_macros.cpp index a7c56849d1..18e9e292c0 100644 --- a/hardware_interface/test/test_macros.cpp +++ b/hardware_interface/test/test_macros.cpp @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include #include "hardware_interface/macros.hpp" -#include "gmock/gmock.h" - class TestMacros : public ::testing::Test { protected: diff --git a/hardware_interface_testing/test/test_components/test_actuator.cpp b/hardware_interface_testing/test/test_components/test_actuator.cpp index 1277fecfb6..b7149369ed 100644 --- a/hardware_interface_testing/test/test_components/test_actuator.cpp +++ b/hardware_interface_testing/test/test_components/test_actuator.cpp @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include #include #include "hardware_interface/actuator_interface.hpp" diff --git a/hardware_interface_testing/test/test_components/test_sensor.cpp b/hardware_interface_testing/test/test_components/test_sensor.cpp index 3fc2ef2445..7f5a476c14 100644 --- a/hardware_interface_testing/test/test_components/test_sensor.cpp +++ b/hardware_interface_testing/test/test_components/test_sensor.cpp @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include #include #include "hardware_interface/sensor_interface.hpp" diff --git a/hardware_interface_testing/test/test_components/test_system.cpp b/hardware_interface_testing/test/test_components/test_system.cpp index 502f5b4c21..6724a1d019 100644 --- a/hardware_interface_testing/test/test_components/test_system.cpp +++ b/hardware_interface_testing/test/test_components/test_system.cpp @@ -13,7 +13,6 @@ // limitations under the License. #include -#include #include #include "hardware_interface/system_interface.hpp" diff --git a/hardware_interface_testing/test/test_resource_manager.hpp b/hardware_interface_testing/test/test_resource_manager.hpp index 18e51342f6..dcb3026e19 100644 --- a/hardware_interface_testing/test/test_resource_manager.hpp +++ b/hardware_interface_testing/test/test_resource_manager.hpp @@ -19,10 +19,11 @@ #include -#include #include #include +#include + #include "hardware_interface/resource_manager.hpp" #include "hardware_interface/types/hardware_interface_return_values.hpp" diff --git a/joint_limits/include/joint_limits/joint_limiter_interface.hpp b/joint_limits/include/joint_limits/joint_limiter_interface.hpp index ed2f269812..42403d56ae 100644 --- a/joint_limits/include/joint_limits/joint_limiter_interface.hpp +++ b/joint_limits/include/joint_limits/joint_limiter_interface.hpp @@ -20,7 +20,6 @@ #include #include -#include "joint_limits/joint_limits.hpp" #include "joint_limits/joint_limits_rosparam.hpp" #include "joint_limits/visibility_control.h" #include "rclcpp/node.hpp" diff --git a/joint_limits/include/joint_limits/joint_limits_rosparam.hpp b/joint_limits/include/joint_limits/joint_limits_rosparam.hpp index b23607f53d..379cee0357 100644 --- a/joint_limits/include/joint_limits/joint_limits_rosparam.hpp +++ b/joint_limits/include/joint_limits/joint_limits_rosparam.hpp @@ -22,7 +22,7 @@ #include #include "joint_limits/joint_limits.hpp" -#include "rclcpp/rclcpp.hpp" +#include "rclcpp/node.hpp" #include "rclcpp_lifecycle/lifecycle_node.hpp" namespace // utilities diff --git a/joint_limits/include/joint_limits/joint_saturation_limiter.hpp b/joint_limits/include/joint_limits/joint_saturation_limiter.hpp index 3641fc5c75..a69cc2791c 100644 --- a/joint_limits/include/joint_limits/joint_saturation_limiter.hpp +++ b/joint_limits/include/joint_limits/joint_saturation_limiter.hpp @@ -18,12 +18,9 @@ #define JOINT_LIMITS__JOINT_SATURATION_LIMITER_HPP_ #include -#include -#include #include #include "joint_limits/joint_limiter_interface.hpp" -#include "joint_limits/joint_limits.hpp" #include "rclcpp/clock.hpp" #include "rclcpp/duration.hpp" diff --git a/joint_limits/src/joint_saturation_limiter.cpp b/joint_limits/src/joint_saturation_limiter.cpp index 2f8ac9636f..f2a3adae1e 100644 --- a/joint_limits/src/joint_saturation_limiter.cpp +++ b/joint_limits/src/joint_saturation_limiter.cpp @@ -19,7 +19,6 @@ #include #include "rclcpp/duration.hpp" -#include "rcutils/logging_macros.h" constexpr size_t ROS_LOG_THROTTLE_PERIOD = 1 * 1000; // Milliseconds to throttle logs inside loops constexpr double VALUE_CONSIDERED_ZERO = 1e-10; diff --git a/joint_limits/test/joint_limits_rosparam_test.cpp b/joint_limits/test/joint_limits_rosparam_test.cpp index 5f376562a6..7d03eb20ca 100644 --- a/joint_limits/test/joint_limits_rosparam_test.cpp +++ b/joint_limits/test/joint_limits_rosparam_test.cpp @@ -14,12 +14,9 @@ /// \author Adolfo Rodriguez Tsouroukdissian -#include - -#include "gtest/gtest.h" +#include #include "joint_limits/joint_limits_rosparam.hpp" -#include "rclcpp/rclcpp.hpp" #include "rclcpp_lifecycle/lifecycle_node.hpp" class JointLimitsRosParamTest : public ::testing::Test diff --git a/joint_limits/test/joint_limits_urdf_test.cpp b/joint_limits/test/joint_limits_urdf_test.cpp index 562293d475..82c7e13613 100644 --- a/joint_limits/test/joint_limits_urdf_test.cpp +++ b/joint_limits/test/joint_limits_urdf_test.cpp @@ -13,8 +13,9 @@ // limitations under the License. /// \author Adolfo Rodriguez Tsouroukdissian +#include + #include "joint_limits/joint_limits_urdf.hpp" -#include "gtest/gtest.h" using std::string; diff --git a/joint_limits/test/test_joint_saturation_limiter.hpp b/joint_limits/test/test_joint_saturation_limiter.hpp index 3da0706177..20097ae591 100644 --- a/joint_limits/test/test_joint_saturation_limiter.hpp +++ b/joint_limits/test/test_joint_saturation_limiter.hpp @@ -23,7 +23,6 @@ #include "joint_limits/joint_limiter_interface.hpp" #include "joint_limits/joint_limits.hpp" #include "pluginlib/class_loader.hpp" -#include "rclcpp/duration.hpp" #include "rclcpp/node.hpp" #include "trajectory_msgs/msg/joint_trajectory_point.hpp" diff --git a/ros2_control_test_assets/include/ros2_control_test_assets/components_urdfs.hpp b/ros2_control_test_assets/include/ros2_control_test_assets/components_urdfs.hpp index eba16c1e71..b0076b859b 100644 --- a/ros2_control_test_assets/include/ros2_control_test_assets/components_urdfs.hpp +++ b/ros2_control_test_assets/include/ros2_control_test_assets/components_urdfs.hpp @@ -15,8 +15,6 @@ #ifndef ROS2_CONTROL_TEST_ASSETS__COMPONENTS_URDFS_HPP_ #define ROS2_CONTROL_TEST_ASSETS__COMPONENTS_URDFS_HPP_ -#include - namespace ros2_control_test_assets { // 1. Industrial Robots with only one interface diff --git a/transmission_interface/include/transmission_interface/accessor.hpp b/transmission_interface/include/transmission_interface/accessor.hpp index dd58e55744..a72b0f39b0 100644 --- a/transmission_interface/include/transmission_interface/accessor.hpp +++ b/transmission_interface/include/transmission_interface/accessor.hpp @@ -17,6 +17,7 @@ #include #include +#include #include #include diff --git a/transmission_interface/include/transmission_interface/differential_transmission.hpp b/transmission_interface/include/transmission_interface/differential_transmission.hpp index 85da01116d..b6b4353dd8 100644 --- a/transmission_interface/include/transmission_interface/differential_transmission.hpp +++ b/transmission_interface/include/transmission_interface/differential_transmission.hpp @@ -16,7 +16,6 @@ #define TRANSMISSION_INTERFACE__DIFFERENTIAL_TRANSMISSION_HPP_ #include -#include #include #include diff --git a/transmission_interface/include/transmission_interface/four_bar_linkage_transmission.hpp b/transmission_interface/include/transmission_interface/four_bar_linkage_transmission.hpp index 39f5df6f61..a8757e9c02 100644 --- a/transmission_interface/include/transmission_interface/four_bar_linkage_transmission.hpp +++ b/transmission_interface/include/transmission_interface/four_bar_linkage_transmission.hpp @@ -21,6 +21,7 @@ #include #include +#include "hardware_interface/types/hardware_interface_type_values.hpp" #include "transmission_interface/accessor.hpp" #include "transmission_interface/exception.hpp" #include "transmission_interface/transmission.hpp" diff --git a/transmission_interface/include/transmission_interface/handle.hpp b/transmission_interface/include/transmission_interface/handle.hpp index bc1c0a78d8..024a019bfd 100644 --- a/transmission_interface/include/transmission_interface/handle.hpp +++ b/transmission_interface/include/transmission_interface/handle.hpp @@ -15,8 +15,6 @@ #ifndef TRANSMISSION_INTERFACE__HANDLE_HPP_ #define TRANSMISSION_INTERFACE__HANDLE_HPP_ -#include - #include "hardware_interface/handle.hpp" namespace transmission_interface diff --git a/transmission_interface/include/transmission_interface/transmission.hpp b/transmission_interface/include/transmission_interface/transmission.hpp index 697e1a4eb7..6275f37711 100644 --- a/transmission_interface/include/transmission_interface/transmission.hpp +++ b/transmission_interface/include/transmission_interface/transmission.hpp @@ -16,8 +16,6 @@ #include #include -#include -#include #include #include "transmission_interface/handle.hpp" diff --git a/transmission_interface/src/differential_transmission_loader.cpp b/transmission_interface/src/differential_transmission_loader.cpp index 37f5b708c7..87ee55fa25 100644 --- a/transmission_interface/src/differential_transmission_loader.cpp +++ b/transmission_interface/src/differential_transmission_loader.cpp @@ -16,12 +16,9 @@ #include -#include "hardware_interface/component_parser.hpp" #include "hardware_interface/hardware_info.hpp" -#include "hardware_interface/types/hardware_interface_type_values.hpp" #include "pluginlib/class_list_macros.hpp" #include "rclcpp/logging.hpp" -#include "rclcpp/rclcpp.hpp" #include "transmission_interface/differential_transmission.hpp" namespace transmission_interface diff --git a/transmission_interface/src/four_bar_linkage_transmission_loader.cpp b/transmission_interface/src/four_bar_linkage_transmission_loader.cpp index 93b42e33bf..e39ad96cbb 100644 --- a/transmission_interface/src/four_bar_linkage_transmission_loader.cpp +++ b/transmission_interface/src/four_bar_linkage_transmission_loader.cpp @@ -16,12 +16,9 @@ #include -#include "hardware_interface/component_parser.hpp" #include "hardware_interface/hardware_info.hpp" -#include "hardware_interface/types/hardware_interface_type_values.hpp" #include "pluginlib/class_list_macros.hpp" #include "rclcpp/logging.hpp" -#include "rclcpp/rclcpp.hpp" #include "transmission_interface/four_bar_linkage_transmission.hpp" namespace transmission_interface diff --git a/transmission_interface/src/simple_transmission_loader.cpp b/transmission_interface/src/simple_transmission_loader.cpp index aaa86bff22..7dd410f534 100644 --- a/transmission_interface/src/simple_transmission_loader.cpp +++ b/transmission_interface/src/simple_transmission_loader.cpp @@ -16,12 +16,9 @@ #include -#include "hardware_interface/component_parser.hpp" #include "hardware_interface/hardware_info.hpp" -#include "hardware_interface/types/hardware_interface_type_values.hpp" #include "pluginlib/class_list_macros.hpp" #include "rclcpp/logging.hpp" -#include "rclcpp/rclcpp.hpp" #include "transmission_interface/simple_transmission.hpp" namespace transmission_interface diff --git a/transmission_interface/test/differential_transmission_loader_test.cpp b/transmission_interface/test/differential_transmission_loader_test.cpp index 946c4703b5..77a7ebed78 100644 --- a/transmission_interface/test/differential_transmission_loader_test.cpp +++ b/transmission_interface/test/differential_transmission_loader_test.cpp @@ -20,11 +20,9 @@ #include "hardware_interface/component_parser.hpp" #include "hardware_interface/hardware_info.hpp" -#include "hardware_interface/types/hardware_interface_type_values.hpp" #include "pluginlib/class_loader.hpp" #include "ros2_control_test_assets/descriptions.hpp" #include "transmission_interface/differential_transmission.hpp" -#include "transmission_interface/differential_transmission_loader.hpp" #include "transmission_interface/transmission_loader.hpp" using testing::DoubleNear; diff --git a/transmission_interface/test/four_bar_linkage_transmission_loader_test.cpp b/transmission_interface/test/four_bar_linkage_transmission_loader_test.cpp index 720cad68b4..8d3e1b2010 100644 --- a/transmission_interface/test/four_bar_linkage_transmission_loader_test.cpp +++ b/transmission_interface/test/four_bar_linkage_transmission_loader_test.cpp @@ -20,11 +20,9 @@ #include "hardware_interface/component_parser.hpp" #include "hardware_interface/hardware_info.hpp" -#include "hardware_interface/types/hardware_interface_type_values.hpp" #include "pluginlib/class_loader.hpp" #include "ros2_control_test_assets/descriptions.hpp" #include "transmission_interface/four_bar_linkage_transmission.hpp" -#include "transmission_interface/four_bar_linkage_transmission_loader.hpp" #include "transmission_interface/transmission_loader.hpp" using testing::DoubleNear; diff --git a/transmission_interface/test/four_bar_linkage_transmission_test.cpp b/transmission_interface/test/four_bar_linkage_transmission_test.cpp index f74e4def6a..08d98ec734 100644 --- a/transmission_interface/test/four_bar_linkage_transmission_test.cpp +++ b/transmission_interface/test/four_bar_linkage_transmission_test.cpp @@ -26,7 +26,6 @@ using hardware_interface::HW_IF_EFFORT; using hardware_interface::HW_IF_POSITION; using hardware_interface::HW_IF_VELOCITY; using testing::DoubleNear; -using testing::Not; using transmission_interface::ActuatorHandle; using transmission_interface::Exception; using transmission_interface::FourBarLinkageTransmission; diff --git a/transmission_interface/test/simple_transmission_loader_test.cpp b/transmission_interface/test/simple_transmission_loader_test.cpp index 968f64c6e8..7433c1bed3 100644 --- a/transmission_interface/test/simple_transmission_loader_test.cpp +++ b/transmission_interface/test/simple_transmission_loader_test.cpp @@ -20,11 +20,9 @@ #include "hardware_interface/component_parser.hpp" #include "hardware_interface/hardware_info.hpp" -#include "hardware_interface/types/hardware_interface_type_values.hpp" #include "pluginlib/class_loader.hpp" #include "ros2_control_test_assets/descriptions.hpp" #include "transmission_interface/simple_transmission.hpp" -#include "transmission_interface/simple_transmission_loader.hpp" #include "transmission_interface/transmission_loader.hpp" using testing::DoubleNear; diff --git a/transmission_interface/test/simple_transmission_test.cpp b/transmission_interface/test/simple_transmission_test.cpp index 33a14f92d1..d687fbfd21 100644 --- a/transmission_interface/test/simple_transmission_test.cpp +++ b/transmission_interface/test/simple_transmission_test.cpp @@ -21,7 +21,6 @@ using hardware_interface::HW_IF_EFFORT; using hardware_interface::HW_IF_POSITION; using hardware_interface::HW_IF_VELOCITY; -using std::vector; using transmission_interface::ActuatorHandle; using transmission_interface::Exception; using transmission_interface::JointHandle; diff --git a/transmission_interface/test/test_transmission_parser.cpp b/transmission_interface/test/test_transmission_parser.cpp deleted file mode 100644 index 3a127e4caa..0000000000 --- a/transmission_interface/test/test_transmission_parser.cpp +++ /dev/null @@ -1,441 +0,0 @@ -// Copyright 2020 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include -#include -#include - -#include "transmission_interface/transmission_parser.hpp" - -using namespace ::testing; // NOLINT - -class TestTransmissionParser : public Test -{ -public: - void SetUp() override - { - valid_urdf_xml_ = - R"( - - - - - - - - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - transmission_interface/SimpleTransmission - - PositionJointInterface - - - 1 - PositionJointInterface - - - - transmission_interface/SimpleTransmission - - VelocityJointInterface - - - 60 - VelocityJointInterface - - - - Gazebo/Orange - - - 0.2 - 0.2 - Gazebo/Black - - - 0.2 - 0.2 - Gazebo/Orange - - - - - - - )"; - - wrong_urdf_xml_ = - R"( - - - - - - - - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - transmission_interface/SimpleTransmission - - 1 - - - - Gazebo/Orange - - - 0.2 - 0.2 - Gazebo/Black - - - 0.2 - 0.2 - Gazebo/Orange - - - - - - - )"; - } - - std::string valid_urdf_xml_; - std::string wrong_urdf_xml_; -}; - -using transmission_interface::parse_transmissions_from_urdf; -using transmission_interface::TransmissionInfo; - -TEST_F(TestTransmissionParser, successfully_parse_valid_urdf) -{ - const auto transmissions = parse_transmissions_from_urdf(valid_urdf_xml_); - - ASSERT_THAT(transmissions, SizeIs(2)); - - // first transmission - EXPECT_EQ("rrbot_tran1", transmissions[0].name); - EXPECT_EQ("transmission_interface/SimpleTransmission", transmissions[0].type); - - ASSERT_THAT(transmissions[0].joints, SizeIs(1)); - ASSERT_THAT(transmissions[0].joints[0].interfaces, SizeIs(1)); - EXPECT_EQ("rrbot_joint1", transmissions[0].joints[0].name); - EXPECT_EQ("PositionJointInterface", transmissions[0].joints[0].interfaces[0]); - - ASSERT_THAT(transmissions[0].actuators, SizeIs(1)); - ASSERT_THAT(transmissions[0].actuators[0].interfaces, SizeIs(1)); - EXPECT_EQ("rrbot_motor1", transmissions[0].actuators[0].name); - EXPECT_EQ("PositionJointInterface", transmissions[0].actuators[0].interfaces[0]); - EXPECT_EQ(1, transmissions[0].actuators[0].mechanical_reduction); - - // second transmission - EXPECT_EQ("rrbot_tran2", transmissions[1].name); - EXPECT_EQ("transmission_interface/SimpleTransmission", transmissions[1].type); - - ASSERT_THAT(transmissions[1].joints, SizeIs(1)); - ASSERT_THAT(transmissions[1].joints[0].interfaces, SizeIs(1)); - EXPECT_EQ("rrbot_joint2", transmissions[1].joints[0].name); - EXPECT_EQ("VelocityJointInterface", transmissions[1].joints[0].interfaces[0]); - - ASSERT_THAT(transmissions[1].actuators, SizeIs(1)); - ASSERT_THAT(transmissions[1].actuators[0].interfaces, SizeIs(1)); - EXPECT_EQ("rrbot_motor2", transmissions[1].actuators[0].name); - EXPECT_EQ("VelocityJointInterface", transmissions[1].actuators[0].interfaces[0]); - EXPECT_EQ(60, transmissions[1].actuators[0].mechanical_reduction); -} - -TEST_F(TestTransmissionParser, empty_string_throws_error) -{ - ASSERT_THROW(transmission_interface::parse_transmissions_from_urdf(""), std::runtime_error); -} - -TEST_F(TestTransmissionParser, empty_urdf_returns_empty) -{ - const auto transmissions = transmission_interface::parse_transmissions_from_urdf( - ""); - ASSERT_THAT(transmissions, IsEmpty()); -} - -TEST_F(TestTransmissionParser, wrong_urdf_throws_error) -{ - EXPECT_THROW( - transmission_interface::parse_transmissions_from_urdf(wrong_urdf_xml_), std::runtime_error); -}