rydb / ros2_bevy

An alternative simulator to gazebo for doing ROS 2 simulation
MIT License
8 stars 0 forks source link

Add for Support for MuJoco #4

Open rydb opened 1 year ago

rydb commented 1 year ago

According to the bench mark here: https://arxiv.org/pdf/2103.04616.pdf

Mujoco, a recently open sourced engine, would have alot to offer for this project. As far as I can tell, MuJoco(compared to rapier):

With the downsides of:

If the downsides could be mitigated, work could be done to add a way to interface between bevy and mujoco physics. As it currently stands, there is a Renderer for bevy + MuJoco only. https://github.com/stillonearth/bevy_mujoco

If MuJoco support is to be added to the project it must have at least the following:

stillonearth commented 1 year ago

There's no way to dynamically add an object to MuJoCo simulation. MuJoCo compiles a scene fine to internal representation and only interfaces are for reading sensors (forces) and manipulating actuators. Hence the paradigm where everything is described declaratively.

If you plan to use bevy+mujoco for robotics that can make sense for things like adding visual sensors (a camera) or implementing logic on top of a mujoco scene. One example could be a reinforcement learning environment for robotic fights.

If you plan to use bevy for a large-scale simulations with accurate physics all within bevy ECS ergonomics, the better solution would be using rapier or XPBD

rydb commented 1 year ago

There's no way to dynamically add an object to MuJoCo simulation. MuJoCo compiles a scene fine to internal representation and only interfaces are for reading sensors (forces) and manipulating actuators. Hence the paradigm where everything is described decoratively.

If you plan to use bevy+mujoco for robotics that can make sense for things like adding visual sensors (a camera) or implementing logic on top of a mujoco scene. One example could be a reinforcement learning environment for robotic fights.

If you plan to use bevy for a large-scale simulations with accurate physics all within bevy ECS ergonomics, the better solution would be using rapier or XPBD

for the sake of expediency, I'll be stick to developing the project's physics with rapier in mind.

stillonearth commented 1 year ago

There's also https://github.com/EmbarkStudios/physx-rs which may be preferable if you don't aim for wasm target or portability.

There's no way to dynamically add an object to MuJoCo simulation. MuJoCo compiles a scene fine to internal representation and only interfaces are for reading sensors (forces) and manipulating actuators. Hence the paradigm where everything is described decoratively.

If you plan to use bevy+mujoco for robotics that can make sense for things like adding visual sensors (a camera) or implementing logic on top of a mujoco scene. One example could be a reinforcement learning environment for robotic fights.

If you plan to use bevy for a large-scale simulations with accurate physics all within bevy ECS ergonomics, the better solution would be using rapier or XPBD https://github.com/Jondolf/bevy_xpbd

for the sake of expediency, I'll be stick to developing the project's physics with rapier in mind.

— Reply to this email directly, view it on GitHub https://github.com/rydb/ros2_bevy/issues/4#issuecomment-1641007549, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXHKFILODHVKAIXHI2TGJ63XQ3445ANCNFSM6AAAAAA2NQPMIA . You are receiving this because you commented.Message ID: @.***>