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

fix(slow_down_planner): improper parameter used in slow down #2276

Merged

Conversation

satoshi-ota
Copy link
Contributor

@satoshi-ota satoshi-ota commented Nov 13, 2022

Signed-off-by: satoshi-ota satoshi.ota928@gmail.com

Description

close #2258

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

@satoshi-ota
Copy link
Contributor Author

@VRichardJP

@codecov
Copy link

codecov bot commented Nov 13, 2022

Codecov Report

Base: 10.61% // Head: 10.50% // Decreases project coverage by -0.10% ⚠️

Coverage data is based on head (9f99a8a) compared to base (3c195d7).
Patch coverage: 0.00% of modified lines in pull request are covered.

❗ Current head 9f99a8a differs from pull request most recent head 5767e39. Consider uploading reports for the commit 5767e39 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2276      +/-   ##
==========================================
- Coverage   10.61%   10.50%   -0.11%     
==========================================
  Files        1241     1247       +6     
  Lines       83132    91028    +7896     
  Branches    20459    21033     +574     
==========================================
+ Hits         8825     9565     +740     
- Misses      64595    71276    +6681     
- Partials     9712    10187     +475     
Flag Coverage Δ *Carryforward flag
differential 0.00% <0.00%> (?)
total 10.49% <0.00%> (-0.13%) ⬇️ Carriedforward from 988fe02

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
planning/obstacle_stop_planner/src/node.cpp 0.00% <0.00%> (ø)
...tic_evaluator/include/kinematic_evaluator/stat.hpp 62.50% <0.00%> (-19.32%) ⬇️
..._evaluator/include/localization_evaluator/stat.hpp 56.25% <0.00%> (-16.48%) ⬇️
.../src/vehicle/test_vehicle_state_checker_helper.hpp 70.58% <0.00%> (-9.42%) ⬇️
planning/behavior_path_planner/test/input.cpp 60.00% <0.00%> (-7.86%) ⬇️
common/perception_utils/src/conversion.cpp 50.00% <0.00%> (-7.15%) ⬇️
...city_planner/include/utilization/state_machine.hpp 31.03% <0.00%> (-7.07%) ⬇️
...ng/behavior_path_planner/test/test_turn_signal.cpp 40.41% <0.00%> (-6.86%) ⬇️
...include/motion_utils/trajectory/tmp_conversion.hpp 60.00% <0.00%> (-6.67%) ⬇️
...oware_auto_geometry/include/geometry/common_2d.hpp 82.66% <0.00%> (-5.91%) ⬇️
... and 772 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@VRichardJP
Copy link
Contributor

Is it working on your side?

I have tried your fork with these parameters:

=== src/universe/autoware.universe (git) ===
diff --git a/launch/tier4_planning_launch/config/scenario_planning/lane_driving/motion_planning/obstacle_stop_planner/obstacle_stop_planner.param.yaml b/launch/tier4_planning_launch/config/scenario_planning/lane_driving/motion_planning/obstacle_stop_planner/obstacle_stop_planner.param.yaml
index 55a21d6cd..5d30ef879 100644
--- a/launch/tier4_planning_launch/config/scenario_planning/lane_driving/motion_planning/obstacle_stop_planner/obstacle_stop_planner.param.yaml
+++ b/launch/tier4_planning_launch/config/scenario_planning/lane_driving/motion_planning/obstacle_stop_planner/obstacle_stop_planner.param.yaml
@@ -3,7 +3,7 @@
     hunting_threshold: 0.5                   # even if the obstacle disappears, the stop judgment continues for hunting_threshold [s]
     lowpass_gain: 0.9                        # gain parameter for low pass filter [-]
     max_velocity: 20.0                       # max velocity [m/s]
-    enable_slow_down: False                  # whether to use slow down planner [-]
+    enable_slow_down: True                  # whether to use slow down planner [-]
 
     stop_planner:
       # params for stop position
@@ -29,12 +29,12 @@
 
       # params for detection area
       detection_area:
