Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(autoware_velocity_smoother): porting from universe to core #10184

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions planning/autoware_external_velocity_limit_selector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ Example:

## Inputs

| Name | Type | Description |
| --------------------------------------------------- | ---------------------------------------------- | --------------------------------------------- |
| `~input/velocity_limit_from_api` | tier4_planning_msgs::VelocityLimit | velocity limit from api |
| `~input/velocity_limit_from_internal` | tier4_planning_msgs::VelocityLimit | velocity limit from autoware internal modules |
| `~input/velocity_limit_clear_command_from_internal` | tier4_planning_msgs::VelocityLimitClearCommand | velocity limit clear command |
| Name | Type | Description |
| --------------------------------------------------- | ---------------------------------------------------------- | --------------------------------------------- |
| `~input/velocity_limit_from_api` | autoware_internal_planning_msgs::VelocityLimit | velocity limit from api |
| `~input/velocity_limit_from_internal` | autoware_internal_planning_msgs::VelocityLimit | velocity limit from autoware internal modules |
| `~input/velocity_limit_clear_command_from_internal` | autoware_internal_planning_msgs::VelocityLimitClearCommand | velocity limit clear command |

## Outputs

| Name | Type | Description |
| ---------------------- | ---------------------------------- | ------------------------------------------------- |
| `~output/max_velocity` | tier4_planning_msgs::VelocityLimit | current information of the hardest velocity limit |
| Name | Type | Description |
| ---------------------- | ---------------------------------------------- | ------------------------------------------------- |
| `~output/max_velocity` | autoware_internal_planning_msgs::VelocityLimit | current information of the hardest velocity limit |

## Parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include <rclcpp/rclcpp.hpp>

#include <autoware_internal_debug_msgs/msg/string_stamped.hpp>
#include <tier4_planning_msgs/msg/velocity_limit.hpp>
#include <tier4_planning_msgs/msg/velocity_limit_clear_command.hpp>
#include <autoware_internal_planning_msgs/msg/velocity_limit.hpp>
#include <autoware_internal_planning_msgs/msg/velocity_limit_clear_command.hpp>

