Skip to content

Commit

Permalink
Continuous-time Conflict Based Search prototype (#15)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael X. Grey <[email protected]>
  • Loading branch information
mxgrey authored Apr 20, 2023
1 parent 7dbc05c commit e910cfa
Show file tree
Hide file tree
Showing 62 changed files with 7,001 additions and 2,559 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/ci_linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@ name: ci_linux
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '30 2 * * *'
# The final 1 indicates that we want to run this test on Tuesdays, making
# this a weekly test.
- cron: '30 2 * * 1'
workflow_dispatch:
pull_request:

push:
branches: [main]

env:
CARGO_TERM_COLOR: always

Expand All @@ -15,16 +20,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Instally nightly
- name: Install nightly
run: |
rustup toolchain install nightly
rustup default nightly
- uses: actions/checkout@v3
- name: Build mapf
run: cd mapf && cargo build
- name: Run tests mapf
run: cd mapf && cargo test
- name: Build mapf-viz
run: cd mapf-viz && cargo build
- name: Run tests mapf-viz
run: cd mapf-viz && cargo test
- name: Build workspace
run: |
cargo build --workspace --tests
- name: Run tests
run: |
cargo test --tests
45 changes: 45 additions & 0 deletions .github/workflows/ci_windows.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: ci_windows
on:
schedule:
# * is a special character in YAML so you have to quote this string
# The final 1 indicates that we want to run this test on Tuesdays, making
# this a weekly test.
- cron: '30 2 * * 1'
workflow_dispatch:
pull_request:
push:
branches: [main]

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: windows-latest

steps:
- name: checkout
uses: actions/checkout@v3

- name: Install Rustup using win.rustup.rs
run: |
# Disable the download progress bar which can cause perf issues
$ProgressPreference = "SilentlyContinue"
Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe
.\rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --default-toolchain=none
del rustup-init.exe
rustup default nightly
rustup target add x86_64-pc-windows-msvc
shell: powershell

- name: build
run: |
rustc -Vv
cargo -V
cargo build --workspace --tests
shell: cmd

- name: test
run: |
cargo test --tests
shell: cmd
61 changes: 61 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[![style](https://github.com/open-rmf/mapf/actions/workflows/style.yaml/badge.svg)](https://github.com/open-rmf/mapf/actions/workflows/style.yaml)
[![ci_linux](https://github.com/open-rmf/mapf/actions/workflows/ci_linux.yaml/badge.svg)](https://github.com/open-rmf/mapf/actions/workflows/ci_linux.yaml)
[![ci_windows](https://github.com/open-rmf/mapf/actions/workflows/ci_windows.yaml/badge.svg)](https://github.com/open-rmf/mapf/actions/workflows/ci_windows.yaml)

# multi-agent (path finding) planning framework

Mapf is a (currently experimental) Rust library for multi-agent planning, with
Expand All @@ -10,3 +14,60 @@ This is being developed as part of the [Open-RMF](https://github.com/open-rmf)
project which provides an open source framework for enabling interoperability
between heterogeneous fleets of mobile robots, including cooperation across
different platforms and vendors.

# Helpful Links

* [Rust Book](https://doc.rust-lang.org/stable/book/)

# Install dependencies

## Ubuntu / MacOS / Linux / Unix

We tend to always target the latest versions of Rust, so we recommend using the `rustup` tool: https://www.rust-lang.org/tools/install

```bash
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

If you already have `rustup` then you can use this to bring your installation up to date:
```bash
$ rustup update
```

## Windows

Follow instructions for installing rustup-init.exe [here](https://forge.rust-lang.org/infra/other-installation-methods.html#other-ways-to-install-rustup).

# Use nightly

We are currently using a few unstable features from the nightly toolchain of Rust
because they allow `mapf` to have extreme customizability without any loss to
performance. The easiest way to use the nightly version is to make it your default
toolchain with this command:

```bash
$ rustup default nightly
```

# Run an example

From the root directory:

```bash
$ cargo run --release --example grid
```

This example will allow you to experiment with multiple agents cooperatively
planning from their starts to their goals in a grid environment. Use left/right
click to set the start/goal cells of each agent. Use shift+left/right click to
add/remove occupancy from cells. The velocities and sizes of each agent can be
customized independently, and you can save/load scenarios into yaml files.

Some premade scenarios can be found in the `mapf-viz/scenarios` folder. Load a
scenario on startup by passing the scenario name as an executable argument, e.g.:

```bash
$ cargo run --release --example grid -- mapf-viz/scenarios/sizes.yaml
```

Note that the scenario filename to load at startup must come after a `--` with a space on each side.
3 changes: 2 additions & 1 deletion mapf-viz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ iced = { git = "https://github.com/mxgrey/iced", branch = "asymmetric_scale", fe
iced_aw = { git = "https://github.com/iced-rs/iced_aw", branch = "main" }
iced_native = { git = "https://github.com/mxgrey/iced", branch = "asymmetric_scale" }
serde = { version="1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "*"
async-std = "1.0"
directories-next = "2.0"
native-dialog = "*"
Expand All @@ -20,3 +20,4 @@ lyon = "*"
nalgebra = "*"
arrayvec = "*"
time-point = "*"
clap = { version = "4.2.1", features = ["derive"] }
Loading

0 comments on commit e910cfa

Please sign in to comment.