Skip to content

Commit

Permalink
Revert "remove node namespace"
Browse files Browse the repository at this point in the history
This reverts commit 7cbb780.
Signed-off-by: M. Fatih Cırıt <[email protected]>
  • Loading branch information
xmfcx committed Dec 10, 2024
1 parent 7cbb780 commit ea6f047
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions common/autoware_node/include/autoware/node/node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include <string>

namespace autoware
namespace autoware::node
{
using CallbackReturn = rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn;

Expand All @@ -36,6 +36,6 @@ class Node : public rclcpp_lifecycle::LifecycleNode
protected:
CallbackReturn on_shutdown(const rclcpp_lifecycle::State & state) override;
};
} // namespace autoware
} // namespace autoware::node

#endif // AUTOWARE__NODE__NODE_HPP_
4 changes: 2 additions & 2 deletions common/autoware_node/src/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include <string>

namespace autoware
namespace autoware::node
{
Node::Node(
const std::string & node_name, const std::string & ns, const rclcpp::NodeOptions & options)
Expand All @@ -35,4 +35,4 @@ CallbackReturn Node::on_shutdown(const rclcpp_lifecycle::State & state)
get_node_base_interface()->get_fully_qualified_name(), state.label().c_str());
return CallbackReturn::SUCCESS;
}
} // namespace autoware
} // namespace autoware::node
4 changes: 2 additions & 2 deletions common/autoware_node/test/test_an_init_shutdown.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ TEST_F(AutowareNodeInitShutdown, NodeInitShutdown)
std::shared_ptr<rclcpp::executors::SingleThreadedExecutor> executor;
executor = std::make_shared<rclcpp::executors::SingleThreadedExecutor>();

autoware::Node::SharedPtr autoware_node =
std::make_shared<autoware::Node>("test_node", "test_ns", node_options_an_);
autoware::node::Node::SharedPtr autoware_node =
std::make_shared<autoware::node::Node>("test_node", "test_ns", node_options_an_);

executor->add_node(autoware_node->get_node_base_interface());

Expand Down
2 changes: 1 addition & 1 deletion demos/autoware_test_node/src/include/test_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
namespace autoware::test_node
{

class TestNode : public autoware::Node
class TestNode : public autoware::node::Node
{
public:
explicit TestNode(const rclcpp::NodeOptions & options = rclcpp::NodeOptions());
Expand Down
3 changes: 2 additions & 1 deletion demos/autoware_test_node/src/test_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@

namespace autoware::test_node
{
TestNode::TestNode(const rclcpp::NodeOptions & options) : autoware::Node("test_node", "", options)
TestNode::TestNode(const rclcpp::NodeOptions & options)
: autoware::node::Node("test_node", "", options)

Check warning on line 22 in demos/autoware_test_node/src/test_node.cpp

View check run for this annotation

Codecov / codecov/patch

demos/autoware_test_node/src/test_node.cpp#L21-L22

Added lines #L21 - L22 were not covered by tests
{
RCLCPP_DEBUG(

Check warning on line 24 in demos/autoware_test_node/src/test_node.cpp

View check run for this annotation

Codecov / codecov/patch

demos/autoware_test_node/src/test_node.cpp#L24

Added line #L24 was not covered by tests
get_logger(), "TestNode %s constructor was called.",
Expand Down

0 comments on commit ea6f047

Please sign in to comment.