From e1535d0029c35b6cbd364d0171482d07bfa1cfb8 Mon Sep 17 00:00:00 2001 From: Sergei Surovtsev Date: Thu, 25 Jan 2024 14:00:44 +0300 Subject: [PATCH] updated to recent bevy_rl --- Cargo.toml | 12 ++++++------ examples/a1_walk.rs | 8 ++++---- examples/bevy_rl_rest.rs | 12 ++++++------ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e8c8543..d10db90 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/examples/a1_walk.rs b/examples/a1_walk.rs index fd7633b..dec760d 100644 --- a/examples/a1_walk.rs +++ b/examples/a1_walk.rs @@ -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(); } diff --git a/examples/bevy_rl_rest.rs b/examples/bevy_rl_rest.rs index 6b5a6be..085575a 100644 --- a/examples/bevy_rl_rest.rs +++ b/examples/bevy_rl_rest.rs @@ -83,12 +83,12 @@ 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 { @@ -96,7 +96,7 @@ fn main() { pause_simulation: false, target_fps: 600.0, }) - .add_plugin(MuJoCoPlugin); + .add_plugins(MuJoCoPlugin); // Setup bevy_rl let ai_gym_state = AIGymState::::new(AIGymSettings { @@ -106,11 +106,11 @@ fn main() { ..default() }); app.insert_resource(ai_gym_state) - .add_plugin(AIGymPlugin::::default()); + .add_plugins(AIGymPlugin::::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();