Skip to content

Commit dc11aeb

Browse files
authored
refactor(component_interface_utils): prefix package and namespace with autoware (#9092)
Signed-off-by: Esteve Fernandez <esteve.fernandez@tier4.jp>
1 parent 3153252 commit dc11aeb

File tree

81 files changed

+217
-206
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+217
-206
lines changed

common/component_interface_utils/CMakeLists.txt common/autoware_component_interface_utils/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.14)
2-
project(component_interface_utils)
2+
project(autoware_component_interface_utils)
33

44
find_package(autoware_cmake REQUIRED)
55
autoware_package()

common/component_interface_utils/README.md common/autoware_component_interface_utils/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# component_interface_utils
1+
# autoware_component_interface_utils
22

33
## Features
44

@@ -40,13 +40,13 @@ Create the wrapper using the above definition as follows.
4040

4141
```cpp
4242
// header file
43-
component_interface_utils::Service<SampleService>::SharedPtr srv_;
44-
component_interface_utils::Client<SampleService>::SharedPtr cli_;
45-
component_interface_utils::Publisher<SampleMessage>::SharedPtr pub_;
46-
component_interface_utils::Subscription<SampleMessage>::SharedPtr sub_;
43+
autoware::component_interface_utils::Service<SampleService>::SharedPtr srv_;
44+
autoware::component_interface_utils::Client<SampleService>::SharedPtr cli_;
45+
autoware::component_interface_utils::Publisher<SampleMessage>::SharedPtr pub_;
46+
autoware::component_interface_utils::Subscription<SampleMessage>::SharedPtr sub_;
4747

4848
// source file
49-
const auto node = component_interface_utils::NodeAdaptor(this);
49+
const auto node = autoware::component_interface_utils::NodeAdaptor(this);
5050
node.init_srv(srv_, callback);
5151
node.init_cli(cli_);
5252
node.init_pub(pub_);
@@ -94,7 +94,7 @@ void service_callback(Request req, Response res)
9494
There are utilities for relaying services and messages of the same type.
9595

9696
```cpp
97-
const auto node = component_interface_utils::NodeAdaptor(this);
97+
const auto node = autoware::component_interface_utils::NodeAdaptor(this);
9898
service_callback_group_ = create_callback_group(rclcpp::CallbackGroupType::MutuallyExclusive);
9999
node.relay_message(pub_, sub_);
100100
node.relay_service(cli_, srv_, service_callback_group_); // group is for avoiding deadlocks

common/component_interface_utils/include/component_interface_utils/rclcpp.hpp common/autoware_component_interface_utils/include/autoware/component_interface_utils/rclcpp.hpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef COMPONENT_INTERFACE_UTILS__RCLCPP_HPP_
16-
#define COMPONENT_INTERFACE_UTILS__RCLCPP_HPP_
15+
#ifndef AUTOWARE__COMPONENT_INTERFACE_UTILS__RCLCPP_HPP_
16+
#define AUTOWARE__COMPONENT_INTERFACE_UTILS__RCLCPP_HPP_
1717

18-
#include <component_interface_utils/rclcpp/create_interface.hpp>
19-
#include <component_interface_utils/rclcpp/interface.hpp>
20-
#include <component_interface_utils/rclcpp/service_client.hpp>
21-
#include <component_interface_utils/rclcpp/service_server.hpp>
22-
#include <component_interface_utils/rclcpp/topic_publisher.hpp>
23-
#include <component_interface_utils/rclcpp/topic_subscription.hpp>
18+
#include <autoware/component_interface_utils/rclcpp/create_interface.hpp>
19+
#include <autoware/component_interface_utils/rclcpp/interface.hpp>
20+
#include <autoware/component_interface_utils/rclcpp/service_client.hpp>
21+
#include <autoware/component_interface_utils/rclcpp/service_server.hpp>
22+
#include <autoware/component_interface_utils/rclcpp/topic_publisher.hpp>
23+
#include <autoware/component_interface_utils/rclcpp/topic_subscription.hpp>
2424

2525
#include <memory>
2626
#include <optional>
2727
#include <utility>
2828

29-
namespace component_interface_utils
29+
namespace autoware::component_interface_utils
3030
{
3131

3232
class NodeAdaptor
@@ -123,6 +123,6 @@ class NodeAdaptor
123123
NodeInterface::SharedPtr interface_;
124124
};
125125

