Skip to content

Commit

Permalink
Merge branch 'main' into gnss-poser-migration
Browse files Browse the repository at this point in the history
  • Loading branch information
xmfcx authored Feb 18, 2025
2 parents 502b54e + 3a595e4 commit 423bc83
Show file tree
Hide file tree
Showing 73 changed files with 6,518 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ common/autoware_node/** [email protected] @autowarefoundation/autoware-core-globa
common/autoware_osqp_interface/** [email protected] [email protected] [email protected] [email protected] @autowarefoundation/autoware-core-global-codeowners
common/autoware_point_types/** [email protected] [email protected] [email protected] @autowarefoundation/autoware-core-global-codeowners
common/autoware_qp_interface/** [email protected] [email protected] [email protected] [email protected] @autowarefoundation/autoware-core-global-codeowners
common/autoware_trajectory/** [email protected] [email protected] [email protected] @autowarefoundation/autoware-core-global-codeowners
demos/autoware_test_node/** [email protected] @autowarefoundation/autoware-core-global-codeowners
localization/autoware_ekf_localizer/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] @autowarefoundation/autoware-core-global-codeowners
localization/autoware_localization_util/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] @autowarefoundation/autoware-core-global-codeowners
testing/autoware_testing/** [email protected] [email protected] [email protected] [email protected] @autowarefoundation/autoware-core-global-codeowners

### Copied from .github/CODEOWNERS-manual ###
.github/** @autowarefoundation/autoware-core-global-codeowners
2 changes: 2 additions & 0 deletions .pages
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nav:
- ... | regex=^(?!.*(README.md|CONTRIBUTING.md|CODE_OF_CONDUCT.md|DISCLAIMER.md)).*$
19 changes: 19 additions & 0 deletions common/autoware_component_interface_specs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
cmake_minimum_required(VERSION 3.14)
project(autoware_component_interface_specs)

find_package(autoware_cmake REQUIRED)
autoware_package()

if(BUILD_TESTING)
ament_auto_add_gtest(gtest_${PROJECT_NAME}
test/gtest_main.cpp
test/test_planning.cpp
test/test_control.cpp
test/test_localization.cpp
test/test_map.cpp
test/test_perception.cpp
test/test_vehicle.cpp
)
endif()

ament_auto_package()
47 changes: 47 additions & 0 deletions common/autoware_component_interface_specs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# autoware_component_interface_specs

This package defines the standardized component interface specifications for Autoware Core, ensuring consistent communication and interaction between various components in the Autoware autonomous driving stack.

## Purpose

The purpose of this package is to:

- Provide a single source of truth for component interface definitions
- Ensure consistency across different implementations
- Facilitate modular development and component interchangeability
- Document the communication protocols between Autoware Core components

## Structure

The package contains interface specifications for various components, including:

- Message definitions
- Service interfaces
- Action interfaces

## Usage

To use these interface specifications in your component:

1. Add this package as a dependency in your package.xml:

```xml
<depend>autoware_component_interface_specs</depend>
```

2. Use the provided interfaces in your component code.

```cpp
#include <autoware/component_interface_specs/localization.hpp>
// Example: Creating a publisher using the interface specs
using KinematicState = autoware::component_interface_specs::localization::KinematicState;
rclcpp::Publisher<KinematicState::Message>::SharedPtr publisher_ =
create_publisher<KinematicState::Message>(
KinematicState::name,
autoware::component_interface_specs::get_qos(KinematicState));
// Example: Creating a subscription using the interface specs
auto subscriber_ = create_subscription<KinematicState::Message>(
KinematicState::name,
autoware::component_interface_specs::get_qos(KinematicState),
std::bind(&YourClass::callback, this, std::placeholders::1));
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// 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__COMPONENT_INTERFACE_SPECS__CONTROL_HPP_
#define AUTOWARE__COMPONENT_INTERFACE_SPECS__CONTROL_HPP_

#include <autoware/component_interface_specs/utils.hpp>
#include <rclcpp/qos.hpp>

#include <autoware_control_msgs/msg/control.hpp>

namespace autoware::component_interface_specs::control
{

struct ControlCommand
{
using Message = autoware_control_msgs::msg::Control;
static constexpr char name[] = "/control/command/control_cmd";
static constexpr size_t depth = 1;
static constexpr auto reliability = RMW_QOS_POLICY_RELIABILITY_RELIABLE;
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL;
};

} // namespace autoware::component_interface_specs::control

#endif // AUTOWARE__COMPONENT_INTERFACE_SPECS__CONTROL_HPP_
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// 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__COMPONENT_INTERFACE_SPECS__LOCALIZATION_HPP_
#define AUTOWARE__COMPONENT_INTERFACE_SPECS__LOCALIZATION_HPP_

#include <autoware/component_interface_specs/utils.hpp>
#include <rclcpp/qos.hpp>

#include <geometry_msgs/msg/accel_with_covariance_stamped.hpp>
#include <nav_msgs/msg/odometry.hpp>

namespace autoware::component_interface_specs::localization
{

struct KinematicState
{
using Message = nav_msgs::msg::Odometry;
static constexpr char name[] = "/localization/kinematic_state";
static constexpr size_t depth = 1;
static constexpr auto reliability = RMW_QOS_POLICY_RELIABILITY_RELIABLE;
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_VOLATILE;
};

struct Acceleration
{
using Message = geometry_msgs::msg::AccelWithCovarianceStamped;
static constexpr char name[] = "/localization/acceleration";
static constexpr size_t depth = 1;
static constexpr auto reliability = RMW_QOS_POLICY_RELIABILITY_RELIABLE;
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_VOLATILE;
};

} // namespace autoware::component_interface_specs::localization

#endif // AUTOWARE__COMPONENT_INTERFACE_SPECS__LOCALIZATION_HPP_
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// Copyright 2023 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__COMPONENT_INTERFACE_SPECS__MAP_HPP_
#define AUTOWARE__COMPONENT_INTERFACE_SPECS__MAP_HPP_

#include <autoware/component_interface_specs/utils.hpp>
#include <rclcpp/qos.hpp>

#include <autoware_map_msgs/msg/lanelet_map_bin.hpp>
#include <autoware_map_msgs/msg/map_projector_info.hpp>
#include <sensor_msgs/msg/point_cloud2.hpp>

namespace autoware::component_interface_specs::map
{

struct MapProjectorInfo
{
using Message = autoware_map_msgs::msg::MapProjectorInfo;
static constexpr char name[] = "/map/map_projector_info";
static constexpr size_t depth = 1;
static constexpr auto reliability = RMW_QOS_POLICY_RELIABILITY_RELIABLE;
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL;
};

struct PointCloudMap
{
using Message = sensor_msgs::msg::PointCloud2;
static constexpr char name[] = "/map/point_cloud_map";
static constexpr size_t depth = 1;
static constexpr auto reliability = RMW_QOS_POLICY_RELIABILITY_RELIABLE;
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL;
};

struct VectorMap
{
using Message = autoware_map_msgs::msg::LaneletMapBin;
static constexpr char name[] = "/map/vector_map";
static constexpr size_t depth = 1;
static constexpr auto reliability = RMW_QOS_POLICY_RELIABILITY_RELIABLE;
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL;
};

} // namespace autoware::component_interface_specs::map

#endif // AUTOWARE__COMPONENT_INTERFACE_SPECS__MAP_HPP_
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// 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__COMPONENT_INTERFACE_SPECS__PERCEPTION_HPP_
#define AUTOWARE__COMPONENT_INTERFACE_SPECS__PERCEPTION_HPP_

#include <autoware/component_interface_specs/utils.hpp>
#include <rclcpp/qos.hpp>

#include <autoware_perception_msgs/msg/predicted_objects.hpp>

namespace autoware::component_interface_specs::perception
{

struct ObjectRecognition
{
using Message = autoware_perception_msgs::msg::PredictedObjects;
static constexpr char name[] = "/perception/object_recognition/objects";
static constexpr size_t depth = 1;
static constexpr auto reliability = RMW_QOS_POLICY_RELIABILITY_RELIABLE;
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_VOLATILE;
};

} // namespace autoware::component_interface_specs::perception

#endif // AUTOWARE__COMPONENT_INTERFACE_SPECS__PERCEPTION_HPP_
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// 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__COMPONENT_INTERFACE_SPECS__PLANNING_HPP_
#define AUTOWARE__COMPONENT_INTERFACE_SPECS__PLANNING_HPP_

#include <autoware/component_interface_specs/utils.hpp>
#include <rclcpp/qos.hpp>

#include <autoware_planning_msgs/msg/lanelet_route.hpp>
#include <autoware_planning_msgs/msg/trajectory.hpp>

namespace autoware::component_interface_specs::planning
{

struct LaneletRoute
{
using Message = autoware_planning_msgs::msg::LaneletRoute;
static constexpr char name[] = "/planning/mission_planning/route_selector/main/route";
static constexpr size_t depth = 1;
static constexpr auto reliability = RMW_QOS_POLICY_RELIABILITY_RELIABLE;
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL;
};

struct Trajectory
{
using Message = autoware_planning_msgs::msg::Trajectory;
static constexpr char name[] = "/planning/scenario_planning/trajectory";
static constexpr size_t depth = 1;
static constexpr auto reliability = RMW_QOS_POLICY_RELIABILITY_RELIABLE;
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_VOLATILE;
};

} // namespace autoware::component_interface_specs::planning

#endif // AUTOWARE__COMPONENT_INTERFACE_SPECS__PLANNING_HPP_
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// Copyright 2023 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__COMPONENT_INTERFACE_SPECS__UTILS_HPP_
#define AUTOWARE__COMPONENT_INTERFACE_SPECS__UTILS_HPP_

#include <rclcpp/qos.hpp>

#include <autoware_map_msgs/msg/lanelet_map_bin.hpp>
#include <autoware_map_msgs/msg/map_projector_info.hpp>
#include <sensor_msgs/msg/point_cloud2.hpp>

namespace autoware::component_interface_specs
{

template <typename T>
rclcpp::QoS get_qos(T interface)
{
return rclcpp::QoS{interface.depth}
.reliability(interface.reliability)
.durability(interface.durability);
}

} // namespace autoware::component_interface_specs

#endif // AUTOWARE__COMPONENT_INTERFACE_SPECS__UTILS_HPP_
Loading

0 comments on commit 423bc83

Please sign in to comment.