

Merge pull request #33 from HarvestX/fix/macro-place
Fix macro place
@2db79bb9adbfd6e6f9faf45c3feb836658742ebc
--- p9n_example/include/p9n_example/display_node.hpp
+++ p9n_example/include/p9n_example/display_node.hpp
... | ... | @@ -16,11 +16,10 @@ |
16 | 16 |
|
17 | 17 |
#include <string> |
18 | 18 |
#include <memory> |
19 |
-#include <sensor_msgs/msg/joy.hpp> |
|
20 |
-#include <rclcpp/rclcpp.hpp> |
|
21 | 19 |
|
22 | 20 |
#include <p9n_interface/p9n_interface.hpp> |
23 |
- |
|
21 |
+#include <rclcpp/rclcpp.hpp> |
|
22 |
+#include <sensor_msgs/msg/joy.hpp> |
|
24 | 23 |
|
25 | 24 |
namespace p9n_example |
26 | 25 |
{ |
... | ... | @@ -37,6 +36,3 @@ |
37 | 36 |
void onJoy(sensor_msgs::msg::Joy::ConstSharedPtr); |
38 | 37 |
}; |
39 | 38 |
} // namespace p9n_example |
40 |
- |
|
41 |
-#include "rclcpp_components/register_node_macro.hpp" |
|
42 |
-RCLCPP_COMPONENTS_REGISTER_NODE(p9n_example::DisplayNode) |
--- p9n_example/src/display_node.cpp
+++ p9n_example/src/display_node.cpp
... | ... | @@ -21,7 +21,6 @@ |
21 | 21 |
DisplayNode::DisplayNode(const rclcpp::NodeOptions & options) |
22 | 22 |
: rclcpp::Node("display_node", options) |
23 | 23 |
{ |
24 |
- |
|
25 | 24 |
const std::string hw_name = this->declare_parameter<std::string>( |
26 | 25 |
"hw_type", p9n_interface::HW_NAME::DUALSENSE); |
27 | 26 |
|
... | ... | @@ -162,8 +161,11 @@ |
162 | 161 |
} |
163 | 162 |
|
164 | 163 |
if (this->p9n_if_->pressedAny()) { |
165 |
- using namespace std::chrono_literals; |
|
164 |
+ using namespace std::chrono_literals; // NOLINT |
|
166 | 165 |
rclcpp::sleep_for(200ms); |
167 | 166 |
} |
168 | 167 |
} |
169 | 168 |
} // namespace p9n_example |
169 |
+ |
|
170 |
+#include "rclcpp_components/register_node_macro.hpp" |
|
171 |
+RCLCPP_COMPONENTS_REGISTER_NODE(p9n_example::DisplayNode) |
--- p9n_node/include/p9n_node/teleop_twist_joy_node.hpp
+++ p9n_node/include/p9n_node/teleop_twist_joy_node.hpp
... | ... | @@ -50,6 +50,3 @@ |
50 | 50 |
void onWatchdog(); |
51 | 51 |
}; |
52 | 52 |
} // namespace p9n_node |
53 |
- |
|
54 |
-#include "rclcpp_components/register_node_macro.hpp" |
|
55 |
-RCLCPP_COMPONENTS_REGISTER_NODE(p9n_node::TeleopTwistJoyNode) |
--- p9n_node/src/teleop_twist_joy_node.cpp
+++ p9n_node/src/teleop_twist_joy_node.cpp
... | ... | @@ -92,3 +92,6 @@ |
92 | 92 |
this->timer_watchdog_->cancel(); |
93 | 93 |
} |
94 | 94 |
} // namespace p9n_node |
95 |
+ |
|
96 |
+#include "rclcpp_components/register_node_macro.hpp" |
|
97 |
+RCLCPP_COMPONENTS_REGISTER_NODE(p9n_node::TeleopTwistJoyNode) |
--- p9n_test/include/p9n_test/p9n_test_node.hpp
+++ p9n_test/include/p9n_test/p9n_test_node.hpp
... | ... | @@ -39,9 +39,5 @@ |
39 | 39 |
public: |
40 | 40 |
explicit PlayStationTestNode(const rclcpp::NodeOptions &); |
41 | 41 |
void onJoy(sensor_msgs::msg::Joy::ConstSharedPtr); |
42 |
- |
|
43 | 42 |
}; |
44 | 43 |
} // namespace p9n_test |
45 |
- |
|
46 |
-#include "rclcpp_components/register_node_macro.hpp" |
|
47 |
-RCLCPP_COMPONENTS_REGISTER_NODE(p9n_test::PlayStationTestNode) |
--- p9n_test/src/p9n_test_node.cpp
+++ p9n_test/src/p9n_test_node.cpp
... | ... | @@ -100,7 +100,6 @@ |
100 | 100 |
} |
101 | 101 |
} |
102 | 102 |
|
103 |
- |
|
104 | 103 |
if (this->wf_handler_->isDone()) { |
105 | 104 |
RCLCPP_INFO(this->get_logger(), "Done!"); |
106 | 105 |
this->wf_handler_->showResult(); |
... | ... | @@ -109,9 +108,12 @@ |
109 | 108 |
} |
110 | 109 |
|
111 | 110 |
// Delay for button chattering |
112 |
- using namespace std::chrono_literals; |
|
111 |
+ using namespace std::chrono_literals; // NOLINT |
|
113 | 112 |
rclcpp::sleep_for(500ms); |
114 | 113 |
} |
115 | 114 |
|
116 | 115 |
|
117 | 116 |
} // namespace p9n_test |
117 |
+ |
|
118 |
+#include "rclcpp_components/register_node_macro.hpp" |
|
119 |
+RCLCPP_COMPONENTS_REGISTER_NODE(p9n_test::PlayStationTestNode) |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?