126-
} // namespace component_interface_utils
126+
} // namespace autoware::component_interface_utils
127127

128-
#endif // COMPONENT_INTERFACE_UTILS__RCLCPP_HPP_
128+
#endif // AUTOWARE__COMPONENT_INTERFACE_UTILS__RCLCPP_HPP_

common/component_interface_utils/include/component_interface_utils/rclcpp/create_interface.hpp common/autoware_component_interface_utils/include/autoware/component_interface_utils/rclcpp/create_interface.hpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef COMPONENT_INTERFACE_UTILS__RCLCPP__CREATE_INTERFACE_HPP_
16-
#define COMPONENT_INTERFACE_UTILS__RCLCPP__CREATE_INTERFACE_HPP_
15+
#ifndef AUTOWARE__COMPONENT_INTERFACE_UTILS__RCLCPP__CREATE_INTERFACE_HPP_
16+
#define AUTOWARE__COMPONENT_INTERFACE_UTILS__RCLCPP__CREATE_INTERFACE_HPP_
1717

18-
#include <component_interface_utils/rclcpp/interface.hpp>
19-
#include <component_interface_utils/rclcpp/service_client.hpp>
20-
#include <component_interface_utils/rclcpp/service_server.hpp>
21-
#include <component_interface_utils/rclcpp/topic_publisher.hpp>
22-
#include <component_interface_utils/rclcpp/topic_subscription.hpp>
23-
#include <component_interface_utils/specs.hpp>
18+
#include <autoware/component_interface_utils/rclcpp/interface.hpp>
19+
#include <autoware/component_interface_utils/rclcpp/service_client.hpp>
20+
#include <autoware/component_interface_utils/rclcpp/service_server.hpp>
21+
#include <autoware/component_interface_utils/rclcpp/topic_publisher.hpp>
22+
#include <autoware/component_interface_utils/rclcpp/topic_subscription.hpp>
23+
#include <autoware/component_interface_utils/specs.hpp>
2424
#include <rclcpp/rclcpp.hpp>
2525

2626
#include <utility>
2727

28-
namespace component_interface_utils
28+
namespace autoware::component_interface_utils
2929
{
3030

3131
/// Create a client wrapper for logging. This is a private implementation.
@@ -72,6 +72,6 @@ typename Subscription<SpecT>::SharedPtr create_subscription_impl(
7272
return Subscription<SpecT>::make_shared(subscription);
7373
}
7474

75-
} // namespace component_interface_utils
75+
} // namespace autoware::component_interface_utils
7676

77-
#endif // COMPONENT_INTERFACE_UTILS__RCLCPP__CREATE_INTERFACE_HPP_
77+
#endif // AUTOWARE__COMPONENT_INTERFACE_UTILS__RCLCPP__CREATE_INTERFACE_HPP_

common/component_interface_utils/include/component_interface_utils/rclcpp/exceptions.hpp common/autoware_component_interface_utils/include/autoware/component_interface_utils/rclcpp/exceptions.hpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef COMPONENT_INTERFACE_UTILS__RCLCPP__EXCEPTIONS_HPP_
16-
#define COMPONENT_INTERFACE_UTILS__RCLCPP__EXCEPTIONS_HPP_
15+
#ifndef AUTOWARE__COMPONENT_INTERFACE_UTILS__RCLCPP__EXCEPTIONS_HPP_
16+
#define AUTOWARE__COMPONENT_INTERFACE_UTILS__RCLCPP__EXCEPTIONS_HPP_
1717

1818
#include <autoware_adapi_v1_msgs/msg/response_status.hpp>
1919

2020
#include <exception>
2121
#include <string>
2222

23-
namespace component_interface_utils
23+
namespace autoware::component_interface_utils
2424
{
2525

2626
class ServiceException : public std::exception
@@ -104,6 +104,6 @@ class NoEffectWarning : public ServiceException
104104
}
105105
};
106106

107-
} // namespace component_interface_utils
107+
} // namespace autoware::component_interface_utils
108108

109-
#endif // COMPONENT_INTERFACE_UTILS__RCLCPP__EXCEPTIONS_HPP_
109+
#endif // AUTOWARE__COMPONENT_INTERFACE_UTILS__RCLCPP__EXCEPTIONS_HPP_

