Skip to content

Commit cac33b0

Browse files
authored
feat(autoware_ad_api_specs): define localization interface (autowarefoundation#1560)
feat(autoware_ad_api_msgs): define localization interface Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
1 parent 04fe796 commit cac33b0

File tree

5 files changed

+102
-0
lines changed

5 files changed

+102
-0
lines changed

common/autoware_ad_api_msgs/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ autoware_package()
77
rosidl_generate_interfaces(${PROJECT_NAME}
88
common/msg/ResponseStatus.msg
99
interface/srv/InterfaceVersion.srv
10+
localization/msg/LocalizationInitializationState.msg
11+
localization/srv/InitializeLocalization.srv
1012
routing/msg/RouteState.msg
1113
routing/msg/Route.msg
1214
routing/msg/RouteData.msg
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
uint16 UNKNOWN = 0
2+
uint16 UNINITIALIZED = 1
3+
uint16 INITIALIZING = 2
4+
uint16 INITIALIZED = 3
5+
6+
builtin_interfaces/Time stamp
7+
uint16 state
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
geometry_msgs/PoseWithCovarianceStamped[<=1] pose
2+
---
3+
uint16 ERROR_UNSAFE = 1
4+
uint16 ERROR_GNSS_SUPPORT = 2
5+
uint16 ERROR_GNSS = 3
6+
uint16 ERROR_ESTIMATION = 4
7+
autoware_ad_api_msgs/ResponseStatus status
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// Copyright 2022 TIER IV, Inc.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#ifndef AUTOWARE_AD_API_SPECS__LOCALIZATION_HPP_
16+
#define AUTOWARE_AD_API_SPECS__LOCALIZATION_HPP_
17+
18+
#include <rclcpp/qos.hpp>
19+
20+
#include <autoware_ad_api_msgs/msg/localization_initialization_state.hpp>
21+
#include <autoware_ad_api_msgs/srv/initialize_localization.hpp>
22+
23+
namespace autoware_ad_api::localization
24+
{
25+
26+
struct Initialize
27+
{
28+
using Service = autoware_ad_api_msgs::srv::InitializeLocalization;
29+
static constexpr char name[] = "/api/localization/initialize";
30+
};
31+
32+
struct InitializationState
33+
{
34+
using Message = autoware_ad_api_msgs::msg::LocalizationInitializationState;
35+
static constexpr char name[] = "/api/localization/initialization_state";
36+
static constexpr size_t depth = 3;
37+
static constexpr auto reliability = RMW_QOS_POLICY_RELIABILITY_RELIABLE;
38+
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL;
39+
};
40+
41+
} // namespace autoware_ad_api::localization
42+
43+
#endif // AUTOWARE_AD_API_SPECS__LOCALIZATION_HPP_
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// Copyright 2022 TIER IV, Inc.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#ifndef COMPONENT_INTERFACE_SPECS__LOCALIZATION_HPP_
16+
#define COMPONENT_INTERFACE_SPECS__LOCALIZATION_HPP_
17+
18+
#include <rclcpp/qos.hpp>
19+
20+
#include <autoware_ad_api_msgs/msg/localization_initialization_state.hpp>
21+
#include <autoware_ad_api_msgs/srv/initialize_localization.hpp>
22+
23+
namespace localization_interface
24+
{
25+
26+
struct Initialize
27+
{
28+
using Service = autoware_ad_api_msgs::srv::InitializeLocalization;
29+
static constexpr char name[] = "/localization/initialize";
30+
};
31+
32+
struct InitializationState
33+
{
34+
using Message = autoware_ad_api_msgs::msg::LocalizationInitializationState;
35+
static constexpr char name[] = "/localization/initialization_state";
36+
static constexpr size_t depth = 3;
37+
static constexpr auto reliability = RMW_QOS_POLICY_RELIABILITY_RELIABLE;
38+
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL;
39+
};
40+
41+
} // namespace localization_interface
42+
43+
#endif // COMPONENT_INTERFACE_SPECS__LOCALIZATION_HPP_

0 commit comments

Comments
 (0)