autowarefoundation / autoware.universe

https://autowarefoundation.github.io/autoware.universe/
Apache License 2.0
1k stars 641 forks source link

[Dense-Urban-ODD] Improve cruise planner safe distance when cruising a front npc #7922

Closed ahmeddesokyebrahim closed 1 month ago

ahmeddesokyebrahim commented 4 months ago

Checklist

Description

Part of:

Dense Urban ODD Characteristics

In the context of Dense Urban ODD, currently obstacle_cruise_planner keeps a very long safe distance between ego and front npc which makes the driving scenario not natural. or potentially develop new features to improve the slowing down of ego vehicle to overtaking road user maintaining both passengers safety and comfortability.

Purpose

Based on description above, the purpose of this issue is to improve obstacle_cruise_planner safe distance calculations to have a more near human driving scenarios while cruising a front npc.

Cruising front npc "UC-NTR-005-0001"

The following image describes the scenario where ...

image

The purpose of of this improvement is to mitigate any unnecessary distance (very long distance between ego and npc) that makes the driving scenario not natural / human-like.

Npc slowing down from 14 km/h to 10 km/h

https://github.com/user-attachments/assets/9ce9d596-0150-4b66-b766-3658440e8695

For reproducing the issue using scenario simulation, you can use the these scenario and map files. :exclamation: Note :exclamation: In this previous scenario, the safe distance is updated to be 12.5 m following the 3-seconds inter-vehicle time-distance distance performance requirements here

Possible approaches

The obstacle_cruise_planner already depends on a function named calcRSSDistance() to get the target_dist_to_obstacle This function basically depends on this equation :

d_safe =  v_ego * t_reaction + (v_ego^2) / (2 * a_max) - (v_obstacle^2) / (2 * a_min) + d_margin

The d_margin is set to 6.0 m which yields to a very long distance in the afortmentioned scenario between ego and front npc.

A possible approach is to provide speration between stop and cruise parameters and reduce the value for cruise paramter used by RSS equation to be just a small constant to avoid zero distance )

Definition of done

mitsudome-r commented 3 months ago

@brkay54 @ahmeddesokyebrahim
Could you provide the reasons behind the safety distance of 2 seconds?Could you post the link to the reference you used to define this?

It would be also nice if you could also what original function is considering. Depending on the intention of function, it might be better to update the scenario to use the rss criteria.

villaoningfootball commented 1 month ago

Will different NPCs set different times?

ahmeddesokyebrahim commented 1 month ago

Closing this issue as completed after merging the relevant PR.