From f3c76c441696b4ce837a26b556f7b9aeb66a76d3 Mon Sep 17 00:00:00 2001 From: Dustin Carlino Date: Wed, 21 Nov 2018 09:38:14 -0800 Subject: [PATCH] hack around accel_to_stop_in_dist problem, for now --- sim/src/fsm.rs | 1 + sim/src/kinematics.rs | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sim/src/fsm.rs b/sim/src/fsm.rs index eea76945e7..129fc0513a 100644 --- a/sim/src/fsm.rs +++ b/sim/src/fsm.rs @@ -30,6 +30,7 @@ enum Action { WaitForBus(BusStopID, RouteID), // (from, to) RideBus(BusStopID, BusStopID), + // TODO parking, unparking bike // Only buses DeboardPassengers(BusStopID), diff --git a/sim/src/kinematics.rs b/sim/src/kinematics.rs index bc3f90394f..1685cdd097 100644 --- a/sim/src/kinematics.rs +++ b/sim/src/kinematics.rs @@ -95,8 +95,9 @@ impl Vehicle { vehicle_type: VehicleType::Bike, // http://eprints.uwe.ac.uk/20767/ says mean 0.231 max_accel: rng.gen_range(0.2, 0.3) * si::MPS2, - // Just assume it's the same as acceleration for now - max_deaccel: rng.gen_range(-0.3, -0.2) * si::MPS2, + // Much easier deaccel. Partly to avoid accel_to_stop_in_dist bugs with bikes running + // stop signs. + max_deaccel: rng.gen_range(-1.3, -1.2) * si::MPS2, length: rng.gen_range(MIN_BIKE_LENGTH.value_unsafe, MAX_BIKE_LENGTH.value_unsafe) * si::M, // 7 to 10 mph is 4.47 m/s