bevy_urdf
A Bevy plugin for importing robots from URDF files and running physics simulations. Ground vehicles use Rapier physics, while drones are simulated using integrated dynamics models.
Features
- Import URDF robot descriptions into Bevy
- Support for STL and OBJ mesh formats
- Rapier physics integration for ground vehicles
- Custom dynamics simulation for drone vehicles
- Event-driven sensor reading and motor control
- Multiple robot type support (ground vehicles, quadrupeds, drones)
Installation
Add to your Cargo.toml:
[]
= "0.3.0" # Replace with actual version
Quick Start
1. Add Plugins
Add the necessary plugins to your Bevy app:
use *;
use ;
2. Load Robot
Load a robot in your startup systems:
use ;
3. Spawn Robot
Subscribe to the loaded event and spawn the robot:
use ;
API Reference
Events
The plugin uses an event-driven architecture for robot control and sensor feedback:
Sensor Reading
Motor Control (Ground Robots)
For ground-based robots and vehicles:
Thrust Control (Drones)
For aerial vehicles and drones:
Robot Types
RobotType::NotDrone- Ground vehicles, quadrupeds, manipulatorsRobotType::Drone- Aerial vehicles with thrust-based control
Examples
Run the included examples to see the plugin in action:
# Drone simulation
# Quadruped robot simulation
URDF Requirements
Before using URDF files with this plugin:
- Mesh Paths: Ensure all mesh file references use relative paths
- Unsupported Elements: Remove or replace
package://URIs - Gazebo Elements: Gazebo-specific nodes are not supported and should be removed
Example of supported mesh reference:
<!-- Good: relative path -->
<!-- Not supported: package URI -->
Known Limitations
- Package URIs (
package://) are not supported - Gazebo-specific URDF elements are ignored
- Drone rotor animations are not yet implemented
- Limited to STL and OBJ mesh formats
Contributing
Contributions are welcome! Please feel free to submit issues and pull requests.