Skip to content

Commit

Permalink
gazebo_ros: fix other cpplint build_order errors
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
  • Loading branch information
scpeters authored and jacobperron committed May 3, 2022
1 parent 31b73c5 commit c81855a
Show file tree
Hide file tree
Showing 20 changed files with 72 additions and 64 deletions.
16 changes: 9 additions & 7 deletions gazebo_ros/src/gazebo_ros_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,22 @@

#include "gazebo_ros/gazebo_ros_factory.hpp"

#include <tinyxml.h>

#include <gazebo/common/Events.hh>
#include <gazebo/common/Plugin.hh>
#include <gazebo/physics/Entity.hh>
#include <gazebo/physics/Model.hh>
#include <gazebo/physics/PhysicsIface.hh>
#include <gazebo/physics/World.hh>
#include <gazebo/transport/Node.hh>

#include <algorithm>
#include <memory>
#include <sstream>
#include <string>
#include <vector>

#include <gazebo_msgs/srv/get_model_list.hpp>
#include <gazebo_msgs/srv/delete_entity.hpp>
#include <gazebo_msgs/srv/spawn_entity.hpp>
Expand All @@ -30,13 +39,6 @@
#include <gazebo_ros/utils.hpp>
#include <rosgraph_msgs/msg/clock.hpp>

#include <tinyxml.h>
#include <algorithm>
#include <memory>
#include <sstream>
#include <string>
#include <vector>

