Skip to content

Commit d85da95

Browse files
authored
feat(autoware_ad_api_specs): define motion interface (autowarefoundation#1808)
* feat(autoware_ad_api_specs): define motion interface Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> * feat: add error code Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> * feat: move adapi messages Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> * feat(component_interface_utils): apply message change Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> * feat: change message type Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp> Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
1 parent 47c77c7 commit d85da95

File tree

2 files changed

+96
-0
lines changed
  • common
    • autoware_ad_api_specs/include/autoware_ad_api_specs
    • component_interface_specs/include/component_interface_specs

2 files changed

+96
-0
lines changed
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__MOTION_HPP_
16+
#define AUTOWARE_AD_API_SPECS__MOTION_HPP_
17+
18+
#include <rclcpp/qos.hpp>
19+
20+
#include <autoware_ad_api_msgs/msg/motion_state.hpp>
21+
#include <autoware_ad_api_msgs/srv/accept_start.hpp>
22+
23+
namespace autoware_ad_api::motion
24+
{
25+
26+
struct AcceptStart
27+
{
28+
using Service = autoware_ad_api_msgs::srv::AcceptStart;
29+
static constexpr char name[] = "/api/motion/accept_start";
30+
};
31+
32+
struct State
33+
{
34+
using Message = autoware_ad_api_msgs::msg::MotionState;
35+
static constexpr char name[] = "/api/motion/state";
36+
static constexpr size_t depth = 1;
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::motion
42+
43+
#endif // AUTOWARE_AD_API_SPECS__MOTION_HPP_
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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__CONTROL_HPP_
16+
#define COMPONENT_INTERFACE_SPECS__CONTROL_HPP_
17+
18+
#include <rclcpp/qos.hpp>
19+
20+
#include <tier4_control_msgs/msg/is_paused.hpp>
21+
#include <tier4_control_msgs/msg/is_start_requested.hpp>
22+
#include <tier4_control_msgs/srv/set_pause.hpp>
23+
24+
namespace control_interface
25+
{
26+
27+
struct SetPause
28+
{
29+
using Service = tier4_control_msgs::srv::SetPause;
30+
static constexpr char name[] = "/control/vehicle_cmd_gate/set_pause";
31+
};
32+
33+
struct IsPaused
34+
{
35+
using Message = tier4_control_msgs::msg::IsPaused;
36+
static constexpr char name[] = "/control/vehicle_cmd_gate/is_paused";
37+
static constexpr size_t depth = 1;
38+
static constexpr auto reliability = RMW_QOS_POLICY_RELIABILITY_RELIABLE;
39+
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL;
40+
};
41+
42+
struct IsStartRequested
43+
{
44+
using Message = tier4_control_msgs::msg::IsStartRequested;
45+
static constexpr char name[] = "/control/vehicle_cmd_gate/is_start_requested";
46+
static constexpr size_t depth = 1;
47+
static constexpr auto reliability = RMW_QOS_POLICY_RELIABILITY_RELIABLE;
48+
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL;
49+
};
50+
51+
} // namespace control_interface
52+
53+
#endif // COMPONENT_INTERFACE_SPECS__CONTROL_HPP_

0 commit comments

Comments
 (0)