Commit Graph

1035 Commits

Author SHA1 Message Date
Dustin Carlino
474d92f5db modeling border nodes in map, control, sim, editor layers 2018-11-11 14:49:27 -08:00
Dustin Carlino
40cc81ca6f make intersection policies handle one agent with multiple turns 2018-11-10 15:39:02 -08:00
Dustin Carlino
7ddbd753f4 storing neighborhoods as GPS 2018-11-09 14:12:20 -08:00
Dustin Carlino
9ba9acb3d2 modeling bus lanes 2018-11-07 13:50:22 -08:00
Dustin Carlino
c6cd36071c make the large maps still work: fixes to bus route verification and
degenerate stop sign handling
2018-11-06 12:39:27 -08:00
Dustin Carlino
02f24bfe15 removing annoying duplicated fields in Turn 2018-11-06 09:29:50 -08:00
Dustin Carlino
9f0d3b610a introducing TurnType 2018-11-05 18:42:33 -08:00
Dustin Carlino
bd96b4ff5f storing src/dst intersection with Road directly 2018-11-05 17:39:23 -08:00
Dustin Carlino
9cb1337785 starting a rewrite of the code to find turns between sidewalks, based on
road adjacencies. needs a few more intermediate steps.
2018-11-05 17:15:54 -08:00
Dustin Carlino
aa23d76243 simplify API: PathStep is Copy 2018-11-05 14:37:26 -08:00
Dustin Carlino
d69804e485 fixing chokepoints plugin by looking at paths 2018-11-04 15:25:48 -08:00
Dustin Carlino
376f9bd3c5 new, simple implementation of trace_route and lots of deleted old code 2018-11-04 08:27:35 -08:00
Dustin Carlino
df6628e5b5 preps for filling out pathfind impl 2018-11-03 20:57:58 -07:00
Dustin Carlino
d4dc5fc658 percolating changes to sim layer slowly... 2018-11-03 20:46:41 -07:00
Dustin Carlino
58025c027d fixing trace_route with contraflow on last step 2018-11-03 12:29:00 -07:00
Dustin Carlino
6ecfac0bd3 precomputing canonical pt per trip, since so much stuff kinda cares about it 2018-11-01 17:05:15 -07:00
Dustin Carlino
db34ddb2b7 changing the activity plugin to show a heatmap of what's currently in view 2018-11-01 16:07:48 -07:00
Dustin Carlino
b593d3f5cf WIP plugin to highlight lanes with movement 2018-11-01 14:42:43 -07:00
Dustin Carlino
b7e184eeca adjusting scripts to convert OSM polygons 2018-10-29 15:53:04 -07:00
Dustin Carlino
f8f2ea3f95 switching to a simpler GPS<->Pt2D scheme that's bijective 2018-10-29 15:01:15 -07:00
Dustin Carlino
bb9c98b54e splitting into two Bounds types 2018-10-29 14:16:30 -07:00
Dustin Carlino
cc9f0289ab exporting polygons in the osmosis format... wait, may need to change the
coordinate system first. let's first refactor bounds to be more careful
about existing code.
2018-10-29 12:29:11 -07:00
Dustin Carlino
949529b780 adding some initial neighborhood summary for an a/b test 2018-10-29 11:24:01 -07:00
Dustin Carlino
a45521e1a6 using Timer with read_binary 2018-10-28 17:17:35 -07:00
Dustin Carlino
f011f8f56d making hierarchial progress timer to replace flamegraphs. using in many,
but not all, places
2018-10-28 16:40:37 -07:00
Dustin Carlino
15da2fe9cd using quadtrees to MASSIVELY speed up sidewalk matching 2018-10-28 13:59:54 -07:00
Dustin Carlino
45bd7ee128 eliminate bus stops that dont line up with short driving lanes 2018-10-24 14:59:22 -07:00
Dustin Carlino
740597b64f even more convenient debugging, by marking what agent is being processed everywhere 2018-10-24 13:33:07 -07:00
Dustin Carlino
da786f9348 gather initial summary text for neighborhoods 2018-10-23 16:18:33 -07:00
Dustin Carlino
8a474e16b0 how is a car winding up with negative dist_along? argh, another hacky
epsilon fix
2018-10-22 20:03:39 -07:00
Dustin Carlino
9883da6fa8 fix bugs with follow plugin at the end of the trip 2018-10-22 16:32:58 -07:00
Dustin Carlino
ce9b9da5bb bugfix: find driving lane near destination building 2018-10-22 15:40:16 -07:00
Dustin Carlino
bed21cac17 woops, eagerly evaluating tooltip for parked car 2018-10-22 15:09:12 -07:00
Dustin Carlino
9660794467 show route by trip, not agent 2018-10-22 14:39:25 -07:00
Dustin Carlino
b8fa12d0d5 terminating ped trace_route at the right SidewalkSpot 2018-10-22 14:18:25 -07:00
Dustin Carlino
9c1ae28bf8 ped trace_routes were wrong for contraflow steps 2018-10-22 13:16:30 -07:00
Dustin Carlino
a1ac8cf7dd plugin to show diff for all agents 2018-10-22 11:22:16 -07:00
Dustin Carlino
ba3bcb5087 moving precompute binary to its own crate, adding logging 2018-10-21 11:37:30 -07:00
Dustin Carlino
68b0983436 associate the right map+edits with savestates 2018-10-21 11:14:22 -07:00
Dustin Carlino
050a9a1400 load pre-baked maps. now starting an a/b test is very fast! \o/ 2018-10-20 09:18:57 -07:00
Dustin Carlino
66bbdc0362 script to save all the maps with edits. no loading yet 2018-10-20 09:02:44 -07:00
Dustin Carlino
80121df78c rename data/maps to data/raw_maps 2018-10-20 08:25:49 -07:00
Dustin Carlino
5d010d2580 make a/b test work again... neighborhoods can be kind of poorly defined 2018-10-18 15:44:35 -07:00
Dustin Carlino
10a6ee09d1 debugging why we wound up with disconnected roads, breaking parking seeding... ah, there are roads in the neighborhood without any buildings 2018-10-18 13:57:38 -07:00
Dustin Carlino
bb21c45394 weighted choice for how many cars per building 2018-10-17 16:22:33 -07:00
Dustin Carlino
ec49d2dd20 fix problem with trace_route requesting invalid start dist 2018-10-17 15:27:38 -07:00
Dustin Carlino
452677672f savestate at the end of the step 2018-10-17 15:07:26 -07:00
Dustin Carlino
3968a78166 only allow interactive spawning at the beginning 2018-10-17 15:01:36 -07:00
Dustin Carlino
d897ebfd4b fixing up broken tests... at least making them build :\ 2018-10-17 13:42:07 -07:00
Dustin Carlino
d02c5004f9 clean up Pt2D::from_gps API 2018-10-17 13:14:10 -07:00
Dustin Carlino
b25046bd67 removing old, weird controls for interactively spawning stuff in the UI 2018-10-17 13:06:40 -07:00
Dustin Carlino
fade0f8883 UI plugin to show parked car / building associations 2018-10-17 12:29:46 -07:00
Dustin Carlino
24edfcd784 place parked cars close to buildings, in a stable way 2018-10-17 11:49:15 -07:00
Dustin Carlino
98914ce208 peds only use the car associated with their building 2018-10-17 10:34:02 -07:00
Dustin Carlino
0d33a25d44 calm down DiffWorlds, not every agent has a trip -- buses and parked cars, namely 2018-10-17 10:10:22 -07:00
Dustin Carlino
299c7bdb2f seed parked cars per building, not per spot 2018-10-17 10:01:33 -07:00
Dustin Carlino
7919b0bd8d associating cars with an owner 2018-10-16 17:28:03 -07:00
Dustin Carlino
2c110a58f9 starting a very basic plugin to show differences between trips in parallel worlds 2018-10-16 14:48:41 -07:00
Dustin Carlino
41817d3e91 oops, nonsense option to start moving cars 2018-10-16 12:15:02 -07:00
Dustin Carlino
9400e3d010 refactor: hardcode concrete rng type, remove annoying generic 2018-10-16 12:00:20 -07:00
Dustin Carlino
14c341d86a shuffle parked cars to use without offsetting the RNG 2018-10-16 11:50:16 -07:00
Dustin Carlino
77786c9483 forking RNGs to keep SeedParking consistent 2018-10-16 11:39:16 -07:00
Dustin Carlino
bc48b3189f generate trips to spawn before seeding parking spots, to make trip IDs line up better... 2018-10-14 18:53:39 -07:00
Dustin Carlino
022b78ca34 associate trips with peds and cars more easily 2018-10-14 14:10:46 -07:00
Dustin Carlino
80f6eb95b4 brainstorming edit-invariant trips. initial work to reference TripIDs,
which are independent of mode.
2018-10-14 14:01:03 -07:00
Dustin Carlino
19bcf0199e update map paths in tests 2018-10-13 17:43:52 -07:00
Dustin Carlino
90af8a84c6 woops, car pathfinding shouldnt use bike lanes. and A/B test manager
should set json filename
2018-10-13 16:34:02 -07:00
Dustin Carlino
25a1beba4e generalize traces a bit to handle 0-length turns properly 2018-10-13 16:05:52 -07:00
Dustin Carlino
e4dc075871 WIP trying to solve problem of driving traces not matching up sometimes 2018-10-13 15:41:40 -07:00
Dustin Carlino
f7f9b5ab70 plugin to find and show chokepoints 2018-10-13 15:24:14 -07:00
Dustin Carlino
99559fa578 also retain the logical pieces of a Trace, so we can next find chokepoints 2018-10-13 11:27:22 -07:00
Dustin Carlino
37173fc72c dont savestate at 0s 2018-10-10 16:31:16 -07:00
Dustin Carlino
792c25b40b removing failure crate in sim too 2018-10-10 16:29:43 -07:00
Dustin Carlino
843742b708 adding error messages for map model queries that can fail 2018-10-10 15:58:00 -07:00
Dustin Carlino
e681032866 fix bug where commands scheduled at tick 0 were skipped 2018-10-10 09:27:06 -07:00
Dustin Carlino
6dad7155aa swap sims 2018-10-09 21:44:26 -07:00
Dustin Carlino
4672994777 fixed one problem with ped trace_route... walking model is so complicated. >< 2018-10-09 17:43:22 -07:00
Dustin Carlino
dcbf373896 constructing traces way more directly. still broken for peds. :( 2018-10-09 16:14:48 -07:00
Dustin Carlino
88ac5267d2 include turns in ped route... but oops, this won't work, need to know
contraflow lanes when taking slices
2018-10-09 15:17:17 -07:00
Dustin Carlino
d0f88f8d52 use new Trace for show_route plugin. handle 0-length turns 2018-10-09 14:36:53 -07:00
Dustin Carlino
2716a2272b making trace handle lanes and turns 2018-10-09 13:43:59 -07:00
Dustin Carlino
d3e5fdb7c4 moving on->traversable, in the map model directly 2018-10-09 13:09:26 -07:00
Dustin Carlino
d7a36889b2 some of the pieces to render smart arrows in front of agents 2018-10-09 12:56:58 -07:00
Dustin Carlino
2fffbb53f9 refactoring logic to save stuff 2018-10-08 10:21:13 -07:00
Dustin Carlino
fcfef89760 intermission: handling empty directory listings, menus 2018-10-08 09:45:21 -07:00
Dustin Carlino
7ef462d94d defining a plugin to manage A/B tests 2018-10-08 09:00:55 -07:00
Dustin Carlino
daac00155e start animating the lines 2018-10-06 14:30:57 -07:00
Dustin Carlino
94ac54d7e8 stop using Color and Vec2d types from piston, to slowly move away from dependence on piston 2018-10-05 14:58:48 -07:00
Dustin Carlino
478d12aecb plumb car properties between driving and parking sims. seems simpler... 2018-10-05 12:35:32 -07:00
Dustin Carlino
2b0af3ea52 fixing name of map edits... 2018-10-05 10:58:45 -07:00
Dustin Carlino
2c8aa62f97 describe map edits in GUI 2018-10-04 11:16:00 -07:00
Dustin Carlino
bed2c604f3 directly save control intersection policies, dont need this intermedite savestate struct 2018-10-04 11:05:53 -07:00
Dustin Carlino
53993feebb skeleton of plugin that can manage different map edits 2018-10-02 21:29:50 -07:00
Dustin Carlino
190d9be972 sharing flags for specifying sim to load 2018-10-02 16:34:27 -07:00
Dustin Carlino
04acd6723b rename scenario_name, now that we have scenarios 2018-10-02 16:13:20 -07:00
Dustin Carlino
72d0294efb load named map edits, not a single one 2018-10-02 16:07:48 -07:00
Dustin Carlino
7b718b4621 bundling all map edits together 2018-10-02 15:48:10 -07:00
Dustin Carlino
8badd7a813 show optional sidepanel in UI with current sim score 2018-09-28 07:43:53 -07:00
Dustin Carlino
4f3afa3894 very primitively tracking trip times, only showing in headless 2018-09-28 07:19:16 -07:00
Dustin Carlino
6e0f58f4c6 accept scenarios on the CLI 2018-09-27 14:53:46 -07:00
Dustin Carlino
30362f138d spawn drivers too from scenarios 2018-09-27 14:42:22 -07:00
Dustin Carlino
287528bb66 handle spawn commands in any order 2018-09-27 14:19:25 -07:00
Dustin Carlino
b7a3dc852c spawn walking agents over time 2018-09-27 12:37:03 -07:00
Dustin Carlino
dc6549f726 seeding parked cars in polygon 2018-09-27 12:08:35 -07:00
Dustin Carlino
8e12d4d6f0 interlude: make spawn functions directly populate car_properties 2018-09-27 11:53:51 -07:00
Dustin Carlino
fa1d7e8182 WIP instantiating a scenario 2018-09-27 11:47:29 -07:00
Dustin Carlino
3d2255d728 move wizard to ezgui \o/ 2018-09-25 14:43:56 -07:00
Dustin Carlino
49ab31c1ca woops, was displaying ansi codes in logscroller 2018-09-24 15:42:10 -07:00
Dustin Carlino
d134706db7 bigger FSM for managing scenarios... it initially seems to work? :P 2018-09-24 15:40:37 -07:00
Dustin Carlino
8b5b7d806e moving maps to a subdirectory inside data/ 2018-09-24 14:40:16 -07:00
Dustin Carlino
19e6aaf244 defining scenarios, renaming polygons -> neighborhoods 2018-09-24 14:30:02 -07:00
Dustin Carlino
64e6f6c9cd define a second unused wizard workflow, and move some mostly generic pieces to ezgui 2018-09-24 14:17:29 -07:00
Dustin Carlino
8ffc817501 logging handlers for headless 2018-09-24 10:54:11 -07:00
Dustin Carlino
09c3b017b9 logging in map layer too 2018-09-23 14:15:24 -07:00
Dustin Carlino
e6e1f7cbc5 logging from sim crate, automatically noting the target 2018-09-23 13:56:29 -07:00
Dustin Carlino
bcc65941f3 saving polygon areas 2018-09-19 09:30:01 -07:00
Dustin Carlino
8b0fb9248c using Pt2D in ezgui's API when appropriate 2018-09-18 15:09:17 -07:00
Dustin Carlino
20a1bb7923 dispersing the remainders of map_model::geometry 2018-09-18 14:35:10 -07:00
Dustin Carlino
e4339436fc make bus stops a separate layer to render. easy! 2018-09-15 19:58:25 -07:00
Dustin Carlino
74ad9d0819 split bus stops into their own first-class object in the map model layer 2018-09-15 19:02:10 -07:00
Dustin Carlino
e65f3aecc7 update to rust 1.29, re-run format 2018-09-15 16:54:00 -07:00
Dustin Carlino
5303087fa2 making DrawCar implement renderable 2018-09-13 22:33:58 -07:00
Dustin Carlino
b3d2a5c5be WIP making DrawPed implement Renderable 2018-09-13 22:15:03 -07:00
Dustin Carlino
a059bccfd5 making more plugins initiate themselves, instead of UI doing it 2018-09-13 11:57:18 -07:00
Dustin Carlino
013b3e11c5 pathfinding using bus stops, unused, and not the right interface yet 2018-09-09 14:03:20 -07:00
Dustin Carlino
0b127e979a WIP generalizing pathfinding to have different expansion and costs 2018-09-09 13:15:56 -07:00
Dustin Carlino
630f6504f4 stick in some flamegraph timings to part of map loading 2018-09-08 13:01:39 -07:00
Dustin Carlino
99fe9f170c fixing up tests 2018-09-07 14:08:36 -07:00
Dustin Carlino
58b01fce9e instantiate bus routes from GTFS too 2018-09-07 13:03:50 -07:00
Dustin Carlino
143084a8a9 parse gtfs during map conversion 2018-09-07 11:54:27 -07:00
Dustin Carlino
c1ad5fb39f working on turning GTFS into map model layer bus stops, but interlude of
refactoring a sidewalk pt finder thing
2018-09-06 18:18:56 -07:00
Dustin Carlino
e02ec325de simpler gtfs parsing 2018-09-06 16:48:28 -07:00
Dustin Carlino
1d732c5a3b WIP load gtfs 2018-09-06 14:59:02 -07:00
Dustin Carlino
c5c00d5740 record stack traces 2018-09-06 13:32:35 -07:00
Dustin Carlino
0276dd54aa starting to capture stack traces at runtime 2018-09-05 16:37:18 -07:00
Dustin Carlino
e99d9944e4 using failure crate in sim 2018-09-05 15:21:04 -07:00
Dustin Carlino
a2c7b8b5bd fixing warping peds and preventing it from happening again 2018-09-05 14:22:47 -07:00
Dustin Carlino
fbcc2a9094 unifying WorldView and AgentInfo 2018-09-05 13:10:29 -07:00
Dustin Carlino
62d0c4af15 make simqueue cache dist_along 2018-09-05 12:22:35 -07:00
Dustin Carlino
8547b18650 WIP figuring out why just yielding at stop signs breaks things 2018-09-05 11:57:06 -07:00
Dustin Carlino
551c0c3170 making BusStop a lightweight ID-like thing 2018-09-04 13:21:01 -07:00
Dustin Carlino
11f0f20a3e digging into nondeterminism due to fp issues 2018-09-04 12:56:18 -07:00
Dustin Carlino
686f247b52 adding a test of a ped using the bus 2018-09-04 12:19:28 -07:00
Dustin Carlino
55b02e6c5c making a sample ped using the bus 2018-09-04 11:49:22 -07:00
Dustin Carlino
a74bfe6c92 making peds leave the bus 2018-09-04 11:18:27 -07:00
Dustin Carlino
7e8407466e gluing transit sim to trip manager for boarding a bus 2018-09-04 10:55:44 -07:00
Dustin Carlino
bc9b559701 making the multi-leg trips handle transitions correctly 2018-09-04 10:31:52 -07:00
Dustin Carlino
9d01183a7e introducing some proper multi-leg trips 2018-09-04 10:16:34 -07:00
Dustin Carlino
ae3a293d44 moving most of the parts of spawner that use rng to helpers 2018-09-03 12:47:06 -07:00
Dustin Carlino
3ecad61959 moving more sim spawning methods to helpers 2018-08-31 15:22:35 -07:00
Dustin Carlino
93e4e4217e moving some init helpers to be methods of sim 2018-08-31 15:11:18 -07:00
Dustin Carlino
0205eb8978 splitting out a trip manager from the spawner 2018-08-31 14:13:55 -07:00
Dustin Carlino
c1f87395cc unused, WIP code for peds to wait for, board, deboard buses 2018-08-31 11:23:30 -07:00
Dustin Carlino
c38c9d43ac visualize an agent's path 2018-08-30 15:30:53 -07:00
Dustin Carlino
c685a80a98 moving state to transit model, making router get directives from it 2018-08-30 15:00:52 -07:00
Dustin Carlino
da402dd2c1 making the unit test framework watch for events 2018-08-30 11:36:14 -07:00
Dustin Carlino
63a8171370 recording events that happen each tick 2018-08-30 11:03:58 -07:00
Dustin Carlino
44f02273be starting a transit sim state, so we know when a bus is at a stop, so we can unit test it. ;) 2018-08-29 23:42:16 -07:00
Dustin Carlino
023fa61da6 switching sim tests to inspect state via json 2018-08-29 22:37:21 -07:00
Dustin Carlino
b7379fcdf8 woops, bus length was wrong 2018-08-29 13:40:07 -07:00
Dustin Carlino
90a503559a sim being done doesnt wait for buses, which never stop 2018-08-29 13:34:28 -07:00
Dustin Carlino
bb619a9ddd oops, using the wrong router in lookahead, fixed a bug 2018-08-29 13:26:00 -07:00
Dustin Carlino
aa05519539 woops, forgot to make a bus route to next stop 2018-08-29 13:13:33 -07:00
Dustin Carlino
4840757562 turning assertions in kinemtics layer into nicer errors 2018-08-29 13:05:01 -07:00
Dustin Carlino
b51eb51716 fix bus router; it was starting with the wrong stop 2018-08-29 12:44:39 -07:00
Dustin Carlino
fc2abb1524 silence spammy logs 2018-08-28 14:50:16 -07:00
Dustin Carlino
c9a0ea213b spawning a bus that follows a route 2018-08-28 14:44:11 -07:00
Dustin Carlino
813be332d4 disable stop sign yields; it's uncovering other bugs that i'm not ready to dig into 2018-08-28 13:39:05 -07:00
Dustin Carlino
6e3f246877 make sure we're not exceeding speed limit... 2018-08-28 13:37:14 -07:00
Dustin Carlino
1845e5881b fix bug where cars wouldnt stop for lead vehicles on other lanes, due to lookahead dist confusion 2018-08-28 12:23:06 -07:00
Dustin Carlino
c325f91036 fix a test broken a bit ago 2018-08-28 12:10:15 -07:00
Dustin Carlino
bb15bdb4d4 extracting out router for cars. along the way, kinda rearranging how
mutability and views work
2018-08-28 12:02:52 -07:00
Dustin Carlino
b70648a8d4 print relevant savestate when the sim breaks 2018-08-27 14:18:09 -07:00
Dustin Carlino
9115a9e7f1 use run_until_done in more places 2018-08-27 14:05:05 -07:00
Dustin Carlino
3333aa69a8 refactoring helpers for tests and headless 2018-08-27 13:52:34 -07:00
Dustin Carlino
fe8a28ff34 savestate regularly 2018-08-27 13:21:31 -07:00
Dustin Carlino
891b07bec4 load from map or savestate 2018-08-27 13:14:03 -07:00
Dustin Carlino
f0a60e434d load most recent sim savestate 2018-08-27 11:42:55 -07:00
Dustin Carlino
269235d1e1 writing savestates in a consistent place 2018-08-27 11:10:02 -07:00
Dustin Carlino
6eb935a88d dont stop at stop signs for priority turns 2018-08-24 12:53:21 -07:00
Dustin Carlino
f36c94c730 render individual points from extra KML, and refactor some circle helpers 2018-08-23 15:17:37 -07:00
Dustin Carlino
f141329e85 moving some types in the sim layer around, now that the dust has settled 2018-08-23 13:56:49 -07:00
Dustin Carlino
2a12c338cf fixing up the parking test... had to deal with horizontal/vertical lines
for the building front path stuff
2018-08-23 10:37:17 -07:00
Dustin Carlino
7745678794 make the spawner deal with trips and transitions... big revamp for it 2018-08-23 10:11:56 -07:00
Dustin Carlino
0a944f9864 making peds be able to start/end at a parking spot as well. nothing
tells them to start/end at parking yet, though
2018-08-23 07:58:18 -07:00
Dustin Carlino
fbf6010715 make peds walk to bldgs when done with path 2018-08-22 14:19:46 -07:00
Dustin Carlino
7b28b8c988 make peds actually walk from bldg to sidewalk when starting 2018-08-22 14:03:08 -07:00
Dustin Carlino
3fba70a9a9 make pedestrians start aligned with building paths. almost ready to make
them travel along the front path
2018-08-22 13:43:11 -07:00
Dustin Carlino
0e2ae49596 debug a car in a different color 2018-08-22 10:13:32 -07:00
Dustin Carlino
19727cdcaf adjusting intersection policy to not deadlock? 2018-08-22 09:30:33 -07:00
Dustin Carlino
9b4caacea7 quick fix for signal overrun 2018-08-22 09:02:30 -07:00
Dustin Carlino
ef307e817f debugging for an intersection policy problem. traffic signal allows
overrun!
2018-08-21 19:02:24 -07:00
Dustin Carlino
9f1ad3755d present sim time in a nicer format 2018-08-21 16:19:54 -07:00
Dustin Carlino
b87af4b303 digging into stuck kinematics. seemingly unblocks completion test! 2018-08-20 15:34:55 -07:00
Dustin Carlino
ebb83e6592 woops, driving capacity not based on all long vehicles 2018-08-20 13:31:24 -07:00
Dustin Carlino
d84a9b06cc make following distance understand different car lengths 2018-08-20 13:05:36 -07:00
Dustin Carlino
9fdac1cfe3 removing the defunct models module 2018-08-20 12:53:15 -07:00
Dustin Carlino
1eecc48dbe removing parametric driving model for now. too much work to keep it updated as aorta driving model improves, and no benefit anticipated. 2018-08-20 12:39:03 -07:00
Dustin Carlino
7f29e5d285 making car length vary, and adjusting parking model in response 2018-08-20 12:31:39 -07:00
Dustin Carlino
917c3c3ed5 WIP storing per-car properties like accel somewhere 2018-08-20 11:27:11 -07:00
Dustin Carlino
e2ee2ecc84 drawing cars a bit more nicely 2018-08-19 19:01:31 -07:00
Dustin Carlino
bf52822e37 wrote a few tests of parking 2018-08-19 18:07:28 -07:00
Dustin Carlino
3376633ed9 avoid dupe commands to start parked cars 2018-08-17 22:37:57 -07:00
Dustin Carlino
cef21f2545 dont start a parked car if it'll cause a crash. keep trying till it
works.
2018-08-17 14:26:42 -07:00
Dustin Carlino
dd206474cc kind of handle being stuck at a deadend 2018-08-16 18:43:38 -07:00
Dustin Carlino
0b57852a09 refactor command; enum doesnt make sense 2018-08-16 18:32:46 -07:00
Dustin Carlino
3e8aa2c43f start parked cars from spawner as well 2018-08-16 18:26:05 -07:00
Dustin Carlino
29ad509401 moving pedestrian spawning 2018-08-16 17:46:51 -07:00
Dustin Carlino
af8a583f77 moving spawning of parked cars to a dedicated place 2018-08-16 15:10:26 -07:00
Dustin Carlino
6054154aaf roaming around (very naively) for parking 2018-08-16 13:18:48 -07:00
Dustin Carlino
0edd4c6eff oops, bug where parking spots were too close to the start 2018-08-16 12:50:46 -07:00
Dustin Carlino
e7dab9f65e undo an epsilon fix that broke stuff. all tests pass right now! 2018-08-15 16:28:43 -07:00
Dustin Carlino
d8e26eb703 woops, lookahead distance needs to stay back from cars. how did this not break earlier? 2018-08-15 16:13:47 -07:00
Dustin Carlino
f45bc525d5 fix a few epsilon issues that made restoring from a savestate break 2018-08-15 15:37:07 -07:00
Dustin Carlino
6693147a99 WIP making driving cars park at a specific spot 2018-08-15 15:29:49 -07:00
Dustin Carlino
511aab4483 representing departing vehicles 2018-08-15 11:53:04 -07:00
Dustin Carlino
d3611c6084 easier queries for lane type 2018-08-14 21:25:19 -07:00
Dustin Carlino
f6a302efb9 start parked car at the appropriate distance 2018-08-14 21:17:20 -07:00
Dustin Carlino
1720e51828 WIP start a specific parked car, not the last one in the lane. broken,
because multiple cars jump to the beginning of the driving lane. need to
make them start in the right position (and then go there slowly)
2018-08-14 21:13:05 -07:00
Dustin Carlino
432c9644fc slightly different speed limits 2018-08-09 13:14:30 -07:00
Dustin Carlino
6d70605355 unit test that a sim finishes eventually 2018-08-09 12:53:12 -07:00
Dustin Carlino
44239588c8 debugging why a car doesnt see an agent to not hit... oh, wasn't
factoring in FOLLOW_DIST
2018-08-09 12:23:26 -07:00
Dustin Carlino
850df3de4e fix a bug with stop signs that probably didnt even happen 2018-08-09 12:04:55 -07:00
Dustin Carlino
6c6dbee529 WIP ignore constraints on the current lane if our lookahead dist doesnt even hit them 2018-08-09 12:00:37 -07:00
Dustin Carlino
0fe6507a5c oops, never actually capped acceleration of cars... 2018-08-09 11:28:10 -07:00
Dustin Carlino
3e9a2db0bd flag to tell headless to savestate 2018-08-09 11:16:51 -07:00
Dustin Carlino
40cb2bf6f4 making draw_polygon only accept a geom Polygon. guess ezgui depending on geom is fine. 2018-08-09 10:57:19 -07:00
Dustin Carlino
0caa8969dd fix contains_pt signature 2018-08-09 10:49:26 -07:00
Dustin Carlino
bf2bd09a54 WIP converting lanes and draw car to new polygon 2018-08-09 10:36:29 -07:00
Dustin Carlino
c77415164e count the peds moving/waiting too 2018-08-08 12:47:57 -07:00
Dustin Carlino
ccbf5939d8 waiting_for for new driving model 2018-08-08 12:43:47 -07:00
Dustin Carlino
8d82148342 fix bug with somebody holding a lock on a turn 2018-08-08 12:26:46 -07:00
Dustin Carlino
449085f02f stop sign should only admit leader vehicles 2018-08-08 11:50:05 -07:00
Dustin Carlino
139c03ce09 let everyone through traffic signal; figuring out crossing time is hard 2018-08-08 11:01:55 -07:00
Dustin Carlino
a3caf09cda count agents as stopped if their speed is super tiny 2018-08-08 10:53:10 -07:00
Dustin Carlino
7e6a48ebc6 vanish at the end of the last lane, not the beginning 2018-08-07 14:16:28 -07:00
Dustin Carlino
bdb21f5eef wait, can fit more cars on lanes, actually 2018-08-07 14:10:19 -07:00
Dustin Carlino
d0744083fc stop right BEFORE intersections 2018-08-07 14:06:31 -07:00
Dustin Carlino
0a0740c1bf oops, nobody was actually stopping for stop signs 2018-08-07 13:11:25 -07:00
Dustin Carlino
4c0a8f588a still debugging various breakages. drawing lane IDs 2018-08-07 12:23:00 -07:00
Dustin Carlino
62f2d9c40e debugging sim invariant breakages better 2018-08-07 11:35:40 -07:00
Dustin Carlino
73f23549b6 WIP debugging a car entering a lane too quickly 2018-08-07 11:13:13 -07:00
Dustin Carlino
4e5d8eccb0 handling end-of-path for lookahead 2018-08-07 10:41:44 -07:00
Dustin Carlino
9dce169a88 working on arbitrary lookahead and not hitting lead vehicles 2018-08-06 16:46:08 -07:00
Dustin Carlino
d71c2cf70d filling out more kinematics stuff, resuming aorta driving model.
stopping for intersections now seems OK...
2018-08-06 14:56:14 -07:00
Dustin Carlino
c7bae2b6ef type aliases for units 2018-08-04 17:04:48 -07:00
Dustin Carlino
5b41f4a9b5 few things towards new driving model, without lookahead 2018-08-04 15:07:11 -07:00
Dustin Carlino
474215d478 moving agent stepping code to be owned by each agent 2018-08-04 14:10:27 -07:00
Dustin Carlino
676e076ae1 repeating determinism tests for both driving models 2018-08-04 13:25:09 -07:00
Dustin Carlino
7611be90ab trying enums with delegation... 2018-08-04 12:26:58 -07:00
Dustin Carlino
bb934ff509 WIP making both driving models toggleable... 2018-08-04 09:54:13 -07:00
Dustin Carlino
c2306ef47a forking aorta driving model from parametric one... 2018-08-04 08:03:55 -07:00
Dustin Carlino
87d040f061 first making driving stuff private, before making a second driving model 2018-08-03 14:32:08 -07:00
Dustin Carlino
67c81df83f draw stopping buffer for cars 2018-08-02 11:15:47 -07:00
Dustin Carlino
5ad6f53607 use new dimensioned version, letting us serialize maps and clean up
hacks elsewhere
2018-08-01 14:05:38 -07:00
Dustin Carlino
73f4c95bd0 test to make sure savestating stays deterministic 2018-08-01 13:37:26 -07:00
Dustin Carlino
890f6541af turns between sidewalks were getting conflated after the TurnID change; adding parent intersection fixes it. should fix ped warping problem. 2018-08-01 13:31:14 -07:00
Dustin Carlino
ec38ccc11e refactoring common code in intersections 2018-08-01 11:38:35 -07:00
Dustin Carlino
aaf2933768 debug cars and peds 2018-08-01 09:35:02 -07:00
Dustin Carlino
3941621127 draw ped waiting for a turn 2018-07-31 20:31:41 -07:00
Dustin Carlino
473b5bf22e handle missing objects in warp plugin 2018-07-31 13:49:04 -07:00
Dustin Carlino
296e16aea9 warp to agents 2018-07-31 13:25:03 -07:00
Dustin Carlino
c7bf59dde0 refactor serde multimap helper 2018-07-30 17:39:15 -07:00
Dustin Carlino
c874d432f9 revamping walking sim to match driving. may have some warping bugs... 2018-07-30 17:28:14 -07:00
Dustin Carlino
cc8c6453ac make walking sim state match driving, with a kind of SimQueue equivalent 2018-07-30 17:03:33 -07:00
Dustin Carlino
af706f72e1 making the new protocol for agent/intersection interaction. it works!
\o/
2018-07-30 16:10:39 -07:00
Dustin Carlino
fe62537ee3 moving part of car behavior to an immutable reaction to a worldview 2018-07-30 15:11:15 -07:00
Dustin Carlino
6cc8489dfa reduce some visibility 2018-07-30 15:01:41 -07:00
Dustin Carlino
93815c91f0 argh, broke serialization again. refactoring a nice btreemap solution 2018-07-30 14:50:53 -07:00
Dustin Carlino
7205e6d926 lifting intersection sim state out of driving 2018-07-30 14:39:15 -07:00
Dustin Carlino
d4f2966a5d changing API of intersection policies to allow for peds 2018-07-30 14:22:36 -07:00
Dustin Carlino
19133adad8 fixed the broken savestating; custom multimap serialization was just
plain wrong
2018-07-30 13:30:30 -07:00
Dustin Carlino
c9b890e44c hash to btree, for easier comparison in serializtion 2018-07-29 16:58:41 -07:00
Dustin Carlino
af6b7c08ac fixing sim serialization after TurnID became a tuple struct 2018-07-29 16:34:47 -07:00
Dustin Carlino
cce85994f6 dont need a sort anymore... actually, can't run the determinism test
right now
2018-07-29 15:51:06 -07:00
Dustin Carlino
298babc85d parallelizing parked->driving car pathfinding too 2018-07-28 11:02:28 -07:00
Dustin Carlino
f732335ed8 parallelizing pathfinding for pedestrians 2018-07-27 15:51:44 -07:00
Dustin Carlino
d22d955dbb deleting and adding turns when edited 2018-07-26 13:06:37 -07:00
Dustin Carlino
904aa4449e editing lane types, vastly simplified, no turns yet 2018-07-26 12:04:02 -07:00
Dustin Carlino
de54b917bc changing turns to have IDs thatll be stable across edits 2018-07-25 19:01:47 -07:00
Dustin Carlino
3ed1bba5c9 fixing encapsulation and delegation of stuff in sim layer 2018-07-25 18:36:04 -07:00
Dustin Carlino
3e72f39121 planning how to do live road edits 2018-07-25 18:19:39 -07:00
Dustin Carlino
9200a5ef3d use pretty assertions 2018-07-24 16:23:25 -07:00
Dustin Carlino
c321c07bd7 make map use road edits when loading from scratch 2018-07-24 16:06:25 -07:00
Dustin Carlino
30b992e7f0 wait, make road remember lane types too 2018-07-24 11:40:58 -07:00
Dustin Carlino
c04572e4c7 dont store siblings anymore, simplify LaneSpec 2018-07-24 10:07:31 -07:00
Dustin Carlino
4207b2cacf rename existing roads to lanes 2018-07-23 20:24:53 -07:00
Dustin Carlino
52d5c5b69b bike lane turns 2018-07-23 14:03:13 -07:00
Dustin Carlino
3017728515 introducing bike lanes! no turns yet 2018-07-23 10:56:45 -07:00
Dustin Carlino
22b1e70707 info on parked cars and peds in OSD 2018-07-14 13:53:32 -05:00
Dustin Carlino
f54d581016 fixing pedestrian mouseover 2018-07-14 13:38:15 -05:00
Dustin Carlino
9ce7309c3e making peds move, but blindly plow through intersections 2018-07-14 13:33:08 -05:00
Dustin Carlino
82460f62f5 making peds pathfind to a goal 2018-07-14 10:32:21 -07:00
Dustin Carlino
e5de791fa7 starting to model pedestrians. spawn and draw them. 2018-07-11 15:06:31 -07:00
Dustin Carlino
6f00507740 realizing an issue with old editor state 2018-07-11 13:43:47 -07:00
Dustin Carlino
5ffa4ba7c7 centering parked cars in their spots 2018-07-09 16:08:23 -07:00
Dustin Carlino
282f20e438 drawing parked cars 2018-07-09 14:17:33 -07:00
Dustin Carlino
db54420ede fixing all tests 2018-07-09 13:52:08 -07:00
Dustin Carlino
8b58665dbd handling new build errors after 1.27... 2018-07-09 13:44:52 -07:00
Dustin Carlino
2ebc13140b round of rustfmt after 1.27 upgrade 2018-07-09 12:30:59 -07:00
Dustin Carlino
d3bcbe1da2 lots of the logic to start a parked car 2018-07-09 11:59:40 -07:00
Dustin Carlino
dbc6cd1e67 the first time spawning is requested, create a bunch of parked cars 2018-07-09 11:11:40 -07:00
Dustin Carlino
bf68be8870 moving the sim state that's driving-specific 2018-07-09 11:07:54 -07:00
Dustin Carlino
bde37d666b split out some of the driving-only code 2018-07-09 10:36:17 -07:00
Dustin Carlino
75144cf2ab rename a file to deemphasize strawness 2018-07-09 10:22:34 -07:00
Dustin Carlino
ddb30734c6 refactoring DrawCar 2018-07-09 10:17:20 -07:00
Dustin Carlino
d2c67d8b91 seeding with a bunch of parked cars 2018-07-09 09:41:05 -07:00
Dustin Carlino
8b908d2744 calculating the number of parking spots 2018-07-09 09:16:12 -07:00
Dustin Carlino
c033f51da2 make cars pathfind to their destination 2018-07-08 15:40:39 -07:00
Dustin Carlino
c6ebab1e9c move some sim code 2018-07-08 14:00:03 -07:00
Dustin Carlino
e2aabeb0e9 refactoring drawing primitives into GfxCtx 2018-07-06 11:04:18 -07:00
Dustin Carlino
a082fbb511 moving stuff to geom crate 2018-06-28 20:35:00 -07:00
Dustin Carlino
34e7f11cda get rid of vecmath 2018-06-28 19:46:21 -07:00
Dustin Carlino
4bdf70365e making my own angle class 2018-06-28 15:07:48 -07:00
Dustin Carlino
bc92c3ca8d replacing the pb with serde stuff 2018-06-25 18:56:57 -07:00
Dustin Carlino
94e8f7a4bf switch to new polygons for cars. seems to work. 2018-06-25 14:01:55 -07:00
Dustin Carlino
3edbf30719 woops, forgot to fix a sim test ages ago when refactoring json writing/reading 2018-06-25 09:06:40 -07:00
Dustin Carlino
ba310cbd45 removing geom crate, using just map model 2018-06-25 09:00:43 -07:00
Dustin Carlino
0d46b413bb move gfxctx 2018-06-22 14:42:13 -07:00
Dustin Carlino
5ce158cb90 refactoring json saving/loading 2018-06-22 13:36:12 -07:00
Dustin Carlino
6b8a5a0103 moving more colors to scheme 2018-06-21 11:18:17 -07:00
Dustin Carlino
0d43b8da88 dont put cars on wrong lane types 2018-06-19 12:24:29 -07:00
Dustin Carlino
116f3c35e9 upgrade to rand 0.5 2018-06-18 10:32:54 -07:00
Dustin Carlino
923883883b updating README and trimming license declarations 2018-06-03 17:56:53 -07:00
Dustin Carlino
f2b7344940 using new rust 1.26 match stuff, and fmt 2018-05-10 16:19:26 -07:00
Dustin Carlino
9b4a8b22c6 tweak the behavior of starting a turn. still jumpy and weird, am thinking this is a fundamental problem with straw_model 2018-04-17 17:26:41 -07:00
Dustin Carlino
b73e9ebfb6 a second determinism test, to make sure savestating works reasonably 2018-04-16 17:30:55 -07:00
Dustin Carlino
9e1c5ffc52 fix the nondeterminism from using hashmap. doh. 2018-04-16 17:21:25 -07:00
Dustin Carlino
93245a79ca start a test to see if simulations are deterministic. they... aren't :( 2018-04-15 21:08:00 -07:00
Dustin Carlino
9f3fd72417 changing f64 time to u32 ticks. this gets rid of the custom serde stuff
and lets us compare full sim states
2018-04-14 15:29:18 -07:00
Dustin Carlino
401123d11a make rng part of sim 2018-04-13 22:44:24 -07:00
Dustin Carlino
f8436f9017 add UI hooks to save/load sim state 2018-04-13 21:52:30 -07:00
Dustin Carlino
e292d06cfb change intersection policy from trait to enum, so serde works 2018-04-13 21:34:00 -07:00
Dustin Carlino
ff2f284d1f serializing (most of) the sim state 2018-04-13 19:08:18 -07:00
Dustin Carlino
065c2ce9ba Importing everything since the initial import 2018-04-10 17:51:37 -07:00