Skip to main content

Crate robocomp

Crate robocomp 

Source
Expand description

§robocomp

Bevy Plugin for Robot/Rigid-Body Composition using URDF inspired physics agnostic components. For use with editors like Blender (via Skein) etc.

§Features

  • Standardized Blender-Bevy interop: Provides standard set of Components which can be set in editors like Blender via plugins like Skein. On exporting to gltf/glb and 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_rapier3d and avian3d
  • 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.

§Crates

CrateDescription
robocompPhysics-agnostic core: Rd/Rc components, RobocompPlugin
robocomp_rapier3dRapier 3D backend: RobocompRapierPlugin, RobocompRapierControllerPlugin — re-exports core
robocomp_avian3dAvian 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 Compatibility

Bevybevy_rapier3drobocomp_rapier3davian3drobocomp_avian3d
0.180.340.10.6.10.1

§Workspace

# 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

Re-exports§

pub use plugin::RobocompPlugin;

Modules§

cleanup_manager
Cleanup manager plugin and related components/systems.
plugin
Main plugin for the robot compositor.
rc
Exposes the components for the robot composition/editing.
rd
Describes the robot and its components. URDF inspired robot description format. ref: https://wiki.ros.org/urdf/XML ref: https://articulatedrobotics.xyz/tutorials/ready-for-ros/urdf/