Skip to content

Commit

Permalink
Merge branch 'main' into feature/separate_concatenate_filter_node
Browse files Browse the repository at this point in the history
  • Loading branch information
YoshiRi committed Jul 14, 2023
2 parents ee7bad2 + 6f11675 commit 74998f4
Show file tree
Hide file tree
Showing 768 changed files with 106,279 additions and 12,660 deletions.
390 changes: 206 additions & 184 deletions .github/CODEOWNERS

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion .github/sync-files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@
files:
- source: .github/workflows/deploy-docs.yaml
- source: .github/workflows/delete-closed-pr-docs.yaml
- source: mkdocs.yaml
- source: mkdocs-base.yaml
dest: mkdocs.yaml
pre-commands: |
sd "Autoware Documentation" "Autoware Universe Documentation" {source}
sd "autoware-documentation" "autoware.universe" {source}
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/json-schema-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: json-schema-check

on:
pull_request:
paths:
- "**/schema/*.schema.json"
- "**/config/*.param.yaml"

jobs:
json-schema-check:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3

- name: Run json-schema-check
uses: autowarefoundation/autoware-github-actions/json-schema-check@v1
3 changes: 3 additions & 0 deletions .github/workflows/pre-commit-optional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ jobs:
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Run pre-commit
uses: autowarefoundation/autoware-github-actions/pre-commit@v1
with:
pre-commit-config: .pre-commit-config-optional.yaml
base-branch: origin/${{ github.base_ref }}
1 change: 0 additions & 1 deletion .github/workflows/update-codeowners-from-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ jobs:
uses: autowarefoundation/autoware-github-actions/update-codeowners-from-packages@v1
with:
token: ${{ steps.generate-token.outputs.token }}
global-codeowners: "@autowarefoundation/autoware-global-codeowners"
pr-labels: |
bot
update-codeowners-from-packages
Expand Down
3 changes: 0 additions & 3 deletions .markdown-link-check.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
},
{
"pattern": "^https://github.com/.*/discussions/new"
},
{
"pattern": "^https://doi.org/10.2172/7309916"
}
],
"retryOn429": true,
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config-optional.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/tcort/markdown-link-check
rev: v3.11.1
rev: v3.11.2
hooks:
- id: markdown-link-check
args: [--quiet, --config=.markdown-link-check.json]
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ repos:
args: [--quiet]
exclude: .cu

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.23.2
hooks:
- id: check-metaschema
files: ^.+/schema/.*schema\.json$

- repo: local
hooks:
- id: prettier-svg
Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ representative at an online or offline event.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[email protected].
<[email protected]>.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// 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_AD_API_SPECS__VEHICLE_HPP_
#define AUTOWARE_AD_API_SPECS__VEHICLE_HPP_

#include <rclcpp/qos.hpp>

#include <autoware_adapi_v1_msgs/msg/vehicle_kinematics.hpp>
#include <autoware_adapi_v1_msgs/msg/vehicle_status.hpp>
#include <autoware_adapi_v1_msgs/srv/get_vehicle_dimensions.hpp>

namespace autoware_ad_api::vehicle
{

struct VehicleKinematics
{
using Message = autoware_adapi_v1_msgs::msg::VehicleKinematics;
static constexpr char name[] = "/api/vehicle/kinematics";
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 VehicleStatus
{
using Message = autoware_adapi_v1_msgs::msg::VehicleStatus;
static constexpr char name[] = "/api/vehicle/status";
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 Dimensions
{
using Service = autoware_adapi_v1_msgs::srv::GetVehicleDimensions;
static constexpr char name[] = "/api/vehicle/dimensions";
};

} // namespace autoware_ad_api::vehicle

#endif // AUTOWARE_AD_API_SPECS__VEHICLE_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ class AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC ObjectPolygonDisplayBase
m_default_topic{default_topic}
{
m_display_type_property = new rviz_common::properties::EnumProperty(
"Polygon Type", "3d", "Type of the polygon to display object.");
"Polygon Type", "3d", "Type of the polygon to display object.", this);
// Option values here must correspond to indices in palette_textures_ array in onInitialize()
// below.
m_display_type_property->addOption("3d", 0);
m_display_type_property->addOption("2d", 1);
m_display_type_property->addOption("Disable", 2);
m_simple_visualize_mode_property = new rviz_common::properties::EnumProperty(
"Visualization Type", "Normal", "Simplicity of the polygon to display object.");
"Visualization Type", "Normal", "Simplicity of the polygon to display object.", this);
m_simple_visualize_mode_property->addOption("Normal", 0);
m_simple_visualize_mode_property->addOption("Simple", 1);
// iterate over default values to create and initialize the properties.
Expand Down
29 changes: 27 additions & 2 deletions common/autoware_testing/autoware_testing/smoke_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,19 @@ def resolve_node(context, *args, **kwargs):
for file_name in shlex.split(LaunchConfiguration("arg_param_filenames").perform(context))
]

parameters_test = [
os.path.join(
get_package_share_directory(LaunchConfiguration("arg_package").perform(context)),
"test",
file_name,
)
for file_name in shlex.split(
LaunchConfiguration("arg_test_param_filenames").perform(context)
)
]

