Skip to content

Commit

Permalink
fix(avoidance): fix bug in calculation of rss longitudinal margin (au…
Browse files Browse the repository at this point in the history
…towarefoundation#2872)

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
  • Loading branch information
satoshi-ota authored and 1222-takeshi committed Mar 6, 2023
1 parent 99bd1ff commit a3c89d1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2458,7 +2458,7 @@ double AvoidanceModule::getRSSLongitudinalDistance(
* =======================================
*/
if (!is_front_object && !opposite_lane_vehicle) {
return v_obj * idling_time + 0.5 * accel_for_rss * std::pow(v_obj, 2.0) +
return v_obj * idling_time + 0.5 * accel_for_rss * std::pow(idling_time, 2.0) +
std::pow(v_obj + accel_for_rss * idling_time, 2.0) / (2.0 * accel_for_rss) -
std::pow(v_ego, 2.0) / (2.0 * accel_for_rss);
}
Expand Down

0 comments on commit a3c89d1

Please sign in to comment.