Fixes issue with pedestrins in ALSM

Some changes in constants for approaching vehicles
This commit is contained in:
Jacopo Bartiromo 2021-07-28 15:54:15 +02:00 committed by bernat
parent c611c1b464
commit d74495c7ff
3 changed files with 9 additions and 9 deletions

View File

@ -125,11 +125,11 @@ void ALSM::IdentifyNewActors(const ActorList &actor_list) {
}
}
}
if (!registered_vehicles.Contains(actor_id)
&& unregistered_actors.find(actor_id) == unregistered_actors.end()) {
}
if (!registered_vehicles.Contains(actor_id)
&& unregistered_actors.find(actor_id) == unregistered_actors.end()) {
unregistered_actors.insert({actor_id, actor});
}
unregistered_actors.insert({actor_id, actor});
}
}
}

View File

@ -73,7 +73,7 @@ static const float OVERLAP_THRESHOLD = 0.1f;
static const float LOCKING_DISTANCE_PADDING = 4.0f;
static const float COLLISION_RADIUS_STOP = 8.0f;
static const float COLLISION_RADIUS_MIN = 20.0f;
static const float COLLISION_RADIUS_RATE = 0.5f;
static const float COLLISION_RADIUS_RATE = 0.65f;
static const float MAX_LOCKING_EXTENSION = 10.0f;
static const float WALKER_TIME_EXTENSION = 1.5f;
static const float SQUARE_ROOT_OF_TWO = 1.414f;
@ -106,8 +106,8 @@ static const double DOUBLE_NO_SIGNAL_PASSTHROUGH_INTERVAL = 5.0;
namespace MotionPlan {
static const float RELATIVE_APPROACH_SPEED = 10.0f / 3.6f;
static const float MIN_FOLLOW_LEAD_DISTANCE = 5.0f;
static const float MAX_FOLLOW_LEAD_DISTANCE = 10.0f;
static const float MIN_FOLLOW_LEAD_DISTANCE = 2.0f;
static const float MAX_FOLLOW_LEAD_DISTANCE = 5.0f;
static const float FOLLOW_DISTANCE_RATE = 0.1f;
static const float CRITICAL_BRAKING_MARGIN = 0.25f;
static const float EPSILON_RELATIVE_SPEED = 0.001f;

View File

@ -329,10 +329,10 @@ std::pair<bool, float> MotionPlanStage::CollisionHandling(const CollisionHazardD
}
// If vehicle is approaching a lead vehicle and the lead vehicle is further
// than CRITICAL_BRAKING_MARGIN but closer than FOLLOW_LEAD_DISTANCE.
else if (available_distance_margin > CRITICAL_BRAKING_MARGIN) {
else if (available_distance_margin > CRITICAL_BRAKING_MARGIN && other_velocity.Length() < 1.0f) {
// Then follow the lead vehicle by acquiring it's speed along current heading.
dynamic_target_velocity = std::max(other_speed_along_heading, RELATIVE_APPROACH_SPEED);
} else {
} else if (available_distance_margin < CRITICAL_BRAKING_MARGIN) {
// If lead vehicle closer than CRITICAL_BRAKING_MARGIN, initiate emergency stop.
collision_emergency_stop = true;
}