Skip to content

Commit

Permalink
feat(autoware_ad_api_specs): define localization interface (tier4#1560)
Browse files Browse the repository at this point in the history
feat(autoware_ad_api_msgs): define localization interface

Signed-off-by: Takagi, Isamu <[email protected]>
  • Loading branch information
isamu-takagi authored and boyali committed Sep 28, 2022
1 parent eadca92 commit 94952fc
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 0 deletions.
2 changes: 2 additions & 0 deletions common/autoware_ad_api_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ autoware_package()
rosidl_generate_interfaces(${PROJECT_NAME}
common/msg/ResponseStatus.msg
interface/srv/InterfaceVersion.srv
localization/msg/LocalizationInitializationState.msg
localization/srv/InitializeLocalization.srv
routing/msg/RouteState.msg
routing/msg/Route.msg
routing/msg/RouteData.msg
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
uint16 UNKNOWN = 0
uint16 UNINITIALIZED = 1
uint16 INITIALIZING = 2
uint16 INITIALIZED = 3

builtin_interfaces/Time stamp
uint16 state
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
geometry_msgs/PoseWithCovarianceStamped[<=1] pose
---
uint16 ERROR_UNSAFE = 1
uint16 ERROR_GNSS_SUPPORT = 2
uint16 ERROR_GNSS = 3
uint16 ERROR_ESTIMATION = 4
autoware_ad_api_msgs/ResponseStatus status
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Copyright 2022 TIER IV, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef AUTOWARE_AD_API_SPECS__LOCALIZATION_HPP_
#define AUTOWARE_AD_API_SPECS__LOCALIZATION_HPP_

#include <rclcpp/qos.hpp>

#include <autoware_ad_api_msgs/msg/localization_initialization_state.hpp>
#include <autoware_ad_api_msgs/srv/initialize_localization.hpp>

namespace autoware_ad_api::localization
{

struct Initialize
{
using Service = autoware_ad_api_msgs::srv::InitializeLocalization;
static constexpr char name[] = "/api/localization/initialize";
};

struct InitializationState
{
using Message = autoware_ad_api_msgs::msg::LocalizationInitializationState;
static constexpr char name[] = "/api/localization/initialization_state";
static constexpr size_t depth = 3;
static constexpr auto reliability = RMW_QOS_POLICY_RELIABILITY_RELIABLE;
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL;
};

} // namespace autoware_ad_api::localization

#endif // AUTOWARE_AD_API_SPECS__LOCALIZATION_HPP_
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Copyright 2022 TIER IV, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef COMPONENT_INTERFACE_SPECS__LOCALIZATION_HPP_
#define COMPONENT_INTERFACE_SPECS__LOCALIZATION_HPP_

#include <rclcpp/qos.hpp>

#include <autoware_ad_api_msgs/msg/localization_initialization_state.hpp>
#include <autoware_ad_api_msgs/srv/initialize_localization.hpp>

namespace localization_interface
{

struct Initialize
{
using Service = autoware_ad_api_msgs::srv::InitializeLocalization;
static constexpr char name[] = "/localization/initialize";
};

struct InitializationState
{
using Message = autoware_ad_api_msgs::msg::LocalizationInitializationState;
static constexpr char name[] = "/localization/initialization_state";
static constexpr size_t depth = 3;
static constexpr auto reliability = RMW_QOS_POLICY_RELIABILITY_RELIABLE;
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL;
};

} // namespace localization_interface

#endif // COMPONENT_INTERFACE_SPECS__LOCALIZATION_HPP_

0 comments on commit 94952fc

Please sign in to comment.