namespace gazebo_ros
{

Expand Down
11 changes: 6 additions & 5 deletions gazebo_ros/src/gazebo_ros_force_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@
#include <gazebo/physics/Model.hh>
#include <gazebo/physics/PhysicsIface.hh>
#include <gazebo/physics/World.hh>
#include <gazebo_msgs/srv/apply_link_wrench.hpp>
#include <gazebo_msgs/srv/apply_joint_effort.hpp>
#include <gazebo_msgs/srv/joint_request.hpp>
#include <gazebo_msgs/srv/link_request.hpp>
#include <gazebo_ros/node.hpp>

#include <algorithm>
#include <memory>
#include <string>
#include <vector>

#include <gazebo_msgs/srv/apply_link_wrench.hpp>
#include <gazebo_msgs/srv/apply_joint_effort.hpp>
#include <gazebo_msgs/srv/joint_request.hpp>
#include <gazebo_msgs/srv/link_request.hpp>
#include <gazebo_ros/node.hpp>

#include "gazebo_ros/conversions/builtin_interfaces.hpp"
#include "gazebo_ros/gazebo_ros_force_system.hpp"

Expand Down
6 changes: 3 additions & 3 deletions gazebo_ros/src/gazebo_ros_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
#include <gazebo/physics/World.hh>
#include <gazebo/transport/Node.hh>

#include <memory>
#include <string>

#include <gazebo_msgs/msg/performance_metrics.hpp>
#include <gazebo_msgs/msg/sensor_performance_metric.hpp>

Expand All @@ -30,9 +33,6 @@
#include <rosgraph_msgs/msg/clock.hpp>
#include <std_srvs/srv/empty.hpp>

#include <memory>
#include <string>

#ifndef GAZEBO_ROS_HAS_PERFORMANCE_METRICS
#if \
(GAZEBO_MAJOR_VERSION == 11 && GAZEBO_MINOR_VERSION > 1) || \
Expand Down
9 changes: 5 additions & 4 deletions gazebo_ros/src/gazebo_ros_properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <gazebo/common/Plugin.hh>
#include <gazebo/physics/Entity.hh>
#include <gazebo/physics/Joint.hh>
Expand All @@ -21,6 +23,9 @@
#include <gazebo/physics/World.hh>
#include <gazebo/physics/Collision.hh>
#include <gazebo/transport/Node.hh>

#include <memory>

#include <gazebo_msgs/srv/get_joint_properties.hpp>
#include <gazebo_msgs/srv/get_light_properties.hpp>
#include <gazebo_msgs/srv/get_link_properties.hpp>
Expand All @@ -33,10 +38,6 @@
#include <gazebo_ros/conversions/geometry_msgs.hpp>
#include <gazebo_ros/node.hpp>

#include <memory>

#include "gazebo_ros/gazebo_ros_properties.hpp"

namespace gazebo_ros
{

Expand Down
8 changes: 5 additions & 3 deletions gazebo_ros/src/gazebo_ros_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <gazebo/common/Plugin.hh>
#include <gazebo/physics/Entity.hh>
#include <gazebo/physics/Light.hh>
#include <gazebo/physics/Link.hh>
#include <gazebo/physics/Model.hh>
#include <gazebo/physics/World.hh>

#include <memory>

#include <gazebo_msgs/msg/link_states.hpp>
#include <gazebo_msgs/msg/model_states.hpp>
#include <gazebo_msgs/srv/get_entity_state.hpp>
#include <gazebo_msgs/srv/set_entity_state.hpp>
#include <gazebo_ros/node.hpp>

#include <memory>

#include "gazebo_ros/conversions/builtin_interfaces.hpp"
#include "gazebo_ros/conversions/geometry_msgs.hpp"
#include "gazebo_ros/gazebo_ros_state.hpp"

namespace gazebo_ros
{
Expand Down
8 changes: 4 additions & 4 deletions gazebo_ros/src/qos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
// limitations under the License.

#include <gazebo_ros/qos.hpp>

#include <rclcpp/expand_topic_or_service_name.hpp>
#include <rclcpp/node_options.hpp>
#include <rclcpp/qos.hpp>
#include <rcl/rcl.h>
#include <rcl/remap.h>
#include <rmw/types.h>
Expand All @@ -29,6 +25,10 @@
#include <string>
#include <utility>

#include <rclcpp/expand_topic_or_service_name.hpp>
#include <rclcpp/node_options.hpp>
#include <rclcpp/qos.hpp>

namespace gazebo_ros
{

Expand Down
6 changes: 3 additions & 3 deletions gazebo_ros/test/plugins/args_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

#include <gazebo/common/Plugin.hh>

#include <std_msgs/msg/string.hpp>
#include <gazebo_ros/node.hpp>

#include <memory>

#include <gazebo_ros/node.hpp>
#include <std_msgs/msg/string.hpp>

/// Simple example of a gazebo system plugin which uses a ROS2 node with gazebo_ros::Node.
class ProperInit : public gazebo::SystemPlugin
{
Expand Down
6 changes: 3 additions & 3 deletions gazebo_ros/test/plugins/create_node_without_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

#include <gazebo/common/Plugin.hh>

#include <std_msgs/msg/string.hpp>
#include <gazebo_ros/node.hpp>

#include <memory>

#include <gazebo_ros/node.hpp>
#include <std_msgs/msg/string.hpp>

/// Simple example of a gazebo system plugin which uses a ROS2 node with gazebo_ros::Node.
class CreateBeforeInit : public gazebo::SystemPlugin
{
Expand Down
6 changes: 3 additions & 3 deletions gazebo_ros/test/plugins/multiple_nodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

#include <gazebo/common/Plugin.hh>

#include <std_msgs/msg/string.hpp>
#include <gazebo_ros/node.hpp>

#include <memory>

#include <gazebo_ros/node.hpp>
#include <std_msgs/msg/string.hpp>

/// Simple example of a gazebo system plugin which uses a ROS2 node with gazebo_ros::Node.
class MultipleNodes : public gazebo::SystemPlugin
{
Expand Down
6 changes: 3 additions & 3 deletions gazebo_ros/test/plugins/ros_world_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

#include <gazebo/common/Plugin.hh>

#include <std_msgs/msg/string.hpp>
#include <gazebo_ros/node.hpp>

#include <memory>

#include <gazebo_ros/node.hpp>
#include <std_msgs/msg/string.hpp>

/// Simple example of a gazebo world plugin which uses a ROS2 node with gazebo_ros::Node.
class RosWorldPlugin : public gazebo::WorldPlugin
{
Expand Down
8 changes: 4 additions & 4 deletions gazebo_ros/test/plugins/sdf_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@

#include <gazebo/common/Plugin.hh>

#include <std_msgs/msg/string.hpp>
#include <gazebo_ros/node.hpp>
#include <rclcpp/exceptions.hpp>

#include <memory>
#include <string>

#include <gazebo_ros/node.hpp>
#include <rclcpp/exceptions.hpp>
#include <std_msgs/msg/string.hpp>

/// Simple example of a gazebo world plugin which uses a ROS2 node with gazebo_ros::Node.
class SDFNode : public gazebo::WorldPlugin
{
Expand Down
2 changes: 1 addition & 1 deletion gazebo_ros/test/test_gazebo_ros_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
// limitations under the License.

#include <gazebo/test/ServerFixture.hh>
#include <memory>
#include <gazebo_msgs/srv/get_model_list.hpp>
#include <gazebo_msgs/srv/delete_entity.hpp>
#include <gazebo_msgs/srv/spawn_entity.hpp>
#include <rclcpp/rclcpp.hpp>
#include <memory>

class GazeboRosFactoryTest : public gazebo::ServerFixture
{
Expand Down
2 changes: 1 addition & 1 deletion gazebo_ros/test/test_gazebo_ros_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
// limitations under the License.

#include <gazebo/test/ServerFixture.hh>
#include <memory>
#include <rclcpp/rclcpp.hpp>
#include <std_srvs/srv/empty.hpp>
#include <memory>

class GazeboRosInitTest : public gazebo::ServerFixture
{
Expand Down
2 changes: 1 addition & 1 deletion gazebo_ros/test/test_gazebo_ros_joint_effort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
// limitations under the License.

#include <gazebo/test/ServerFixture.hh>
#include <memory>
#include <gazebo_msgs/srv/apply_joint_effort.hpp>
#include <gazebo_msgs/srv/joint_request.hpp>
#include <rclcpp/rclcpp.hpp>
#include <memory>

#define tol 10e-2

Expand Down
2 changes: 1 addition & 1 deletion gazebo_ros/test/test_gazebo_ros_link_wrench.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
// limitations under the License.

#include <gazebo/test/ServerFixture.hh>
#include <memory>
#include <gazebo_msgs/srv/apply_link_wrench.hpp>
#include <gazebo_msgs/srv/link_request.hpp>
#include <rclcpp/rclcpp.hpp>
#include <memory>

#define tol 10e-2

Expand Down
12 changes: 6 additions & 6 deletions gazebo_ros/test/test_gazebo_ros_properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

#include <gazebo/test/ServerFixture.hh>

#include <memory>
#include <string>
#include <vector>

#include <gazebo_msgs/srv/get_model_properties.hpp>
#include <gazebo_msgs/srv/get_joint_properties.hpp>
#include <gazebo_msgs/srv/get_link_properties.hpp>
Expand All @@ -23,16 +27,12 @@
#include <gazebo_msgs/srv/set_link_properties.hpp>
#include <gazebo_msgs/srv/set_light_properties.hpp>
#include <gazebo_msgs/srv/set_physics_properties.hpp>

#include <geometry_msgs/msg/pose.hpp>
#include <gazebo_msgs/srv/spawn_entity.hpp>

#include <gazebo_ros/conversions/geometry_msgs.hpp>
#include <geometry_msgs/msg/pose.hpp>
#include <rclcpp/rclcpp.hpp>

#include <memory>
#include <string>
#include <vector>

#define tol 0.01

class GazeboRosPropertiesTest : public gazebo::ServerFixture
Expand Down
6 changes: 3 additions & 3 deletions gazebo_ros/test/test_gazebo_ros_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
#include <ignition/math/Pose3.hh>
#include <ignition/math/Vector3.hh>

#include <memory>
#include <string>

#include <gazebo_msgs/msg/link_states.hpp>
#include <gazebo_msgs/msg/model_states.hpp>
#include <gazebo_msgs/srv/get_entity_state.hpp>
#include <gazebo_msgs/srv/set_entity_state.hpp>
#include <gazebo_ros/conversions/geometry_msgs.hpp>
#include <rclcpp/rclcpp.hpp>

#include <memory>
#include <string>

#define tol 10e-2

using namespace std::literals::chrono_literals; // NOLINT
Expand Down
10 changes: 5 additions & 5 deletions gazebo_ros/test/test_plugins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@

#include <gtest/gtest.h>

#include <gazebo_ros/testing_utils.hpp>

#include <rclcpp/rclcpp.hpp>
#include <std_msgs/msg/string.hpp>

#include <memory>
#include <string>
#include <utility>
#include <vector>

#include <gazebo_ros/testing_utils.hpp>

#include <rclcpp/rclcpp.hpp>
#include <std_msgs/msg/string.hpp>

struct TestParams
{
std::vector<const char *> args;
Expand Down
7 changes: 4 additions & 3 deletions gazebo_ros/test/test_sim_time.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@
// limitations under the License.

#include <gtest/gtest.h>
#include <gazebo_ros/testing_utils.hpp>
#include <rclcpp/rclcpp.hpp>
#include <rosgraph_msgs/msg/clock.hpp>

#include <memory>
#include <string>
#include <vector>

#include <gazebo_ros/testing_utils.hpp>
#include <rclcpp/rclcpp.hpp>
#include <rosgraph_msgs/msg/clock.hpp>

using namespace std::literals::chrono_literals;

/// Tests the simtime published to /clock by gazebo_ros_init
Expand Down
3 changes: 2 additions & 1 deletion gazebo_ros/test/test_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <gazebo_ros/utils.hpp>
#include <gazebo/sensors/GaussianNoiseModel.hh>
#include <gazebo/sensors/sensors.hh>
#include <gtest/gtest.h>

#include <memory>
#include <string>

#include <gazebo_ros/utils.hpp>

TEST(TestUtils, NoiseVariance)
{
// Test no noise has 0 variance
Expand Down

0 comments on commit c81855a

Please sign in to comment.