From c81855a3e8cd47f0b35bc86c1946f5163c74c44f Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Sun, 6 Feb 2022 01:15:37 -0800 Subject: [PATCH] gazebo_ros: fix other cpplint build_order errors Signed-off-by: Steve Peters --- gazebo_ros/src/gazebo_ros_factory.cpp | 16 +++++++++------- gazebo_ros/src/gazebo_ros_force_system.cpp | 11 ++++++----- gazebo_ros/src/gazebo_ros_init.cpp | 6 +++--- gazebo_ros/src/gazebo_ros_properties.cpp | 9 +++++---- gazebo_ros/src/gazebo_ros_state.cpp | 8 +++++--- gazebo_ros/src/qos.cpp | 8 ++++---- gazebo_ros/test/plugins/args_init.cpp | 6 +++--- .../test/plugins/create_node_without_init.cpp | 6 +++--- gazebo_ros/test/plugins/multiple_nodes.cpp | 6 +++--- gazebo_ros/test/plugins/ros_world_plugin.cpp | 6 +++--- gazebo_ros/test/plugins/sdf_node.cpp | 8 ++++---- gazebo_ros/test/test_gazebo_ros_factory.cpp | 2 +- gazebo_ros/test/test_gazebo_ros_init.cpp | 2 +- gazebo_ros/test/test_gazebo_ros_joint_effort.cpp | 2 +- gazebo_ros/test/test_gazebo_ros_link_wrench.cpp | 2 +- gazebo_ros/test/test_gazebo_ros_properties.cpp | 12 ++++++------ gazebo_ros/test/test_gazebo_ros_state.cpp | 6 +++--- gazebo_ros/test/test_plugins.cpp | 10 +++++----- gazebo_ros/test/test_sim_time.cpp | 7 ++++--- gazebo_ros/test/test_utils.cpp | 3 ++- 20 files changed, 72 insertions(+), 64 deletions(-) diff --git a/gazebo_ros/src/gazebo_ros_factory.cpp b/gazebo_ros/src/gazebo_ros_factory.cpp index 1e0ba57fe..62fb10b7b 100644 --- a/gazebo_ros/src/gazebo_ros_factory.cpp +++ b/gazebo_ros/src/gazebo_ros_factory.cpp @@ -14,6 +14,8 @@ #include "gazebo_ros/gazebo_ros_factory.hpp" +#include + #include #include #include @@ -21,6 +23,13 @@ #include #include #include + +#include +#include +#include +#include +#include + #include #include #include @@ -30,13 +39,6 @@ #include #include -#include -#include -#include -#include -#include -#include - namespace gazebo_ros { diff --git a/gazebo_ros/src/gazebo_ros_force_system.cpp b/gazebo_ros/src/gazebo_ros_force_system.cpp index 70818635a..ac94a649c 100644 --- a/gazebo_ros/src/gazebo_ros_force_system.cpp +++ b/gazebo_ros/src/gazebo_ros_force_system.cpp @@ -16,17 +16,18 @@ #include #include #include -#include -#include -#include -#include -#include #include #include #include #include +#include +#include +#include +#include +#include + #include "gazebo_ros/conversions/builtin_interfaces.hpp" #include "gazebo_ros/gazebo_ros_force_system.hpp" diff --git a/gazebo_ros/src/gazebo_ros_init.cpp b/gazebo_ros/src/gazebo_ros_init.cpp index a798d4517..b096387fe 100644 --- a/gazebo_ros/src/gazebo_ros_init.cpp +++ b/gazebo_ros/src/gazebo_ros_init.cpp @@ -20,6 +20,9 @@ #include #include +#include +#include + #include #include @@ -30,9 +33,6 @@ #include #include -#include -#include - #ifndef GAZEBO_ROS_HAS_PERFORMANCE_METRICS #if \ (GAZEBO_MAJOR_VERSION == 11 && GAZEBO_MINOR_VERSION > 1) || \ diff --git a/gazebo_ros/src/gazebo_ros_properties.cpp b/gazebo_ros/src/gazebo_ros_properties.cpp index 127fd5e61..db387c46f 100644 --- a/gazebo_ros/src/gazebo_ros_properties.cpp +++ b/gazebo_ros/src/gazebo_ros_properties.cpp @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "gazebo_ros/gazebo_ros_properties.hpp" + #include #include #include @@ -21,6 +23,9 @@ #include #include #include + +#include + #include #include #include @@ -33,10 +38,6 @@ #include #include -#include - -#include "gazebo_ros/gazebo_ros_properties.hpp" - namespace gazebo_ros { diff --git a/gazebo_ros/src/gazebo_ros_state.cpp b/gazebo_ros/src/gazebo_ros_state.cpp index b1cc4fd0a..06201ca3b 100644 --- a/gazebo_ros/src/gazebo_ros_state.cpp +++ b/gazebo_ros/src/gazebo_ros_state.cpp @@ -12,23 +12,25 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "gazebo_ros/gazebo_ros_state.hpp" + #include #include #include #include #include #include + +#include + #include #include #include #include #include -#include - #include "gazebo_ros/conversions/builtin_interfaces.hpp" #include "gazebo_ros/conversions/geometry_msgs.hpp" -#include "gazebo_ros/gazebo_ros_state.hpp" namespace gazebo_ros { diff --git a/gazebo_ros/src/qos.cpp b/gazebo_ros/src/qos.cpp index 95766859b..774673508 100644 --- a/gazebo_ros/src/qos.cpp +++ b/gazebo_ros/src/qos.cpp @@ -13,10 +13,6 @@ // limitations under the License. #include - -#include -#include -#include #include #include #include @@ -29,6 +25,10 @@ #include #include +#include +#include +#include + namespace gazebo_ros { diff --git a/gazebo_ros/test/plugins/args_init.cpp b/gazebo_ros/test/plugins/args_init.cpp index 14ab804fa..e7798cbb6 100644 --- a/gazebo_ros/test/plugins/args_init.cpp +++ b/gazebo_ros/test/plugins/args_init.cpp @@ -14,11 +14,11 @@ #include -#include -#include - #include +#include +#include + /// Simple example of a gazebo system plugin which uses a ROS2 node with gazebo_ros::Node. class ProperInit : public gazebo::SystemPlugin { diff --git a/gazebo_ros/test/plugins/create_node_without_init.cpp b/gazebo_ros/test/plugins/create_node_without_init.cpp index fab2c8929..30c9c7304 100644 --- a/gazebo_ros/test/plugins/create_node_without_init.cpp +++ b/gazebo_ros/test/plugins/create_node_without_init.cpp @@ -14,11 +14,11 @@ #include -#include -#include - #include +#include +#include + /// Simple example of a gazebo system plugin which uses a ROS2 node with gazebo_ros::Node. class CreateBeforeInit : public gazebo::SystemPlugin { diff --git a/gazebo_ros/test/plugins/multiple_nodes.cpp b/gazebo_ros/test/plugins/multiple_nodes.cpp index 0e78ed8c8..353a83d99 100644 --- a/gazebo_ros/test/plugins/multiple_nodes.cpp +++ b/gazebo_ros/test/plugins/multiple_nodes.cpp @@ -14,11 +14,11 @@ #include -#include -#include - #include +#include +#include + /// Simple example of a gazebo system plugin which uses a ROS2 node with gazebo_ros::Node. class MultipleNodes : public gazebo::SystemPlugin { diff --git a/gazebo_ros/test/plugins/ros_world_plugin.cpp b/gazebo_ros/test/plugins/ros_world_plugin.cpp index c1c988314..c2e86d7e9 100644 --- a/gazebo_ros/test/plugins/ros_world_plugin.cpp +++ b/gazebo_ros/test/plugins/ros_world_plugin.cpp @@ -14,11 +14,11 @@ #include -#include -#include - #include +#include +#include + /// Simple example of a gazebo world plugin which uses a ROS2 node with gazebo_ros::Node. class RosWorldPlugin : public gazebo::WorldPlugin { diff --git a/gazebo_ros/test/plugins/sdf_node.cpp b/gazebo_ros/test/plugins/sdf_node.cpp index 4913edcae..7d3b3b1e8 100644 --- a/gazebo_ros/test/plugins/sdf_node.cpp +++ b/gazebo_ros/test/plugins/sdf_node.cpp @@ -14,13 +14,13 @@ #include -#include -#include -#include - #include #include +#include +#include +#include + /// Simple example of a gazebo world plugin which uses a ROS2 node with gazebo_ros::Node. class SDFNode : public gazebo::WorldPlugin { diff --git a/gazebo_ros/test/test_gazebo_ros_factory.cpp b/gazebo_ros/test/test_gazebo_ros_factory.cpp index 04463a615..dda3cc7a2 100644 --- a/gazebo_ros/test/test_gazebo_ros_factory.cpp +++ b/gazebo_ros/test/test_gazebo_ros_factory.cpp @@ -13,11 +13,11 @@ // limitations under the License. #include +#include #include #include #include #include -#include class GazeboRosFactoryTest : public gazebo::ServerFixture { diff --git a/gazebo_ros/test/test_gazebo_ros_init.cpp b/gazebo_ros/test/test_gazebo_ros_init.cpp index 33d0e6353..6087a7fe2 100644 --- a/gazebo_ros/test/test_gazebo_ros_init.cpp +++ b/gazebo_ros/test/test_gazebo_ros_init.cpp @@ -13,9 +13,9 @@ // limitations under the License. #include +#include #include #include -#include class GazeboRosInitTest : public gazebo::ServerFixture { diff --git a/gazebo_ros/test/test_gazebo_ros_joint_effort.cpp b/gazebo_ros/test/test_gazebo_ros_joint_effort.cpp index d5831eea7..96c43df10 100644 --- a/gazebo_ros/test/test_gazebo_ros_joint_effort.cpp +++ b/gazebo_ros/test/test_gazebo_ros_joint_effort.cpp @@ -13,10 +13,10 @@ // limitations under the License. #include +#include #include #include #include -#include #define tol 10e-2 diff --git a/gazebo_ros/test/test_gazebo_ros_link_wrench.cpp b/gazebo_ros/test/test_gazebo_ros_link_wrench.cpp index a12a92d82..4ea3993cd 100644 --- a/gazebo_ros/test/test_gazebo_ros_link_wrench.cpp +++ b/gazebo_ros/test/test_gazebo_ros_link_wrench.cpp @@ -13,10 +13,10 @@ // limitations under the License. #include +#include #include #include #include -#include #define tol 10e-2 diff --git a/gazebo_ros/test/test_gazebo_ros_properties.cpp b/gazebo_ros/test/test_gazebo_ros_properties.cpp index b80f95243..714c05cd7 100644 --- a/gazebo_ros/test/test_gazebo_ros_properties.cpp +++ b/gazebo_ros/test/test_gazebo_ros_properties.cpp @@ -14,6 +14,10 @@ #include +#include +#include +#include + #include #include #include @@ -23,16 +27,12 @@ #include #include #include - -#include #include + #include +#include #include -#include -#include -#include - #define tol 0.01 class GazeboRosPropertiesTest : public gazebo::ServerFixture diff --git a/gazebo_ros/test/test_gazebo_ros_state.cpp b/gazebo_ros/test/test_gazebo_ros_state.cpp index cb4280657..f54e5956c 100644 --- a/gazebo_ros/test/test_gazebo_ros_state.cpp +++ b/gazebo_ros/test/test_gazebo_ros_state.cpp @@ -16,6 +16,9 @@ #include #include +#include +#include + #include #include #include @@ -23,9 +26,6 @@ #include #include -#include -#include - #define tol 10e-2 using namespace std::literals::chrono_literals; // NOLINT diff --git a/gazebo_ros/test/test_plugins.cpp b/gazebo_ros/test/test_plugins.cpp index 1235388ee..dd59dff5e 100644 --- a/gazebo_ros/test/test_plugins.cpp +++ b/gazebo_ros/test/test_plugins.cpp @@ -14,16 +14,16 @@ #include -#include - -#include -#include - #include #include #include #include +#include + +#include +#include + struct TestParams { std::vector args; diff --git a/gazebo_ros/test/test_sim_time.cpp b/gazebo_ros/test/test_sim_time.cpp index fb5dafbb4..b26c0034f 100644 --- a/gazebo_ros/test/test_sim_time.cpp +++ b/gazebo_ros/test/test_sim_time.cpp @@ -13,14 +13,15 @@ // limitations under the License. #include -#include -#include -#include #include #include #include +#include +#include +#include + using namespace std::literals::chrono_literals; /// Tests the simtime published to /clock by gazebo_ros_init diff --git a/gazebo_ros/test/test_utils.cpp b/gazebo_ros/test/test_utils.cpp index 726b6ce13..7f9a14fe4 100644 --- a/gazebo_ros/test/test_utils.cpp +++ b/gazebo_ros/test/test_utils.cpp @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include #include #include #include @@ -20,6 +19,8 @@ #include #include +#include + TEST(TestUtils, NoiseVariance) { // Test no noise has 0 variance