Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move dependency to rmf_workcell #43

Merged
merged 4 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions nexus_workcell_editor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,11 @@ name = "nexus_workcell_editor"

[dependencies]
bevy = "0.12"
bevy_egui = "0.23"
# TODO(luca) Fix upstream by removing the open_url feature from bevy_egui
home = "=0.5.9"
# 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/open-rmf/rmf_workcell", tag = "v0.0.1" }
rmf_workcell_format = { git = "https://github.com/open-rmf/rmf_workcell", tag = "v0.0.1" }
rclrs = "0.4.0"
nexus_calibration_msgs = "*"
34 changes: 19 additions & 15 deletions nexus_workcell_editor/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -98,25 +101,26 @@ fn main() {
));

app.insert_resource(DirectionalLightShadowMap { size: 2048 })
.init_resource::<SiteAssets>()
.add_state::<AppState>()
.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,
Expand Down
12 changes: 5 additions & 7 deletions nexus_workcell_editor/src/main_menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,26 @@
*
*/

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<PathBuf>,
pub import: Option<PathBuf>,
pub importing: Option<Task<Option<(Entity, rmf_site_format::Site)>>>,
}

impl Autoload {
pub fn file(filename: PathBuf, import: Option<PathBuf>) -> Self {
Autoload {
filename: Some(filename),
import,
importing: None,
}
}
}
Expand Down Expand Up @@ -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(),
Expand Down
4 changes: 2 additions & 2 deletions nexus_workcell_editor/src/workcell_calibration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down
Loading