common/component_interface_utils/include/component_interface_utils/rclcpp/interface.hpp common/autoware_component_interface_utils/include/autoware/component_interface_utils/rclcpp/interface.hpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef COMPONENT_INTERFACE_UTILS__RCLCPP__INTERFACE_HPP_
16-
#define COMPONENT_INTERFACE_UTILS__RCLCPP__INTERFACE_HPP_
15+
#ifndef AUTOWARE__COMPONENT_INTERFACE_UTILS__RCLCPP__INTERFACE_HPP_
16+
#define AUTOWARE__COMPONENT_INTERFACE_UTILS__RCLCPP__INTERFACE_HPP_
1717

1818
#include <rclcpp/rclcpp.hpp>
1919

@@ -23,7 +23,7 @@
2323
#include <string>
2424
#include <unordered_map>
2525

26-
namespace component_interface_utils
26+
namespace autoware::component_interface_utils
2727
{
2828

2929
struct NodeInterface
@@ -68,6 +68,6 @@ struct NodeInterface
6868
std::string node_name;
6969
};
7070

71-
} // namespace component_interface_utils
71+
} // namespace autoware::component_interface_utils
7272

73-
#endif // COMPONENT_INTERFACE_UTILS__RCLCPP__INTERFACE_HPP_
73+
#endif // AUTOWARE__COMPONENT_INTERFACE_UTILS__RCLCPP__INTERFACE_HPP_

common/component_interface_utils/include/component_interface_utils/rclcpp/service_client.hpp common/autoware_component_interface_utils/include/autoware/component_interface_utils/rclcpp/service_client.hpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef COMPONENT_INTERFACE_UTILS__RCLCPP__SERVICE_CLIENT_HPP_
16-
#define COMPONENT_INTERFACE_UTILS__RCLCPP__SERVICE_CLIENT_HPP_
15+
#ifndef AUTOWARE__COMPONENT_INTERFACE_UTILS__RCLCPP__SERVICE_CLIENT_HPP_
16+
#define AUTOWARE__COMPONENT_INTERFACE_UTILS__RCLCPP__SERVICE_CLIENT_HPP_
1717

18-
#include <component_interface_utils/rclcpp/exceptions.hpp>
19-
#include <component_interface_utils/rclcpp/interface.hpp>
18+
#include <autoware/component_interface_utils/rclcpp/exceptions.hpp>
19+
#include <autoware/component_interface_utils/rclcpp/interface.hpp>
2020
#include <rclcpp/node.hpp>
2121

2222
#include <tier4_system_msgs/msg/service_log.hpp>
@@ -25,7 +25,7 @@
2525
#include <string>
2626
#include <utility>
2727

28-
namespace component_interface_utils
28+
namespace autoware::component_interface_utils
2929
{
3030

3131
/// The wrapper class of rclcpp::Client for logging.
@@ -104,6 +104,6 @@ class Client
104104
NodeInterface::SharedPtr interface_;
105105
};
106106

107-
} // namespace component_interface_utils
107+
} // namespace autoware::component_interface_utils
108108

109-
#endif // COMPONENT_INTERFACE_UTILS__RCLCPP__SERVICE_CLIENT_HPP_
109+
#endif // AUTOWARE__COMPONENT_INTERFACE_UTILS__RCLCPP__SERVICE_CLIENT_HPP_

common/component_interface_utils/include/component_interface_utils/rclcpp/service_server.hpp common/autoware_component_interface_utils/include/autoware/component_interface_utils/rclcpp/service_server.hpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef COMPONENT_INTERFACE_UTILS__RCLCPP__SERVICE_SERVER_HPP_
16-
#define COMPONENT_INTERFACE_UTILS__RCLCPP__SERVICE_SERVER_HPP_
15+
#ifndef AUTOWARE__COMPONENT_INTERFACE_UTILS__RCLCPP__SERVICE_SERVER_HPP_
16+
#define AUTOWARE__COMPONENT_INTERFACE_UTILS__RCLCPP__SERVICE_SERVER_HPP_
1717

18-
#include <component_interface_utils/rclcpp/exceptions.hpp>
19-
#include <component_interface_utils/rclcpp/interface.hpp>
18+
#include <autoware/component_interface_utils/rclcpp/exceptions.hpp>
19+
#include <autoware/component_interface_utils/rclcpp/interface.hpp>
2020
#include <rclcpp/node.hpp>
2121

