Skip to content

Commit

Permalink
Split up the include of rclcpp.hpp (ros2#1027)
Browse files Browse the repository at this point in the history
* Split up the include of rclcpp.hpp

Instead, just bring in the headers we need.  That should
help reduce compilation time and memory.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
  • Loading branch information
clalancette committed Jun 28, 2022
1 parent fa60ff7 commit 3a6a68a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,18 @@
#include <unordered_map>
#include <vector>

#include "rclcpp/rclcpp.hpp" // rclcpp must be included before the Windows specific includes.
#include "rclcpp/clock.hpp"
#include "rclcpp/executors/single_threaded_executor.hpp"
#include "rclcpp/intra_process_setting.hpp"
#include "rclcpp/node.hpp"
#include "rclcpp/node_options.hpp"
#include "rclcpp/publisher_base.hpp"
#include "rclcpp/qos.hpp"
#include "rclcpp/serialization.hpp"
#include "rclcpp/serialized_message.hpp"
#include "rclcpp/subscription_base.hpp"
#include "rclcpp/subscription_options.hpp"
#include "rclcpp/utilities.hpp"

namespace rosbag2_test_common
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
#include <string>
#include <vector>

#include "rclcpp/rclcpp.hpp"

#include "rosbag2_cpp/reader.hpp"
#include "rosbag2_cpp/types.hpp"
#include "rosbag2_cpp/writer.hpp"
Expand Down
9 changes: 1 addition & 8 deletions rosbag2_transport/test/rosbag2_transport/test_play_for.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,10 @@
#include <chrono>
#include <future>
#include <memory>
#include <string>
#include <vector>
#include <unordered_map>
#include <utility>

#include "rclcpp/rclcpp.hpp"

#include "rosbag2_test_common/subscription_manager.hpp"

#include "rosbag2_transport/player.hpp"
#include "rosbag2_transport/qos.hpp"
#include "rclcpp/duration.hpp"

#include "test_msgs/msg/arrays.hpp"
#include "test_msgs/msg/basic_types.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
#include <vector>
#include <utility>

#include "rclcpp/rclcpp.hpp"
#include "rclcpp/client.hpp"
#include "rclcpp/executors/single_threaded_executor.hpp"
#include "rclcpp/node.hpp"
#include "rclcpp/subscription.hpp"
#include "rclcpp/utilities.hpp"

#include "rosbag2_interfaces/srv/is_paused.hpp"
#include "rosbag2_interfaces/srv/pause.hpp"
Expand Down

0 comments on commit 3a6a68a

Please sign in to comment.