-        lateral_margin: 1.0                  # offset from vehicle side edge for expanding the search area of the surrounding point cloud [m]
+        lateral_margin: 10.0                  # offset from vehicle side edge for expanding the search area of the surrounding point cloud [m]
 
       # params for velocity
       target_velocity:
-        max_slow_down_velocity: 1.38         # max slow down velocity (use this param if consider_constraints is False)[m/s]
-        min_slow_down_velocity: 0.28         # min slow down velocity (use this param if consider_constraints is False)[m/s]
+        max_slow_down_velocity: 10.0         # max slow down velocity (use this param if consider_constraints is False)[m/s]
+        min_slow_down_velocity: 10.0         # min slow down velocity (use this param if consider_constraints is False)[m/s]
         slow_down_velocity: 1.38             # target slow down velocity (use this param if consider_constraints is True)[m/s]
 
       # params for deceleration constraints (use this param if consider_constraints is True)
diff --git a/launch/tier4_planning_launch/launch/scenario_planning/lane_driving/motion_planning/motion_planning.launch.py b/launch/tier4_planning_launch/launch/scenario_planning/lane_driving/motion_planning/motion_planning.launch.py
index 91bc71379..8d9f5b9af 100644
--- a/launch/tier4_planning_launch/launch/scenario_planning/lane_driving/motion_planning/motion_planning.launch.py
+++ b/launch/tier4_planning_launch/launch/scenario_planning/lane_driving/motion_planning/motion_planning.launch.py
@@ -209,7 +209,7 @@ def launch_setup(context, *args, **kwargs):
             obstacle_stop_planner_param,
             obstacle_stop_planner_acc_param,
             vehicle_info_param,
-            {"enable_slow_down": False},
+            # {"enable_slow_down": False},
         ],
         extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}],
     )

I can see the slow down markers, but the speed seems not to be limited to 10km/h:
image

@VRichardJP
Copy link
Contributor

VRichardJP commented Nov 15, 2022

Sorry I am silly. With these parameters it works:

max_slow_down_velocity: 2.78  # = 10km/h!
min_slow_down_velocity: 2.78  

What about the motion_planning.launch.py? Does it makes sense to keep the hardcoded {"enable_slow_down": False} while it can be set in the yaml file?

@satoshi-ota
Copy link
Contributor Author

@VRichardJP hmm... 🤔 I'll check it again with your parameters setting.

@satoshi-ota
Copy link
Contributor Author

satoshi-ota commented Nov 15, 2022

@VRichardJP

With these parameters it works:

That's good 👍

Previously, enable_slow_down was not included in the yaml file, so it was hardcoded into the launch file motion_planning.launch.py. Now it is not needed, so I'll remove hardcoded param in this PR.

@github-actions github-actions bot added component:launch Launch files, scripts and initialization tools. (auto-assigned) component:planning Route planning, decision-making, and navigation. (auto-assigned) labels Nov 17, 2022
@satoshi-ota satoshi-ota enabled auto-merge (squash) November 28, 2022 09:13
@satoshi-ota satoshi-ota requested a review from a team as a code owner November 28, 2022 09:18
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
…rom launch.py

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
@satoshi-ota satoshi-ota merged commit 140c505 into autowarefoundation:main Nov 29, 2022
@satoshi-ota satoshi-ota deleted the fix/slow-down-planner-bug branch November 29, 2022 04:52
HansRobo pushed a commit to HansRobo/autoware.universe that referenced this pull request Dec 16, 2022
…efoundation#2276)

* fix(slow_down_planner): improper parameter used in slow down

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(tier4_planning_launch): remove hardcoded param enable_slow_down from launch.py

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
kminoda pushed a commit to kminoda/autoware.universe that referenced this pull request Jan 6, 2023
…efoundation#2276)

* fix(slow_down_planner): improper parameter used in slow down

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(tier4_planning_launch): remove hardcoded param enable_slow_down from launch.py

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Signed-off-by: kminoda <koji.minoda@tier4.jp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:launch Launch files, scripts and initialization tools. (auto-assigned) component:planning Route planning, decision-making, and navigation. (auto-assigned)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

obstacle_stop_planner slow down planner does not work?
4 participants