Skip to content

Commit

Permalink
updated to recent bevy_rl
Browse files Browse the repository at this point in the history
stillonearth committed Jan 25, 2024
1 parent 192296c commit e1535d0
Showing 3 changed files with 16 additions and 16 deletions.
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "bevy_quadruped_neural_control"
version = "0.0.2"
version = "0.0.3"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/stillonearth/bevy_quadruped_neural_control"

[dependencies]
bevy = "0.10.0"
bevy_rl = { version = "0.10.0-beta" } # { version = "0.9.6" }
bevy_mujoco = { git = "https://github.com/stillonearth/bevy_mujoco.git", rev = "51192fe" }
bevy-inspector-egui = { version = "0.18.1" }
bevy_flycam = { git = "https://github.com/NiklasEi/bevy_flycam.git", rev = "7d69689" }
bevy = "0.12"
bevy_rl = { version = "0.12" } # { version = "0.9.6" }
bevy_mujoco = { version = "0.12" }
# bevy-inspector-egui = { version = "0.18.1" }
bevy_flycam = { git = "https://github.com/sburris0/bevy_flycam" }
rand = "0.8.5"
serde = "1.0.158"
serde_derive = "1.0.158"
8 changes: 4 additions & 4 deletions examples/a1_walk.rs
Original file line number Diff line number Diff line change
@@ -111,13 +111,13 @@ fn main() {
target_fps: 600.0, // this is not actual fps (bug in bevy_mujoco),
// the bigger the value, the slower the simulation
})
.add_plugin(NoCameraPlayerPlugin)
.add_plugins(NoCameraPlayerPlugin)
.insert_resource(MovementSettings {
speed: 1.0,
..default()
})
.add_plugin(MuJoCoPlugin)
.add_startup_system(setup)
.add_system(robot_control_loop)
.add_plugins(MuJoCoPlugin)
.add_systems(Startup, setup)
.add_systems(Update, robot_control_loop)
.run();
}
12 changes: 6 additions & 6 deletions examples/bevy_rl_rest.rs
Original file line number Diff line number Diff line change
@@ -83,20 +83,20 @@ fn main() {

// Basic bevy setup
app.add_plugins(DefaultPlugins)
.add_plugin(NoCameraPlayerPlugin)
.add_plugins(NoCameraPlayerPlugin)
.insert_resource(MovementSettings {
speed: 3.0,
..default()
})
.add_startup_system(setup);
.add_systems(Startup, setup);

// Setup bevy_mujoco
app.insert_resource(MuJoCoPluginSettings {
model_xml_path: "assets/unitree_a1/scene.xml".to_string(),
pause_simulation: false,
target_fps: 600.0,
})
.add_plugin(MuJoCoPlugin);
.add_plugins(MuJoCoPlugin);

// Setup bevy_rl
let ai_gym_state = AIGymState::<Actions, EnvironmentState>::new(AIGymSettings {
@@ -106,11 +106,11 @@ fn main() {
..default()
});
app.insert_resource(ai_gym_state)
.add_plugin(AIGymPlugin::<Actions, EnvironmentState>::default());
.add_plugins(AIGymPlugin::<Actions, EnvironmentState>::default());

// bevy_rl events
app.add_system(bevy_rl_pause_request);
app.add_system(bevy_rl_control_request);
app.add_systems(Update, bevy_rl_pause_request);
app.add_systems(Update, bevy_rl_control_request);

// Start
app.run();

0 comments on commit e1535d0

Please sign in to comment.