parameters.extend(parameters_test)

smoke_test_node = Node(
package=LaunchConfiguration("arg_package"),
executable=LaunchConfiguration("arg_package_exe"),
Expand All @@ -61,6 +74,11 @@ def generate_test_description():
arg_param_filenames = DeclareLaunchArgument(
"arg_param_filenames", default_value=["test.param.yaml"], description="Test param file"
)
arg_test_param_filenames = DeclareLaunchArgument(
"arg_test_param_filenames",
default_value=["test.param.yaml"],
description="Test only param file",
)
arg_executable_arguments = DeclareLaunchArgument(
"arg_executable_arguments", default_value=[""], description="Tested executable arguments"
)
Expand All @@ -70,6 +88,7 @@ def generate_test_description():
arg_package,
arg_package_exe,
arg_param_filenames,
arg_test_param_filenames,
arg_executable_arguments,
OpaqueFunction(function=resolve_node),
launch_testing.actions.ReadyToTest(),
Expand All @@ -82,9 +101,15 @@ def test_wait_for_node_ready(self):
"""Waiting for the node is ready."""
rclpy.init()
test_node = rclpy.create_node("test_node")
while len(test_node.get_node_names()) == 0:
# Wait until both dummy node "test_node" and real tested node are registered and then kill
# both of them, if tested node does not register within `timeout` seconds test will fail
start_time = time.time()
timeout = 2 # seconds
timeout_msg = "Smoke test timeout has been reached ({}s)".format(timeout)
print("waiting for Nodes to be ready")
while len(test_node.get_node_names()) < 2:
assert time.time() - start_time < timeout, timeout_msg
time.sleep(0.1)
print("waiting for Node to be ready")
rclpy.shutdown()


Expand Down
14 changes: 12 additions & 2 deletions common/autoware_testing/cmake/add_smoke_test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,31 @@
# :type EXECUTABLE_ARGUMENTS: string

function(add_smoke_test package_name executable_name)
cmake_parse_arguments(PARSE_ARGV 2 smoke_test "" "PARAM_FILENAMES;EXECUTABLE_ARGUMENTS" "")
cmake_parse_arguments(PARSE_ARGV 2 smoke_test "" "PARAM_FILENAMES;TEST_PARAM_FILENAMES;
EXECUTABLE_ARGUMENTS;TARGET_INFIX" "")

set(ARGUMENTS "arg_package:=${package_name}" "arg_package_exe:=${executable_name}")

set(TARGET_INFIX "") # OPTIONAL infix to distinguish multiple smoke tests for one node
if(smoke_test_TARGET_INFIX)
set(TARGET_INFIX "_${smoke_test_TARGET_INFIX}")
endif()

if(smoke_test_PARAM_FILENAMES)
list(APPEND ARGUMENTS "arg_param_filenames:=${smoke_test_PARAM_FILENAMES}")
endif()

if(smoke_test_TEST_PARAM_FILENAMES)
list(APPEND ARGUMENTS "arg_test_param_filenames:=${smoke_test_TEST_PARAM_FILENAMES}")
endif()

if(smoke_test_EXECUTABLE_ARGUMENTS)
list(APPEND ARGUMENTS "arg_executable_arguments:=${smoke_test_EXECUTABLE_ARGUMENTS}")
endif()

add_ros_test(
${autoware_testing_DIR}/../autoware_testing/smoke_test.py
TARGET "${executable_name}_smoke_test"
TARGET "${executable_name}${TARGET_INFIX}_smoke_test"
ARGS "${ARGUMENTS}"
TIMEOUT "30"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <autoware_adapi_v1_msgs/msg/localization_initialization_state.hpp>
#include <autoware_adapi_v1_msgs/srv/initialize_localization.hpp>
#include <geometry_msgs/msg/accel_with_covariance_stamped.hpp>
#include <nav_msgs/msg/odometry.hpp>

namespace localization_interface
Expand Down Expand Up @@ -48,6 +49,15 @@ struct KinematicState
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 localization_interface

#endif // COMPONENT_INTERFACE_SPECS__LOCALIZATION_HPP_
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// 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 COMPONENT_INTERFACE_SPECS__MAP_HPP_
#define COMPONENT_INTERFACE_SPECS__MAP_HPP_

#include <rclcpp/qos.hpp>

#include <tier4_map_msgs/msg/map_projector_info.hpp>

namespace map_interface
{

struct MapProjectorInfo
{
using Message = tier4_map_msgs::msg::MapProjectorInfo;
static constexpr char name[] = "/map/map_projector_type";
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 map_interface

#endif // COMPONENT_INTERFACE_SPECS__MAP_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,24 @@ struct Route
static constexpr auto durability = RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL;
};

struct NormalRoute
{
using Message = autoware_planning_msgs::msg::LaneletRoute;
static constexpr char name[] = "/planning/mission_planning/normal_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 MrmRoute
{
using Message = autoware_planning_msgs::msg::LaneletRoute;
static constexpr char name[] = "/planning/mission_planning/mrm_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_auto_planning_msgs::msg::Trajectory;
Expand Down
Loading

0 comments on commit 74998f4

Please sign in to comment.