2222
#include <tier4_system_msgs/msg/service_log.hpp>
2323

2424
#include <string>
2525

26-
namespace component_interface_utils
26+
namespace autoware::component_interface_utils
2727
{
2828

2929
/// The wrapper class of rclcpp::Service for logging.
@@ -94,6 +94,6 @@ class Service
9494
NodeInterface::SharedPtr interface_;
9595
};
9696

97-
} // namespace component_interface_utils
97+
} // namespace autoware::component_interface_utils
9898

99-
#endif // COMPONENT_INTERFACE_UTILS__RCLCPP__SERVICE_SERVER_HPP_
99+
#endif // AUTOWARE__COMPONENT_INTERFACE_UTILS__RCLCPP__SERVICE_SERVER_HPP_

common/component_interface_utils/include/component_interface_utils/rclcpp/topic_publisher.hpp common/autoware_component_interface_utils/include/autoware/component_interface_utils/rclcpp/topic_publisher.hpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef COMPONENT_INTERFACE_UTILS__RCLCPP__TOPIC_PUBLISHER_HPP_
16-
#define COMPONENT_INTERFACE_UTILS__RCLCPP__TOPIC_PUBLISHER_HPP_
15+
#ifndef AUTOWARE__COMPONENT_INTERFACE_UTILS__RCLCPP__TOPIC_PUBLISHER_HPP_
16+
#define AUTOWARE__COMPONENT_INTERFACE_UTILS__RCLCPP__TOPIC_PUBLISHER_HPP_
1717

1818
#include <rclcpp/publisher.hpp>
1919

20-
namespace component_interface_utils
20+
namespace autoware::component_interface_utils
2121
{
2222

2323
/// The wrapper class of rclcpp::Publisher. This is for future use and no functionality now.
@@ -43,6 +43,6 @@ class Publisher
4343
typename WrapType::SharedPtr publisher_;
4444
};
4545

46-
} // namespace component_interface_utils
46+
} // namespace autoware::component_interface_utils
4747

48-
#endif // COMPONENT_INTERFACE_UTILS__RCLCPP__TOPIC_PUBLISHER_HPP_
48+
#endif // AUTOWARE__COMPONENT_INTERFACE_UTILS__RCLCPP__TOPIC_PUBLISHER_HPP_

common/component_interface_utils/include/component_interface_utils/rclcpp/topic_subscription.hpp common/autoware_component_interface_utils/include/autoware/component_interface_utils/rclcpp/topic_subscription.hpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef COMPONENT_INTERFACE_UTILS__RCLCPP__TOPIC_SUBSCRIPTION_HPP_
16-
#define COMPONENT_INTERFACE_UTILS__RCLCPP__TOPIC_SUBSCRIPTION_HPP_
15+
#ifndef AUTOWARE__COMPONENT_INTERFACE_UTILS__RCLCPP__TOPIC_SUBSCRIPTION_HPP_
16+
#define AUTOWARE__COMPONENT_INTERFACE_UTILS__RCLCPP__TOPIC_SUBSCRIPTION_HPP_
1717

1818
#include <rclcpp/subscription.hpp>
1919

20-
namespace component_interface_utils
20+
namespace autoware::component_interface_utils
2121
{
2222

2323
/// The wrapper class of rclcpp::Subscription. This is for future use and no functionality now.
@@ -40,6 +40,6 @@ class Subscription
4040
typename WrapType::SharedPtr subscription_;
4141
};
4242

43-
} // namespace component_interface_utils
43+
} // namespace autoware::component_interface_utils
4444

45-
#endif // COMPONENT_INTERFACE_UTILS__RCLCPP__TOPIC_SUBSCRIPTION_HPP_
45+
#endif // AUTOWARE__COMPONENT_INTERFACE_UTILS__RCLCPP__TOPIC_SUBSCRIPTION_HPP_

common/component_interface_utils/include/component_interface_utils/specs.hpp common/autoware_component_interface_utils/include/autoware/component_interface_utils/specs.hpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef COMPONENT_INTERFACE_UTILS__SPECS_HPP_
16-
#define COMPONENT_INTERFACE_UTILS__SPECS_HPP_
15+
#ifndef AUTOWARE__COMPONENT_INTERFACE_UTILS__SPECS_HPP_
16+
#define AUTOWARE__COMPONENT_INTERFACE_UTILS__SPECS_HPP_
1717

