14#define SQUARE(a) ((a) * (a))
15#define RATE(MaxY, MinY, DiffX) (((MaxY) - (MinY)) / (DiffX))
18namespace traffic_manager {
27namespace VehicleRemoval {
44namespace WorldInfoRefresh {
58 return !(now >=
last && (now -
last) < period);
64 const bool refreshed_this_step,
65 const bool missing_from_the_last_refresh) {
66 return !refreshed_this_step && !missing_from_the_last_refresh;
69[[nodiscard]]
inline bool IsBatchSyncDue(
const uint64_t unwaited_batches,
const uint64_t limit) {
70 return unwaited_batches >= limit;
74namespace SpeedThreshold {
80namespace PathBufferUpdate {
87namespace WaypointSelection {
133namespace LaneChange {
157static const float EPSILON = 2.0f * std::numeric_limits<float>::epsilon();
163namespace FrameMemory {
187namespace MotionPlan {
207static const float PI = 3.1415927f;
286static const float DT = 0.05f;
314 "the launch ramp must be able to step out of the throttle deadband");
343namespace StuckRecovery {
#define SQUARE(a)
This file contains various constants used in traffic manager arranged into sensible namespaces for re...
static const float LOCKING_DISTANCE_PADDING
static const float VEL_EXT_FACTOR
static const float OVERLAP_THRESHOLD
static const float BOUNDARY_EXTENSION_MINIMUM
static const float BOUNDARY_EXTENSION_RATE
static const float MIN_VELOCITY_COLL_RADIUS
static const float COLLISION_RADIUS_RATE
static const float COS_10_DEGREES
static const float VERTICAL_OVERLAP_THRESHOLD
static const float SQUARE_ROOT_OF_TWO
static const float WALKER_TIME_EXTENSION
static const float MIN_REFERENCE_DISTANCE
static const float EPSILON
static const float COLLISION_RADIUS_MIN
static const float COLLISION_RADIUS_STOP
static const float MAX_LOCKING_EXTENSION
static const uint64_t GROWTH_STEP_SIZE
static const float INV_GROWTH_STEP_SIZE
static const uint64_t INITIAL_SIZE
static const float PHYSICS_RADIUS
static const double INV_HYBRID_DT
static const double HYBRID_MODE_DT
static const float HYBRID_MODE_DT_FL
static const float MIN_LANE_CHANGE_SPEED
static const float MAX_WPT_DISTANCE
static const float INTER_LANE_CHANGE_DISTANCE
static const float MAXIMUM_LANE_OBSTACLE_CURVATURE
static const float FIFTYPERC
static const float MAXIMUM_LANE_OBSTACLE_DISTANCE
static const float MINIMUM_LANE_CHANGE_DISTANCE
static const float MIN_WPT_DISTANCE
static float const Z_DELTA
static const float INV_MAP_RESOLUTION
static float const STRAIGHT_DEG
static const float INFINITE_DISTANCE
static const double MAX_WPT_DISTANCE
static const float MAX_WPT_RADIANS
static const float MAX_GEODESIC_GRID_LENGTH
static const float MAP_RESOLUTION
static const double MIN_LANE_WIDTH
static const float LATERAL_COMFORT_ACCELERATION
static const float EPSILON_RELATIVE_SPEED
static const float PERC_MAX_SLOWDOWN
static const float CURVATURE_SAMPLE_SPACING
static const float LANDMARK_DETECTION_TIME
static const float CRITICAL_BRAKING_MARGIN
static const float FOLLOW_LEAD_FACTOR
static const float MAX_JUNCTION_BLOCK_DISTANCE
static const float TWO_KM
static const float RELATIVE_APPROACH_SPEED
static const float TL_TARGET_VELOCITY
static const uint16_t ATTEMPTS_TO_TELEPORT
static const float MIN_FOLLOW_LEAD_DISTANCE
static const float STOP_TARGET_VELOCITY
static const float YIELD_TARGET_VELOCITY
static const float TURN_BRAKING_DECELERATION
static const unsigned short TM_DEFAULT_PORT
static const uint64_t MIN_TRY_COUNT
static const int64_t TM_TIMEOUT
static const float INV_DT
static const float MAX_STEERING_RATE
static const float MAX_STEER_AUTHORITY_CORRECTION
static const float MAX_THROTTLE
static const float WHEELBASE_FRACTION
static const float COMFORT_ACCELERATION
static const float STEER_LIMIT_GAIN
static const float MAX_STEERING_DIFF
static constexpr float MIN_CONTROL_DT
static const float MAX_DEVIATION_RATE
static const float MAX_BRAKE
static const std::vector< float > LATERAL_HIGHWAY_PARAM
static const float REFERENCE_LEAD_FRACTION
static const std::vector< float > LONGITUDIAL_PARAM
static const float STEER_DEADBAND
static const float REF_MAX_STEER_ANGLE
static const std::vector< float > LONGITUDIAL_HIGHWAY_PARAM
static constexpr float MAX_LAUNCH_THROTTLE_RISE_RATE
static const float BRAKE_DEADBAND
static const float MAX_CONTROL_DT
static const float MAX_STEERING
static constexpr float THROTTLE_DEADBAND
static const float PURSUIT_CURVATURE_MARGIN
static const float MAX_DEVIATION_DELTA
static const float MAX_LATERAL_GAIN_SCALE
static const float STEER_DEADBAND_REF_SPEED
static const float LAUNCH_RAMP_SPEED
static const float REF_VEHICLE_LENGTH
static const std::vector< float > LATERAL_PARAM
static const float MAX_START_DISTANCE
static const float HORIZON_RATE
static const float HIGH_SPEED_HORIZON_RATE
static const float MINIMUM_HORIZON_LENGTH
static const float AFTER_JUNCTION_MIN_SPEED
static const float HIGHWAY_SPEED
static const float INITIAL_PERCENTAGE_SPEED_DIFFERENCE
static const float ALIGN_EXIT_DEVIATION
static const float ALIGN_ENTER_DEVIATION
static const double PHASE_DURATION
static const float STUCK_SPEED
static const double STUCK_TIME
static const float FORWARD_THROTTLE
static const float RECOVERY_STEER
static const float MISALIGN_MAX_SPEED
static const float REVERSE_THROTTLE
static const uint64_t BUFFER_STEP_THROUGH
static const float INV_BUFFER_STEP_THROUGH
static const double EXIT_JUNCTION_THRESHOLD
static const double MINIMUM_STOP_TIME
static const float SUN_ALTITUDE_DEGREES_BEFORE_DAWN
static const float MAX_DISTANCE_LIGHT_CHECK
static const float SUN_ALTITUDE_DEGREES_JUST_BEFORE_SUNSET
static const float FOG_DENSITY_THRESHOLD
static const float SUN_ALTITUDE_DEGREES_JUST_AFTER_DAWN
static const float HEAVY_PRECIPITATION_THRESHOLD
static const float SUN_ALTITUDE_DEGREES_AFTER_SUNSET
static const double RED_TL_BLOCKED_TIME_THRESHOLD
static const double BLOCKED_TIME_THRESHOLD
static const float STOPPED_VELOCITY_THRESHOLD
static const double DELTA_TIME_BETWEEN_DESTRUCTIONS
static const float LARGE_VEHICLES_JUNCTION_OFFSET
static const float SAFE_DISTANCE_AFTER_JUNCTION
static const float LARGE_VEHICLES_JUNCTION_INBOARD_SCALE
static const float LARGE_VEHICLES_JUNCTION_POINT
static const float LARGE_VEHICLES_JUNCTION_MAX_RADIUS
static const float TARGET_WAYPOINT_TIME_HORIZON
static const float MIN_SAFE_INTERVAL_LENGTH
static const float LARGE_VEHICLES_JUNCTION_OFFSET_GAIN
static const float LARGE_VEHICLES_JUNCTION_REF_LENGTH
static const float MAX_TARGET_WAYPOINT_DISTANCE
static const float MAX_PURSUIT_CHORD_SAGITTA
static const float MIN_TARGET_WAYPOINT_DISTANCE
static const float LARGE_VEHICLES_JUNCTION_SIDE_MARGIN
static const float JUNCTION_LOOK_AHEAD
static const float LARGE_VEHICLES_JUNCTION_CLEARANCE
static const float MIN_JUNCTION_LENGTH
static const double VEHICLE_LIGHT_STATES_REFRESH_PERIOD
bool IsRefreshDue(const double now, const double last, const double period)
Also true when the clock jumps backwards (new episode) or on NaN, so an unusable clock refreshes rath...
static const double EPISODE_SETTINGS_REFRESH_PERIOD
bool IsBatchSyncDue(const uint64_t unwaited_batches, const uint64_t limit)
static const uint64_t MAX_UNWAITED_CONTROL_BATCHES
static const std::chrono::milliseconds SNAPSHOT_POLL_PERIOD
static const double WEATHER_REFRESH_PERIOD
bool IsEarlyRefreshDue(const bool refreshed_this_step, const bool missing_from_the_last_refresh)
A vehicle the server already omitted from a fresh list (dormant on a large map) must not re-arm the u...
This file contains definitions of common data structures used in traffic manager.