Skip to content

Commit

Permalink
feat(avoidance): add new parameter
Browse files Browse the repository at this point in the history
Signed-off-by: satoshi-ota <[email protected]>
  • Loading branch information
satoshi-ota committed Oct 28, 2023
1 parent 3713bb7 commit e830097
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,18 @@
# avoidance distance parameters
longitudinal:
prepare_time: 2.0 # [s]
remain_buffer_distance: 30.0 # [m]
min_prepare_distance: 1.0 # [m]
min_slow_down_speed: 1.38 # [m/s]
buf_slow_down_speed: 0.56 # [m/s]
nominal_avoidance_speed: 8.33 # [m/s]
# return dead line
return_dead_line:
goal:
enable: true # [-]
buffer: 30.0 # [m]
traffic_light:
enable: true # [-]
buffer: 3.0 # [m]

# For yield maneuver
yield:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ struct AvoidanceParameters
// use intersection area for avoidance
bool use_intersection_areas{false};

// consider avoidance return dead line
bool enable_dead_line_for_goal{false};
bool enable_dead_line_for_traffic_light{false};

// module try to return original path to keep this distance from edge point of the path.
double dead_line_buffer_for_goal{0.0};
double dead_line_buffer_for_traffic_light{0.0};

// max deceleration for
double max_deceleration{0.0};

Expand Down Expand Up @@ -217,9 +225,6 @@ struct AvoidanceParameters
// nominal avoidance sped
double nominal_avoidance_speed{0.0};

// module try to return original path to keep this distance from edge point of the path.
double remain_buffer_distance{0.0};

// The margin is configured so that the generated avoidance trajectory does not come near to the
// road shoulder.
double soft_road_shoulder_margin{1.0};
Expand Down Expand Up @@ -514,6 +519,10 @@ struct AvoidancePlanningData
bool found_avoidance_path{false};

double to_stop_line{std::numeric_limits<double>::max()};

double to_start_point{std::numeric_limits<double>::lowest()};

double to_return_point{std::numeric_limits<double>::max()};
};

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,23 @@ AvoidanceModuleManager::AvoidanceModuleManager(
std::string ns = "avoidance.avoidance.longitudinal.";
p.prepare_time = getOrDeclareParameter<double>(*node, ns + "prepare_time");
p.min_prepare_distance = getOrDeclareParameter<double>(*node, ns + "min_prepare_distance");
p.remain_buffer_distance = getOrDeclareParameter<double>(*node, ns + "remain_buffer_distance");
p.min_slow_down_speed = getOrDeclareParameter<double>(*node, ns + "min_slow_down_speed");
p.buf_slow_down_speed = getOrDeclareParameter<double>(*node, ns + "buf_slow_down_speed");
p.nominal_avoidance_speed =
getOrDeclareParameter<double>(*node, ns + "nominal_avoidance_speed");
}

// avoidance maneuver (return shift dead line)
{
std::string ns = "avoidance.avoidance.return_dead_line.";
p.enable_dead_line_for_goal = getOrDeclareParameter<bool>(*node, ns + "goal.enable");
p.enable_dead_line_for_traffic_light =
getOrDeclareParameter<bool>(*node, ns + "traffic_light.enable");
p.dead_line_buffer_for_goal = getOrDeclareParameter<double>(*node, ns + "goal.buffer");
p.dead_line_buffer_for_traffic_light =
getOrDeclareParameter<double>(*node, ns + "traffic_light.buffer");
}

// yield
{
std::string ns = "avoidance.yield.";
Expand Down

0 comments on commit e830097

Please sign in to comment.