Abstreet - Transportation planning and traffic simulation software for creating cities friendlier to walking, biking, and public transit

Overview

A/B Street

Ever been stuck in traffic on a bus, wondering why is there legal street parking instead of a dedicated bus lane? A/B Street is a project to plan, simulate, and communicate visions for making cities friendlier to people walking, biking, and taking public transit. We create software to simulate traffic, edit streets and intersections, plan bike networks, create low-traffic neighborhoods, and educate the public about 15-minute neighborhoods through games. The project works anywhere in the world, thanks to OpenStreetMap.

Videos

Documentation

Project mission

We amplify the efforts of individuals and advocacy groups who campaign to transition cities away from private motor vehicles. We believe in transparent and reproducible analysis, so all of our work is open source and based on public data. We believe everybody should have a voice in shaping their city, so our software aims to be easy to use.

Why not leave city planning to professionals? People are local experts on the small slice of the city they interact with daily -- the one left turn lane that always backs up or a certain set of poorly timed walk signals. Laura Adler writes:

"Only with simple, accessible simulation programs can citizens become active generators of their own urban visions, not just passive recipients of options laid out by government officials."

Existing urban planning software is either proprietary or hard to use. A/B Street strives to be highly accessible, by being a fun, engaging game. See here for more guiding principles.

Credits

Core team:

See full credits

Contact [email protected] or follow @CarlinoDustin for updates.

