diff --git a/nexus_workcell_editor/Cargo.toml b/nexus_workcell_editor/Cargo.toml index 899d193..015ded3 100644 --- a/nexus_workcell_editor/Cargo.toml +++ b/nexus_workcell_editor/Cargo.toml @@ -9,13 +9,10 @@ name = "nexus_workcell_editor" [dependencies] bevy = "0.12" -bevy_egui = "0.23" -# TODO(luca) Just use the version used by site editor once released -bevy_impulse = { git = "https://github.com/open-rmf/bevy_impulse", branch = "main" } clap = { version = "4.0.10", features = ["color", "derive", "help", "usage", "suggestions"] } crossbeam-channel = "0.5.8" # TODO(luca) back to main when PR is merged -rmf_site_editor = { git = "https://github.com/open-rmf/rmf_site", rev = "f4bed77" } -rmf_site_format = { git = "https://github.com/open-rmf/rmf_site", rev = "f4bed77" } +rmf_workcell_editor = { git = "https://github.com/luca-della-vedova/rmf_workcell", branch = "first_commit" } +rmf_workcell_format = { git = "https://github.com/luca-della-vedova/rmf_workcell", branch = "first_commit" } rclrs = "0.4.0" nexus_calibration_msgs = "*" diff --git a/nexus_workcell_editor/src/main.rs b/nexus_workcell_editor/src/main.rs index f9c1fb1..260fac1 100644 --- a/nexus_workcell_editor/src/main.rs +++ b/nexus_workcell_editor/src/main.rs @@ -15,22 +15,25 @@ * */ -use bevy::render::{ - render_resource::{AddressMode, SamplerDescriptor}, - settings::{WgpuFeatures, WgpuSettings}, - RenderPlugin, +use bevy::{ + log::LogPlugin, + pbr::DirectionalLightShadowMap, + prelude::*, + render::{ + render_resource::{AddressMode, SamplerDescriptor}, + settings::{WgpuFeatures, WgpuSettings}, + RenderPlugin, + }, }; -use bevy::{log::LogPlugin, pbr::DirectionalLightShadowMap, prelude::*}; -use bevy_egui::EguiPlugin; use clap::Parser; -use librmf_site_editor::{ - aabb::AabbUpdatePlugin, animate::AnimationPlugin, asset_loaders::AssetLoadersPlugin, - interaction::InteractionPlugin, issue::IssuePlugin, keyboard::*, log::LogHistoryPlugin, - occupancy::OccupancyPlugin, site::SitePlugin, site_asset_io::SiteAssetIoPlugin, - view_menu::ViewMenuPlugin, widgets::*, wireframe::SiteWireframePlugin, - workcell::WorkcellEditorPlugin, workspace::*, AppState, CommandLineArgs, +use librmf_workcell_editor::{ + bevy_egui::EguiPlugin, bevy_impulse, interaction::InteractionPlugin, keyboard::*, + site_asset_io::SiteAssetIoPlugin, view_menu::ViewMenuPlugin, widgets::*, + workcell::WorkcellEditorPlugin, workspace::*, AabbUpdatePlugin, AnimationPlugin, AppState, + AssetLoadersPlugin, CommandLineArgs, DeletionPlugin, FuelPlugin, LogHistoryPlugin, + ModelLoadingPlugin, SiteAssets, SiteWireframePlugin, }; pub mod main_menu; @@ -98,25 +101,26 @@ fn main() { )); app.insert_resource(DirectionalLightShadowMap { size: 2048 }) + .init_resource::() .add_state::() .add_plugins(( AssetLoadersPlugin, LogHistoryPlugin, + DeletionPlugin, + FuelPlugin::default(), AabbUpdatePlugin, EguiPlugin, KeyboardInputPlugin, MainMenuPlugin, WorkcellEditorPlugin, - SitePlugin, + ModelLoadingPlugin::default(), InteractionPlugin::default(), StandardUiPlugin::default(), AnimationPlugin, - OccupancyPlugin, WorkspacePlugin, SiteWireframePlugin, )) .add_plugins(( - IssuePlugin, ViewMenuPlugin, RosContextPlugin, WorkcellCalibrationPlugin, diff --git a/nexus_workcell_editor/src/main_menu.rs b/nexus_workcell_editor/src/main_menu.rs index 3d2ee45..120a532 100644 --- a/nexus_workcell_editor/src/main_menu.rs +++ b/nexus_workcell_editor/src/main_menu.rs @@ -15,20 +15,19 @@ * */ -use bevy::{app::AppExit, prelude::*, tasks::Task, window::PrimaryWindow}; -use bevy_egui::{egui, EguiContexts}; -use librmf_site_editor::{ +use bevy::{app::AppExit, prelude::*, window::PrimaryWindow}; +use librmf_workcell_editor::{ + bevy_egui::{egui, EguiContexts}, workspace::{WorkspaceData, WorkspaceLoader}, AppState, }; -use rmf_site_format; +use rmf_workcell_format; use std::path::PathBuf; #[derive(Resource)] pub struct Autoload { pub filename: Option, pub import: Option, - pub importing: Option>>, } impl Autoload { @@ -36,7 +35,6 @@ impl Autoload { Autoload { filename: Some(filename), import, - importing: None, } } } @@ -85,7 +83,7 @@ fn egui_ui( ui.horizontal(|ui| { if ui.button("New workcell").clicked() { workspace_loader.load_from_data(WorkspaceData::Workcell( - rmf_site_format::Workcell::default() + rmf_workcell_format::Workcell::default() .to_string() .unwrap() .into(), diff --git a/nexus_workcell_editor/src/workcell_calibration.rs b/nexus_workcell_editor/src/workcell_calibration.rs index 2cd30df..9802b98 100644 --- a/nexus_workcell_editor/src/workcell_calibration.rs +++ b/nexus_workcell_editor/src/workcell_calibration.rs @@ -16,11 +16,11 @@ */ use bevy::prelude::*; -use bevy_egui::EguiContexts; +use librmf_workcell_editor::bevy_egui::EguiContexts; use crossbeam_channel::{Receiver, Sender}; -use rmf_site_format::{anchor::*, workcell::*}; +use rmf_workcell_format::{workcell::*, Anchor}; use std::{collections::HashMap, sync::Arc};