Bevy Plugin for Robot/Rigid-Body Composition using URDF inspired physics agnostic components. For use with editors like Blender (via Skein) etc.
- Standardized Blender-Bevy interop: Provides standard set of
Componentswhich can be set in editors like Blender via plugins like Skein. On exporting togltf/glband import into Bevy, they get converted into proper physics bodies with joints! - Easier Prefab Creation: All you have to create are required gameplay and logic components which can be set on your gameplay objects for prefabs. No need to do reinvent the wheel of creating custom physics components every time!
- Physics Agnostic Simulation: Allows swapping the underlying physics engine with almost NO changes to code or
gltf/glb/scene! Supports Backends for Physics Engines:bevy_rapier3dandavian3d - Easier Physics Body Queries and Control: Robocomp provides all references to associated components of a robot at the top level and centralized. This simplifies querying and controlling the robotic contraptions in the simulation without traversing hierarchy.
| Crate | Description |
|---|---|
robocomp |
Physics-agnostic core: Rd/Rc components, RobocompPlugin |
robocomp_rapier3d |
Rapier 3D backend: RobocompRapierPlugin, RobocompRapierControllerPlugin — re-exports core |
robocomp_avian3d |
Avian 3D backend: RobocompAvianPlugin, RobocompAvianControllerPlugin — re-exports core |
For Rapier 3D simulations, depend on robocomp_rapier3d:
[dependencies]
robocomp_rapier3d = "0.1"use bevy::prelude::*;
use bevy_rapier3d::prelude::*;
use robocomp_rapier3d::{RobocompRapierPlugin, rc::RcSceneRoot};
app.add_plugins((
RapierPhysicsPlugin::<NoUserData>::default(),
RobocompRapierPlugin,
));See the robocomp_rapier3d examples — start with simple_rigid_bodies_rapier3d.
For Avian 3D simulations, depend on robocomp_avian3d:
[dependencies]
robocomp_avian3d = "0.1"use bevy::prelude::*;
use avian3d::prelude::*;
use robocomp_avian3d::{RobocompAvianPlugin, rc::RcSceneRoot};
app.add_plugins((
PhysicsPlugins::default(),
RobocompAvianPlugin,
));See the robocomp_avian3d examples — start with simple_rigid_bodies_avian3d.
For a custom physics backend, depend on robocomp only and implement your own pre-processor.
| Bevy | bevy_rapier3d | robocomp_rapier3d | avian3d | robocomp_avian3d |
|---|---|---|---|---|
| 0.18 | 0.34 | 0.1 | 0.6.1 | 0.1 |
# Run all tests
cargo test --workspace
# Run an example (assets live at workspace root; names: <example>[_skein]_<backend>)
cargo run -p robocomp_rapier3d --example revolute_rapier3d
cargo run -p robocomp_rapier3d --example revolute_skein_rapier3d
cargo run -p robocomp_avian3d --example revolute_avian3d
cargo run -p robocomp_avian3d --example revolute_skein_avian3d