From 557d68fef3e07118fd0c44a6b0cc3f8f2cec14a4 Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Thu, 31 Aug 2023 11:23:09 +0800 Subject: [PATCH] Remove workcell and robot location icons Signed-off-by: Luca Della Vedova --- assets/textures/robot.png | Bin 1783 -> 0 bytes assets/textures/robot.svg | 111 --------------------------- assets/textures/workcell.png | Bin 2996 -> 0 bytes assets/textures/workcell.svg | 92 ---------------------- rmf_site_editor/src/site/assets.rs | 12 --- rmf_site_editor/src/site/location.rs | 48 ++---------- rmf_site_editor/src/site_asset_io.rs | 8 -- 7 files changed, 6 insertions(+), 265 deletions(-) delete mode 100644 assets/textures/robot.png delete mode 100644 assets/textures/robot.svg delete mode 100644 assets/textures/workcell.png delete mode 100644 assets/textures/workcell.svg diff --git a/assets/textures/robot.png b/assets/textures/robot.png deleted file mode 100644 index 094bfe352e6dd8a066b0b0ead29817ddaf0f93c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1783 zcmVpF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H1282mO zK~#90?VC?b6HgS!zqC!Dgc?&0T0#+RVr)XZbVH-u!0;#0YU4o@J%~p=aHEA%7^(tW>!KUQYj-A=o-g}^7-#5Xhh=FPV| z%bVG;3;MCj@1*{oP{#_RQB z@7}$deB>km5n*Ct0-;a{u~-ZX3kw(@AJ-Is7RJWLP*+z6yWI|#%LPFYP*zr!vmfFi z5{Xb_VPg9L?T?{AtG`(9Lrn+3=IvDPNysR0C_H*PDevSL)-#nodSVC zfP0=FJ$e*(@80EVn-9Icy?FNQnQ9wR6yfoBKt%9(JY0Si6$*#LX}`S1Vxi&TVVa$t zrQg4QGj+$0ALo7g^5WdNb4-69KYpay*;yJM9wv*$lJ+Eo!(ml_s#8D|MG^#oaoW_> zM2m}yQkzsNRa61apFhv^_xbZ@scvy`k(!#Cn0i4FNEAgye-4LZSuqcYMx&UVoRsXE zni@QQ{20~M)m)ENF`x~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caV zN6_h%vwcAjegIjP!-+(KPMkQg>4%yNd9}2(P$H4Ynp$(87EdOV4O1ApHEngrPH?EcSD>~4$i3Qz`s91h2iQU_8B-o1Ng Z{14VXaRXdDh2H=G002ovPDHLkV1j3AQcwT@ diff --git a/assets/textures/robot.svg b/assets/textures/robot.svg deleted file mode 100644 index 24f7d01f..00000000 --- a/assets/textures/robot.svg +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - diff --git a/assets/textures/workcell.png b/assets/textures/workcell.png deleted file mode 100644 index b204f689aae92198c5b989d22c56e0f0341b8093..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2996 zcmV;l3rqBgP)pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H13qeUl zK~#90*ktO(__0+T+4cuw%p@ubCYv!6F`H92jnM>6 zbki6=LZYtG_`$3QV{Q^P_(8T=gT&ZPG#e6GMix*=z!pZKAJAuiu-^3a-V65@y!-vK zCpk&m_dV}<&vQQRx$k+aAtKO!7?DIoz<-m2jEoGY_TP5m--hZ0%%4A>MvopXT0Z{x zW3}BO4G}@DCGha!Lwe(lHzehHy`EZITPZp^S`~j(UjpaPpC452bUNwEl`ATFGXT{H z@caE#T3X6~*Jw1vaU7+kr7?O|t5q$Rct8!@x^)XQ@W=%bVd27s0D#`!Ug-6D{&$^D zhxYb%Rea(&&Y{{22p!qHygVWziiwG#oSYo~cdyq=-+ue8T5b`M!WrOnIJRY1reHz=hZ%2QBzoNcy9OqC( zfYa&3oH=uNM`z8Nh4S+9AsfDY`7+bNWy_W^^8WsQOqei%muoZ{w6(PjYO}k$8%K^D zVd|}2yH*hiiUnRWbUTHf<8<%$+-z(FvX*!RYAdz@9yO zkeHY#>WdN*WD_u0=Yvafax#t|KQ5@>+ScD^1oby;*dW=Sm@jfj zkVQaoak0R7QBe`RUN6p^IfK;HRDoQt*Q2?)nX$8U=~71L*I$3-Wv5S{W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_site_editor/src/site/assets.rs b/rmf_site_editor/src/site/assets.rs index c4d49c63..bb706c81 100644 --- a/rmf_site_editor/src/site/assets.rs +++ b/rmf_site_editor/src/site/assets.rs @@ -55,8 +55,6 @@ pub struct SiteAssets { pub charger_material: Handle, pub holding_point_material: Handle, pub parking_material: Handle, - pub robot_material: Handle, - pub workcell_material: Handle, } impl FromWorld for SiteAssets { @@ -71,12 +69,6 @@ impl FromWorld for SiteAssets { let parking_texture = asset_server.load(&String::from(&AssetSource::Bundled( "textures/parking.png".to_string(), ))); - let robot_texture = asset_server.load(&String::from(&AssetSource::Bundled( - "textures/robot.png".to_string(), - ))); - let workcell_texture = asset_server.load(&String::from(&AssetSource::Bundled( - "textures/workcell.png".to_string(), - ))); let mut materials = world .get_resource_mut::>() @@ -162,8 +154,6 @@ impl FromWorld for SiteAssets { let charger_material = materials.add(charger_texture.into()); let holding_point_material = materials.add(holding_point_texture.into()); let parking_material = materials.add(parking_texture.into()); - let robot_material = materials.add(robot_texture.into()); - let workcell_material = materials.add(workcell_texture.into()); let mut meshes = world.get_resource_mut::>().unwrap(); let level_anchor_mesh = meshes.add( @@ -271,8 +261,6 @@ impl FromWorld for SiteAssets { charger_material, holding_point_material, parking_material, - robot_material, - workcell_material, } } } diff --git a/rmf_site_editor/src/site/location.rs b/rmf_site_editor/src/site/location.rs index 5ba9f22e..dc92e610 100644 --- a/rmf_site_editor/src/site/location.rs +++ b/rmf_site_editor/src/site/location.rs @@ -27,8 +27,6 @@ pub struct LocationTagMeshes { charger: Option, parking_spot: Option, holding_point: Option, - spawn_robot: Option, - workcell: Option, } fn location_halo_tf(tag: &LocationTag) -> Transform { @@ -100,8 +98,8 @@ pub fn add_location_visuals( let position = anchors .point_in_parent_frame_of(point.0, Category::Location, e) - .unwrap(); - //+ LOCATION_LAYER_HEIGHT * Vec3::Z; + .unwrap() + + LOCATION_LAYER_HEIGHT * Vec3::Z; let mut tag_meshes = LocationTagMeshes::default(); for tag in tags.iter() { @@ -119,14 +117,8 @@ pub fn add_location_visuals( tag_meshes.holding_point = Some(id); assets.holding_point_material.clone() } - LocationTag::SpawnRobot(_) => { - tag_meshes.spawn_robot = Some(id); - assets.robot_material.clone() - } - LocationTag::Workcell(_) => { - tag_meshes.workcell = Some(id); - assets.workcell_material.clone() - } + // Workcells and robots are not visualized + LocationTag::SpawnRobot(_) | LocationTag::Workcell(_) => continue, }; commands.entity(id).insert(PbrBundle { mesh: assets.location_tag_mesh.clone(), @@ -241,18 +233,6 @@ pub fn update_location_for_changed_location_tags( tag_meshes.holding_point = None; } } - if let Some(id) = tag_meshes.spawn_robot { - if !tags.iter().any(|t| t.spawn_robot().is_some()) { - commands.entity(id).despawn_recursive(); - tag_meshes.spawn_robot = None; - } - } - if let Some(id) = tag_meshes.workcell { - if !tags.iter().any(|t| t.workcell().is_some()) { - commands.entity(id).despawn_recursive(); - tag_meshes.workcell = None; - } - } // Spawn the new tags for tag in tags.iter() { let (id, material) = match tag { @@ -283,24 +263,8 @@ pub fn update_location_for_changed_location_tags( continue; } } - LocationTag::SpawnRobot(_) => { - if tag_meshes.spawn_robot.is_none() { - let id = commands.spawn_empty().id(); - tag_meshes.spawn_robot = Some(id); - (id, assets.robot_material.clone()) - } else { - continue; - } - } - LocationTag::Workcell(_) => { - if tag_meshes.workcell.is_none() { - let id = commands.spawn_empty().id(); - tag_meshes.workcell = Some(id); - (id, assets.workcell_material.clone()) - } else { - continue; - } - } + // Workcells and robots are not visualized + LocationTag::SpawnRobot(_) | LocationTag::Workcell(_) => continue, }; commands.entity(id).insert(PbrBundle { mesh: assets.location_tag_mesh.clone(), diff --git a/rmf_site_editor/src/site_asset_io.rs b/rmf_site_editor/src/site_asset_io.rs index ba29adfd..dee77985 100644 --- a/rmf_site_editor/src/site_asset_io.rs +++ b/rmf_site_editor/src/site_asset_io.rs @@ -263,14 +263,6 @@ impl SiteAssetIo { "textures/stopwatch.png".to_owned(), include_bytes!("../../assets/textures/stopwatch.png").to_vec(), ); - self.bundled_assets.insert( - "textures/robot.png".to_owned(), - include_bytes!("../../assets/textures/robot.png").to_vec(), - ); - self.bundled_assets.insert( - "textures/workcell.png".to_owned(), - include_bytes!("../../assets/textures/workcell.png").to_vec(), - ); } }