1818
#include <rclcpp/qos.hpp>
1919

20-
namespace component_interface_utils
20+
namespace autoware::component_interface_utils
2121
{
2222

2323
template <class SpecT>
@@ -29,6 +29,6 @@ rclcpp::QoS get_qos()
2929
return qos;
3030
}
3131

32-
} // namespace component_interface_utils
32+
} // namespace autoware::component_interface_utils
3333

34-
#endif // COMPONENT_INTERFACE_UTILS__SPECS_HPP_
34+
#endif // AUTOWARE__COMPONENT_INTERFACE_UTILS__SPECS_HPP_

common/component_interface_utils/include/component_interface_utils/status.hpp common/autoware_component_interface_utils/include/autoware/component_interface_utils/status.hpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef COMPONENT_INTERFACE_UTILS__STATUS_HPP_
16-
#define COMPONENT_INTERFACE_UTILS__STATUS_HPP_
15+
#ifndef AUTOWARE__COMPONENT_INTERFACE_UTILS__STATUS_HPP_
16+
#define AUTOWARE__COMPONENT_INTERFACE_UTILS__STATUS_HPP_
1717

18-
namespace component_interface_utils::status
18+
namespace autoware::component_interface_utils::status
1919
{
2020

2121
template <class T1, class T2>
@@ -26,6 +26,6 @@ void copy(const T1 & src, T2 & dst) // NOLINT(build/include_what_you_use): cppl
2626
dst->status.message = src->status.message;
2727
}
2828

29-
} // namespace component_interface_utils::status
29+
} // namespace autoware::component_interface_utils::status
3030

31-
#endif // COMPONENT_INTERFACE_UTILS__STATUS_HPP_
31+
#endif // AUTOWARE__COMPONENT_INTERFACE_UTILS__STATUS_HPP_

common/component_interface_utils/package.xml common/autoware_component_interface_utils/package.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0"?>
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
4-
<name>component_interface_utils</name>
4+
<name>autoware_component_interface_utils</name>
55
<version>0.0.0</version>
6-
<description>The component_interface_utils package</description>
6+
<description>The autoware_component_interface_utils package</description>
77
<maintainer email="isamu.takagi@tier4.jp">Takagi, Isamu</maintainer>
88
<maintainer email="yukihiro.saito@tier4.jp">Yukihiro Saito</maintainer>
99
<license>Apache License 2.0</license>

common/component_interface_utils/test/test_component_interface_utils.cpp common/autoware_component_interface_utils/test/test_component_interface_utils.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#include "component_interface_utils/rclcpp/exceptions.hpp"
16-
#include "component_interface_utils/specs.hpp"
17-
#include "component_interface_utils/status.hpp"
15+
#include "autoware/component_interface_utils/rclcpp/exceptions.hpp"
16+
#include "autoware/component_interface_utils/specs.hpp"
17+
#include "autoware/component_interface_utils/status.hpp"
1818
#include "gtest/gtest.h"
1919

2020
TEST(interface, utils)
2121
{
2222
{
23-
using component_interface_utils::ServiceException;
23+
using autoware::component_interface_utils::ServiceException;
2424
using ResponseStatus = autoware_adapi_v1_msgs::msg::ResponseStatus;
2525
using ResponseStatusCode = ResponseStatus::_code_type;
2626

@@ -34,7 +34,7 @@ TEST(interface, utils)
3434
}
3535

3636
{
37-
using component_interface_utils::ServiceException;
37+
using autoware::component_interface_utils::ServiceException;
3838
using ResponseStatus = autoware_adapi_v1_msgs::msg::ResponseStatus;
3939
using ResponseStatusCode = ResponseStatus::_code_type;
4040

@@ -48,10 +48,10 @@ TEST(interface, utils)
4848
}
4949

5050
{
51-
using component_interface_utils::ServiceException;
51+
using autoware::component_interface_utils::ServiceException;
5252
using ResponseStatus = autoware_adapi_v1_msgs::msg::ResponseStatus;
5353
using ResponseStatusCode = ResponseStatus::_code_type;
54-
using component_interface_utils::status::copy;
54+
using autoware::component_interface_utils::status::copy;
5555

5656
class status_test
5757
{

0 commit comments

Comments
 (0)