Skip to content

Commit

Permalink
feat(obstacle_cruise_planner): add jerk and acc limits for slow-down (a…
Browse files Browse the repository at this point in the history
…utowarefoundation#5810)

Add jerk and acc limits for slow-down

Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp>
Signed-off-by: karishma <karishma@interpl.ai>
  • Loading branch information
danielsanchezaran authored and karishma1911 committed Dec 19, 2023
1 parent 2e6139e commit c6a915a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
min_jerk: -1.0 # min jerk [m/sss]
max_jerk: 1.0 # max jerk [m/sss]

slow_down:
min_acc: -1.0 # min slowdown deceleration [m/ss]
min_jerk: -1.0 # min slowdown jerk [m/sss]

# constraints to be observed
limit:
min_acc: -2.5 # min deceleration limit [m/ss]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ struct LongitudinalInfo
limit_min_accel = node.declare_parameter<double>("limit.min_acc");
limit_max_jerk = node.declare_parameter<double>("limit.max_jerk");
limit_min_jerk = node.declare_parameter<double>("limit.min_jerk");
slow_down_min_accel = node.declare_parameter<double>("slow_down.min_acc");
slow_down_min_jerk = node.declare_parameter<double>("slow_down.min_jerk");

idling_time = node.declare_parameter<double>("common.idling_time");
min_ego_accel_for_rss = node.declare_parameter<double>("common.min_ego_accel_for_rss");
Expand All @@ -197,6 +199,9 @@ struct LongitudinalInfo
tier4_autoware_utils::updateParam<double>(parameters, "limit.min_accel", limit_min_accel);
tier4_autoware_utils::updateParam<double>(parameters, "limit.max_jerk", limit_max_jerk);
tier4_autoware_utils::updateParam<double>(parameters, "limit.min_jerk", limit_min_jerk);
tier4_autoware_utils::updateParam<double>(
parameters, "slow_down.min_accel", slow_down_min_accel);
tier4_autoware_utils::updateParam<double>(parameters, "slow_down.min_jerk", slow_down_min_jerk);

tier4_autoware_utils::updateParam<double>(parameters, "common.idling_time", idling_time);
tier4_autoware_utils::updateParam<double>(
Expand All @@ -220,6 +225,8 @@ struct LongitudinalInfo
double min_accel;
double max_jerk;
double min_jerk;
double slow_down_min_jerk;
double slow_down_min_accel;
double limit_max_accel;
double limit_min_accel;
double limit_max_jerk;
Expand Down
4 changes: 2 additions & 2 deletions planning/obstacle_cruise_planner/src/planner_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -763,8 +763,8 @@ PlannerInterface::calculateDistanceToSlowDownWithConstraints(
}
// TODO(murooka) Calculate more precisely. Final acceleration should be zero.
const double min_feasible_slow_down_vel = calcDecelerationVelocityFromDistanceToTarget(
longitudinal_info_.min_jerk, longitudinal_info_.min_accel, planner_data.ego_acc,
planner_data.ego_vel, deceleration_dist);
longitudinal_info_.slow_down_min_jerk, longitudinal_info_.slow_down_min_accel,
planner_data.ego_acc, planner_data.ego_vel, deceleration_dist);
return min_feasible_slow_down_vel;
}();
if (prev_output) {
Expand Down

0 comments on commit c6a915a

Please sign in to comment.