Important
You are on a branch with experimental support for ROS 2 via rclrs.
This will require more steps to set up than usual, so installation instructions for the necessary packages are below:
-
Install ROS Jazzy according to the normal installation instructions.
-
Install Rust according to the normal installation instructions.
-
Run these commands to set up the workspace with the message bindings:
sudo apt install -y git libclang-dev python3-pip python3-vcstool # libclang-dev is required by bindgenpip install git+https://github.com/colcon/colcon-cargo.git --break-system-packagespip install git+https://github.com/colcon/colcon-ros-cargo.git --break-system-packagesFor now we need a fork of cargo-ament-build until this PR is merged and released:
cargo install --git https://github.com/mxgrey/cargo-ament-buildCreate a workspace with the necessary repos:
mkdir -p workspace/src && cd workspacegit clone https://github.com/open-rmf/crossflow src/crossflow -b ros2vcs import src < src/crossflow/ros2-feature.reposSource the ROS distro and build the workspace:
source /opt/ros/jazzy/setup.bashcolcon build --allow-overriding action_msgs builtin_interfaces common_interfaces composition_interfaces example_interfaces geometry_msgs lifecycle_msgs nav_msgs rcl_interfaces rosgraph_msgs rosidl_default_generators rosidl_default_runtime sensor_msgs sensor_msgs_py service_msgs statistics_msgs std_msgs std_srvs trajectory_msgs type_description_interfaces unique_identifier_msgs visualization_msgs- After
colcon buildhas finished, you should see a.cargo/config.tomlfile inside your workspace, with[patch.crates-io.___]sections pointing to the generated message bindings. Now you should source the workspace using
source install/setup.bashNow you can run the ROS 2 example. You can also create your own crate in this colcon workspace and link as shown in the example.
This library provides sophisticated reactive programming for the bevy ECS. In addition to supporting one-shot chains of async operations, it can support reusable workflows with parallel branches, synchronization, races, and cycles. These workflows can be hierarchical, so a workflow can be used as a building block by other workflows.
There are several different categories of problems that crossflow sets out to solve. If any one of these use-cases is relevant to you, it's worth considering crossflow as a solution:
- Coordinating async activities (e.g. filesystem i/o, network i/o, or long-running calculations) with regular bevy systems
- Calling one-shot systems on an ad hoc basis, where the systems require an input value and produce an output value that you need to use
- Defining a procedure to be followed by your application or by an agent or pipeline within your application
- Designing a complex state machine that gradually switches between different modes or behaviors while interacting with the world
- Managing many parallel threads of activities that need to be synchronized or raced against each other
- Introduction to workflows
- JSON Diagram Format
- Crossflow Docs
- Bevy Engine
- Bevy Cheat Book
- Rust Book
- Install Rust
Crossflow may be supported across several releases of Bevy, although we only have one for the time being:
| bevy | crossflow |
|---|---|
| 0.16 | 0.0.1 |
The main branch currently targets bevy version 0.16 (crossflow 0.0.x). We
will try to keep main up to date with the latest release of bevy, but you can
expect a few months of delay.
This is a Rust project that often uses the latest language features. We recommend
installing rustup and cargo using the installation instructions from the Rust
website: https://www.rust-lang.org/tools/install
For Ubuntu specifically you can run these commands to get the dependencies you need:
- To install
rustupandcargo
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh- Make sure you have basic compilation tools installed
sudo apt-get install build-essentialOnce dependencies are installed you can run the tests:
cargo testYou can find some illustrative examples for building workflows out of diagrams:
- Calculator
- Door manager that uses zenoh and protobuf
- Mock navigation system using ROS
To use crossflow in your own Rust project, you can run
cargo add crossflow