#include <memory>
#include <string>
Expand All @@ -30,9 +30,9 @@ namespace autoware::external_velocity_limit_selector
{

using autoware_internal_debug_msgs::msg::StringStamped;
using tier4_planning_msgs::msg::VelocityLimit;
using tier4_planning_msgs::msg::VelocityLimitClearCommand;
using tier4_planning_msgs::msg::VelocityLimitConstraints;
using autoware_internal_planning_msgs::msg::VelocityLimit;
using autoware_internal_planning_msgs::msg::VelocityLimitClearCommand;
using autoware_internal_planning_msgs::msg::VelocityLimitConstraints;

using VelocityLimitTable = std::unordered_map<std::string, VelocityLimit>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
<buildtool_depend>autoware_cmake</buildtool_depend>

<depend>autoware_internal_debug_msgs</depend>
<depend>autoware_internal_planning_msgs</depend>
<depend>generate_parameter_library</depend>
<depend>rclcpp</depend>
<depend>rclcpp_components</depend>
<depend>tier4_planning_msgs</depend>

<exec_depend>ros2cli</exec_depend>
<exec_depend>topic_tools</exec_depend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
import unittest

from ament_index_python import get_package_share_directory
from autoware_internal_planning_msgs.msg import VelocityLimit
from autoware_internal_planning_msgs.msg import VelocityLimitClearCommand
import launch
from launch.actions import IncludeLaunchDescription
from launch.launch_description_sources import AnyLaunchDescriptionSource
Expand All @@ -30,8 +32,6 @@
from rcl_interfaces.srv import SetParameters
import rclpy
import rclpy.qos
from tier4_planning_msgs.msg import VelocityLimit
from tier4_planning_msgs.msg import VelocityLimitClearCommand

logger = get_logger(__name__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include "autoware_internal_debug_msgs/msg/float32_stamped.hpp"
#include "autoware_internal_debug_msgs/msg/float64_stamped.hpp"
#include "autoware_internal_planning_msgs/msg/velocity_limit.hpp"
#include "autoware_internal_planning_msgs/msg/velocity_limit_clear_command.hpp"
#include "autoware_perception_msgs/msg/predicted_object.hpp"
#include "autoware_perception_msgs/msg/predicted_objects.hpp"
#include "autoware_planning_msgs/msg/trajectory.hpp"
Expand All @@ -31,8 +33,6 @@
#include "nav_msgs/msg/odometry.hpp"
#include "sensor_msgs/msg/point_cloud2.hpp"
#include "tier4_planning_msgs/msg/stop_speed_exceeded.hpp"
#include "tier4_planning_msgs/msg/velocity_limit.hpp"
#include "tier4_planning_msgs/msg/velocity_limit_clear_command.hpp"
#include "visualization_msgs/msg/marker_array.hpp"

#include <pcl/point_cloud.h>
Expand All @@ -41,6 +41,8 @@
using autoware::vehicle_info_utils::VehicleInfo;
using autoware_internal_debug_msgs::msg::Float32Stamped;
using autoware_internal_debug_msgs::msg::Float64Stamped;
using autoware_internal_planning_msgs::msg::VelocityLimit;
using autoware_internal_planning_msgs::msg::VelocityLimitClearCommand;
using autoware_perception_msgs::msg::ObjectClassification;
using autoware_perception_msgs::msg::PredictedObject;
using autoware_perception_msgs::msg::PredictedObjects;
Expand All @@ -54,8 +56,6 @@ using geometry_msgs::msg::Twist;
using nav_msgs::msg::Odometry;
using sensor_msgs::msg::PointCloud2;
using tier4_planning_msgs::msg::StopSpeedExceeded;
using tier4_planning_msgs::msg::VelocityLimit;
using tier4_planning_msgs::msg::VelocityLimitClearCommand;
using visualization_msgs::msg::Marker;
using visualization_msgs::msg::MarkerArray;
namespace bg = boost::geometry;
Expand Down
1 change: 1 addition & 0 deletions planning/autoware_obstacle_cruise_planner/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<buildtool_depend>autoware_cmake</buildtool_depend>

<depend>autoware_internal_debug_msgs</depend>
<depend>autoware_internal_planning_msgs</depend>
<depend>autoware_interpolation</depend>
<depend>autoware_lanelet2_extension</depend>
<depend>autoware_motion_utils</depend>
Expand Down
1 change: 1 addition & 0 deletions planning/autoware_obstacle_stop_planner/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

<depend>autoware_adapi_v1_msgs</depend>
<depend>autoware_internal_debug_msgs</depend>
<depend>autoware_internal_planning_msgs</depend>
<depend>autoware_motion_utils</depend>
<depend>autoware_perception_msgs</depend>
<depend>autoware_planning_factor_interface</depend>
Expand Down
8 changes: 4 additions & 4 deletions planning/autoware_obstacle_stop_planner/src/node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
#include <autoware_internal_debug_msgs/msg/float32_multi_array_stamped.hpp>
#include <autoware_internal_debug_msgs/msg/float32_stamped.hpp>
#include <autoware_internal_debug_msgs/msg/float64_stamped.hpp>
#include <autoware_internal_planning_msgs/msg/velocity_limit.hpp>
#include <autoware_internal_planning_msgs/msg/velocity_limit_clear_command.hpp>
#include <autoware_perception_msgs/msg/predicted_objects.hpp>
#include <autoware_planning_msgs/msg/trajectory.hpp>
#include <diagnostic_msgs/msg/diagnostic_status.hpp>
Expand All @@ -42,8 +44,6 @@
#include <geometry_msgs/msg/twist_stamped.hpp>
#include <sensor_msgs/msg/point_cloud2.hpp>
#include <tier4_planning_msgs/msg/expand_stop_range.hpp>
#include <tier4_planning_msgs/msg/velocity_limit.hpp>
#include <tier4_planning_msgs/msg/velocity_limit_clear_command.hpp>

#include <boost/assert.hpp>
#include <boost/assign/list_of.hpp>
Expand Down Expand Up @@ -86,12 +86,12 @@ using autoware_internal_debug_msgs::msg::BoolStamped;
using autoware_internal_debug_msgs::msg::Float32MultiArrayStamped;
using autoware_internal_debug_msgs::msg::Float32Stamped;
using autoware_internal_debug_msgs::msg::Float64Stamped;
using autoware_internal_planning_msgs::msg::VelocityLimit;
using autoware_internal_planning_msgs::msg::VelocityLimitClearCommand;
using autoware_perception_msgs::msg::PredictedObjects;
using autoware_planning_msgs::msg::Trajectory;
using autoware_planning_msgs::msg::TrajectoryPoint;
using tier4_planning_msgs::msg::ExpandStopRange;
using tier4_planning_msgs::msg::VelocityLimit;
using tier4_planning_msgs::msg::VelocityLimitClearCommand;

using TrajectoryPoints = std::vector<TrajectoryPoint>;
using PointCloud = pcl::PointCloud<pcl::PointXYZ>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<buildtool_depend>autoware_cmake</buildtool_depend>

<depend>autoware_internal_msgs</depend>
<depend>autoware_internal_planning_msgs</depend>
<depend>autoware_lanelet2_extension</depend>
<depend>autoware_motion_utils</depend>
<depend>autoware_planning_msgs</depend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ RemainingDistanceTimeCalculatorNode::RemainingDistanceTimeCalculatorNode(
sub_route_ = create_subscription<LaneletRoute>(
"~/input/route", qos_transient_local,
std::bind(&RemainingDistanceTimeCalculatorNode::on_route, this, _1));
sub_planning_velocity_ = create_subscription<tier4_planning_msgs::msg::VelocityLimit>(
sub_planning_velocity_ = create_subscription<autoware_internal_planning_msgs::msg::VelocityLimit>(
"/planning/scenario_planning/current_max_velocity", qos_transient_local,
std::bind(&RemainingDistanceTimeCalculatorNode::on_velocity_limit, this, _1));
sub_scenario_ = this->create_subscription<tier4_planning_msgs::msg::Scenario>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
#include <remaining_distance_time_calculator_parameters.hpp>

#include <autoware_internal_msgs/msg/mission_remaining_distance_time.hpp>
#include <autoware_internal_planning_msgs/msg/velocity_limit.hpp>
#include <autoware_map_msgs/msg/lanelet_map_bin.hpp>
#include <autoware_planning_msgs/msg/lanelet_route.hpp>
#include <geometry_msgs/msg/pose.hpp>
#include <geometry_msgs/msg/vector3.hpp>
#include <nav_msgs/msg/odometry.hpp>
#include <tier4_planning_msgs/msg/scenario.hpp>
#include <tier4_planning_msgs/msg/velocity_limit.hpp>

#include <lanelet2_core/Forward.h>
#include <lanelet2_core/utility/Optional.h>
Expand All @@ -49,7 +49,7 @@ class RemainingDistanceTimeCalculatorNode : public rclcpp::Node
using LaneletRoute = autoware_planning_msgs::msg::LaneletRoute;
using HADMapBin = autoware_map_msgs::msg::LaneletMapBin;
using Odometry = nav_msgs::msg::Odometry;
using VelocityLimit = tier4_planning_msgs::msg::VelocityLimit;
using VelocityLimit = autoware_internal_planning_msgs::msg::VelocityLimit;
using MissionRemainingDistanceTime = autoware_internal_msgs::msg::MissionRemainingDistanceTime;

rclcpp::Subscription<LaneletRoute>::SharedPtr sub_route_;
Expand Down
18 changes: 9 additions & 9 deletions planning/autoware_surround_obstacle_checker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ As mentioned in stop condition section, it prevents chattering by changing thres

### Output

| Name | Type | Description |
| --------------------------------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------- |
| `~/output/velocity_limit_clear_command` | `tier4_planning_msgs::msg::VelocityLimitClearCommand` | Velocity limit clear command |
| `~/output/max_velocity` | `tier4_planning_msgs::msg::VelocityLimit` | Velocity limit command |
| `~/output/no_start_reason` | `diagnostic_msgs::msg::DiagnosticStatus` | No start reason |
| `~/debug/marker` | `visualization_msgs::msg::MarkerArray` | Marker for visualization |
| `~/debug/footprint` | `geometry_msgs::msg::PolygonStamped` | Ego vehicle base footprint for visualization |
| `~/debug/footprint_offset` | `geometry_msgs::msg::PolygonStamped` | Ego vehicle footprint with `surround_check_distance` offset for visualization |
| `~/debug/footprint_recover_offset` | `geometry_msgs::msg::PolygonStamped` | Ego vehicle footprint with `surround_check_recover_distance` offset for visualization |
| Name | Type | Description |
| --------------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| `~/output/velocity_limit_clear_command` | `autoware_internal_planning_msgs::msg::VelocityLimitClearCommand` | Velocity limit clear command |
| `~/output/max_velocity` | `autoware_internal_planning_msgs::msg::VelocityLimit` | Velocity limit command |
| `~/output/no_start_reason` | `diagnostic_msgs::msg::DiagnosticStatus` | No start reason |
| `~/debug/marker` | `visualization_msgs::msg::MarkerArray` | Marker for visualization |
| `~/debug/footprint` | `geometry_msgs::msg::PolygonStamped` | Ego vehicle base footprint for visualization |
| `~/debug/footprint_offset` | `geometry_msgs::msg::PolygonStamped` | Ego vehicle footprint with `surround_check_distance` offset for visualization |
| `~/debug/footprint_recover_offset` | `geometry_msgs::msg::PolygonStamped` | Ego vehicle footprint with `surround_check_recover_distance` offset for visualization |

## Parameters

Expand Down
2 changes: 1 addition & 1 deletion planning/autoware_surround_obstacle_checker/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<buildtool_depend>autoware_cmake</buildtool_depend>
<buildtool_depend>eigen3_cmake_module</buildtool_depend>

<depend>autoware_internal_planning_msgs</depend>
<depend>autoware_motion_utils</depend>
<depend>autoware_perception_msgs</depend>
<depend>autoware_planning_factor_interface</depend>
Expand All @@ -34,7 +35,6 @@
<depend>tf2_eigen</depend>
<depend>tf2_geometry_msgs</depend>
<depend>tf2_ros</depend>
<depend>tier4_planning_msgs</depend>
<depend>visualization_msgs</depend>

<test_depend>ament_cmake_ros</test_depend>
Expand Down
8 changes: 4 additions & 4 deletions planning/autoware_surround_obstacle_checker/src/node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
#include <rclcpp/rclcpp.hpp>

#include <autoware_internal_debug_msgs/msg/float64_stamped.hpp>
#include <autoware_internal_planning_msgs/msg/velocity_limit.hpp>
#include <autoware_internal_planning_msgs/msg/velocity_limit_clear_command.hpp>
#include <autoware_perception_msgs/msg/predicted_objects.hpp>
#include <diagnostic_msgs/msg/diagnostic_status.hpp>
#include <diagnostic_msgs/msg/key_value.hpp>
#include <nav_msgs/msg/odometry.hpp>
#include <sensor_msgs/msg/point_cloud2.hpp>
#include <tier4_planning_msgs/msg/velocity_limit.hpp>
#include <tier4_planning_msgs/msg/velocity_limit_clear_command.hpp>
#include <visualization_msgs/msg/marker_array.hpp>

#include <tf2/utils.h>
Expand All @@ -50,10 +50,10 @@ namespace autoware::surround_obstacle_checker

using autoware::motion_utils::VehicleStopChecker;
using autoware::vehicle_info_utils::VehicleInfo;
using autoware_internal_planning_msgs::msg::VelocityLimit;
using autoware_internal_planning_msgs::msg::VelocityLimitClearCommand;
using autoware_perception_msgs::msg::PredictedObjects;
using autoware_perception_msgs::msg::Shape;
using tier4_planning_msgs::msg::VelocityLimit;
using tier4_planning_msgs::msg::VelocityLimitClearCommand;

using Obstacle = std::pair<double /* distance */, geometry_msgs::msg::Point>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ Stop condition の項で述べたように、状態によって障害物判定

### Output

| Name | Type | Description |
| --------------------------------------- | ----------------------------------------------------- | ---------------------------- |
| `~/output/velocity_limit_clear_command` | `tier4_planning_msgs::msg::VelocityLimitClearCommand` | Velocity limit clear command |
| `~/output/max_velocity` | `tier4_planning_msgs::msg::VelocityLimit` | Velocity limit command |
| `~/output/no_start_reason` | `diagnostic_msgs::msg::DiagnosticStatus` | No start reason |
| `~/debug/marker` | `visualization_msgs::msg::MarkerArray` | Marker for visualization |
| Name | Type | Description |
| --------------------------------------- | ----------------------------------------------------------------- | ---------------------------- |
| `~/output/velocity_limit_clear_command` | `autoware_internal_planning_msgs::msg::VelocityLimitClearCommand` | Velocity limit clear command |
| `~/output/max_velocity` | `autoware_internal_planning_msgs::msg::VelocityLimit` | Velocity limit command |
| `~/output/no_start_reason` | `diagnostic_msgs::msg::DiagnosticStatus` | No start reason |
| `~/debug/marker` | `visualization_msgs::msg::MarkerArray` | Marker for visualization |

## Parameters

Expand Down
12 changes: 3 additions & 9 deletions planning/autoware_velocity_smoother/README.ja.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Velocity Smoother

## Purpose
## Overview

`autoware_velocity_smoother`は目標軌道上の各点における望ましい車速を計画して出力するモジュールである。
このモジュールは、速度の最大化と乗り心地の良さを両立するために、事前に指定された制限速度、制限加速度および制限躍度の範囲で車速を計画する。
加速度や躍度の制限を与えることは車速の変化を滑らかにすることに対応するため、このモジュールを`autoware_velocity_smoother`と呼んでいる。

## Inner-workings / Algorithms
## Design

### Flow chart

Expand Down Expand Up @@ -237,14 +237,8 @@ Example:
- 参照経路に設定されている制限速度を指定した減速度やジャークで達成不可能な場合、可能な範囲で速度、加速度、ジャークの逸脱量を抑えながら減速
- 各逸脱量の重視の度合いはパラメータにより指定

## (Optional) Error detection and handling

## (Optional) Performance characterization

## (Optional) References/External links
## References/External links

[1] B. Stellato, et al., "OSQP: an operator splitting solver for quadratic programs", Mathematical Programming Computation, 2020, [10.1007/s12532-020-00179-2](https://link.springer.com/article/10.1007/s12532-020-00179-2).

[2] Y. Zhang, et al., "Toward a More Complete, Flexible, and Safer Speed Planning for Autonomous Driving via Convex Optimization", Sensors, vol. 18, no. 7, p. 2185, 2018, [10.3390/s18072185](https://doi.org/10.3390/s18072185)

## (Optional) Future extensions / Unimplemented parts
Loading
Loading