Comments
  • Visualizing low-traffic neighborhoods and gated communities

    Visualizing low-traffic neighborhoods and gated communities

    Today, there are two types of roads colored pink.

    Screenshot from 2021-05-21 14-06-49 This is a gated/private community in Seattle called Broadmoor. There's a physical gate surrounding this neighborhood; you have to show an ID to a guard to walk or drive in.

    Screenshot from 2021-05-21 14-08-40 This is a Stay Healthy Street in Seattle. Also called "play street", "living street", "low traffic neighborhood" in different parts of the world. People can drive through there only if they live on that street, or they're making deliveries. Pedestrians and bicycles and people playing outside are supposed to be the main use. They usually have some kind of sign or barrier at the entrances: 960x0

    We should probably depict these differently. The pink color isn't meaningful at all. We have the unzoomed view, shown above, and also the zoomed-in detail view like this: Screenshot from 2021-05-21 14-11-20

    Maybe we could have a simple 2D top-down rendering of a barrier or a gatehouse? For the unzoomed view, I'm not sure what to do.

    @trangrei

    design-needed 
    opened by dabreegster 53
  • Make crosswalks bidirectional

    Make crosswalks bidirectional

    For issue #813

    Problems:

    • ~~Currently crashing in map_model::objects::traffic_signals::Stage::max_crosswalk_time failing to find a movement in i.movements~~
    • I added PathStep::ContraflowTurn mostly by adding it to the enum and then fixing all the non-exhaustive pattern errors, which means I likely missed some matches which use _.
    • I haven't touched pathfinder v2 yet, notably into_v1_walking would likely generate TurnIDs which do not correspond to any Turn

    other TODOs:

    • Degenerate intersections still have two crosswalks (they had four before?). Do they not have SharedSidewalkCorners?
    • Once all duplicate crosswalks are not being created, remove other_crosswalk_ids and its one reference.
    opened by mdejean 42
  • better default

    better default "random" traffic patterns

    see https://github.com/dabreegster/abstreet/issues/154#issuecomment-658026415 for current plans

    see https://github.com/dabreegster/abstreet/issues/205#issuecomment-660707593 for warp hint


    sim/src/make/generator.rs contains code for generating trips

    See https://github.com/dabreegster/abstreet/pull/183/files for related code

    See https://github.com/dabreegster/abstreet/commit/ead4a99682d11ec4af4824a1ab4c3854bae7b0d4 for related code


    I have no idea how "random" traffic generation works, but currently it results in poor results for large maps.

    Initial traffic at midnight seemed reasonable (maybe bicycle traffic was too high and bus traffic was too low), but later instead of ramping up it started dropping!

    I expected game melting down/crashing on attempting to simulate tens (hundreds?) thousands of active trips at once rather than drop to zero active trips.

    EDIT: yes, it is a prime example of not reading warnings. Random is described to behave in this way - see https://github.com/dabreegster/abstreet/commit/da1731ccb2d549ed95516de76881ab53f67e8dd3#diff-628ee6879bfcdd889804ae5371c9a26cR223

    good first issue 
    opened by matkoniecz 28
  • Quick prototype of Streetcomplete colors and an explicit curb

    Quick prototype of Streetcomplete colors and an explicit curb

    This is a followup to @westnordost's suggestion in #704 to draw a more explicit curb between the road and sidewalk. I incorporated a few more ideas here too, pulling lots of colors from Streetcomplete (https://user-images.githubusercontent.com/7988080/103153247-827c1f00-478f-11eb-9d1f-4d12017533aa.png) and also its map style (https://raw.githubusercontent.com/ENT8R/streetcomplete-mapstyle/gh-pages/images/light.png). I'm really liking how things are looking and am considering a big color overhaul based around this. Any initial feedback? @Robinlovelace, @michaelkirk, @trangrei

    Some of the changes:

    • Using Streetcomplete colors for the map background, water, parks, unzoomed roads
    • Drawing a bold line between the road and curb. (There are some bugs near intersections that I'll fix if we decide to push forward with this style.)
    • Use Streetcomplete color for zoomed-in lanes
    • Stop coloring intersections and parking lanes a different color. It usually doesn't match reality; just show paved surface, and add markings on top of that.

    If we go forward with this, there's lots of code simplification I'll do, and rethinking the styling for bike/bus lanes, access-restricted roads, night mode, etc. Also need to make sure layers and agents look good on this scheme.

    We could also just incorporate a few of the ideas -- the color changes and adding the curb could be independent steps.

    Before: Screenshot from 2021-07-23 13-04-15 After: Screenshot from 2021-07-23 13-04-24

    Before: Screenshot from 2021-07-23 13-03-38 After: Screenshot from 2021-07-23 13-03-19

    Before: Screenshot from 2021-07-23 13-05-46 After: Screenshot from 2021-07-23 13-05-39

    opened by dabreegster 25
  • Create new lane types to express different types of buffers for prote…

    Create new lane types to express different types of buffers for prote…

    …cted bike lanes. They're only created manually right now, to explore rendering.

    The goal is to start modeling different types of bike lanes -- some are right in the door-zone of street parking, others have flimsy little flex posts protecting from cars, but some have proper barriers in place. Eventually we'll use this in the routing and simulation layer. But the goal for this PR is actually just to explore the rendering style.

    I've started with 4 types of barriers, but happy to add more!

    For each of these, any better ideas for visualizing in our top-down view?

    Stripes

    Top-down rendering: Screenshot from 2021-07-16 14-50-25 Reference: buffered-bike-lane_street_0

    Flex posts ("wands" in the UK)

    Rendering: Screenshot from 2021-07-16 14-51-45 Reality: bikes_lanes_slider

    Planters

    Rendering: Screenshot from 2021-07-16 14-52-52 Reality: 2016_0211_2ndAvePioneerSquareFlyer-concept

    Jersey barrier

    Rendering: Screenshot from 2021-07-16 14-54-00 Reality: bikelane-protected-jersey-barrier-flushing-ave--fortheloveofbikes-thumb

    Next steps

    There's more work needed to create/modify these properly in the road editor UI. I also want to start tagging these in OSM, and then importing into A/B Street. https://wiki.openstreetmap.org/wiki/Berlin/Verkehrswende/Radwege#Tagging-Beispiele seems to have some traction.

    opened by dabreegster 19
  • Levenshulme LTN

    Levenshulme LTN

    In collaboration with the University of Manchester, we're trying to initially apply the LTN tool to study the Levenshulme LTN. Urban Observatory has sensors measuring air quality, pedestrian counts, and vehicle counts in the area. There should be data both before and after the LTN was put in. So, the goal is to take the LTN's impact prediction about short-term detours, and compare it to the real observations.

    What exactly is the LTN scheme?

    We'll need a map representation before and after the scheme was put in.

    • [ ] Find a definitive boundary
    • [ ] Find the location of the filters
    • [ ] If recent OSM edits have picked up the LTN, transform the small bike-only segments into filters, so they can be manipulated in the tool

    From https://s3-eu-west-2.amazonaws.com/commonplace-customer-assets/levenshulmeandburnageactiveneighbourhood/FAQ%20Design%20Detail.pdf: Screenshot from 2022-01-31 13-37-52

    https://secure.manchester.gov.uk/info/200024/consultations_and_surveys/8009/levenshulme_and_burnage_active_neighbourhood/3 lists 14 filter locations

    When were the filters installed? (And double check -- do we have counts from before that?)

    opened by dabreegster 17
  • Importing OSM data for London

    Importing OSM data for London

    Hi, your progress with the LTN Tool is exciting and it's already potentially useful. London UK is a focus of a lot of effort in planning LTNs.

    As you may know, London is administered as 33 boroughs that act as separate cities for most road planning. My own borough is Camden https://www.openstreetmap.org/#map=13/51.5428/-0.1809. It would be great to get the OSM data for Camden imported to AB Street. I'd be happy to designate the area or to download the relevant section of the OSM database.

    Once knowledge of the LTN Tool spreads I imagine there will be demands from quite a few other London boroughs too. Does it make sense to import the OSM data for all of Greater London (http://download.geofabrik.de/europe/great-britain/england/greater-london.html)?

    opened by georgio8 17
  • Import all service roads

    Import all service roads

    Separate cyclepaths like https://www.openstreetmap.org/way/54563641 excluded; let's try enabling them.

    https://www.openstreetmap.org/way/4188078 has cycleway:left, but it winds up on the right -- I think the left-hand driving side needs some fixes here.

    opened by dabreegster 17
  • Font problem or a missing language setting?

    Font problem or a missing language setting?

    I built the simulation game from source. After starting the simulation, i see a mix of readable text and non-readable pixels, where i assume, another text should be visible. Is there a missing font or do i have to define a prefered language for the game? abstreet_fontproblem

    opened by okilimu 17
  • Adding support for other cities

    Adding support for other cities

    What's involved with this? It's not just converting the OSM data right? Are locations hardcoded in somewhere? My city has terrible street traffic. I'd love to modify this to support other cities easily.

    opened by taybin 17
  • Import Münster (Germany)

    Import Münster (Germany)

    Hi,

    great project!

    I tried to import my hometown, Münster in Germany. I used the (unzipped) .osm file downloaded from bbbike.org. I tried to import this with the following command:

    ./import.sh --oneshot=Muenster.osm
    
    

    The import fails with this error.

    thread 'main' panicked at 'No bus route from Position(Lane #102018, 27.2693m) to Position(Lane #86195, 7.4311m) now for Bus 329: Sendenhorst, Realschule => Hoetmar, Hagenhoff! Prevent this edit', map_model/src/pathfind/walking.rs:329:17
    

    This might be related to #190, but I didn't investigate any further beyond this error message. I got the same error with a manual bounding box download from bbbike.org, though.

    opened by silberzwiebel 14
  • Embed osm2streets in map_model

    Embed osm2streets in map_model

    Currently the raw_map layer embeds osm2streets StreetNetwork, just adding A/B Street-specific stuff in addition (buildings, areas, transit routes, and things like crosswalks & modal filters that aren't yet in osm2streets). But then the map_model layer, which is used by the traffic sim and all the apps, has its own representation for roads and intersections, and all the osm2streets stuff is gone. This was OK to start, but it's starting to get a bit tricky:

    • A/B Street edits lane specs and needs to regenerate geometry and movements, so we have an adapter kind of hack around it now
    • Rendering code is starting to be duplicated between map_gui and osm2streets. And then again in #1038 for Bevy
    • There are some osm2streets API concepts like RoadEdge that'd be useful to use over here now, but they're not easy to get at

    I'd like to explore options for embedding StreetNetwork inside map_model::Map too. Reasons to be wary of this:

    • Keeping serialized file size small and loading times quick for large maps is important, potentially at the expense of code readability / API niceness
    • the API surface of Lane, Road, Intersection is huge and messy
    • Keeping some indirection / wrapper between osm2streets and here is a good idea for evolving the two codebases at different speeds

    Another vague idea is to embed osm2streets::{Road, Intersection} structs inside of A/B Street equivalents, and keep a few extra fields over on this side

    CC @BudgieInWA

    opened by dabreegster 1
  • Add to Taginfo Projects

    Add to Taginfo Projects

    Show the OpenStreetMap community what data you are using. Add your project to the list of Taginfo Projects.

    (you may provide multiple, i.e. if there is different themed layers. or -if possible- for Streetmix)

    opened by danieldegroot2 2
  • Window height resized to 600px after loading

    Window height resized to 600px after loading

    Platform: Linux (ArchLinux, Gnome 43.2, Wayland)

    When starting the game with RUST_LOG=trace RUST_BACKTRACE=1 cargo run --bin game -- --dev, I observe the following behaviour:

    • the window starts with a 800x600px size, then goes full screen, and then down to 1920x600px
    • according to the window decoration, it's always maximized, so you have to click twice on the "maximize" icon to go to full screen after that.

    Here are some relevant logs:

    [2022-12-15T23:45:31Z WARN  widgetry::runner] Monitor scale factor is 1, screen window is 800, but the application requires 1500. Overriding the scale factor to 1.
    [2022-12-15T23:45:31Z TRACE widgetry::runner] winit event says the window was resized from 800, 600 to ScreenDims { width: 1920.0, height: 1013.0 }. But inner size is ScreenDims { width: 1920.0, height: 1013.0 }, so using that
    [2022-12-15T23:45:33Z TRACE widgetry::runner] winit event says the window was resized from 1920, 1013 to ScreenDims { width: 1920.0, height: 600.0 }. But inner size is ScreenDims { width: 1920.0, height: 600.0 }, so using that
    

    I'm not sure why the initial window is 800x600px. From what I understand, the issue likely lies in glutin, but that crate was completely rewritten recently, so if there's a bug there it's not going to get fixed.

    It looks like updating glutin isn't a straightforward task.

    opened by matthieu-foucault 2
  • LTN tutorial mode

    LTN tutorial mode

    Madison designed an interactive tutorial mode for the LTN tool, but I haven't found time to implement it yet. If someone's not afraid of the slightly odd UI library A/B Street uses, it could be a fun medium-sized starter project. The design can be found at https://www.figma.com/file/HxSNM2146bcb0P0bNlW0x1/LTN-Working-Station-V2?node-id=5369%3A5464&t=cE5ZYUOuSsUMKwl2-0. Some samples: Screenshot from 2022-12-08 12-58-34 Screenshot from 2022-12-08 12-58-21 Embedding a second view of the map canvas is a bit advanced, but something we've figured out before. If anyone's interested in implementing, I can help flesh out smaller tasks and figure out how to structure the code.

    CC @matthieu-foucault as an option I forgot from the other list

    good first issue 
    opened by dabreegster 1
  • Easter Bunny (or other holiday) versions of 15-min Santa Game?

    Easter Bunny (or other holiday) versions of 15-min Santa Game?

    Goal: Adapting 15-min Santa game to an Easter Bunny version

    Target users: AI UK attendees & Nick M's kids 😄

    Needs: art/design, development support

    Ideas brainstormed with @dabreegster:

    • Switch Santa with Easter Bunny
    • 2 player game: one is focused on dropping eggs and the other on finding eggs?
    • Adapt to other cities across the UK and worldwide
    opened by dingaaling 3
Releases(v0.3.37)
Owner
A/B Street
Transportation planning and traffic simulation software for creating cities friendlier to walking, biking, and public transit
A/B Street
Hierarchical Task Network Planning deeply integrated with bevy, which I use in my games :P

Note that CI currently tests against a matrix of (windows, mac, linux) * (toolchain stable, nightly) * (cargo build, test, clippy), which ensures vali

null 29 Oct 16, 2024
A velocity-based falling sand simulation built with Rust and Bevy

⏳ Bevy Falling Sand A velocity-based falling sand simulation built with Rust and Bevy! This simluation uses bevy_rapier to generate colliders that reg

Tomato 7 Oct 30, 2023
Life simulation written in rust

Life simulation written in Rust, inspired by this very old screensaver: https://sourceforge.net/projects/primlife/ Demo: https://joelthelion.github.io

Joel Schaerer 214 Dec 14, 2022
A sci-fi battle simulation implemented in the bevy engine.

Bevy Combat It's a bevy port of my ECS Combat Unity demo. Check out the web demo in your browser. You can use the - and = keys to speed up and slow do

ElliotB256 47 Dec 22, 2022
3d car simulation in rust

3d car simulation in rust This project is developed with intention to learn: programming on rust, computer graphics, physics simulation, geometric alg

Alexi Chepura 45 Dec 31, 2022
Wheeled vehicle simulation using Bevy engine with Rapier's joints

⚠️ Legacy branch! ⚠️ 'master' branch is currently broken due to migration to newer rapier and bevy_rapier so unless you want to compare old and new ve

null 29 Nov 14, 2022
A networked (p2p), cross-platform physics simulation example using rollback netcode

bevy_gaff (work in progress) bevy_gaff is an attempt at making a networked (p2p), cross-platform physics simulation using rollback netcode. It synchro

Johan Klokkhammer Helsing 13 Sep 5, 2023
A gravitation simulation with Barnes-Hut algorithm implementation.

Gravitation Particles A Barnes-Hut implementation of n-body gravitation simulation in Rust. Running the project The video rendering feature is impleme

Artem 3 Oct 5, 2023
Rust boids simulation using Reynolds model running with Bevy engine.

example.mp4 About Rust boids simulation using Reynolds model running with Bevy engine. The following parameters can be updated while the simulation is

Daniel Di Dio Balsamo 7 Nov 15, 2023
Victorem - easy UDP game server and client framework for creating simple 2D and 3D online game prototype in Rust.

Victorem Easy UDP game server and client framework for creating simple 2D and 3D online game prototype in Rust. Example Cargo.toml [dependencies] vict

Victor Winbringer 27 Jan 7, 2023
a prototype crate for creating modular and performant 3D CPU particle systems, inspired by Unity's Shuriken Particle System.

bevy_prototype_particles This is a prototype crate for creating modular and performant 3D CPU particle systems, inspired by Unity's Shuriken Particle

James Liu 28 Sep 12, 2022
Engine / framework for creating highly customizable and user modable action RPG's

Rust RPG Toolkit PLEASE NOTE: this in early and very heavy development. API is subject to constant change, as it has newly transitioned from being a g

Ole A. Sjo Fasting 58 Dec 5, 2022
Hotham is a framework for quickly and easily creating amazing standalone VR experiences.

?? Under construction! Please mind the mess! ?? Introduction G'day, and welcome to Hotham! ?? Hotham is an attempt to create a lightweight, high perfo

Let Eyes Equals Two 296 Dec 29, 2022
Bell is a work in progress programming language that compiles to MCfunction (Minecraft's language for creating datapacks).

Bell is a work in progress programming language that compiles to MCfunction (Minecraft's language for creating datapacks). It provides a higher level,

Yoav 17 Aug 25, 2022
Creating a simple flappy bird game in Rust language

Creating a simple flappy bird game in Rust language The main goal of this project is to get my hands dirty with rust, while creating something fun. Ex

Sajidur Rahman 1 Feb 10, 2022
Utilities for creating strictly ordered execution graphs of systems for the Bevy game engine

bevy_system_graph This crate provides the utilities for creating strictly ordered execution graphs of systems for the Bevy game engine. Bevy Version S

Hourai Teahouse 19 Dec 2, 2022
Wein2D.js bindings for creating browser games in Rust using WebAssembly.

Wein2D.js-WASM Wein2D.js bindings for creating browser games in Rust using WebAssembly. Wein2D.js-WASM requires Wein2d.js to be loaded in the same doc

DevTaube 1 Apr 14, 2022
Facilitate the process of creating a decompilation project for a given Wii/Gamecube game

dadosod Facilitate the process of creating a decompilation project for a given Wii/Gamecube game Features Disassembly DOL Guess/Calculate common secti

Wesley Moret 7 Dec 7, 2022
A tool for creating optimised, platform specific glTF files.

Squisher What? squisher is a program that takes a glTF or .glb file with PNG/JPG textures and produces a .glb file where the textures have been replac

Let Eyes Equals Two 4 Aug 24, 2022