diff --git a/Articulated_objects/Ikea_furniture/BRIMNES_Cabinet_with_doors_glass_black_78x95cm/.collect.mapping.json b/Articulated_objects/Ikea_furniture/BRIMNES_Cabinet_with_doors_glass_black_78x95cm/.collect.mapping.json new file mode 100755 index 0000000000000000000000000000000000000000..aea549ab5ae4b4cd88999977ac34aae9bd819c5b --- /dev/null +++ b/Articulated_objects/Ikea_furniture/BRIMNES_Cabinet_with_doors_glass_black_78x95cm/.collect.mapping.json @@ -0,0 +1,23 @@ +{ + "version": "1.0", + "file_records": [ + { + "source_url": "C:/NVIDIA/Materials/2023_1/Base/Glass/Clear_Glass.mdl", + "source_hash": "4f0a8491bb73517be6b84a9bb9abd025e2b1d06c", + "target_url": "./NVIDIA/Materials/2023_1/Base/Glass/Clear_Glass.mdl", + "target_hash": "6363c1272285f40752354ef24371dfeb9a3e3dfb" + }, + { + "source_url": "C:/xufang/USD Room/IKEA/Three/BRIMNES_Cabinet_with_doors_glass_black_78x95cm/resource/img/4b66ce5d83cebdb048a63fc95b5a7ff2.png", + "source_hash": "95c296af5fc7c9424556697f88454bba327898ca", + "target_url": "./resource/img/4b66ce5d83cebdb048a63fc95b5a7ff2.png", + "target_hash": "95c296af5fc7c9424556697f88454bba327898ca" + }, + { + "source_url": "C:/xufang/USD Room/IKEA/Three/BRIMNES_Cabinet_with_doors_glass_black_78x95cm/resource/img/6a84af47e7df213abe4969d3e4b6778d.png", + "source_hash": "968d862e6c2479af2a346e9d09e8be8445f6d963", + "target_url": "./resource/img/6a84af47e7df213abe4969d3e4b6778d.png", + "target_hash": "968d862e6c2479af2a346e9d09e8be8445f6d963" + } + ] +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/BRIMNES_Cabinet_with_doors_glass_black_78x95cm/NVIDIA/Materials/2023_1/Base/Glass/Clear_Glass.mdl b/Articulated_objects/Ikea_furniture/BRIMNES_Cabinet_with_doors_glass_black_78x95cm/NVIDIA/Materials/2023_1/Base/Glass/Clear_Glass.mdl new file mode 100755 index 0000000000000000000000000000000000000000..d6c08a66ec3d6465474bf1e93968a42c369059a1 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/BRIMNES_Cabinet_with_doors_glass_black_78x95cm/NVIDIA/Materials/2023_1/Base/Glass/Clear_Glass.mdl @@ -0,0 +1,43 @@ +mdl 1.3; + +import ::OmniGlass::OmniGlass; +import ::tex::gamma_mode; +import ::state::normal; + +export material Clear_Glass(*) + = OmniGlass::OmniGlass( + absorption_coeff: color(1.f, 1.f, 1.f), + glass_color: color(1.f, 1.f, 1.f), + use_glass_color_texture: false, + glass_color_texture: texture_2d(), + frosting_roughness: 0.f, + glass_ior: 1.52f, + thin_walled: true, + project_uvw: false, + world_or_object: false, + uv_space_index: 0, + texture_translate: float2(0.f), + texture_rotate: 0.f, + texture_scale: float2(1.f)); + +/* +mdl 1.5; + +import ::Library::AEC::Materials::Templates::GlassWithVolume::GlassWithVolume; +import ::tex::gamma_mode; +import ::state::normal; + +export material Clear_Glass(*) + = ::Library::AEC::Materials::Templates::GlassWithVolume::GlassWithVolume( + thin_walled: true, + transmission_color: color(1.f, 1.f, 1.f), + roughness_texture: texture_2d(), + ior: 1.52f, + transmission_color_texture: texture_2d(), + roughness_texture_influence: 0.f, + roughness: 0.f, + reflection_color_texture: texture_2d(), + reflection_color: color(1.f, 1.f, 1.f), + depth: 0.0001f, + normal_map_texture: texture_2d()); +*/ diff --git a/Articulated_objects/Ikea_furniture/BRIMNES_Cabinet_with_doors_glass_black_78x95cm/model_BRIMNES_Cabinet_with_doors_glass_black_78x95cm.usd b/Articulated_objects/Ikea_furniture/BRIMNES_Cabinet_with_doors_glass_black_78x95cm/model_BRIMNES_Cabinet_with_doors_glass_black_78x95cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..e9b0c527ce61345e0a0051af0e429a596db7a0c2 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/BRIMNES_Cabinet_with_doors_glass_black_78x95cm/model_BRIMNES_Cabinet_with_doors_glass_black_78x95cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:116cff868fd0ca6cc37fc01069e8bc2a5002906658e80901540f4d6fc40946da +size 10944 diff --git a/Articulated_objects/Ikea_furniture/BRIMNES_Cabinet_with_doors_glass_black_78x95cm/resource/img/4b66ce5d83cebdb048a63fc95b5a7ff2.png b/Articulated_objects/Ikea_furniture/BRIMNES_Cabinet_with_doors_glass_black_78x95cm/resource/img/4b66ce5d83cebdb048a63fc95b5a7ff2.png new file mode 100755 index 0000000000000000000000000000000000000000..011e83e84b8b4ce1fba167affb167ed10d61b5c0 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/BRIMNES_Cabinet_with_doors_glass_black_78x95cm/resource/img/4b66ce5d83cebdb048a63fc95b5a7ff2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d8fc68d1a76431bbffd9037a49485198b4cb89adee32b6796cfef8fa3b5d8b96 +size 98840 diff --git a/Articulated_objects/Ikea_furniture/BRIMNES_Cabinet_with_doors_glass_black_78x95cm/resource/img/6a84af47e7df213abe4969d3e4b6778d.png b/Articulated_objects/Ikea_furniture/BRIMNES_Cabinet_with_doors_glass_black_78x95cm/resource/img/6a84af47e7df213abe4969d3e4b6778d.png new file mode 100755 index 0000000000000000000000000000000000000000..6bb53a5b71abd5c34cf7526274a7c86bbc075e72 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/BRIMNES_Cabinet_with_doors_glass_black_78x95cm/resource/img/6a84af47e7df213abe4969d3e4b6778d.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba41f1c52e0a0617f5bc6be37435eb562f32ae979e7136f876100a45a685d3b1 +size 43308 diff --git a/Articulated_objects/Ikea_furniture/BRIMNES_Cabinet_with_doors_glass_black_78x95cm/resource/material.usd b/Articulated_objects/Ikea_furniture/BRIMNES_Cabinet_with_doors_glass_black_78x95cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..7236b89570b4ab3c8fa6981051aa74bfaeebb52b --- /dev/null +++ b/Articulated_objects/Ikea_furniture/BRIMNES_Cabinet_with_doors_glass_black_78x95cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1aa2bb55f0d20c4fdb61b08bf92f0fe30cacdf0858d8b8cc104c51178e60ab91 +size 2521 diff --git a/Articulated_objects/Ikea_furniture/BRIMNES_Cabinet_with_doors_glass_black_78x95cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/BRIMNES_Cabinet_with_doors_glass_black_78x95cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..5c8d596e3ab7763799a4501aa74681f375a0f24b --- /dev/null +++ b/Articulated_objects/Ikea_furniture/BRIMNES_Cabinet_with_doors_glass_black_78x95cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f7d7f4675e42e509342d4011bb8e8a76777d20f41bc29e481a2d6da57d77c00a +size 163274 diff --git a/Articulated_objects/Ikea_furniture/BRUKSVARA_wardrobe_with_2_doors_and_2 drawers_brown_79x57x201cm/model_BRUKSVARA_wardrobe_with_2_doors_and_2 drawers_brown_79x57x201cm.usd b/Articulated_objects/Ikea_furniture/BRUKSVARA_wardrobe_with_2_doors_and_2 drawers_brown_79x57x201cm/model_BRUKSVARA_wardrobe_with_2_doors_and_2 drawers_brown_79x57x201cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..7d102e98f055c82dcc47ae275ce17bb86cbdf2cb --- /dev/null +++ b/Articulated_objects/Ikea_furniture/BRUKSVARA_wardrobe_with_2_doors_and_2 drawers_brown_79x57x201cm/model_BRUKSVARA_wardrobe_with_2_doors_and_2 drawers_brown_79x57x201cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dfa21efa5a3e37643d64bf1c596d6c361c2bcdb08a49ab2147dc5e15095f73ac +size 16443 diff --git a/Articulated_objects/Ikea_furniture/BRUKSVARA_wardrobe_with_2_doors_and_2 drawers_brown_79x57x201cm/resource/img/effdfaad612583405524cadfa6cd919c.png b/Articulated_objects/Ikea_furniture/BRUKSVARA_wardrobe_with_2_doors_and_2 drawers_brown_79x57x201cm/resource/img/effdfaad612583405524cadfa6cd919c.png new file mode 100755 index 0000000000000000000000000000000000000000..8215419ea03bd47cf8d809d62c1914040057c1a4 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/BRUKSVARA_wardrobe_with_2_doors_and_2 drawers_brown_79x57x201cm/resource/img/effdfaad612583405524cadfa6cd919c.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:69971db24312b0cfe66696fd0397049bfb111f1275bf0e91b5fc636e1e659375 +size 102456 diff --git a/Articulated_objects/Ikea_furniture/BRUKSVARA_wardrobe_with_2_doors_and_2 drawers_brown_79x57x201cm/resource/material.usd b/Articulated_objects/Ikea_furniture/BRUKSVARA_wardrobe_with_2_doors_and_2 drawers_brown_79x57x201cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..1442e83ad6c38c71b1221bcbfb62e6869372476e --- /dev/null +++ b/Articulated_objects/Ikea_furniture/BRUKSVARA_wardrobe_with_2_doors_and_2 drawers_brown_79x57x201cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96093afd44d30361a701ef50b5a3842d7269ee4c9ebc8071dbdb4fc8dbbf1c12 +size 2019 diff --git a/Articulated_objects/Ikea_furniture/BRUKSVARA_wardrobe_with_2_doors_and_2 drawers_brown_79x57x201cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/BRUKSVARA_wardrobe_with_2_doors_and_2 drawers_brown_79x57x201cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..8f6656ae059fcd1620d8a43d3ffbc26f5812087f --- /dev/null +++ b/Articulated_objects/Ikea_furniture/BRUKSVARA_wardrobe_with_2_doors_and_2 drawers_brown_79x57x201cm/resource/v_69323/element_path.json @@ -0,0 +1,13 @@ +{ + "23": "/root/E_BRUKSVARA_wardrobe_with_2_doors_and_2drawers_brown_79x57x201cm_23", + "24": "/root/E_door2_24", + "25": "/root/E_door1_25", + "30": "/root/E_door2_24/E_handle_30", + "31": "/root/E_drawer1_31", + "48": "/root/E_door1_25/E_handle_48", + "49": "/root/E_drawer1_31/E_handle_49", + "54": "/root/E_drawer2_54", + "53": "/root/E_drawer2_54/E_handle_53", + "55": "/root/E_BRUKSVARA_wardrobe_with_2_doors_and_2drawers_brown_79x57x201cm_23/E_part1_55", + "57": "/root/E_BRUKSVARA_wardrobe_with_2_doors_and_2drawers_brown_79x57x201cm_23/E_shelf_57" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/BRUKSVARA_wardrobe_with_2_doors_and_2 drawers_brown_79x57x201cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/BRUKSVARA_wardrobe_with_2_doors_and_2 drawers_brown_79x57x201cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..19716d993cacdd2e53553e305e66d54979714d72 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/BRUKSVARA_wardrobe_with_2_doors_and_2 drawers_brown_79x57x201cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20fe4173141b6342920bef7f6944ddf29318a2e678515b77ff5fe975a1a86d49 +size 239571 diff --git a/Articulated_objects/Ikea_furniture/EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm/model_EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm.usd b/Articulated_objects/Ikea_furniture/EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm/model_EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..b410081bdc1af24aba18728f6c1c7eac898fbc9e --- /dev/null +++ b/Articulated_objects/Ikea_furniture/EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm/model_EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f918aaeb10bd1594f85f60732573f79f9255c73960e94b1dab744c549d9bbae9 +size 16607 diff --git a/Articulated_objects/Ikea_furniture/EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm/resource/img/b81f125db45d284d9d32e2ec7d459198.png b/Articulated_objects/Ikea_furniture/EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm/resource/img/b81f125db45d284d9d32e2ec7d459198.png new file mode 100755 index 0000000000000000000000000000000000000000..737bf27d533eabde8230621f9b69a6315748d38f --- /dev/null +++ b/Articulated_objects/Ikea_furniture/EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm/resource/img/b81f125db45d284d9d32e2ec7d459198.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5396eb012471686b375e88d21a3905459d2277a7647da7ab36264204fcd0a050 +size 131528 diff --git a/Articulated_objects/Ikea_furniture/EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm/resource/img/b82c1d924ce634316ba5b5470b7529a6.png b/Articulated_objects/Ikea_furniture/EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm/resource/img/b82c1d924ce634316ba5b5470b7529a6.png new file mode 100755 index 0000000000000000000000000000000000000000..9c7e96d0e8764a671081baf17625c5df375c174e --- /dev/null +++ b/Articulated_objects/Ikea_furniture/EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm/resource/img/b82c1d924ce634316ba5b5470b7529a6.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:266122103a9999008e928cb0e63aab74497474c0a0d663b4f4c4a7e8bf7da901 +size 31408 diff --git a/Articulated_objects/Ikea_furniture/EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm/resource/material.usd b/Articulated_objects/Ikea_furniture/EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..bab0c6fb61e714b85adb04a70fecbf8232743a0b --- /dev/null +++ b/Articulated_objects/Ikea_furniture/EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d198667cb5db29b82726fb9dade7b152a5a527405cfc92ff4153f2dc19832c8b +size 2643 diff --git a/Articulated_objects/Ikea_furniture/EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..6b7cbebc1b60017eeae9a211c1f990ef29bfd151 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm/resource/v_69323/element_path.json @@ -0,0 +1,10 @@ +{ + "9": "/root/E_EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm_9", + "10": "/root/E_EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm_9/E_part1_10", + "12": "/root/E_button_12", + "13": "/root/E_EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm_9/E_tabletop_13", + "14": "/root/E_EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm_9/E_shelf_14", + "2": "/root/E_door_2", + "4": "/root/E_EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm_9/E_part2_4", + "9Geo": "/root/E_EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm_9/E_EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm_9Geo" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..159907540dc4218724bce60937f09c090d786aa1 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/EKET_Cabinet_w_door_and_1_shelf_brown_walnut_effect_35x35x70cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8bbc0dc856f581e804c1627a38c0415c571466139fcee8f9bae004db22f9d77b +size 103087 diff --git a/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_2_drawers_white_70x35x35cm/model_EKET_Cabinet_with_2_drawers_white_70x35x35cm.usd b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_2_drawers_white_70x35x35cm/model_EKET_Cabinet_with_2_drawers_white_70x35x35cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..05baf8af6cb640eb86306e431e8b09eedc6ff667 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_2_drawers_white_70x35x35cm/model_EKET_Cabinet_with_2_drawers_white_70x35x35cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc537fa8a81116eedcd9b1233dfccb39bd0d9f1ed366b472402ef660fef9cd9e +size 11437 diff --git a/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_2_drawers_white_70x35x35cm/resource/img/2dadd6833ca12ca6395d878079d38432.png b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_2_drawers_white_70x35x35cm/resource/img/2dadd6833ca12ca6395d878079d38432.png new file mode 100755 index 0000000000000000000000000000000000000000..ee8903097379d5c43a8ce260e8180e0f0a549452 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_2_drawers_white_70x35x35cm/resource/img/2dadd6833ca12ca6395d878079d38432.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:390f02072fc8911453ba902326fd62504f03ecda019f0b453b881d44401658d6 +size 24450 diff --git a/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_2_drawers_white_70x35x35cm/resource/img/47700254f9e1a7a3d2b39d7fd2e9644d.png b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_2_drawers_white_70x35x35cm/resource/img/47700254f9e1a7a3d2b39d7fd2e9644d.png new file mode 100755 index 0000000000000000000000000000000000000000..24a64bc520275a4232794e46cba3db9e91c74119 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_2_drawers_white_70x35x35cm/resource/img/47700254f9e1a7a3d2b39d7fd2e9644d.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:65fb0ea990a9a4e50d0cb5a9b24c65ab38068fe20ba904b8d736967925b6d27a +size 28813 diff --git a/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_2_drawers_white_70x35x35cm/resource/material.usd b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_2_drawers_white_70x35x35cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..6e1e7a72231a11c1ae90c8f4a5335348d9cbd770 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_2_drawers_white_70x35x35cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d5f6a54903a1595f08f8278a299f687b92d06c9bc97103c999e1d59f1d1bb64 +size 2308 diff --git a/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_2_drawers_white_70x35x35cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_2_drawers_white_70x35x35cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..cc4bf454151832f8176d7ff0dd84f558e101a52e --- /dev/null +++ b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_2_drawers_white_70x35x35cm/resource/v_69323/element_path.json @@ -0,0 +1,7 @@ +{ + "17": "/root/E_drawer2_17", + "5": "/root/E_EKET_Cabinet_with_2_drawers_white_70x35x35cm_5", + "19": "/root/E_EKET_Cabinet_with_2_drawers_white_70x35x35cm_5/E_tabletop_19", + "5Geo": "/root/E_EKET_Cabinet_with_2_drawers_white_70x35x35cm_5/E_EKET_Cabinet_with_2_drawers_white_70x35x35cm_5Geo", + "9": "/root/E_drawer1_9" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_2_drawers_white_70x35x35cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_2_drawers_white_70x35x35cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..3b1db4330679f1031c15523d07c88258ed2a7fa3 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_2_drawers_white_70x35x35cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:11bfb7e5286b8286e1268613054d47cc9d6359179d09f8388b20253229d1d9e7 +size 32083 diff --git a/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm/model_EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm.usd b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm/model_EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..e9f626bd5d77bdd513144501a69f05aabcbb2add --- /dev/null +++ b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm/model_EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d519b0ce7af73e0e08014e435c34314fd66b5f2fcad029a01e46aa0ab87f1eba +size 11447 diff --git a/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm/resource/img/416219bd934fc4fd2e202b2f1be33b2f.png b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm/resource/img/416219bd934fc4fd2e202b2f1be33b2f.png new file mode 100755 index 0000000000000000000000000000000000000000..5decc0282c6a1786df922e6105ba0f76e4de7592 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm/resource/img/416219bd934fc4fd2e202b2f1be33b2f.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a40a416c2a852148838c8df144815f412c0b7d2f85a9ff53bc11af409bf71cd4 +size 16207 diff --git a/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm/resource/img/416219bd934fc4fd2e202b2f1be33b2f_1.png b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm/resource/img/416219bd934fc4fd2e202b2f1be33b2f_1.png new file mode 100755 index 0000000000000000000000000000000000000000..10cecfa0e3e85f0df6a9b40dec459b4fa543f4bd --- /dev/null +++ b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm/resource/img/416219bd934fc4fd2e202b2f1be33b2f_1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c11698c01393aa0d0cbe9bde7c6b74a5384fbc61fe9cc87b57737fe4794d15bb +size 126930 diff --git a/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm/resource/img/b81f125db45d284d9d32e2ec7d459198.png b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm/resource/img/b81f125db45d284d9d32e2ec7d459198.png new file mode 100755 index 0000000000000000000000000000000000000000..737bf27d533eabde8230621f9b69a6315748d38f --- /dev/null +++ b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm/resource/img/b81f125db45d284d9d32e2ec7d459198.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5396eb012471686b375e88d21a3905459d2277a7647da7ab36264204fcd0a050 +size 131528 diff --git a/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm/resource/img/b82c1d924ce634316ba5b5470b7529a6.png b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm/resource/img/b82c1d924ce634316ba5b5470b7529a6.png new file mode 100755 index 0000000000000000000000000000000000000000..9c7e96d0e8764a671081baf17625c5df375c174e --- /dev/null +++ b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm/resource/img/b82c1d924ce634316ba5b5470b7529a6.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:266122103a9999008e928cb0e63aab74497474c0a0d663b4f4c4a7e8bf7da901 +size 31408 diff --git a/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm/resource/img/d5797984753b585906ed8c09715e3404.png b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm/resource/img/d5797984753b585906ed8c09715e3404.png new file mode 100755 index 0000000000000000000000000000000000000000..81d87904b8142ac686d70df7b80a8eb85d02ce7d --- /dev/null +++ b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm/resource/img/d5797984753b585906ed8c09715e3404.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6a3f3695cd429408a5b1751b6dc1b05850ec1883e843381dd7e1a65f54e661d +size 7454 diff --git a/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm/resource/material.usd b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..2784b346b9a330b7156bf783523f48d01c73f849 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:599f9bb4c28cc235226a0fa9ec49665e14383b505c8343b478954a44ac943dc6 +size 3048 diff --git a/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..8c00252578127af9ab870c9a9691978a2f38a6d4 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm/resource/v_69323/element_path.json @@ -0,0 +1,9 @@ +{ + "2": "/root/E_EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm_2", + "11": "/root/E_EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm_2/E_part2_11", + "12": "/root/E_EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm_2/E_tabletop_12", + "2Geo": "/root/E_EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm_2/E_EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm_2Geo", + "3": "/root/E_door_3", + "4": "/root/E_EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm_2/E_part1_4", + "9": "/root/E_EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm_2/E_EKET_Suspension_rail_35cm_9" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..95f6b38cafe7a300cb0dc2a403d36f0a8e14bb3f --- /dev/null +++ b/Articulated_objects/Ikea_furniture/EKET_Cabinet_with_door_brown_walnut_effect_35x35x35cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:accfa24e9ff5c8ba0582bd0c49a1f9f4bb3f70b6e48df6a6377b2187e2ec2e08 +size 301501 diff --git a/Articulated_objects/Ikea_furniture/GREAKER_cabinet_with_drawers_white_84X101cm/model_GREAKER_cabinet_with_drawers_white_84X101cm.usd b/Articulated_objects/Ikea_furniture/GREAKER_cabinet_with_drawers_white_84X101cm/model_GREAKER_cabinet_with_drawers_white_84X101cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..0bb84f95f779b669cef6db5c076f80374fab21ef --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GREAKER_cabinet_with_drawers_white_84X101cm/model_GREAKER_cabinet_with_drawers_white_84X101cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3a5310a01291af43af9e66a73fc0c7588ae52d7d219f54b6713b54d80bc5cb82 +size 22138 diff --git a/Articulated_objects/Ikea_furniture/GREAKER_cabinet_with_drawers_white_84X101cm/resource/img/edd4b6fc4d93d6a3e133b99c9fe97979.png b/Articulated_objects/Ikea_furniture/GREAKER_cabinet_with_drawers_white_84X101cm/resource/img/edd4b6fc4d93d6a3e133b99c9fe97979.png new file mode 100755 index 0000000000000000000000000000000000000000..21ed2f96198dc067f3f1a76278cb98f79b67b31b --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GREAKER_cabinet_with_drawers_white_84X101cm/resource/img/edd4b6fc4d93d6a3e133b99c9fe97979.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a65b4c827e6797466e5341e7fb54f87fb882e8b6040a067e939795e0727bc8f4 +size 97709 diff --git a/Articulated_objects/Ikea_furniture/GREAKER_cabinet_with_drawers_white_84X101cm/resource/img/f5a64fe1335885e8d581278b10e6323d.png b/Articulated_objects/Ikea_furniture/GREAKER_cabinet_with_drawers_white_84X101cm/resource/img/f5a64fe1335885e8d581278b10e6323d.png new file mode 100755 index 0000000000000000000000000000000000000000..a25059b955411c88212a94cc89a0d0ce7e08d541 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GREAKER_cabinet_with_drawers_white_84X101cm/resource/img/f5a64fe1335885e8d581278b10e6323d.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e22339f074a2416f670212576397049f95b6efe24657c8557a2fdc6fa35d81d +size 23710 diff --git a/Articulated_objects/Ikea_furniture/GREAKER_cabinet_with_drawers_white_84X101cm/resource/material.usd b/Articulated_objects/Ikea_furniture/GREAKER_cabinet_with_drawers_white_84X101cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..abacfc75d3222a8afd4e60e1560456003fb3f576 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GREAKER_cabinet_with_drawers_white_84X101cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8370a7331acede904dd769eece590b18681c96aeabd1f9c1b54d01d9955a07eb +size 2291 diff --git a/Articulated_objects/Ikea_furniture/GREAKER_cabinet_with_drawers_white_84X101cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/GREAKER_cabinet_with_drawers_white_84X101cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..a9fbcf8560c38f1b50f2827efb94d459a9fbf3ad --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GREAKER_cabinet_with_drawers_white_84X101cm/resource/v_69323/element_path.json @@ -0,0 +1,12 @@ +{ + "13": "/root/E_door1_13", + "11": "/root/E_door1_13/E_handle_11", + "15": "/root/E_door2_15", + "14": "/root/E_door2_15/E_handle_14", + "25": "/root/E_drawer4_25", + "44": "/root/E_drawer3_44", + "50": "/root/E_drawer2_50", + "56": "/root/E_drawer1_56", + "7": "/root/E_GREAKER_cabinet_with_drawers_white_84X101cm_7", + "68": "/root/E_GREAKER_cabinet_with_drawers_white_84X101cm_7/E_tabletop_68" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/GREAKER_cabinet_with_drawers_white_84X101cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/GREAKER_cabinet_with_drawers_white_84X101cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..048731992d9d923973637c40823bd6b0cd2c09f4 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GREAKER_cabinet_with_drawers_white_84X101cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3866d4b24d6d70a617c5ad681b636fff5151fa2fd9695fb0c644cfb9aef4a0c +size 353320 diff --git a/Articulated_objects/Ikea_furniture/GULLABERG_Bedside_table_with_1_drawe_with_shelf_white_53x43x69cm/model_GULLABERG_Bedside_table_with_1_drawe_with_shelf_white_53x43x69cm.usd b/Articulated_objects/Ikea_furniture/GULLABERG_Bedside_table_with_1_drawe_with_shelf_white_53x43x69cm/model_GULLABERG_Bedside_table_with_1_drawe_with_shelf_white_53x43x69cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..894070dbe2cd36b56fba128ac1814941d5d34afe --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GULLABERG_Bedside_table_with_1_drawe_with_shelf_white_53x43x69cm/model_GULLABERG_Bedside_table_with_1_drawe_with_shelf_white_53x43x69cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be8ed30042a161c974eab47e83b33a9d2e95c37e2201dd23c3bde3c727d50934 +size 12267 diff --git a/Articulated_objects/Ikea_furniture/GULLABERG_Bedside_table_with_1_drawe_with_shelf_white_53x43x69cm/resource/img/04215496bc65712bfecf4259cc2c109b.png b/Articulated_objects/Ikea_furniture/GULLABERG_Bedside_table_with_1_drawe_with_shelf_white_53x43x69cm/resource/img/04215496bc65712bfecf4259cc2c109b.png new file mode 100755 index 0000000000000000000000000000000000000000..582ee37e778bb9acd68576cdbaa98c68732c7892 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GULLABERG_Bedside_table_with_1_drawe_with_shelf_white_53x43x69cm/resource/img/04215496bc65712bfecf4259cc2c109b.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05ee16e2c75fe94c47d1eb978a115279ffeef44024d6b30b5f88b21d71812e14 +size 145501 diff --git a/Articulated_objects/Ikea_furniture/GULLABERG_Bedside_table_with_1_drawe_with_shelf_white_53x43x69cm/resource/material.usd b/Articulated_objects/Ikea_furniture/GULLABERG_Bedside_table_with_1_drawe_with_shelf_white_53x43x69cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..c5d52844a30af751aa31e4e123acccf35b053901 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GULLABERG_Bedside_table_with_1_drawe_with_shelf_white_53x43x69cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:69e292c312849a0e60e534914662f2f30d45497acf770490162410e215f6498a +size 2019 diff --git a/Articulated_objects/Ikea_furniture/GULLABERG_Bedside_table_with_1_drawe_with_shelf_white_53x43x69cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/GULLABERG_Bedside_table_with_1_drawe_with_shelf_white_53x43x69cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..bc101aacfacf1a59a0288ffba0f52300485d1b36 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GULLABERG_Bedside_table_with_1_drawe_with_shelf_white_53x43x69cm/resource/v_69323/element_path.json @@ -0,0 +1,7 @@ +{ + "4": "/root/E_drawer_4", + "11": "/root/E_drawer_4/E_handle_11", + "3": "/root/E_GULLABERG_Bedside_table_with_1_drawe_with_shelf_white_53x43x69cm_3", + "7": "/root/E_GULLABERG_Bedside_table_with_1_drawe_with_shelf_white_53x43x69cm_3/E_part1_7", + "9": "/root/E_GULLABERG_Bedside_table_with_1_drawe_with_shelf_white_53x43x69cm_3/E_tabletop_9" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/GULLABERG_Bedside_table_with_1_drawe_with_shelf_white_53x43x69cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/GULLABERG_Bedside_table_with_1_drawe_with_shelf_white_53x43x69cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..61b3b9c08164c7b345b4cad88ecd53d3f970e0d1 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GULLABERG_Bedside_table_with_1_drawe_with_shelf_white_53x43x69cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d1942e9704a8395a0a990d4c1e5dc9caf2f866715ac4f1a1821a53c701ddc7e4 +size 1182302 diff --git a/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_2_compartments_grey_88x30x122cm/model_GULLABERG_Shoe_cabinet_with_2_compartments_grey_88x30x122cm.usd b/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_2_compartments_grey_88x30x122cm/model_GULLABERG_Shoe_cabinet_with_2_compartments_grey_88x30x122cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..a8a4886a9f0deca293fb610408cd046c175b2a74 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_2_compartments_grey_88x30x122cm/model_GULLABERG_Shoe_cabinet_with_2_compartments_grey_88x30x122cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0337f6219afa75cc4021fdc59b8b2dd73b6182cef1312f80cbed37a736a8a48 +size 19765 diff --git a/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_2_compartments_grey_88x30x122cm/resource/img/3b506795919bdcd7a1640b5276df757a.png b/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_2_compartments_grey_88x30x122cm/resource/img/3b506795919bdcd7a1640b5276df757a.png new file mode 100755 index 0000000000000000000000000000000000000000..895f565a4b3523f2b60972a500833ba44111ebfa --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_2_compartments_grey_88x30x122cm/resource/img/3b506795919bdcd7a1640b5276df757a.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d1c9d04423ea92e61eff82cf6958439d6ff818a3cb55567bc74f0d834e0f7553 +size 218837 diff --git a/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_2_compartments_grey_88x30x122cm/resource/img/a2f97d952ef97a57446e1b66075581d8.png b/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_2_compartments_grey_88x30x122cm/resource/img/a2f97d952ef97a57446e1b66075581d8.png new file mode 100755 index 0000000000000000000000000000000000000000..41026cb7e263dc3ed54b199fdfb9f544d0450c01 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_2_compartments_grey_88x30x122cm/resource/img/a2f97d952ef97a57446e1b66075581d8.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3226e925512b76c105c400360f957a774cfa117eda596c7f105ef97a0affe73 +size 9904 diff --git a/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_2_compartments_grey_88x30x122cm/resource/img/f7942a88145189d2526a747354f1999b.png b/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_2_compartments_grey_88x30x122cm/resource/img/f7942a88145189d2526a747354f1999b.png new file mode 100755 index 0000000000000000000000000000000000000000..625fc5732520b2775f0ecb261849eab583f5e511 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_2_compartments_grey_88x30x122cm/resource/img/f7942a88145189d2526a747354f1999b.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45a2d55d7f8e0e4a088a9e3640b2ec7489a7ebfcf3b1db1bb9ac0f527b8ce182 +size 114891 diff --git a/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_2_compartments_grey_88x30x122cm/resource/material.usd b/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_2_compartments_grey_88x30x122cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..1f99ffb3ba53693c200a7ed48b58b9d2faaef6f2 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_2_compartments_grey_88x30x122cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a4969857a0198462fbed956963930ffe2cfc3d977b3b40496e25fb59aa66d8d2 +size 2559 diff --git a/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_2_compartments_grey_88x30x122cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_2_compartments_grey_88x30x122cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..908ef0202fa7a4b434d985b857fa2416d7d09623 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_2_compartments_grey_88x30x122cm/resource/v_69323/element_path.json @@ -0,0 +1,27 @@ +{ + "8": "/root/E_GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm_8", + "101": "/root/E_GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm_8/E_part1_101", + "102": "/root/E_GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm_8/E_part2_102", + "103": "/root/E_GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm_8/E_part4_103", + "104": "/root/E_GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm_8/E_part3_104", + "18": "/root/E_drawer1_18", + "18Geo": "/root/E_drawer1_18/E_drawer1_18Geo", + "20": "/root/E_drawer1_18/E_part1_1_20", + "51": "/root/E_drawer2_51", + "50": "/root/E_drawer2_51/E_part2_1_50", + "51Geo": "/root/E_drawer2_51/E_drawer2_51Geo", + "73": "/root/E_drawer3_73", + "73Geo": "/root/E_drawer3_73/E_drawer3_73Geo", + "79": "/root/E_drawer4_79", + "79Geo": "/root/E_drawer4_79/E_drawer4_79Geo", + "81": "/root/E_drawer1_18/E_handle_81", + "83": "/root/E_drawer1_18/E_handle_83", + "84": "/root/E_drawer2_51/E_handle_84", + "85": "/root/E_drawer2_51/E_handle_85", + "89": "/root/E_drawer4_79/E_handle_89", + "8Geo": "/root/E_GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm_8/E_GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm_8Geo", + "90": "/root/E_drawer3_73/E_handle_90", + "91": "/root/E_GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm_8/E_tabletop_91", + "92": "/root/E_drawer2_51/E_part2_2_92", + "93": "/root/E_drawer1_18/E_part1_2_93" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_2_compartments_grey_88x30x122cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_2_compartments_grey_88x30x122cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..277422ad3ed2743dbc2e862efe4dda84c9df2cee --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_2_compartments_grey_88x30x122cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b7bf414f6587840ac8cf21ddf5d6610666799a48b2d58ab7392ce400d7d8097a +size 5871144 diff --git a/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm/model_GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm.usd b/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm/model_GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..2deb4fa492b5ff07230cb407afd8736f65865308 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm/model_GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:42f9e4bce7d56d077f78f7e33eb86beca82154bce3c35c85cd2704b6815f541e +size 13492 diff --git a/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm/resource/img/a2f97d952ef97a57446e1b66075581d8.png b/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm/resource/img/a2f97d952ef97a57446e1b66075581d8.png new file mode 100755 index 0000000000000000000000000000000000000000..41026cb7e263dc3ed54b199fdfb9f544d0450c01 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm/resource/img/a2f97d952ef97a57446e1b66075581d8.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3226e925512b76c105c400360f957a774cfa117eda596c7f105ef97a0affe73 +size 9904 diff --git a/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm/resource/img/d3abc2cf3d352204b76f860fabfd3a0b.png b/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm/resource/img/d3abc2cf3d352204b76f860fabfd3a0b.png new file mode 100755 index 0000000000000000000000000000000000000000..f62e8e20e2b8f69b7fc824b3d13f2a0daafe7d40 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm/resource/img/d3abc2cf3d352204b76f860fabfd3a0b.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:25f88f7505857cc334da36553e332b7377e21b626c2f3c30720f61f906dcb102 +size 90432 diff --git a/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm/resource/material.usd b/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..5f972d5b4bccd74ea081c70b439fb00f974e89ed --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4b88273f4548fc4839e10ae56acb37927c628ae871b30dd6b97ee42de3cfb48 +size 2292 diff --git a/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..55f3b6c259321e6beeb7895d1b4629efe653ad6f --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm/resource/v_69323/element_path.json @@ -0,0 +1,25 @@ +{ + "11": "/root/E_GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm_11", + "11Geo": "/root/E_GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm_11/E_GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm_11Geo", + "33": "/root/E_drawer4_33", + "18": "/root/E_drawer4_33/E_handle_18", + "19": "/root/E_drawer4_33/E_part4_1_19", + "31": "/root/E_drawer4_33/E_part4_2_31", + "33Geo": "/root/E_drawer4_33/E_drawer4_33Geo", + "34": "/root/E_drawer3_34", + "34Geo": "/root/E_drawer3_34/E_drawer3_34Geo", + "35": "/root/E_drawer3_34/E_part3_2_35", + "36": "/root/E_drawer3_34/E_part3_1_36", + "37": "/root/E_drawer3_34/E_handle_37", + "40": "/root/E_drawer1_40", + "40Geo": "/root/E_drawer1_40/E_drawer1_40Geo", + "41": "/root/E_drawer2_41", + "41Geo": "/root/E_drawer2_41/E_drawer2_41Geo", + "44": "/root/E_drawer1_40/E_part1_2_44", + "45": "/root/E_drawer2_41/E_part2_2_45", + "46": "/root/E_drawer1_40/E_part1_1_46", + "47": "/root/E_drawer2_41/E_part2_1_47", + "48": "/root/E_drawer1_40/E_handle_48", + "49": "/root/E_drawer2_41/E_handle_49", + "51": "/root/E_GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm_11/E_tabletop_51" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..b2fb86db8b352849785c672c537add79d2c092b7 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GULLABERG_Shoe_cabinet_with_4_compartments_grey_105x22x107cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b1f4df31ad6b1b1dbe9d75afc25abfdba377f67bcb0d9c1380e8f3aa1517abb +size 3062927 diff --git a/Articulated_objects/Ikea_furniture/GULLABERG_chest_of_8_drawers_ grey_anchor_unlock_function_ 89x48x122cm/model_GULLABERG_chest_of_8_drawers_ grey_anchor_unlock_function_ 89x48x122cm.usd b/Articulated_objects/Ikea_furniture/GULLABERG_chest_of_8_drawers_ grey_anchor_unlock_function_ 89x48x122cm/model_GULLABERG_chest_of_8_drawers_ grey_anchor_unlock_function_ 89x48x122cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..eab9333f0a38abd61c2f9005fd9ec1d413038cb0 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GULLABERG_chest_of_8_drawers_ grey_anchor_unlock_function_ 89x48x122cm/model_GULLABERG_chest_of_8_drawers_ grey_anchor_unlock_function_ 89x48x122cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8a5ba52e924255f9d25b89ae8e35ab55ffa475b65e069ff10742bf58e5b6885 +size 18502 diff --git a/Articulated_objects/Ikea_furniture/GULLABERG_chest_of_8_drawers_ grey_anchor_unlock_function_ 89x48x122cm/resource/img/33b9580360907031968c1991686a12e7.png b/Articulated_objects/Ikea_furniture/GULLABERG_chest_of_8_drawers_ grey_anchor_unlock_function_ 89x48x122cm/resource/img/33b9580360907031968c1991686a12e7.png new file mode 100755 index 0000000000000000000000000000000000000000..c94e450d361be10ae57075740266eba7ce08a396 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GULLABERG_chest_of_8_drawers_ grey_anchor_unlock_function_ 89x48x122cm/resource/img/33b9580360907031968c1991686a12e7.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c1c2fc042156f0194be2aee4f0f014e7f1d8f8aceac325458e0112d84c00ec1a +size 16535 diff --git a/Articulated_objects/Ikea_furniture/GULLABERG_chest_of_8_drawers_ grey_anchor_unlock_function_ 89x48x122cm/resource/img/42eb3107ffd1225cac7a723fb1c7506c.png b/Articulated_objects/Ikea_furniture/GULLABERG_chest_of_8_drawers_ grey_anchor_unlock_function_ 89x48x122cm/resource/img/42eb3107ffd1225cac7a723fb1c7506c.png new file mode 100755 index 0000000000000000000000000000000000000000..d2f452ac9af80a54315d955c73e5db2f1eedf4a4 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GULLABERG_chest_of_8_drawers_ grey_anchor_unlock_function_ 89x48x122cm/resource/img/42eb3107ffd1225cac7a723fb1c7506c.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ada0e384253481d2e071d7c6bd892b098cdf09e9a71c2e958506c497f1fe2af4 +size 52303 diff --git a/Articulated_objects/Ikea_furniture/GULLABERG_chest_of_8_drawers_ grey_anchor_unlock_function_ 89x48x122cm/resource/img/effdfaad612583405524cadfa6cd919c.png b/Articulated_objects/Ikea_furniture/GULLABERG_chest_of_8_drawers_ grey_anchor_unlock_function_ 89x48x122cm/resource/img/effdfaad612583405524cadfa6cd919c.png new file mode 100755 index 0000000000000000000000000000000000000000..3f30390759902a066b40f30a9c34392f635ad3e4 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GULLABERG_chest_of_8_drawers_ grey_anchor_unlock_function_ 89x48x122cm/resource/img/effdfaad612583405524cadfa6cd919c.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:864b4dcc9ffabfa152c6b8093b85891f6c2b6b9f052bac11526a826cd86e7117 +size 17142 diff --git a/Articulated_objects/Ikea_furniture/GULLABERG_chest_of_8_drawers_ grey_anchor_unlock_function_ 89x48x122cm/resource/material.usd b/Articulated_objects/Ikea_furniture/GULLABERG_chest_of_8_drawers_ grey_anchor_unlock_function_ 89x48x122cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..0179866bcf79b2e94b28f438df50c262a887a0a4 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GULLABERG_chest_of_8_drawers_ grey_anchor_unlock_function_ 89x48x122cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d33927533d3af63da32b5294c4eac1b31d236abf9261ff8c1cd9ceb93d78ccd +size 2559 diff --git a/Articulated_objects/Ikea_furniture/GULLABERG_chest_of_8_drawers_ grey_anchor_unlock_function_ 89x48x122cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/GULLABERG_chest_of_8_drawers_ grey_anchor_unlock_function_ 89x48x122cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..09e8c9a83fe8db1124d9e8bd7472994baa73dbf3 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GULLABERG_chest_of_8_drawers_ grey_anchor_unlock_function_ 89x48x122cm/resource/v_69323/element_path.json @@ -0,0 +1,20 @@ +{ + "13": "/root/E_drawer2_13", + "18": "/root/E_drawer1_18", + "19": "/root/E_drawer3_19", + "26": "/root/E_drawer5_26", + "27": "/root/E_drawer7_27", + "28": "/root/E_drawer8_28", + "32": "/root/E_GULLABERG_chest_of_8_drawers_grey_anchor_unlock_function_89x48x122cm_32", + "37": "/root/E_drawer4_37", + "47": "/root/E_GULLABERG_chest_of_8_drawers_grey_anchor_unlock_function_89x48x122cm_32/E_tabletop_47", + "48": "/root/E_drawer2_13/E_handle_48", + "49": "/root/E_drawer1_18/E_handle_49", + "50": "/root/E_drawer4_37/E_handle_50", + "51": "/root/E_drawer3_19/E_handle_51", + "52": "/root/E_drawer5_26/E_handle_52", + "7": "/root/E_drawer6_7", + "53": "/root/E_drawer6_7/E_handle_53", + "54": "/root/E_drawer7_27/E_handle_54", + "55": "/root/E_drawer8_28/E_handle_55" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/GULLABERG_chest_of_8_drawers_ grey_anchor_unlock_function_ 89x48x122cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/GULLABERG_chest_of_8_drawers_ grey_anchor_unlock_function_ 89x48x122cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..9b6a2b6c14ef42408a64018ec2109bb1c8ed90f2 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/GULLABERG_chest_of_8_drawers_ grey_anchor_unlock_function_ 89x48x122cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c8be7d11af34af3a87a804edacd850098e005421788d2ac1db0b1d743bf358f4 +size 417141 diff --git a/Articulated_objects/Ikea_furniture/HAUGA_chest_of_3_drawers_ beige_70x46x84cm/model_HAUGA_chest_of_3_drawers_ beige_70x46x84cm.usd b/Articulated_objects/Ikea_furniture/HAUGA_chest_of_3_drawers_ beige_70x46x84cm/model_HAUGA_chest_of_3_drawers_ beige_70x46x84cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..6c80965f7e4ec3dd1c11656bdd271e3c9d89ce7b --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HAUGA_chest_of_3_drawers_ beige_70x46x84cm/model_HAUGA_chest_of_3_drawers_ beige_70x46x84cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:992273f82a8fad19fa15428573e2a2a76553bfb06874b6e27b620075c23a6882 +size 14785 diff --git a/Articulated_objects/Ikea_furniture/HAUGA_chest_of_3_drawers_ beige_70x46x84cm/resource/img/effdfaad612583405524cadfa6cd919c.png b/Articulated_objects/Ikea_furniture/HAUGA_chest_of_3_drawers_ beige_70x46x84cm/resource/img/effdfaad612583405524cadfa6cd919c.png new file mode 100755 index 0000000000000000000000000000000000000000..052de6956da33e4d27bacb070781a91d436d4e2a --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HAUGA_chest_of_3_drawers_ beige_70x46x84cm/resource/img/effdfaad612583405524cadfa6cd919c.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:721cf08d85821603eaeedadadd9b34c007d64874db190703912a0176d9882411 +size 47169 diff --git a/Articulated_objects/Ikea_furniture/HAUGA_chest_of_3_drawers_ beige_70x46x84cm/resource/material.usd b/Articulated_objects/Ikea_furniture/HAUGA_chest_of_3_drawers_ beige_70x46x84cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..21a68b90edd066507741751d85d032b2e6601784 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HAUGA_chest_of_3_drawers_ beige_70x46x84cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea5adf185c2f02d666e1d6218c3c477d586160745bdc6629c23d10efbc5b2e54 +size 2125 diff --git a/Articulated_objects/Ikea_furniture/HAUGA_chest_of_3_drawers_ beige_70x46x84cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/HAUGA_chest_of_3_drawers_ beige_70x46x84cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..5341ae9dcd1ccaf3a2e3f2643f455ed0f5de7ab5 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HAUGA_chest_of_3_drawers_ beige_70x46x84cm/resource/v_69323/element_path.json @@ -0,0 +1,14 @@ +{ + "40": "/root/E_drawer1_40", + "29": "/root/E_drawer1_40/E_handle1_2_29", + "44": "/root/E_drawer2_44", + "45": "/root/E_drawer2_44/E_handle2_2_45", + "46": "/root/E_drawer3_46", + "47": "/root/E_drawer3_46/E_handle3_2_47", + "6": "/root/E_HAUGA_chest_of_3_drawers_beige_70x46x84cm_6", + "5": "/root/E_HAUGA_chest_of_3_drawers_beige_70x46x84cm_6/E_part1_5", + "57": "/root/E_HAUGA_chest_of_3_drawers_beige_70x46x84cm_6/E_tabletop_57", + "58": "/root/E_drawer3_46/E_handle3_1_58", + "59": "/root/E_drawer2_44/E_handle2_1_59", + "60": "/root/E_drawer1_40/E_handle1_1_60" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/HAUGA_chest_of_3_drawers_ beige_70x46x84cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/HAUGA_chest_of_3_drawers_ beige_70x46x84cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..edeabca55d176dc516f24d264f5d5018b704cc12 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HAUGA_chest_of_3_drawers_ beige_70x46x84cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:18e37e9af290c96716fdff47ac637a27915a9b82b48042a89bc154081d78b6a4 +size 214225 diff --git a/Articulated_objects/Ikea_furniture/HAUGA_wardrobe_with_sliding_doors_beige_118x55x199cm/model_HAUGA_wardrobe_with_sliding_doors_beige_118x55x199cm(1).usd b/Articulated_objects/Ikea_furniture/HAUGA_wardrobe_with_sliding_doors_beige_118x55x199cm/model_HAUGA_wardrobe_with_sliding_doors_beige_118x55x199cm(1).usd new file mode 100755 index 0000000000000000000000000000000000000000..49570280bc9a09fc8b5e2df64f44a1042cf3ff13 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HAUGA_wardrobe_with_sliding_doors_beige_118x55x199cm/model_HAUGA_wardrobe_with_sliding_doors_beige_118x55x199cm(1).usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a83c457988a2fe31505f4bf4101a4463d6205192617f5a05c52b28a9e2e1af4 +size 14444 diff --git a/Articulated_objects/Ikea_furniture/HAUGA_wardrobe_with_sliding_doors_beige_118x55x199cm/resource/img/effdfaad612583405524cadfa6cd919c.png b/Articulated_objects/Ikea_furniture/HAUGA_wardrobe_with_sliding_doors_beige_118x55x199cm/resource/img/effdfaad612583405524cadfa6cd919c.png new file mode 100755 index 0000000000000000000000000000000000000000..522ca208482ed628486cab310706233d90f16826 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HAUGA_wardrobe_with_sliding_doors_beige_118x55x199cm/resource/img/effdfaad612583405524cadfa6cd919c.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db8fffb8bb8ede7f56ef241e730dabae62db253bdc80440e094c64bf54bd4526 +size 76606 diff --git a/Articulated_objects/Ikea_furniture/HAUGA_wardrobe_with_sliding_doors_beige_118x55x199cm/resource/material.usd b/Articulated_objects/Ikea_furniture/HAUGA_wardrobe_with_sliding_doors_beige_118x55x199cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..1442e83ad6c38c71b1221bcbfb62e6869372476e --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HAUGA_wardrobe_with_sliding_doors_beige_118x55x199cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96093afd44d30361a701ef50b5a3842d7269ee4c9ebc8071dbdb4fc8dbbf1c12 +size 2019 diff --git a/Articulated_objects/Ikea_furniture/HAUGA_wardrobe_with_sliding_doors_beige_118x55x199cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/HAUGA_wardrobe_with_sliding_doors_beige_118x55x199cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..d9b031cb16e8425fbb6aa5100c81a0e3d44b3b3f --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HAUGA_wardrobe_with_sliding_doors_beige_118x55x199cm/resource/v_69323/element_path.json @@ -0,0 +1,18 @@ +{ + "1": "/root/E_door1_1", + "18": "/root/E_door2_18", + "23": "/root/E_door2_18/E_part2_5_23", + "29": "/root/E_door2_18/E_part2_4_29", + "31": "/root/E_door2_18/E_part2_3_31", + "33": "/root/E_door2_18/E_part2_2_33", + "36": "/root/E_door1_1/E_part1_4_36", + "38": "/root/E_door1_1/E_part1_3_38", + "4": "/root/E_HAUGA_wardrobe_with_sliding_doors_beige_118x55x199cm_4", + "40": "/root/E_door1_1/E_part1_2_40", + "42": "/root/E_door1_1/E_part1_1_42", + "44": "/root/E_door1_1/E_handle_44", + "45": "/root/E_door2_18/E_handle_45", + "52": "/root/E_HAUGA_wardrobe_with_sliding_doors_beige_118x55x199cm_4/E_shelf_52", + "53": "/root/E_HAUGA_wardrobe_with_sliding_doors_beige_118x55x199cm_4/E_shelf_53", + "8": "/root/E_HAUGA_wardrobe_with_sliding_doors_beige_118x55x199cm_4/E_pole_8" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/HAUGA_wardrobe_with_sliding_doors_beige_118x55x199cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/HAUGA_wardrobe_with_sliding_doors_beige_118x55x199cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..a39268a65e3ba137912fc54505aecb5bc6daae17 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HAUGA_wardrobe_with_sliding_doors_beige_118x55x199cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60501d49d56dcfe0f0e042f9b02778179afa04fa8cc4f87a5a71f12ee913ddef +size 817564 diff --git a/Articulated_objects/Ikea_furniture/HAVSTA_Cabinet_with_plinth_white_81x47x89cm/model_HAVSTA_Cabinet_with_plinth_white_81x47x89cm(1).usd b/Articulated_objects/Ikea_furniture/HAVSTA_Cabinet_with_plinth_white_81x47x89cm/model_HAVSTA_Cabinet_with_plinth_white_81x47x89cm(1).usd new file mode 100755 index 0000000000000000000000000000000000000000..bdc650c4b54cc680b868486f92293a51d9827a48 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HAVSTA_Cabinet_with_plinth_white_81x47x89cm/model_HAVSTA_Cabinet_with_plinth_white_81x47x89cm(1).usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:272813b5b37bfbd0692469124a94fa193d5dfda1ac28474053472df87e6c6299 +size 16754 diff --git a/Articulated_objects/Ikea_furniture/HAVSTA_Cabinet_with_plinth_white_81x47x89cm/resource/img/3071eb2e0fabf2a4b7f303e0e5e64309.png b/Articulated_objects/Ikea_furniture/HAVSTA_Cabinet_with_plinth_white_81x47x89cm/resource/img/3071eb2e0fabf2a4b7f303e0e5e64309.png new file mode 100755 index 0000000000000000000000000000000000000000..0604eefcdc5e7c76cbc20321aab17e4fa4d7c4ea --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HAVSTA_Cabinet_with_plinth_white_81x47x89cm/resource/img/3071eb2e0fabf2a4b7f303e0e5e64309.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d51c82518e4993f0cfa86bc0e70b40f3ea3a8edef51ba03148503913851b407 +size 5750326 diff --git a/Articulated_objects/Ikea_furniture/HAVSTA_Cabinet_with_plinth_white_81x47x89cm/resource/img/7c5f46f55a6d85d83bf84cb21febef70.png b/Articulated_objects/Ikea_furniture/HAVSTA_Cabinet_with_plinth_white_81x47x89cm/resource/img/7c5f46f55a6d85d83bf84cb21febef70.png new file mode 100755 index 0000000000000000000000000000000000000000..2c1cc9298d2c8fc0f6efc0402401d1d17eff944e --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HAVSTA_Cabinet_with_plinth_white_81x47x89cm/resource/img/7c5f46f55a6d85d83bf84cb21febef70.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5173e984901879f1f6d91ec4f72753ef410084bace4760873825cac6fbbd0c2f +size 158802 diff --git a/Articulated_objects/Ikea_furniture/HAVSTA_Cabinet_with_plinth_white_81x47x89cm/resource/img/c4c60eacf294a98bb60035a683d785b2.png b/Articulated_objects/Ikea_furniture/HAVSTA_Cabinet_with_plinth_white_81x47x89cm/resource/img/c4c60eacf294a98bb60035a683d785b2.png new file mode 100755 index 0000000000000000000000000000000000000000..1a7ceab3814d59e921f187808be0955db9481504 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HAVSTA_Cabinet_with_plinth_white_81x47x89cm/resource/img/c4c60eacf294a98bb60035a683d785b2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:30a74caaf505452416aa4b9a3121e0e83016af24c4f2fd987860f037febff9ff +size 56413 diff --git a/Articulated_objects/Ikea_furniture/HAVSTA_Cabinet_with_plinth_white_81x47x89cm/resource/img/effdfaad612583405524cadfa6cd919c.png b/Articulated_objects/Ikea_furniture/HAVSTA_Cabinet_with_plinth_white_81x47x89cm/resource/img/effdfaad612583405524cadfa6cd919c.png new file mode 100755 index 0000000000000000000000000000000000000000..661424b6f4dcec96531af0a23e0cda1b2675d3ef --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HAVSTA_Cabinet_with_plinth_white_81x47x89cm/resource/img/effdfaad612583405524cadfa6cd919c.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:79e6c71ab6f31af060ff7a711e5343587d3383f2d48a695715b292d8bbdfb93c +size 6747 diff --git a/Articulated_objects/Ikea_furniture/HAVSTA_Cabinet_with_plinth_white_81x47x89cm/resource/material.usd b/Articulated_objects/Ikea_furniture/HAVSTA_Cabinet_with_plinth_white_81x47x89cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..90be18790de37d317ed55784a3c2f2c9f9806f35 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HAVSTA_Cabinet_with_plinth_white_81x47x89cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c05494ffc994236b556b583a5344522d596cabf7222c6af26c9f312d322847b0 +size 2812 diff --git a/Articulated_objects/Ikea_furniture/HAVSTA_Cabinet_with_plinth_white_81x47x89cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/HAVSTA_Cabinet_with_plinth_white_81x47x89cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..de9e7543f50c50c0b7ddb104898fb7e736df1020 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HAVSTA_Cabinet_with_plinth_white_81x47x89cm/resource/v_69323/element_path.json @@ -0,0 +1,15 @@ +{ + "28": "/root/E_HAVSTA_Cabinet_with_plinth_white_81x47x89cm_28", + "10": "/root/E_HAVSTA_Cabinet_with_plinth_white_81x47x89cm_28/E_shelf_10", + "28Geo": "/root/E_HAVSTA_Cabinet_with_plinth_white_81x47x89cm_28/E_HAVSTA_Cabinet_with_plinth_white_81x47x89cm_28Geo", + "3": "/root/E_door1_3", + "3Geo": "/root/E_door1_3/E_door1_3Geo", + "42": "/root/E_door1_3/E_handle_42", + "50": "/root/E_door2_50", + "45": "/root/E_door2_50/E_handle_45", + "46": "/root/E_HAVSTA_Cabinet_with_plinth_white_81x47x89cm_28/E_tabletop_46", + "47": "/root/E_HAVSTA_Cabinet_with_plinth_white_81x47x89cm_28/E_part3_47", + "48": "/root/E_HAVSTA_Cabinet_with_plinth_white_81x47x89cm_28/E_part2_48", + "49": "/root/E_HAVSTA_Cabinet_with_plinth_white_81x47x89cm_28/E_part1_49", + "50Geo": "/root/E_door2_50/E_door2_50Geo" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/HAVSTA_Cabinet_with_plinth_white_81x47x89cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/HAVSTA_Cabinet_with_plinth_white_81x47x89cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..b88abe7dd7fbd401b87c3dd00397bec20f2586ac --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HAVSTA_Cabinet_with_plinth_white_81x47x89cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:887c6c3a50b0093886b199740b8f519793fa8806089bf0b082a224900b14f26b +size 299634 diff --git a/Articulated_objects/Ikea_furniture/HAVSTA_chest_of_6_drawers_ white_121x47x89cm/model_HAVSTA_chest_of_6_drawers_ white_121x47x89cm.usd b/Articulated_objects/Ikea_furniture/HAVSTA_chest_of_6_drawers_ white_121x47x89cm/model_HAVSTA_chest_of_6_drawers_ white_121x47x89cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..a356041927ed0c90cd55774bab98bf2cd3a3f42c --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HAVSTA_chest_of_6_drawers_ white_121x47x89cm/model_HAVSTA_chest_of_6_drawers_ white_121x47x89cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eda9d6b8c7e3c8aaef7d13866ce84c925bea376c121617296b631b5a16b032b2 +size 19542 diff --git a/Articulated_objects/Ikea_furniture/HAVSTA_chest_of_6_drawers_ white_121x47x89cm/resource/img/083e82730e2f6f4fd4aacbe5a9e54f87.png b/Articulated_objects/Ikea_furniture/HAVSTA_chest_of_6_drawers_ white_121x47x89cm/resource/img/083e82730e2f6f4fd4aacbe5a9e54f87.png new file mode 100755 index 0000000000000000000000000000000000000000..d385ada26c3b9ea108133dbd13881973031718b9 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HAVSTA_chest_of_6_drawers_ white_121x47x89cm/resource/img/083e82730e2f6f4fd4aacbe5a9e54f87.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:46930dae6a0f26fca048f8a6de7a227b4f074db7c2b3accaf6d1a225ae8cba0a +size 33280 diff --git a/Articulated_objects/Ikea_furniture/HAVSTA_chest_of_6_drawers_ white_121x47x89cm/resource/img/0d7761c1dc48f446cd4db2b361b541f8.png b/Articulated_objects/Ikea_furniture/HAVSTA_chest_of_6_drawers_ white_121x47x89cm/resource/img/0d7761c1dc48f446cd4db2b361b541f8.png new file mode 100755 index 0000000000000000000000000000000000000000..1e867be87eb4765f997f97c0d4deec914625adcc --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HAVSTA_chest_of_6_drawers_ white_121x47x89cm/resource/img/0d7761c1dc48f446cd4db2b361b541f8.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d261c3470964ebaca507c036b2ec06997d52b65ec21785f0cfc416badb0b011 +size 231142 diff --git a/Articulated_objects/Ikea_furniture/HAVSTA_chest_of_6_drawers_ white_121x47x89cm/resource/img/40b18267f4b2aa3879cc6f5ff92c92ae.png b/Articulated_objects/Ikea_furniture/HAVSTA_chest_of_6_drawers_ white_121x47x89cm/resource/img/40b18267f4b2aa3879cc6f5ff92c92ae.png new file mode 100755 index 0000000000000000000000000000000000000000..2be8ee7c024b455fc5856868751e7b1ee4c3af51 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HAVSTA_chest_of_6_drawers_ white_121x47x89cm/resource/img/40b18267f4b2aa3879cc6f5ff92c92ae.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b419827ee710842b4aa5e6899c87b07acc0975f30978cef6d8bafdb4102c110a +size 28416 diff --git a/Articulated_objects/Ikea_furniture/HAVSTA_chest_of_6_drawers_ white_121x47x89cm/resource/material.usd b/Articulated_objects/Ikea_furniture/HAVSTA_chest_of_6_drawers_ white_121x47x89cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..e2eb8b56b18a36142efd5d462eef062f2b123c8b --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HAVSTA_chest_of_6_drawers_ white_121x47x89cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d04d0f755a04eac545df084b2e43ba41a0a7040e54140ecb077cab185e8dfa2 +size 2560 diff --git a/Articulated_objects/Ikea_furniture/HAVSTA_chest_of_6_drawers_ white_121x47x89cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/HAVSTA_chest_of_6_drawers_ white_121x47x89cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..5e3d33c0a7c1ac96ab6ee868207882e830f39c63 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HAVSTA_chest_of_6_drawers_ white_121x47x89cm/resource/v_69323/element_path.json @@ -0,0 +1,22 @@ +{ + "16": "/root/E_GULLABERG_chest_of_8_drawers_grey_anchor_unlock_function_89x48x122cm_16", + "43": "/root/E_drawer01_43", + "32": "/root/E_drawer01_43/E_part1_1_32", + "33": "/root/E_drawer01_43/E_handle_33", + "48": "/root/E_drawer03_48", + "34": "/root/E_drawer03_48/E_part3_1_34", + "36": "/root/E_drawer03_48/E_handle_36", + "44": "/root/E_drawer02_44", + "45": "/root/E_drawer02_44/E_handle_45", + "46": "/root/E_drawer02_44/E_part2_1_46", + "53": "/root/E_drawer04_53", + "52": "/root/E_drawer04_53/E_handle_52", + "54": "/root/E_drawer04_53/E_part4_1_54", + "57": "/root/E_drawer05_57", + "55": "/root/E_drawer05_57/E_handle_55", + "59": "/root/E_drawer06_59", + "56": "/root/E_drawer06_59/E_handle_56", + "58": "/root/E_drawer05_57/E_part5_1_58", + "60": "/root/E_drawer06_59/E_part6_1_60", + "61": "/root/E_GULLABERG_chest_of_8_drawers_grey_anchor_unlock_function_89x48x122cm_16/E_tabletop_61" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/HAVSTA_chest_of_6_drawers_ white_121x47x89cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/HAVSTA_chest_of_6_drawers_ white_121x47x89cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..c668f1022fcceca831d48c4765d6ac871347e9c3 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HAVSTA_chest_of_6_drawers_ white_121x47x89cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:25581bc042d78f2239b328abadb0728be5cea36e4467db802d41b21045a7f011 +size 234217 diff --git a/Articulated_objects/Ikea_furniture/HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm/.collect.mapping.json b/Articulated_objects/Ikea_furniture/HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm/.collect.mapping.json new file mode 100755 index 0000000000000000000000000000000000000000..63f4dcf3e92106a2fbf7eb4a3cef6adf69790d63 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm/.collect.mapping.json @@ -0,0 +1,29 @@ +{ + "version": "1.0", + "file_records": [ + { + "source_url": "C:/xufang/USD Room/IKEA/Three/HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm/model_HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm.usd", + "source_hash": "e52672822c9755e25ba730c0b3921ebe1c720312", + "target_url": "./model_HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm.usd", + "target_hash": "50cd1729116bcf84d8296b414eaab7d6e1748c63" + }, + { + "source_url": "C:/NVIDIA/Materials/2023_1/Base/Glass/Clear_Glass.mdl", + "source_hash": "4f0a8491bb73517be6b84a9bb9abd025e2b1d06c", + "target_url": "./NVIDIA/Materials/2023_1/Base/Glass/Clear_Glass.mdl", + "target_hash": "d857149f2b9d159a6c1157cc5bf24259fa3f1497" + }, + { + "source_url": "C:/xufang/USD Room/IKEA/Three/HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm/resource/img/548d21aeb790a28d50504f6022ea198d.png", + "source_hash": "636c5b9c3dcf7b38b02250ab3ae31f4d151d169d", + "target_url": "./resource/img/548d21aeb790a28d50504f6022ea198d.png", + "target_hash": "636c5b9c3dcf7b38b02250ab3ae31f4d151d169d" + }, + { + "source_url": "C:/xufang/USD Room/IKEA/Three/HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm/resource/img/b017a1da92c9ae50717b3f3240e4edce.png", + "source_hash": "2012147787b48a723e7052aacc27d228c94db87c", + "target_url": "./resource/img/b017a1da92c9ae50717b3f3240e4edce.png", + "target_hash": "2012147787b48a723e7052aacc27d228c94db87c" + } + ] +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm/NVIDIA/Materials/2023_1/Base/Glass/Clear_Glass.mdl b/Articulated_objects/Ikea_furniture/HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm/NVIDIA/Materials/2023_1/Base/Glass/Clear_Glass.mdl new file mode 100755 index 0000000000000000000000000000000000000000..d6c08a66ec3d6465474bf1e93968a42c369059a1 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm/NVIDIA/Materials/2023_1/Base/Glass/Clear_Glass.mdl @@ -0,0 +1,43 @@ +mdl 1.3; + +import ::OmniGlass::OmniGlass; +import ::tex::gamma_mode; +import ::state::normal; + +export material Clear_Glass(*) + = OmniGlass::OmniGlass( + absorption_coeff: color(1.f, 1.f, 1.f), + glass_color: color(1.f, 1.f, 1.f), + use_glass_color_texture: false, + glass_color_texture: texture_2d(), + frosting_roughness: 0.f, + glass_ior: 1.52f, + thin_walled: true, + project_uvw: false, + world_or_object: false, + uv_space_index: 0, + texture_translate: float2(0.f), + texture_rotate: 0.f, + texture_scale: float2(1.f)); + +/* +mdl 1.5; + +import ::Library::AEC::Materials::Templates::GlassWithVolume::GlassWithVolume; +import ::tex::gamma_mode; +import ::state::normal; + +export material Clear_Glass(*) + = ::Library::AEC::Materials::Templates::GlassWithVolume::GlassWithVolume( + thin_walled: true, + transmission_color: color(1.f, 1.f, 1.f), + roughness_texture: texture_2d(), + ior: 1.52f, + transmission_color_texture: texture_2d(), + roughness_texture_influence: 0.f, + roughness: 0.f, + reflection_color_texture: texture_2d(), + reflection_color: color(1.f, 1.f, 1.f), + depth: 0.0001f, + normal_map_texture: texture_2d()); +*/ diff --git a/Articulated_objects/Ikea_furniture/HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm/model_HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm.usd b/Articulated_objects/Ikea_furniture/HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm/model_HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..8691e5db1885dda8a93785e6b795a96e3d0eaa71 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm/model_HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8686e312e087bf26c8cb6aede5052bfa56800707bcc15e847a0fb30d24ed83c +size 23609 diff --git a/Articulated_objects/Ikea_furniture/HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm/resource/img/548d21aeb790a28d50504f6022ea198d.png b/Articulated_objects/Ikea_furniture/HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm/resource/img/548d21aeb790a28d50504f6022ea198d.png new file mode 100755 index 0000000000000000000000000000000000000000..18ba39666b4ac6d5a243b7b6ceffa6728b8870f4 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm/resource/img/548d21aeb790a28d50504f6022ea198d.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72e0a5f660c93c2c068c6a0a36d3b5a406af4a2ca23fbf8663702118786d5c1f +size 1019916 diff --git a/Articulated_objects/Ikea_furniture/HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm/resource/img/b017a1da92c9ae50717b3f3240e4edce.png b/Articulated_objects/Ikea_furniture/HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm/resource/img/b017a1da92c9ae50717b3f3240e4edce.png new file mode 100755 index 0000000000000000000000000000000000000000..ad7f8a567c0a01bc1b38aaa7c6b27d188d075df3 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm/resource/img/b017a1da92c9ae50717b3f3240e4edce.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b29f25672ad70144117540918f902390e41c2292b9d351b071e29b843c76282 +size 202918 diff --git a/Articulated_objects/Ikea_furniture/HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm/resource/material.usd b/Articulated_objects/Ikea_furniture/HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..e9dfa286241a174890ab6e052ba27dfd6b8c7cef --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cb2ac967b02f7a15afb13c3ce58eea077f5379008c700a7e18b9adc5b7c67c93 +size 2834 diff --git a/Articulated_objects/Ikea_furniture/HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..5df7ddd3d96f899310a2ae8750643ce37f585d26 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/HEMNES_Glass_door_cabinet_with_3_drawers_grey_green_light_brown_stained_90x197cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b1c105f3098b8216952df17c8b27eb94bd6b9d878ed25b50d97518ff4ecca97c +size 458469 diff --git a/Articulated_objects/Ikea_furniture/IDANAS_Desk_white_152x70cm/model_IDANAS_Desk_white_152x70cm.usd b/Articulated_objects/Ikea_furniture/IDANAS_Desk_white_152x70cm/model_IDANAS_Desk_white_152x70cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..4cdf003131153b41ed3d118c528c200ccb8d498b --- /dev/null +++ b/Articulated_objects/Ikea_furniture/IDANAS_Desk_white_152x70cm/model_IDANAS_Desk_white_152x70cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa845f7a549e4ef74eb8ed24c9c8d1c60fe63011898f45b88e0f95af02fe1dc2 +size 24992 diff --git a/Articulated_objects/Ikea_furniture/IDANAS_Desk_white_152x70cm/resource/img/cef633647449ca365ce1d6f1fd24b180.png b/Articulated_objects/Ikea_furniture/IDANAS_Desk_white_152x70cm/resource/img/cef633647449ca365ce1d6f1fd24b180.png new file mode 100755 index 0000000000000000000000000000000000000000..0200419d59bc8c62e1f33bb4e2d684cba40166d3 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/IDANAS_Desk_white_152x70cm/resource/img/cef633647449ca365ce1d6f1fd24b180.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09ba78f2ccc42d2bbd87579a5354a18e1b05abf918a291191a02a94f10dfb73c +size 261800 diff --git a/Articulated_objects/Ikea_furniture/IDANAS_Desk_white_152x70cm/resource/material.usd b/Articulated_objects/Ikea_furniture/IDANAS_Desk_white_152x70cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..c2b65dac4591f971d2c81f9d89b0e91eb417f9ef --- /dev/null +++ b/Articulated_objects/Ikea_furniture/IDANAS_Desk_white_152x70cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e3a39c8c7697abbf3c042105a63e7099697587cfc1e64b14c4a4b46caec28d2 +size 2144 diff --git a/Articulated_objects/Ikea_furniture/IDANAS_Desk_white_152x70cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/IDANAS_Desk_white_152x70cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..6201adf344d5254ba747942c28a9f1d8821d415d --- /dev/null +++ b/Articulated_objects/Ikea_furniture/IDANAS_Desk_white_152x70cm/resource/v_69323/element_path.json @@ -0,0 +1,30 @@ +{ + "81": "/root/E_IDANAS_Desk_white_152x70cm_81", + "30": "/root/E_IDANAS_Desk_white_152x70cm_81/E_part1_30", + "58": "/root/E_drawer2_58", + "58Geo": "/root/E_drawer2_58/E_drawer2_58Geo", + "59": "/root/E_door_59", + "59Geo": "/root/E_door_59/E_door_59Geo", + "60": "/root/E_drawer1_60", + "60Geo": "/root/E_drawer1_60/E_drawer1_60Geo", + "69": "/root/E_IDANAS_Desk_white_152x70cm_81/E_part9_69", + "71": "/root/E_IDANAS_Desk_white_152x70cm_81/E_part8_71", + "72": "/root/E_IDANAS_Desk_white_152x70cm_81/E_part7_72", + "73": "/root/E_IDANAS_Desk_white_152x70cm_81/E_part6_73", + "74": "/root/E_IDANAS_Desk_white_152x70cm_81/E_part5_74", + "75": "/root/E_IDANAS_Desk_white_152x70cm_81/E_part4_75", + "76": "/root/E_IDANAS_Desk_white_152x70cm_81/E_part3_76", + "77": "/root/E_IDANAS_Desk_white_152x70cm_81/E_part2_77", + "78": "/root/E_IDANAS_Desk_white_152x70cm_81/E_shelf_78", + "79": "/root/E_IDANAS_Desk_white_152x70cm_81/E_shelf_79", + "80": "/root/E_IDANAS_Desk_white_152x70cm_81/E_tabletop_80", + "82": "/root/E_door_59/E_handle_82", + "83": "/root/E_drawer1_60/E_handle_83", + "84": "/root/E_drawer2_58/E_handle_84", + "85": "/root/E_IDANAS_Desk_white_152x70cm_81/E_part11_85", + "86": "/root/E_IDANAS_Desk_white_152x70cm_81/E_part10_86", + "87": "/root/E_drawer1_60/E_part1_2_87", + "88": "/root/E_drawer1_60/E_part1_1_88", + "89": "/root/E_drawer2_58/E_part2_2_89", + "90": "/root/E_drawer2_58/E_part2_1_90" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/IDANAS_Desk_white_152x70cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/IDANAS_Desk_white_152x70cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..d59c9596817048dcd57c58d8aa551fff0ffc2918 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/IDANAS_Desk_white_152x70cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da68b22b33eeceabe902688bb4d43f6e90bd47511d03c156538bc6a64ce6f66d +size 294547 diff --git a/Articulated_objects/Ikea_furniture/KILBERGET_chest_of_6_drawers_white_anchor_unlock_function_144x78cm/model_KILBERGET_chest_of_6_drawers_white_anchor_unlock_function_144x78cm.usd b/Articulated_objects/Ikea_furniture/KILBERGET_chest_of_6_drawers_white_anchor_unlock_function_144x78cm/model_KILBERGET_chest_of_6_drawers_white_anchor_unlock_function_144x78cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..3ea5b57f2d69895efde14e29dc0d6feaea8e27a4 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/KILBERGET_chest_of_6_drawers_white_anchor_unlock_function_144x78cm/model_KILBERGET_chest_of_6_drawers_white_anchor_unlock_function_144x78cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9fd5d7ad25ae8cd938c21ef93207450a29ba4568572ad98e71199487d47ea1b8 +size 19050 diff --git a/Articulated_objects/Ikea_furniture/KILBERGET_chest_of_6_drawers_white_anchor_unlock_function_144x78cm/resource/img/b5438c25905693520be7b48998be40a7.png b/Articulated_objects/Ikea_furniture/KILBERGET_chest_of_6_drawers_white_anchor_unlock_function_144x78cm/resource/img/b5438c25905693520be7b48998be40a7.png new file mode 100755 index 0000000000000000000000000000000000000000..f3ef53ec19035592b39c66aae48fd9ac674c031d --- /dev/null +++ b/Articulated_objects/Ikea_furniture/KILBERGET_chest_of_6_drawers_white_anchor_unlock_function_144x78cm/resource/img/b5438c25905693520be7b48998be40a7.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57825e298db850449f9ebbe75906a9fa96c2dbc2334c1f3ba542d52731626f21 +size 96513 diff --git a/Articulated_objects/Ikea_furniture/KILBERGET_chest_of_6_drawers_white_anchor_unlock_function_144x78cm/resource/img/c291be4376a160d658311b48ca11010e.png b/Articulated_objects/Ikea_furniture/KILBERGET_chest_of_6_drawers_white_anchor_unlock_function_144x78cm/resource/img/c291be4376a160d658311b48ca11010e.png new file mode 100755 index 0000000000000000000000000000000000000000..39c57259abe661d09653de9de67b6f05bbbe0ff3 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/KILBERGET_chest_of_6_drawers_white_anchor_unlock_function_144x78cm/resource/img/c291be4376a160d658311b48ca11010e.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b2b628911b8fa6b2132c2e0ef8abed1f9dbaaba30c0723f66e971f43e8ccffa +size 975086 diff --git a/Articulated_objects/Ikea_furniture/KILBERGET_chest_of_6_drawers_white_anchor_unlock_function_144x78cm/resource/material.usd b/Articulated_objects/Ikea_furniture/KILBERGET_chest_of_6_drawers_white_anchor_unlock_function_144x78cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..32580012f2b1c9aaa6887526453d30279840e543 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/KILBERGET_chest_of_6_drawers_white_anchor_unlock_function_144x78cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6bfee817c1636ebcde96ef431974bb5c1304379ef133bff5a38c35f6582d022c +size 2308 diff --git a/Articulated_objects/Ikea_furniture/KILBERGET_chest_of_6_drawers_white_anchor_unlock_function_144x78cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/KILBERGET_chest_of_6_drawers_white_anchor_unlock_function_144x78cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..7fcd9ea02f97578fbf3418b6faf35aeef41449c6 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/KILBERGET_chest_of_6_drawers_white_anchor_unlock_function_144x78cm/resource/v_69323/element_path.json @@ -0,0 +1,23 @@ +{ + "33": "/root/E_drawer1_33", + "36": "/root/E_drawer1_33/E_handle_36", + "37": "/root/E_drawer1_33/E_part1_1_37", + "9": "/root/E_KILBERGET_chest_of_6_drawers_white_anchor_unlock_function_144x78cm_9", + "39": "/root/E_KILBERGET_chest_of_6_drawers_white_anchor_unlock_function_144x78cm_9/E_part01_39", + "57": "/root/E_drawer2_57", + "55": "/root/E_drawer2_57/E_handle_55", + "56": "/root/E_drawer2_57/E_part2_01_56", + "63": "/root/E_drawer3_63", + "60": "/root/E_drawer3_63/E_handle_60", + "65": "/root/E_drawer4_65", + "61": "/root/E_drawer4_65/E_handle_61", + "62": "/root/E_drawer3_63/E_part3_01_62", + "64": "/root/E_drawer4_65/E_part4_01_64", + "70": "/root/E_drawer5_70", + "67": "/root/E_drawer5_70/E_handle_67", + "72": "/root/E_drawer6_72", + "68": "/root/E_drawer6_72/E_handle_68", + "69": "/root/E_drawer5_70/E_part5_01_69", + "71": "/root/E_drawer6_72/E_part6_01_71", + "78": "/root/E_KILBERGET_chest_of_6_drawers_white_anchor_unlock_function_144x78cm_9/E_tabletop_78" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/KILBERGET_chest_of_6_drawers_white_anchor_unlock_function_144x78cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/KILBERGET_chest_of_6_drawers_white_anchor_unlock_function_144x78cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..b0995272472c132b456668e56f487c23fadb6c11 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/KILBERGET_chest_of_6_drawers_white_anchor_unlock_function_144x78cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7087f38921b85330506e067e0dc509a8b2bd9b5134390adee601c51ddb7a098b +size 115830 diff --git a/Articulated_objects/Ikea_furniture/KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm/model_KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm.usd b/Articulated_objects/Ikea_furniture/KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm/model_KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..b339c71725b3f4efe33209d7217dedae313b10b8 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm/model_KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:40d047cc088a1a2f417dfb24773892775d5521d6136cab572b9ef758695a915b +size 13308 diff --git a/Articulated_objects/Ikea_furniture/KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm/resource/img/effdfaad612583405524cadfa6cd919c.png b/Articulated_objects/Ikea_furniture/KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm/resource/img/effdfaad612583405524cadfa6cd919c.png new file mode 100755 index 0000000000000000000000000000000000000000..5cfdcf0554719e4539d10c82a9c375e3bafd6c20 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm/resource/img/effdfaad612583405524cadfa6cd919c.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59a7f88401d196a81ed4853a7b5b490a24d69e482e99d1d808212a1e9efeff38 +size 51437 diff --git a/Articulated_objects/Ikea_furniture/KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm/resource/img/fbbfa2acbd7dbdb82858e53db7ee3f3b.png b/Articulated_objects/Ikea_furniture/KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm/resource/img/fbbfa2acbd7dbdb82858e53db7ee3f3b.png new file mode 100755 index 0000000000000000000000000000000000000000..898b38d967437ec7d10def00a9a2daccfd989f0d --- /dev/null +++ b/Articulated_objects/Ikea_furniture/KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm/resource/img/fbbfa2acbd7dbdb82858e53db7ee3f3b.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a7fd713d16a70ebb53419b1339f1d10418427ac2565bfee095cb491e547cc0f7 +size 79805 diff --git a/Articulated_objects/Ikea_furniture/KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm/resource/material.usd b/Articulated_objects/Ikea_furniture/KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..b89972753d1c75962c6785b52736ca880fecaea0 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e54611765c64e19e6278b548197c6bd528d52382a9db7fb42d2f96684ea080c0 +size 2292 diff --git a/Articulated_objects/Ikea_furniture/KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..ee01ae2c91982485e09adc616d5f280f9264943a --- /dev/null +++ b/Articulated_objects/Ikea_furniture/KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm/resource/v_69323/element_path.json @@ -0,0 +1,16 @@ +{ + "20": "/root/E_door1_20", + "20Geo": "/root/E_door1_20/E_door1_20Geo", + "23": "/root/E_door2_23", + "23Geo": "/root/E_door2_23/E_door2_23Geo", + "7": "/root/E_KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm_7", + "30": "/root/E_KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm_7/E_part1_30", + "33": "/root/E_KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm_7/E_tabletop_33", + "34": "/root/E_KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm_7/E_shelf_34", + "35": "/root/E_KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm_7/E_shelf_35", + "36": "/root/E_KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm_7/E_shelf_36", + "37": "/root/E_KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm_7/E_shelf_37", + "42": "/root/E_door1_20/E_handle_42", + "43": "/root/E_door2_23/E_handle_43", + "7Geo": "/root/E_KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm_7/E_KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm_7Geo" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..93e1a85b10e75ebf26e56b92ebeccfbfa195af7c --- /dev/null +++ b/Articulated_objects/Ikea_furniture/KLEPPSTAD_Shoe_cabinet_storage_white_80x35x117cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:36c406e71b4816fb9667f15502aca82466ae7bea6e34c63f13cf8593e3a23ad5 +size 203935 diff --git a/Articulated_objects/Ikea_furniture/MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm/model_MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm.usd b/Articulated_objects/Ikea_furniture/MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm/model_MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..24a1b362c6bffdfb2a007e4e00e4fde899fa5e77 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm/model_MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5dbf57c5bacc2ca789537fd42b31c44d40cdfdd6ebd28f93f6e2e8e774eec915 +size 16664 diff --git a/Articulated_objects/Ikea_furniture/MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm/resource/img/8530cc457e08909914e9d9f2cb16a676.png b/Articulated_objects/Ikea_furniture/MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm/resource/img/8530cc457e08909914e9d9f2cb16a676.png new file mode 100755 index 0000000000000000000000000000000000000000..87e92795da768dfcdfac06e4dfec51465f2283ef --- /dev/null +++ b/Articulated_objects/Ikea_furniture/MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm/resource/img/8530cc457e08909914e9d9f2cb16a676.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88d525e5feae1238f60f1c1a227a98b09c399d3201edbce7a6c0dbfe5a57d8d3 +size 69034 diff --git a/Articulated_objects/Ikea_furniture/MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm/resource/img/ad47ef6901c5645ea6772692aa999c15.png b/Articulated_objects/Ikea_furniture/MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm/resource/img/ad47ef6901c5645ea6772692aa999c15.png new file mode 100755 index 0000000000000000000000000000000000000000..20e7a23147af2a42ce2baa98c623dce1eab2012b --- /dev/null +++ b/Articulated_objects/Ikea_furniture/MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm/resource/img/ad47ef6901c5645ea6772692aa999c15.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be7996a1661c9645a212258b50e2e56966e2922aa94de0af41dfcc2851c2560a +size 42147 diff --git a/Articulated_objects/Ikea_furniture/MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm/resource/material.usd b/Articulated_objects/Ikea_furniture/MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..3c23086ac0e947fd6f592d4ebf835ae01a776653 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d2c16b36c2341c838d92f21e38dfef885f26547f1a1dd3a8853caf96c85ea734 +size 2292 diff --git a/Articulated_objects/Ikea_furniture/MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..3d4d833baa6f09733db5ad8a30247c53b179554b --- /dev/null +++ b/Articulated_objects/Ikea_furniture/MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm/resource/v_69323/element_path.json @@ -0,0 +1,17 @@ +{ + "40": "/root/E_door1_40", + "40Geo": "/root/E_door1_40/E_door1_40Geo", + "47": "/root/E_MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm_47", + "47Geo": "/root/E_MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm_47/E_MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm_47Geo", + "54": "/root/E_door1_40/E_handle_54", + "56": "/root/E_door2_56", + "55": "/root/E_door2_56/E_handle_55", + "56Geo": "/root/E_door2_56/E_door2_56Geo", + "58": "/root/E_MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm_47/E_part2_58", + "59": "/root/E_MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm_47/E_pole_59", + "60": "/root/E_MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm_47/E_shelf_60", + "61": "/root/E_MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm_47/E_shelf_61", + "62": "/root/E_MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm_47/E_shelf_62", + "63": "/root/E_MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm_47/E_tabletop_63", + "64": "/root/E_MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm_47/E_part1_64" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..67df2503355a69df540f5655daf5b0e4674d2759 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/MACKAPAR_Shoe_cabinet_storage_white_80X35X102cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28a9da34d18c1ff192e279caa878ec47a33796564f338265d862ff436c79a647 +size 218441 diff --git a/Articulated_objects/Ikea_furniture/MICKE/model_MICKE.usd b/Articulated_objects/Ikea_furniture/MICKE/model_MICKE.usd new file mode 100755 index 0000000000000000000000000000000000000000..112c84e7f2f58288a20a99867191f6e6f36701f0 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/MICKE/model_MICKE.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:197d324a91c3119305907e54df76b6a8519fa6cae6cec941f6baaa233c4b432c +size 20356 diff --git a/Articulated_objects/Ikea_furniture/MICKE/resource/img/0deab3a573b56892dbfe42e528d4f025.png b/Articulated_objects/Ikea_furniture/MICKE/resource/img/0deab3a573b56892dbfe42e528d4f025.png new file mode 100755 index 0000000000000000000000000000000000000000..c1290dd844090e53857868fd53c2b222612e84fb --- /dev/null +++ b/Articulated_objects/Ikea_furniture/MICKE/resource/img/0deab3a573b56892dbfe42e528d4f025.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0103bd51643e334674160b2e4fe9c5266165c8854bb7caf634e6e0157086a97 +size 8923 diff --git a/Articulated_objects/Ikea_furniture/MICKE/resource/img/46e45bb6f57fdd2c67fd0bcf28c8152d.png b/Articulated_objects/Ikea_furniture/MICKE/resource/img/46e45bb6f57fdd2c67fd0bcf28c8152d.png new file mode 100755 index 0000000000000000000000000000000000000000..6acb9fa471f3a7e7b39e218bd4d6057f61c1c972 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/MICKE/resource/img/46e45bb6f57fdd2c67fd0bcf28c8152d.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1003391f30e9657e6e3fe2525144ac8c81d4f73ad1dfbc0607716bee5b1c54a8 +size 3991 diff --git a/Articulated_objects/Ikea_furniture/MICKE/resource/img/cef633647449ca365ce1d6f1fd24b180.png b/Articulated_objects/Ikea_furniture/MICKE/resource/img/cef633647449ca365ce1d6f1fd24b180.png new file mode 100755 index 0000000000000000000000000000000000000000..0200419d59bc8c62e1f33bb4e2d684cba40166d3 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/MICKE/resource/img/cef633647449ca365ce1d6f1fd24b180.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09ba78f2ccc42d2bbd87579a5354a18e1b05abf918a291191a02a94f10dfb73c +size 261800 diff --git a/Articulated_objects/Ikea_furniture/MICKE/resource/img/e20d1a8f64d972efcfe0a84d6815b84e.png b/Articulated_objects/Ikea_furniture/MICKE/resource/img/e20d1a8f64d972efcfe0a84d6815b84e.png new file mode 100755 index 0000000000000000000000000000000000000000..5afac82c56077d60e557929c3014487dfe4d4564 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/MICKE/resource/img/e20d1a8f64d972efcfe0a84d6815b84e.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:815c1dd0f7d0262a06d4990be1f015e162f40a531c69c01aea5b5710c6e1ad42 +size 46784 diff --git a/Articulated_objects/Ikea_furniture/MICKE/resource/material.usd b/Articulated_objects/Ikea_furniture/MICKE/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..0877d89d7bd5c2257aac9d57e5425d09160ef2bd --- /dev/null +++ b/Articulated_objects/Ikea_furniture/MICKE/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b354f62043f233ca70d665a9ee3679a4f44f793aba1b8e78d10319856e545bbc +size 2798 diff --git a/Articulated_objects/Ikea_furniture/MICKE/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/MICKE/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..83c68808797146615af709a3e55c331f7132cd1a --- /dev/null +++ b/Articulated_objects/Ikea_furniture/MICKE/resource/v_69323/element_path.json @@ -0,0 +1,23 @@ +{ + "109": "/root/E_MICKE_109", + "103": "/root/E_MICKE_109/E_MICKE_Desk_white_105x50cm_103", + "102": "/root/E_MICKE_109/E_MICKE_Desk_white_105x50cm_103/E_MICKE_Desk_white_105x50cm_102", + "101": "/root/E_MICKE_109/E_MICKE_Desk_white_105x50cm_103/E_MICKE_Desk_white_105x50cm_102/E_shelf_101", + "104": "/root/E_MICKE_109/E_MICKE_Add_on_unit_high_white_105x65cm_104", + "105": "/root/E_MICKE_109/E_MICKE_Add_on_unit_high_white_105x65cm_104/E_shelf_105", + "106": "/root/E_MICKE_109/E_MICKE_Add_on_unit_high_white_105x65cm_104/E_shelf_106", + "107": "/root/E_MICKE_109/E_MICKE_Add_on_unit_high_white_105x65cm_104/E_tabletop_107", + "11": "/root/E_MICKE_109/E_MICKE_Add_on_unit_high_white_105x65cm_104/E_MICKE_Add_on_unit_high_white_105x65cm_11", + "17": "/root/E_MICKE_109/E_MICKE_Desk_white_105x50cm_103/E_MICKE_Desk_white_105x50cm_102/E_MICKE_Desk_white_105x50cm_17", + "33": "/root/E_drawer1_33", + "33Geo": "/root/E_drawer1_33/E_drawer1_33Geo", + "35": "/root/E_drawer1_33/E_part1_1_35", + "36": "/root/E_drawer1_33/E_part1_2_36", + "5": "/root/E_MICKE_109/E_MICKE_Add_on_unit_high_white_105x65cm_104/E_MICKE_Add_on_unit_high_white_105x65cm_5", + "54": "/root/E_drawer2_54", + "70": "/root/E_door_70", + "71": "/root/E_drawer1_33/E_part1_3_71", + "73": "/root/E_MICKE_109/E_MICKE_Desk_white_105x50cm_103/E_MICKE_Desk_white_105x50cm_102/E_tabletop_73", + "85": "/root/E_MICKE_109/E_MICKE_Desk_white_105x50cm_103/E_MICKE_Desk_white_105x50cm_102/E_MICKE_Desk_white_105x50cm_85", + "86": "/root/E_MICKE_109/E_MICKE_Desk_white_105x50cm_103/E_MICKE_Desk_white_105x50cm_102/E_MICKE_Desk_white_105x50cm_86" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/MICKE/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/MICKE/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..d3dce37ba11008d209febb5cbea0c3c8e3878d48 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/MICKE/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:616331034b2937d765b7d03c74709efe34256de2e36ab8d8b4237fb2ec2eaa97 +size 631388 diff --git a/Articulated_objects/Ikea_furniture/MUSKEN_bedside_table_ brown_45x58cm/model_MUSKEN_bedside_table_ brown_45x58cm.usd b/Articulated_objects/Ikea_furniture/MUSKEN_bedside_table_ brown_45x58cm/model_MUSKEN_bedside_table_ brown_45x58cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..5f4649a64e37cc659dc5f37b1cccdbca34e2d2f3 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/MUSKEN_bedside_table_ brown_45x58cm/model_MUSKEN_bedside_table_ brown_45x58cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:33a2735f7e28b825461b85256b4bf37d450a48bf762c6583c218f55684cdb7a4 +size 14065 diff --git a/Articulated_objects/Ikea_furniture/MUSKEN_bedside_table_ brown_45x58cm/resource/img/04215496bc65712bfecf4259cc2c109b.png b/Articulated_objects/Ikea_furniture/MUSKEN_bedside_table_ brown_45x58cm/resource/img/04215496bc65712bfecf4259cc2c109b.png new file mode 100755 index 0000000000000000000000000000000000000000..09ee74d8ae3ebc347d32b5c6658b6d570fcc940a --- /dev/null +++ b/Articulated_objects/Ikea_furniture/MUSKEN_bedside_table_ brown_45x58cm/resource/img/04215496bc65712bfecf4259cc2c109b.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5227481f59dc114b9a5c8032677d6bbdf7de62b2430bdd3c0d5b7117322863b0 +size 37826 diff --git a/Articulated_objects/Ikea_furniture/MUSKEN_bedside_table_ brown_45x58cm/resource/material.usd b/Articulated_objects/Ikea_furniture/MUSKEN_bedside_table_ brown_45x58cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..c5d52844a30af751aa31e4e123acccf35b053901 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/MUSKEN_bedside_table_ brown_45x58cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:69e292c312849a0e60e534914662f2f30d45497acf770490162410e215f6498a +size 2019 diff --git a/Articulated_objects/Ikea_furniture/MUSKEN_bedside_table_ brown_45x58cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/MUSKEN_bedside_table_ brown_45x58cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..17bbfce5ec6b63d1d5a95d76d87ac405dc8af5b6 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/MUSKEN_bedside_table_ brown_45x58cm/resource/v_69323/element_path.json @@ -0,0 +1,7 @@ +{ + "4": "/root/E_MUSKEN_bedside_table_brown_45x58cm_4", + "13": "/root/E_MUSKEN_bedside_table_brown_45x58cm_4/E_tabletop_13", + "3": "/root/E_MUSKEN_bedside_table_brown_45x58cm_4/E_part1_3", + "7": "/root/E_door_7", + "9": "/root/E_door_7/E_handle_9" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/MUSKEN_bedside_table_ brown_45x58cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/MUSKEN_bedside_table_ brown_45x58cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..e9f410bb7b4d887fa72dd60aca71085daa1d444b --- /dev/null +++ b/Articulated_objects/Ikea_furniture/MUSKEN_bedside_table_ brown_45x58cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8effff8162048d85d50afaa659fdc68ef23e67208e18684543297fdf98a63e98 +size 167886 diff --git a/Articulated_objects/Ikea_furniture/MUSKEN_wardrobe_with_2_doors_3_drawers_white_124x60x201cm/model_MUSKEN_wardrobe_with_2_doors_3_drawers_white_124x60x201cm.usd b/Articulated_objects/Ikea_furniture/MUSKEN_wardrobe_with_2_doors_3_drawers_white_124x60x201cm/model_MUSKEN_wardrobe_with_2_doors_3_drawers_white_124x60x201cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..5ab3375a284125d9768e26b7e1d67ea252071ab7 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/MUSKEN_wardrobe_with_2_doors_3_drawers_white_124x60x201cm/model_MUSKEN_wardrobe_with_2_doors_3_drawers_white_124x60x201cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34a847fb37310381f6bc59f88e54f718f5714af5c1484d267afe8042cc512afe +size 20333 diff --git a/Articulated_objects/Ikea_furniture/MUSKEN_wardrobe_with_2_doors_3_drawers_white_124x60x201cm/resource/img/effdfaad612583405524cadfa6cd919c.png b/Articulated_objects/Ikea_furniture/MUSKEN_wardrobe_with_2_doors_3_drawers_white_124x60x201cm/resource/img/effdfaad612583405524cadfa6cd919c.png new file mode 100755 index 0000000000000000000000000000000000000000..74ba6e4f8d0a98a62d7639a158ba7eedfb790d6e --- /dev/null +++ b/Articulated_objects/Ikea_furniture/MUSKEN_wardrobe_with_2_doors_3_drawers_white_124x60x201cm/resource/img/effdfaad612583405524cadfa6cd919c.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7caae8fb6281f39fcb1c68dc64708c7ec8b775bae6f612f39989639f2d59c9d0 +size 75525 diff --git a/Articulated_objects/Ikea_furniture/MUSKEN_wardrobe_with_2_doors_3_drawers_white_124x60x201cm/resource/material.usd b/Articulated_objects/Ikea_furniture/MUSKEN_wardrobe_with_2_doors_3_drawers_white_124x60x201cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..1442e83ad6c38c71b1221bcbfb62e6869372476e --- /dev/null +++ b/Articulated_objects/Ikea_furniture/MUSKEN_wardrobe_with_2_doors_3_drawers_white_124x60x201cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96093afd44d30361a701ef50b5a3842d7269ee4c9ebc8071dbdb4fc8dbbf1c12 +size 2019 diff --git a/Articulated_objects/Ikea_furniture/MUSKEN_wardrobe_with_2_doors_3_drawers_white_124x60x201cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/MUSKEN_wardrobe_with_2_doors_3_drawers_white_124x60x201cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..6eabe95683bf3451b91b6c5c77936ea608425787 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/MUSKEN_wardrobe_with_2_doors_3_drawers_white_124x60x201cm/resource/v_69323/element_path.json @@ -0,0 +1,16 @@ +{ + "13": "/root/E_door02_13", + "17": "/root/E_drawer03_17", + "26": "/root/E_drawer02_26", + "27": "/root/E_drawer01_27", + "3": "/root/E_MUSKEN_wardrobe_with_2_doors_3_drawers_white_124x60x201cm_3", + "48": "/root/E_door02_13/E_handle2_1_48", + "6": "/root/E_door01_6", + "49": "/root/E_door01_6/E_handle1_1_49", + "50": "/root/E_drawer01_27/E_handle1_1_50", + "51": "/root/E_drawer02_26/E_handle2_1_51", + "52": "/root/E_drawer03_17/E_handle3_1_52", + "54": "/root/E_MUSKEN_wardrobe_with_2_doors_3_drawers_white_124x60x201cm_3/E_shelf_54", + "55": "/root/E_MUSKEN_wardrobe_with_2_doors_3_drawers_white_124x60x201cm_3/E_shelf_55", + "56": "/root/E_MUSKEN_wardrobe_with_2_doors_3_drawers_white_124x60x201cm_3/E_pole_56" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/MUSKEN_wardrobe_with_2_doors_3_drawers_white_124x60x201cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/MUSKEN_wardrobe_with_2_doors_3_drawers_white_124x60x201cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..9377381ded5b2f4edd392d994fd508348b71d6f5 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/MUSKEN_wardrobe_with_2_doors_3_drawers_white_124x60x201cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:253417434d5f77f5a049308ca994757d477973b1df888624cdc94c501460fa27 +size 872885 diff --git a/Articulated_objects/Ikea_furniture/NORDKISA_Dressing_table_bamboo_76x47cm(2)/model_NORDKISA_Dressing_table_bamboo_76x47cm(2).usd b/Articulated_objects/Ikea_furniture/NORDKISA_Dressing_table_bamboo_76x47cm(2)/model_NORDKISA_Dressing_table_bamboo_76x47cm(2).usd new file mode 100755 index 0000000000000000000000000000000000000000..37f02539324e0599b2957d9db23f58ce0d72cbf9 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/NORDKISA_Dressing_table_bamboo_76x47cm(2)/model_NORDKISA_Dressing_table_bamboo_76x47cm(2).usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f8059fcff6fedb812c95bd2ce47950766166a0bc7e00f8a8153947c283721477 +size 12571 diff --git a/Articulated_objects/Ikea_furniture/NORDKISA_Dressing_table_bamboo_76x47cm(2)/resource/img/ee6bb693bd9a7048ac57c163996162ac.png b/Articulated_objects/Ikea_furniture/NORDKISA_Dressing_table_bamboo_76x47cm(2)/resource/img/ee6bb693bd9a7048ac57c163996162ac.png new file mode 100755 index 0000000000000000000000000000000000000000..7e1381a6f140712594fa2201376216c7e5040c24 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/NORDKISA_Dressing_table_bamboo_76x47cm(2)/resource/img/ee6bb693bd9a7048ac57c163996162ac.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bddbf5d4599ce5b315e927d0c9c408ecd0402289b97f5a40020d9309d0cab075 +size 181631 diff --git a/Articulated_objects/Ikea_furniture/NORDKISA_Dressing_table_bamboo_76x47cm(2)/resource/material.usd b/Articulated_objects/Ikea_furniture/NORDKISA_Dressing_table_bamboo_76x47cm(2)/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..4835c3634c89501eda081abb29db2fed6affcc29 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/NORDKISA_Dressing_table_bamboo_76x47cm(2)/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b9ba98681558bc11340e017707fd001d10aa607b555dfc04eaea0dd179a65c21 +size 2019 diff --git a/Articulated_objects/Ikea_furniture/NORDKISA_Dressing_table_bamboo_76x47cm(2)/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/NORDKISA_Dressing_table_bamboo_76x47cm(2)/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..d88f4890ba0f24de62975ed87c68fc70a7b31933 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/NORDKISA_Dressing_table_bamboo_76x47cm(2)/resource/v_69323/element_path.json @@ -0,0 +1,10 @@ +{ + "12": "/root/E_NORDKISA_Dressing_table_bamboo_76x47cm_12", + "12Geo": "/root/E_NORDKISA_Dressing_table_bamboo_76x47cm_12/E_NORDKISA_Dressing_table_bamboo_76x47cm_12Geo", + "27": "/root/E_NORDKISA_Dressing_table_bamboo_76x47cm_12/E_tabletop_27", + "28": "/root/E_drawer_28", + "30": "/root/E_NORDKISA_Dressing_table_bamboo_76x47cm_12/E_part1_30", + "31": "/root/E_NORDKISA_Dressing_table_bamboo_76x47cm_12/E_part4_31", + "32": "/root/E_NORDKISA_Dressing_table_bamboo_76x47cm_12/E_part3_32", + "33": "/root/E_NORDKISA_Dressing_table_bamboo_76x47cm_12/E_part2_33" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/NORDKISA_Dressing_table_bamboo_76x47cm(2)/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/NORDKISA_Dressing_table_bamboo_76x47cm(2)/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..1a857405355c06bda71a49f21db8a7e681ae6f24 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/NORDKISA_Dressing_table_bamboo_76x47cm(2)/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7775fc9316bde19904b2803ee5520947e91a832be9972051b4feacbc763d8e21 +size 133128 diff --git a/Articulated_objects/Ikea_furniture/OLDERDALEN_bedside_table_grey_green_pine_47x43cm/model_OLDERDALEN_bedside_table_grey_green_pine_47x43cm(1).usd b/Articulated_objects/Ikea_furniture/OLDERDALEN_bedside_table_grey_green_pine_47x43cm/model_OLDERDALEN_bedside_table_grey_green_pine_47x43cm(1).usd new file mode 100755 index 0000000000000000000000000000000000000000..374bc7bf8fe6aa9e73066dd06136a2e874ac61e9 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/OLDERDALEN_bedside_table_grey_green_pine_47x43cm/model_OLDERDALEN_bedside_table_grey_green_pine_47x43cm(1).usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0aba9320febf8847cd5a6a041ddaec0599655a05e8f60f80f0f0930f5e158e13 +size 10926 diff --git a/Articulated_objects/Ikea_furniture/OLDERDALEN_bedside_table_grey_green_pine_47x43cm/resource/img/b82c1d924ce634316ba5b5470b7529a6.png b/Articulated_objects/Ikea_furniture/OLDERDALEN_bedside_table_grey_green_pine_47x43cm/resource/img/b82c1d924ce634316ba5b5470b7529a6.png new file mode 100755 index 0000000000000000000000000000000000000000..7f44cc4dc1b5c3b24c25072cd9366923a6cf4ffe --- /dev/null +++ b/Articulated_objects/Ikea_furniture/OLDERDALEN_bedside_table_grey_green_pine_47x43cm/resource/img/b82c1d924ce634316ba5b5470b7529a6.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b689e85d0994fb64ac24507aeef4cc474a0ab50a67ee65dd97cc667727fb8914 +size 27832 diff --git a/Articulated_objects/Ikea_furniture/OLDERDALEN_bedside_table_grey_green_pine_47x43cm/resource/img/d897bd3893a06bdeb62520462acd06c9.png b/Articulated_objects/Ikea_furniture/OLDERDALEN_bedside_table_grey_green_pine_47x43cm/resource/img/d897bd3893a06bdeb62520462acd06c9.png new file mode 100755 index 0000000000000000000000000000000000000000..a98a9d080b127f278c49cc76b7a21fc28f8f67da --- /dev/null +++ b/Articulated_objects/Ikea_furniture/OLDERDALEN_bedside_table_grey_green_pine_47x43cm/resource/img/d897bd3893a06bdeb62520462acd06c9.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f96c851b61b4bced0150fcb73c1b9a2e3eee482eedfd11cb1573c0f29b52a145 +size 183117 diff --git a/Articulated_objects/Ikea_furniture/OLDERDALEN_bedside_table_grey_green_pine_47x43cm/resource/material.usd b/Articulated_objects/Ikea_furniture/OLDERDALEN_bedside_table_grey_green_pine_47x43cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..2398328e23fd1c52354076be697228dc7d20acbf --- /dev/null +++ b/Articulated_objects/Ikea_furniture/OLDERDALEN_bedside_table_grey_green_pine_47x43cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ee05bf8257cab7cd95485414c24a19f107d79abfccbaf550656643b2f2e3a736 +size 2292 diff --git a/Articulated_objects/Ikea_furniture/OLDERDALEN_bedside_table_grey_green_pine_47x43cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/OLDERDALEN_bedside_table_grey_green_pine_47x43cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..6e26599e7e879df20e5fb8a5352ba5d16df390d0 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/OLDERDALEN_bedside_table_grey_green_pine_47x43cm/resource/v_69323/element_path.json @@ -0,0 +1,7 @@ +{ + "7": "/root/E_door_7", + "11": "/root/E_door_7/E_handle_11", + "3": "/root/E_OLDERDALEN_bedside_table_grey_green_pine_47x43cm_3", + "12": "/root/E_OLDERDALEN_bedside_table_grey_green_pine_47x43cm_3/E_tabletop_12", + "13": "/root/E_OLDERDALEN_bedside_table_grey_green_pine_47x43cm_3/E_tabletop_13" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/OLDERDALEN_bedside_table_grey_green_pine_47x43cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/OLDERDALEN_bedside_table_grey_green_pine_47x43cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..2111646fec8ab307f6bc72038a85ee5c5df44daf --- /dev/null +++ b/Articulated_objects/Ikea_furniture/OLDERDALEN_bedside_table_grey_green_pine_47x43cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24dab246cf7b32c3c3732e887e3f3aa6b0e8dd9f992447ec2a1734a96facab00 +size 233255 diff --git a/Articulated_objects/Ikea_furniture/RADMANSO_chest_of_3_drawers_brown_walnut_effect_90x48x81cm/model_RADMANSO_chest_of_3_drawers_brown_walnut_effect_90x48x81cm.usd b/Articulated_objects/Ikea_furniture/RADMANSO_chest_of_3_drawers_brown_walnut_effect_90x48x81cm/model_RADMANSO_chest_of_3_drawers_brown_walnut_effect_90x48x81cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..1614b89449098eed2bd94ffdb9eaac46d3b7ae27 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RADMANSO_chest_of_3_drawers_brown_walnut_effect_90x48x81cm/model_RADMANSO_chest_of_3_drawers_brown_walnut_effect_90x48x81cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:526d42ba3fb55cc376538568d80ae1248a44337330d9eb6e34c6aa9dce75d520 +size 15043 diff --git a/Articulated_objects/Ikea_furniture/RADMANSO_chest_of_3_drawers_brown_walnut_effect_90x48x81cm/resource/img/d7b24e7396f57f6dfe1c5eadbd05618e.png b/Articulated_objects/Ikea_furniture/RADMANSO_chest_of_3_drawers_brown_walnut_effect_90x48x81cm/resource/img/d7b24e7396f57f6dfe1c5eadbd05618e.png new file mode 100755 index 0000000000000000000000000000000000000000..8e076da462f1656a75580a9bc4d7e6f5361d2b84 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RADMANSO_chest_of_3_drawers_brown_walnut_effect_90x48x81cm/resource/img/d7b24e7396f57f6dfe1c5eadbd05618e.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c2b746700a4cf5b141e8fa1042f44a3a8a2803fd1c06fa3aaaa0956c8a1bfea +size 32265 diff --git a/Articulated_objects/Ikea_furniture/RADMANSO_chest_of_3_drawers_brown_walnut_effect_90x48x81cm/resource/img/ebef264c1404b6cb6cd4c78f7689c6c4.png b/Articulated_objects/Ikea_furniture/RADMANSO_chest_of_3_drawers_brown_walnut_effect_90x48x81cm/resource/img/ebef264c1404b6cb6cd4c78f7689c6c4.png new file mode 100755 index 0000000000000000000000000000000000000000..11136a93295b70e2036833f61020f643b1727918 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RADMANSO_chest_of_3_drawers_brown_walnut_effect_90x48x81cm/resource/img/ebef264c1404b6cb6cd4c78f7689c6c4.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b90d1e6e9b4b2c4b08eb24ce8e0be0fcaf3a49ef2fe7991bede325e6f20bafc +size 81493 diff --git a/Articulated_objects/Ikea_furniture/RADMANSO_chest_of_3_drawers_brown_walnut_effect_90x48x81cm/resource/img/effdfaad612583405524cadfa6cd919c.png b/Articulated_objects/Ikea_furniture/RADMANSO_chest_of_3_drawers_brown_walnut_effect_90x48x81cm/resource/img/effdfaad612583405524cadfa6cd919c.png new file mode 100755 index 0000000000000000000000000000000000000000..a6b59d83b985485865f67608afbabd7aeebcbf22 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RADMANSO_chest_of_3_drawers_brown_walnut_effect_90x48x81cm/resource/img/effdfaad612583405524cadfa6cd919c.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f759edf76c34ae627ce2c8d19143792afa4a0bdb866a58e58bb205ca406eb922 +size 33357 diff --git a/Articulated_objects/Ikea_furniture/RADMANSO_chest_of_3_drawers_brown_walnut_effect_90x48x81cm/resource/material.usd b/Articulated_objects/Ikea_furniture/RADMANSO_chest_of_3_drawers_brown_walnut_effect_90x48x81cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..892e999ea71b5133d1f20f4b754bf64af86e9108 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RADMANSO_chest_of_3_drawers_brown_walnut_effect_90x48x81cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c44ff1c98eddb7227e9e5f63bcafa8e950017e50047d0e3b85f8b830648682c6 +size 2554 diff --git a/Articulated_objects/Ikea_furniture/RADMANSO_chest_of_3_drawers_brown_walnut_effect_90x48x81cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/RADMANSO_chest_of_3_drawers_brown_walnut_effect_90x48x81cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..8dce7bbdb014a96bda17e21c1b3a2aba4804e9c1 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RADMANSO_chest_of_3_drawers_brown_walnut_effect_90x48x81cm/resource/v_69323/element_path.json @@ -0,0 +1,19 @@ +{ + "1": "/root/E_RaDMANSo_chest_of_3_drawers_brown_walnut_effect_90x48x81cm_1", + "3": "/root/E_drawer1_3", + "17": "/root/E_drawer1_3/E_handle_17", + "20": "/root/E_RaDMANSo_chest_of_3_drawers_brown_walnut_effect_90x48x81cm_1/E_part5_20", + "21": "/root/E_drawer1_3/E_part1_1_21", + "23": "/root/E_RaDMANSo_chest_of_3_drawers_brown_walnut_effect_90x48x81cm_1/E_part3_23", + "25": "/root/E_RaDMANSo_chest_of_3_drawers_brown_walnut_effect_90x48x81cm_1/E_part2_25", + "28": "/root/E_drawer2_28", + "26": "/root/E_drawer2_28/E_handle_26", + "27": "/root/E_drawer2_28/E_part2_1_27", + "29": "/root/E_RaDMANSo_chest_of_3_drawers_brown_walnut_effect_90x48x81cm_1/E_part1_29", + "32": "/root/E_drawer3_32", + "30": "/root/E_drawer3_32/E_handle_30", + "31": "/root/E_drawer3_32/E_part3_1_31", + "33": "/root/E_RaDMANSo_chest_of_3_drawers_brown_walnut_effect_90x48x81cm_1/E_tabletop_33", + "7": "/root/E_RaDMANSo_chest_of_3_drawers_brown_walnut_effect_90x48x81cm_1/E_part7_7", + "8": "/root/E_RaDMANSo_chest_of_3_drawers_brown_walnut_effect_90x48x81cm_1/E_part6_8" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/RADMANSO_chest_of_3_drawers_brown_walnut_effect_90x48x81cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/RADMANSO_chest_of_3_drawers_brown_walnut_effect_90x48x81cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..897eebbcbb9c476f2189caeb519a5c9c3c6f5831 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RADMANSO_chest_of_3_drawers_brown_walnut_effect_90x48x81cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9581867681dd20bfef272965869dfd3f4b79ee2b253424742659a6f8cc1eeb82 +size 618403 diff --git a/Articulated_objects/Ikea_furniture/RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm/.thumbs/256x256/model_RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm.usd.png b/Articulated_objects/Ikea_furniture/RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm/.thumbs/256x256/model_RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm.usd.png new file mode 100755 index 0000000000000000000000000000000000000000..824bbd399567120e7f9e7cfa5eb1670435b63454 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm/.thumbs/256x256/model_RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm.usd.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8d035094be2641a53c2c28f2c7b801331ab044679a0b511a8b85cecae90ba159 +size 28644 diff --git a/Articulated_objects/Ikea_furniture/RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm/model_RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm.json b/Articulated_objects/Ikea_furniture/RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm/model_RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm.json new file mode 100755 index 0000000000000000000000000000000000000000..c68b3719dc70154bda6591366dce950fd026c6ce --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm/model_RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm.json @@ -0,0 +1,29 @@ +{ + "models": { + "cap_0": { + "name": "cap_0", + "parentPath": "/World", + "server": "/home/extwin/usd", + "vaultID": "mv", + "modelID": "fedsfsdfd", + "view_dict": { + "0": "/World/cap_0/v_0" + }, + "offset": [ + 0, + 0, + 0 + ], + "rotation": [ + 0, + 0, + 0 + ], + "scale": [ + 1, + 1, + 1 + ] + } + } +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm/model_RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm.usd b/Articulated_objects/Ikea_furniture/RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm/model_RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..3e87bc7e3c4cf3fe60d013ac2df48833183af756 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm/model_RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b285b37e3b881793f72df3592279679b2cb065a3436df42cf8211624b318cf80 +size 17499 diff --git a/Articulated_objects/Ikea_furniture/RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm/resource/img/29d62ea32d96d96c6cfd7e7eb47982f3.png b/Articulated_objects/Ikea_furniture/RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm/resource/img/29d62ea32d96d96c6cfd7e7eb47982f3.png new file mode 100755 index 0000000000000000000000000000000000000000..257d90da11803485bdb01e73b1a1d73899422cc7 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm/resource/img/29d62ea32d96d96c6cfd7e7eb47982f3.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:62ba2833ca0f232e3660bf2da5d63433bd39d46b77523fdc2c59a53d9f335061 +size 402927 diff --git a/Articulated_objects/Ikea_furniture/RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm/resource/img/effdfaad612583405524cadfa6cd919c.png b/Articulated_objects/Ikea_furniture/RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm/resource/img/effdfaad612583405524cadfa6cd919c.png new file mode 100755 index 0000000000000000000000000000000000000000..8083fea2e6745f4d31746212e33d11f3f7393d9c --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm/resource/img/effdfaad612583405524cadfa6cd919c.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:76eeb4f485f6029695e3df4df307dfc3e2ee1225366e78feb4641c7a4a7b0b93 +size 398360 diff --git a/Articulated_objects/Ikea_furniture/RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm/resource/material.usd b/Articulated_objects/Ikea_furniture/RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..653051f93b86b369232b77983156af38bfa9999a --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:64ea9f480f8859a46a8ca8e199bfe97d8f4ef35c6fb6d20878041fb6fe7bc8be +size 2291 diff --git a/Articulated_objects/Ikea_furniture/RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..c691540ce304d27d4c00ba6756da904a0c227027 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm/resource/v_69323/element_path.json @@ -0,0 +1,7 @@ +{ + "14": "/root/E_door1_14", + "18": "/root/E_door1_14/E_handle_18", + "22": "/root/E_door2_22", + "21": "/root/E_door2_22/E_handle_21", + "3": "/root/E_RAKKESTAD_wardrobe_with_2_doors_black_brown_79x176cm_3" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..e556a85c1c41422f73e15b136cf76abe37a3c8a4 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RAKKESTAD_wardrobe_with_2_doors_ black_brown_79x176cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:595feb514046b54ade2840ad0b8ca5f27460e51ab32f44b13611ec3365fc3b3c +size 179031 diff --git a/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/.collect.mapping.json b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/.collect.mapping.json new file mode 100755 index 0000000000000000000000000000000000000000..0af7265bc151e42e3630b6b040b87ae1c7c6bd43 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/.collect.mapping.json @@ -0,0 +1,53 @@ +{ + "version": "1.0", + "file_records": [ + { + "source_url": "C:/NVIDIA/Materials/2023_1/Base/Metals/Aluminum_Cast.mdl", + "source_hash": "329d4d2ffaa90add2048cf6ba11dbaa0c212f7ba", + "target_url": "./NVIDIA/Materials/2023_1/Base/Metals/Aluminum_Cast.mdl", + "target_hash": "bd6d7e7297d512f83b57209f9b768300f59bcd4f" + }, + { + "source_url": "C:/NVIDIA/Materials/2023_1/Base/Plastics/Plastic_Acrylic.mdl", + "source_hash": "66cf939a7e67b14ecb57330f8d9060b708441b54", + "target_url": "./NVIDIA/Materials/2023_1/Base/Plastics/Plastic_Acrylic.mdl", + "target_hash": "985df4f16bd1f843c1b79e0360724788e85b8d57" + }, + { + "source_url": "C:/xufang/USD Room/IKEA/Three/1/RIDSPO_Desk_oak_140X70cm/resource/img/1694f0537ccc1c37f61dbefec8cbcf42.png", + "source_hash": "a1a53f60fda322782e119e50fab54d6082e39dc9", + "target_url": "./resource/img/1694f0537ccc1c37f61dbefec8cbcf42.png", + "target_hash": "a1a53f60fda322782e119e50fab54d6082e39dc9" + }, + { + "source_url": "C:/xufang/USD Room/IKEA/Three/1/RIDSPO_Desk_oak_140X70cm/resource/img/483dcbac4a1683d2ec4e73847ceb6123.png", + "source_hash": "2d21ac85fb2ecffb4d6b5bbbd6f945f446419a0e", + "target_url": "./resource/img/483dcbac4a1683d2ec4e73847ceb6123.png", + "target_hash": "2d21ac85fb2ecffb4d6b5bbbd6f945f446419a0e" + }, + { + "source_url": "C:/xufang/USD Room/IKEA/Three/1/RIDSPO_Desk_oak_140X70cm/resource/img/e0df6c76bda26bdb67693c3a1804b73d.png", + "source_hash": "03c241c6738f4acded6069b8ae396acc0e90edba", + "target_url": "./resource/img/e0df6c76bda26bdb67693c3a1804b73d.png", + "target_hash": "03c241c6738f4acded6069b8ae396acc0e90edba" + }, + { + "source_url": "C:/NVIDIA/Materials/2023_1/Base/Metals/Aluminum_Cast/Aluminum_Cast_BaseColor.png", + "source_hash": "6f0c1fd1e1de83f5f684414659e2f1f1ff1aab6c", + "target_url": "./NVIDIA/Materials/2023_1/Base/Metals/Aluminum_Cast/Aluminum_Cast_BaseColor.png", + "target_hash": "6f0c1fd1e1de83f5f684414659e2f1f1ff1aab6c" + }, + { + "source_url": "C:/NVIDIA/Materials/2023_1/Base/Metals/Aluminum_Cast/Aluminum_Cast_ORM.png", + "source_hash": "909f7da4db506505ae0c54313851592a2b954725", + "target_url": "./NVIDIA/Materials/2023_1/Base/Metals/Aluminum_Cast/Aluminum_Cast_ORM.png", + "target_hash": "909f7da4db506505ae0c54313851592a2b954725" + }, + { + "source_url": "C:/NVIDIA/Materials/2023_1/Base/Metals/Aluminum_Cast/Aluminum_Cast_N.png", + "source_hash": "637ed21aa84ba71683d69c2d5fe305051b2439cf", + "target_url": "./NVIDIA/Materials/2023_1/Base/Metals/Aluminum_Cast/Aluminum_Cast_N.png", + "target_hash": "637ed21aa84ba71683d69c2d5fe305051b2439cf" + } + ] +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/.thumbs/256x256/model_RIDSPO_Desk_oak_140X70cm.usd.png b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/.thumbs/256x256/model_RIDSPO_Desk_oak_140X70cm.usd.png new file mode 100755 index 0000000000000000000000000000000000000000..d788631ffe9b8c4747aac605403a778bee27fc60 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/.thumbs/256x256/model_RIDSPO_Desk_oak_140X70cm.usd.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5f1c600662d3237141ead78ba65b97e38d7579d971054dde330a8c93ec09ba2 +size 50220 diff --git a/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/NVIDIA/Materials/2023_1/Base/Metals/Aluminum_Cast.mdl b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/NVIDIA/Materials/2023_1/Base/Metals/Aluminum_Cast.mdl new file mode 100755 index 0000000000000000000000000000000000000000..429842f836b917a518f5040bd9db6ec55400ce08 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/NVIDIA/Materials/2023_1/Base/Metals/Aluminum_Cast.mdl @@ -0,0 +1,54 @@ +mdl 1.4; + +import ::OmniPBR::OmniPBR; +import ::anno::author; +import ::anno::description; +import ::anno::display_name; +import ::anno::key_words; +import ::anno::version; +import ::tex::gamma_mode; +import ::state::normal; + +export material Aluminum_Cast(*) +[[ + ::anno::display_name("Omni PBR "), + ::anno::description("Omni PBR, supports ORM textures"), + ::anno::version(1, 0, 0, ""), + ::anno::author("NVIDIA CORPORATION"), + ::anno::key_words(string[]("omni", "PBR", "omniverse", "generic")) +]] + = ::OmniPBR::OmniPBR( + diffuse_color_constant: color(0.200000003f, 0.200000003f, 0.200000003f), + diffuse_texture: texture_2d("./Aluminum_Cast/Aluminum_Cast_BaseColor.png" /* tag 2739, version 3703676365 */, ::tex::gamma_srgb), + albedo_desaturation: 0.f, + albedo_add: 0.f, + albedo_brightness: 1.f, + diffuse_tint: color(1.f, 1.f, 1.f), + reflection_roughness_constant: 0.5f, + reflection_roughness_texture_influence: 1.f, + reflectionroughness_texture: texture_2d(), + metallic_constant: 0.f, + metallic_texture_influence: 1.f, + metallic_texture: texture_2d(), + specular_level: 0.5f, + enable_ORM_texture: true, + ORM_texture: texture_2d("./Aluminum_Cast/Aluminum_Cast_ORM.png" /* tag 2741, version 2892271140 */, ::tex::gamma_linear), + ao_to_diffuse: 0.f, + ao_texture: texture_2d(), + enable_emission: false, + emissive_color: color(1.f, 0.100000001f, 0.100000001f), + emissive_mask_texture: texture_2d(), + emissive_intensity: 40.f, + bump_factor: 1.f, + normalmap_texture: texture_2d("./Aluminum_Cast/Aluminum_Cast_N.png" /* tag 2743, version 2148533726 */, ::tex::gamma_linear), + detail_bump_factor: 0.300000012f, + detail_normalmap_texture: texture_2d(), + project_uvw: false, + world_or_object: false, + uv_space_index: 0, + texture_translate: float2(0.f), + texture_rotate: 0.f, + texture_scale: float2(1.f), + detail_texture_translate: float2(0.f), + detail_texture_rotate: 0.f, + detail_texture_scale: float2(1.f)); diff --git a/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/NVIDIA/Materials/2023_1/Base/Metals/Aluminum_Cast/Aluminum_Cast_BaseColor.png b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/NVIDIA/Materials/2023_1/Base/Metals/Aluminum_Cast/Aluminum_Cast_BaseColor.png new file mode 100755 index 0000000000000000000000000000000000000000..ca744539be764116ef8d64a9ef9eb815f00814d7 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/NVIDIA/Materials/2023_1/Base/Metals/Aluminum_Cast/Aluminum_Cast_BaseColor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03ab7494d37e1f6551a26894628c5fe03a65b4d85a09ed11337e184852a580b3 +size 1154931 diff --git a/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/NVIDIA/Materials/2023_1/Base/Metals/Aluminum_Cast/Aluminum_Cast_N.png b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/NVIDIA/Materials/2023_1/Base/Metals/Aluminum_Cast/Aluminum_Cast_N.png new file mode 100755 index 0000000000000000000000000000000000000000..d01c8569858b610ab3b5594f97590a5d9a2a922e --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/NVIDIA/Materials/2023_1/Base/Metals/Aluminum_Cast/Aluminum_Cast_N.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:812c0161ea14abc581cb35c47b33dc6005c089f8e82dca6cb4dd4832deb0556c +size 6557833 diff --git a/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/NVIDIA/Materials/2023_1/Base/Metals/Aluminum_Cast/Aluminum_Cast_ORM.png b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/NVIDIA/Materials/2023_1/Base/Metals/Aluminum_Cast/Aluminum_Cast_ORM.png new file mode 100755 index 0000000000000000000000000000000000000000..9c237244127ac6fdce0ded7cb69a55533864a962 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/NVIDIA/Materials/2023_1/Base/Metals/Aluminum_Cast/Aluminum_Cast_ORM.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:571eba5a99da444b681609a722a29914490c6dae45d230dac471a45875211a4c +size 4198310 diff --git a/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/NVIDIA/Materials/2023_1/Base/Plastics/Plastic_Acrylic.mdl b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/NVIDIA/Materials/2023_1/Base/Plastics/Plastic_Acrylic.mdl new file mode 100755 index 0000000000000000000000000000000000000000..33bd1f592cc894346d3ba08a8ededbb320dd4e8e --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/NVIDIA/Materials/2023_1/Base/Plastics/Plastic_Acrylic.mdl @@ -0,0 +1,21 @@ +mdl 1.3; + +import ::OmniGlass::OmniGlass; +import ::tex::gamma_mode; +import ::state::normal; + +export material Plastic_Acrylic(*) + = OmniGlass::OmniGlass( + absorption_coeff: color(1.f, 1.f, 1.f), + glass_color: color(1.f, 1.f, 1.f), + use_glass_color_texture: false, + glass_color_texture: texture_2d(), + frosting_roughness: 0.f, + glass_ior: 1.5f, + thin_walled: true, + project_uvw: false, + world_or_object: false, + uv_space_index: 0, + texture_translate: float2(0.f), + texture_rotate: 0.f, + texture_scale: float2(1.f)); \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/model_RIDSPO_Desk_oak_140X70cm.json b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/model_RIDSPO_Desk_oak_140X70cm.json new file mode 100755 index 0000000000000000000000000000000000000000..c68b3719dc70154bda6591366dce950fd026c6ce --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/model_RIDSPO_Desk_oak_140X70cm.json @@ -0,0 +1,29 @@ +{ + "models": { + "cap_0": { + "name": "cap_0", + "parentPath": "/World", + "server": "/home/extwin/usd", + "vaultID": "mv", + "modelID": "fedsfsdfd", + "view_dict": { + "0": "/World/cap_0/v_0" + }, + "offset": [ + 0, + 0, + 0 + ], + "rotation": [ + 0, + 0, + 0 + ], + "scale": [ + 1, + 1, + 1 + ] + } + } +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/model_RIDSPO_Desk_oak_140X70cm.usd b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/model_RIDSPO_Desk_oak_140X70cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..1667c5ff60c25629479f09e5df850db2cc5240ef --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/model_RIDSPO_Desk_oak_140X70cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:836d68c17a323c448122d09bda4a1e317093d486f4da25ffc463ba4ff0dc6f18 +size 17850 diff --git a/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/resource/img/1694f0537ccc1c37f61dbefec8cbcf42.png b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/resource/img/1694f0537ccc1c37f61dbefec8cbcf42.png new file mode 100755 index 0000000000000000000000000000000000000000..1f363c9a3be34e18993c49aaa4e4e5f25b2719f2 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/resource/img/1694f0537ccc1c37f61dbefec8cbcf42.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c72c33f2ea598898cd0942a74d1a3aaedcf10d0640752cae9b030bbd4f4fb39 +size 20148 diff --git a/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/resource/img/483dcbac4a1683d2ec4e73847ceb6123.png b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/resource/img/483dcbac4a1683d2ec4e73847ceb6123.png new file mode 100755 index 0000000000000000000000000000000000000000..d2b517b52b47848e20159c1369ce07f65ebb023a --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/resource/img/483dcbac4a1683d2ec4e73847ceb6123.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:317bce7301e0a42d1287fe3f835d457a7fca616034974eafd03e49bfcc4aca70 +size 50650 diff --git a/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/resource/img/e0df6c76bda26bdb67693c3a1804b73d.png b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/resource/img/e0df6c76bda26bdb67693c3a1804b73d.png new file mode 100755 index 0000000000000000000000000000000000000000..447489c94aae10cf7ef55002794e09998786a00f --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/resource/img/e0df6c76bda26bdb67693c3a1804b73d.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b659c523f29eece612bd0b56399e6428687c6f260565cdcb1eabc7261526345 +size 170360 diff --git a/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/resource/material.usd b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..d118c3ec1270c185f7c2f722339cee8081fbffe2 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a9ff0f2c2d19afc0a64f595ff51855902b9cca31151a5da7d4cc25944c194b1 +size 3086 diff --git a/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..90f2fc4cb8e314f814042656d4f3aa238eccaf3a --- /dev/null +++ b/Articulated_objects/Ikea_furniture/RIDSPO_Desk_oak_140X70cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f18b88d598b41f6bb820f7d3546c4da63c8a804dd62f512ee9f6fe601ea50c3 +size 5473605 diff --git a/Articulated_objects/Ikea_furniture/SMAGORA_wardrobe_white_80x50x187cm/.thumbs/256x256/model_SMAGORA_wardrobe_white_80x50x187cm.usd.png b/Articulated_objects/Ikea_furniture/SMAGORA_wardrobe_white_80x50x187cm/.thumbs/256x256/model_SMAGORA_wardrobe_white_80x50x187cm.usd.png new file mode 100755 index 0000000000000000000000000000000000000000..397dc8a9aa80a8df2ebd65527eebd818cdf354b3 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/SMAGORA_wardrobe_white_80x50x187cm/.thumbs/256x256/model_SMAGORA_wardrobe_white_80x50x187cm.usd.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3655b30b6c25d0d3062821a3deee4a2a7e56bc3c0ddd387c5716bccba088203b +size 16490 diff --git a/Articulated_objects/Ikea_furniture/SMAGORA_wardrobe_white_80x50x187cm/model_SMAGORA_wardrobe_white_80x50x187cm.json b/Articulated_objects/Ikea_furniture/SMAGORA_wardrobe_white_80x50x187cm/model_SMAGORA_wardrobe_white_80x50x187cm.json new file mode 100755 index 0000000000000000000000000000000000000000..c68b3719dc70154bda6591366dce950fd026c6ce --- /dev/null +++ b/Articulated_objects/Ikea_furniture/SMAGORA_wardrobe_white_80x50x187cm/model_SMAGORA_wardrobe_white_80x50x187cm.json @@ -0,0 +1,29 @@ +{ + "models": { + "cap_0": { + "name": "cap_0", + "parentPath": "/World", + "server": "/home/extwin/usd", + "vaultID": "mv", + "modelID": "fedsfsdfd", + "view_dict": { + "0": "/World/cap_0/v_0" + }, + "offset": [ + 0, + 0, + 0 + ], + "rotation": [ + 0, + 0, + 0 + ], + "scale": [ + 1, + 1, + 1 + ] + } + } +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/SMAGORA_wardrobe_white_80x50x187cm/model_SMAGORA_wardrobe_white_80x50x187cm.usd b/Articulated_objects/Ikea_furniture/SMAGORA_wardrobe_white_80x50x187cm/model_SMAGORA_wardrobe_white_80x50x187cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..96f738d3a72e711a202145a38a54706e74e465ec --- /dev/null +++ b/Articulated_objects/Ikea_furniture/SMAGORA_wardrobe_white_80x50x187cm/model_SMAGORA_wardrobe_white_80x50x187cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09f62e8652f308d83c2ea9ae3463c3c53a8db2c5ddfa4aa18f0696d2921eb81e +size 12806 diff --git a/Articulated_objects/Ikea_furniture/SMAGORA_wardrobe_white_80x50x187cm/resource/img/ca9bbc8d0a9843c2432483b82df178a7.png b/Articulated_objects/Ikea_furniture/SMAGORA_wardrobe_white_80x50x187cm/resource/img/ca9bbc8d0a9843c2432483b82df178a7.png new file mode 100755 index 0000000000000000000000000000000000000000..b550612f47b9da8f63cb955d84afdee053c492d8 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/SMAGORA_wardrobe_white_80x50x187cm/resource/img/ca9bbc8d0a9843c2432483b82df178a7.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d37201474d62863ccc820601e0a67f04e76f37deb9ec5c91bf1d58c6aca34874 +size 41930 diff --git a/Articulated_objects/Ikea_furniture/SMAGORA_wardrobe_white_80x50x187cm/resource/material.usd b/Articulated_objects/Ikea_furniture/SMAGORA_wardrobe_white_80x50x187cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..657d244d75371ce34c5f3def30e8c8a261714eb3 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/SMAGORA_wardrobe_white_80x50x187cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:277c1ec2eb4ed156c0f836d95d3b7c30058faed80e27da9797edbb582f6863f9 +size 2019 diff --git a/Articulated_objects/Ikea_furniture/SMAGORA_wardrobe_white_80x50x187cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/SMAGORA_wardrobe_white_80x50x187cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..e2812da8a32f65acbd17bf573e955e81291778d9 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/SMAGORA_wardrobe_white_80x50x187cm/resource/v_69323/element_path.json @@ -0,0 +1,10 @@ +{ + "1": "/root/E_SMaGoRA_wardrobe_white_80x50x187cm_1", + "10": "/root/E_door1_10", + "11": "/root/E_door2_11", + "12": "/root/E_door1_10/E_handle_12", + "13": "/root/E_door2_11/E_handle_13", + "21": "/root/E_SMaGoRA_wardrobe_white_80x50x187cm_1/E_pole_21", + "23": "/root/E_SMaGoRA_wardrobe_white_80x50x187cm_1/E_shelf_23", + "24": "/root/E_SMaGoRA_wardrobe_white_80x50x187cm_1/E_shelf_24" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/SMAGORA_wardrobe_white_80x50x187cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/SMAGORA_wardrobe_white_80x50x187cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..5d22d5f5fe3fff9fd018df0c4ecce43f034335e4 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/SMAGORA_wardrobe_white_80x50x187cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a9c3759a79ebf82581114929867002550aebcb98912d000fdc4514de437a821 +size 632234 diff --git a/Articulated_objects/Ikea_furniture/STOCKHOLM_2025_Sideboard_oak_veneer_161x42x83cm/model_STOCKHOLM_2025_Sideboard_oak_veneer_161x42x83cm.usd b/Articulated_objects/Ikea_furniture/STOCKHOLM_2025_Sideboard_oak_veneer_161x42x83cm/model_STOCKHOLM_2025_Sideboard_oak_veneer_161x42x83cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..25f1c0a56a994728f34257e14b859bfeb9a36450 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/STOCKHOLM_2025_Sideboard_oak_veneer_161x42x83cm/model_STOCKHOLM_2025_Sideboard_oak_veneer_161x42x83cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:967b416d8d1c967b0293de0027ca0d4293bb831fb881625bf5a47c186674e441 +size 20630 diff --git a/Articulated_objects/Ikea_furniture/STOCKHOLM_2025_Sideboard_oak_veneer_161x42x83cm/resource/img/34190a09eaccd8a12b198ffa6521d6e7.png b/Articulated_objects/Ikea_furniture/STOCKHOLM_2025_Sideboard_oak_veneer_161x42x83cm/resource/img/34190a09eaccd8a12b198ffa6521d6e7.png new file mode 100755 index 0000000000000000000000000000000000000000..344fbfecf701f830c705f7fd26a3f6072ec28c2b --- /dev/null +++ b/Articulated_objects/Ikea_furniture/STOCKHOLM_2025_Sideboard_oak_veneer_161x42x83cm/resource/img/34190a09eaccd8a12b198ffa6521d6e7.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1cfb70a24b64d70a80aac562793361ef17e26a77adf0c354115e4510bfe46f17 +size 209668 diff --git a/Articulated_objects/Ikea_furniture/STOCKHOLM_2025_Sideboard_oak_veneer_161x42x83cm/resource/material.usd b/Articulated_objects/Ikea_furniture/STOCKHOLM_2025_Sideboard_oak_veneer_161x42x83cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..7de793af9da83d3e8c77c6f2576fdb760f5d66c6 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/STOCKHOLM_2025_Sideboard_oak_veneer_161x42x83cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c94cc1f798ea82e5888a15e8cfed261cae2df9749c211b4645f60deef3d7bbb8 +size 2025 diff --git a/Articulated_objects/Ikea_furniture/STOCKHOLM_2025_Sideboard_oak_veneer_161x42x83cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/STOCKHOLM_2025_Sideboard_oak_veneer_161x42x83cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..968598bfc8da256b676b6cecc59d63088baded6d --- /dev/null +++ b/Articulated_objects/Ikea_furniture/STOCKHOLM_2025_Sideboard_oak_veneer_161x42x83cm/resource/v_69323/element_path.json @@ -0,0 +1,14 @@ +{ + "27": "/root/E_drawer1_27", + "28": "/root/E_door1_28", + "29": "/root/E_drawer2_29", + "31": "/root/E_door2_31", + "32": "/root/E_door3_32", + "33": "/root/E_door4_33", + "9": "/root/E_STOCKHOLM_2025_Sideboard_oak_veneer_161x42x83cm_9", + "34": "/root/E_STOCKHOLM_2025_Sideboard_oak_veneer_161x42x83cm_9/E_shelf_34", + "35": "/root/E_STOCKHOLM_2025_Sideboard_oak_veneer_161x42x83cm_9/E_shelf_35", + "36": "/root/E_STOCKHOLM_2025_Sideboard_oak_veneer_161x42x83cm_9/E_tabletop_36", + "42": "/root/E_STOCKHOLM_2025_Sideboard_oak_veneer_161x42x83cm_9/E_part1_42", + "9Geo": "/root/E_STOCKHOLM_2025_Sideboard_oak_veneer_161x42x83cm_9/E_STOCKHOLM_2025_Sideboard_oak_veneer_161x42x83cm_9Geo" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/STOCKHOLM_2025_Sideboard_oak_veneer_161x42x83cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/STOCKHOLM_2025_Sideboard_oak_veneer_161x42x83cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..83ca0495b3cac7c73b2691255b54d269c0c9023c --- /dev/null +++ b/Articulated_objects/Ikea_furniture/STOCKHOLM_2025_Sideboard_oak_veneer_161x42x83cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f7a7aa31ae3e5535be84418694a8a69ab94e98b43d1482449cf913c7546b5148 +size 35451 diff --git a/Articulated_objects/Ikea_furniture/SUNDVIK_Childrens_desk_white_60x45cm/model_SUNDVIK_Childrens_desk_white_60x45cm.usd b/Articulated_objects/Ikea_furniture/SUNDVIK_Childrens_desk_white_60x45cm/model_SUNDVIK_Childrens_desk_white_60x45cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..e4ee46e53fb9f47161571d9863f3f168bf211f0e --- /dev/null +++ b/Articulated_objects/Ikea_furniture/SUNDVIK_Childrens_desk_white_60x45cm/model_SUNDVIK_Childrens_desk_white_60x45cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a1fce35d26318323b2cd12902b5457b9965dfb49532d8aac55b387ed0972cd86 +size 87312 diff --git a/Articulated_objects/Ikea_furniture/SUNDVIK_Childrens_desk_white_60x45cm/resource/img/e6fcff107016ffc4fa693b9b86d95208.png b/Articulated_objects/Ikea_furniture/SUNDVIK_Childrens_desk_white_60x45cm/resource/img/e6fcff107016ffc4fa693b9b86d95208.png new file mode 100755 index 0000000000000000000000000000000000000000..b9648c6dfa061f2b24a0498ed86b54629ff829a3 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/SUNDVIK_Childrens_desk_white_60x45cm/resource/img/e6fcff107016ffc4fa693b9b86d95208.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d839f1ae3158a3cea4a05a42eea488e54a72d18b854dcbbbc98e0e9258004d0 +size 252777 diff --git a/Articulated_objects/Ikea_furniture/SUNDVIK_Childrens_desk_white_60x45cm/resource/material.usd b/Articulated_objects/Ikea_furniture/SUNDVIK_Childrens_desk_white_60x45cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..8967a8ecaa0312702c855abb5ee9ab44ca6ec13a --- /dev/null +++ b/Articulated_objects/Ikea_furniture/SUNDVIK_Childrens_desk_white_60x45cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0972f5d671d6560f568c28529a542c186b2275cf9ebf5a69f7d827f35290350f +size 2027 diff --git a/Articulated_objects/Ikea_furniture/SUNDVIK_Childrens_desk_white_60x45cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/SUNDVIK_Childrens_desk_white_60x45cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..42d41fd1f2565a18da45b5d453d921aeccfa266e --- /dev/null +++ b/Articulated_objects/Ikea_furniture/SUNDVIK_Childrens_desk_white_60x45cm/resource/v_69323/element_path.json @@ -0,0 +1,10 @@ +{ + "25": "/root/E_NORDKISA_Dressing_table_bamboo_76x47cm_25", + "18": "/root/E_NORDKISA_Dressing_table_bamboo_76x47cm_25/E_part1_18", + "19": "/root/E_lid_19", + "20": "/root/E_NORDKISA_Dressing_table_bamboo_76x47cm_25/E_tabletop_20", + "21": "/root/E_NORDKISA_Dressing_table_bamboo_76x47cm_25/E_shelf_21", + "22": "/root/E_NORDKISA_Dressing_table_bamboo_76x47cm_25/E_part4_22", + "23": "/root/E_NORDKISA_Dressing_table_bamboo_76x47cm_25/E_part3_23", + "24": "/root/E_NORDKISA_Dressing_table_bamboo_76x47cm_25/E_part2_24" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/SUNDVIK_Childrens_desk_white_60x45cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/SUNDVIK_Childrens_desk_white_60x45cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..1f430cac09d2c9047dcec168204afe361fe78510 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/SUNDVIK_Childrens_desk_white_60x45cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1af9207129346a35ae8eb8cd0a2971d0c92ac581ac006552cfd380fa8bfb797a +size 268064 diff --git a/Articulated_objects/Ikea_furniture/SUNDVIK_wardrobe_white_80x50x172cm/model_SUNDVIK_wardrobe_white_80x50x172cm.usd b/Articulated_objects/Ikea_furniture/SUNDVIK_wardrobe_white_80x50x172cm/model_SUNDVIK_wardrobe_white_80x50x172cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..d4aaf320e1ffb0a00a7a7b1af4ae638fea3943f5 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/SUNDVIK_wardrobe_white_80x50x172cm/model_SUNDVIK_wardrobe_white_80x50x172cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:698e9117e54be534c92c4a115bf4950d2af806b27e456ca7b9c47960f250f5b0 +size 13710 diff --git a/Articulated_objects/Ikea_furniture/SUNDVIK_wardrobe_white_80x50x172cm/resource/img/ff3c4a97620aba12810d836aa7f790a4.png b/Articulated_objects/Ikea_furniture/SUNDVIK_wardrobe_white_80x50x172cm/resource/img/ff3c4a97620aba12810d836aa7f790a4.png new file mode 100755 index 0000000000000000000000000000000000000000..fae6f8795f3d57716d7bf0575036612690ca3a55 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/SUNDVIK_wardrobe_white_80x50x172cm/resource/img/ff3c4a97620aba12810d836aa7f790a4.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1990f9cd9ca553530108dc1b3bcda812e2ef704cc2b84f67867f7798fe0fa4ac +size 75624 diff --git a/Articulated_objects/Ikea_furniture/SUNDVIK_wardrobe_white_80x50x172cm/resource/material.usd b/Articulated_objects/Ikea_furniture/SUNDVIK_wardrobe_white_80x50x172cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..797ea43aa340ad7e3b5e6b2f331a479a0624d5d6 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/SUNDVIK_wardrobe_white_80x50x172cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b8137616d00c9d10c7f483cc14716d6f10061099d4e133cff402b34096a72f8 +size 2027 diff --git a/Articulated_objects/Ikea_furniture/SUNDVIK_wardrobe_white_80x50x172cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/SUNDVIK_wardrobe_white_80x50x172cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..007da230ddeb98c8d2a7773a8da40107db528efa --- /dev/null +++ b/Articulated_objects/Ikea_furniture/SUNDVIK_wardrobe_white_80x50x172cm/resource/v_69323/element_path.json @@ -0,0 +1,11 @@ +{ + "3": "/root/E_SUNDVIK_wardrobe_white_80x50x172cm_3", + "46": "/root/E_door1_46", + "47": "/root/E_door2_47", + "48": "/root/E_SUNDVIK_wardrobe_white_80x50x172cm_3/E_shelf_48", + "49": "/root/E_SUNDVIK_wardrobe_white_80x50x172cm_3/E_shelf_49", + "5": "/root/E_door2_47/E_handle_5", + "9": "/root/E_drawer_9", + "7": "/root/E_drawer_9/E_handle_7", + "8": "/root/E_door1_46/E_handle_8" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/SUNDVIK_wardrobe_white_80x50x172cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/SUNDVIK_wardrobe_white_80x50x172cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..5bc4c512d5e144f6976c390b31be8b2da21a3509 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/SUNDVIK_wardrobe_white_80x50x172cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d38e99e74365f23aef9c3adcdf70cec2aab777013c8ab523f65c3c35801883a +size 436871 diff --git a/Articulated_objects/Ikea_furniture/SYVDE_Dressing_ table_white_100x48cm/model_SYVDE_Dressing_ table_white_100x48cm.usd b/Articulated_objects/Ikea_furniture/SYVDE_Dressing_ table_white_100x48cm/model_SYVDE_Dressing_ table_white_100x48cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..65f0e665464222fc4999b2cdac8dcd3d75a162ec --- /dev/null +++ b/Articulated_objects/Ikea_furniture/SYVDE_Dressing_ table_white_100x48cm/model_SYVDE_Dressing_ table_white_100x48cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b5ed16f3c43a4e5f4dfffb1ca75b6bb7bfa45ea2c4b67eb066c4800876eaaa4f +size 15173 diff --git a/Articulated_objects/Ikea_furniture/SYVDE_Dressing_ table_white_100x48cm/resource/img/f03eca65f229508c83145d0965ee89ad.png b/Articulated_objects/Ikea_furniture/SYVDE_Dressing_ table_white_100x48cm/resource/img/f03eca65f229508c83145d0965ee89ad.png new file mode 100755 index 0000000000000000000000000000000000000000..59436fa36e498eeb61cc187a15f90c94e61e528e --- /dev/null +++ b/Articulated_objects/Ikea_furniture/SYVDE_Dressing_ table_white_100x48cm/resource/img/f03eca65f229508c83145d0965ee89ad.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e8d9a6d9a2bd7b9725f1cb8f5212871c9aea649ff1ea8508b597c2c790addee7 +size 120637 diff --git a/Articulated_objects/Ikea_furniture/SYVDE_Dressing_ table_white_100x48cm/resource/material.usd b/Articulated_objects/Ikea_furniture/SYVDE_Dressing_ table_white_100x48cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..96bbaf2bfd78b81a879ad456b3aa9a8cad5d0ef1 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/SYVDE_Dressing_ table_white_100x48cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59dd9b829b361838755c63533d4156f1d4569a2ece60b688ea3f019a77403f89 +size 2027 diff --git a/Articulated_objects/Ikea_furniture/SYVDE_Dressing_ table_white_100x48cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/SYVDE_Dressing_ table_white_100x48cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..ef9e89f0d11343a8920caad4909e2ac0f5db1333 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/SYVDE_Dressing_ table_white_100x48cm/resource/v_69323/element_path.json @@ -0,0 +1,12 @@ +{ + "20": "/root/E_SYVDE_Dressing_table_white_100x48cm_20", + "20Geo": "/root/E_SYVDE_Dressing_table_white_100x48cm_20/E_SYVDE_Dressing_table_white_100x48cm_20Geo", + "27": "/root/E_drawer2_27", + "27Geo": "/root/E_drawer2_27/E_drawer2_27Geo", + "28": "/root/E_SYVDE_Dressing_table_white_100x48cm_20/E_tabletop_28", + "29": "/root/E_drawer1_29", + "29Geo": "/root/E_drawer1_29/E_drawer1_29Geo", + "31": "/root/E_SYVDE_Dressing_table_white_100x48cm_20/E_tabletop_31", + "32": "/root/E_drawer1_29/E_handle_32", + "34": "/root/E_drawer2_27/E_handle_34" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/SYVDE_Dressing_ table_white_100x48cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/SYVDE_Dressing_ table_white_100x48cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..feb76b0cbe80e9a972eaf8466c9bdcc99bcd33e0 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/SYVDE_Dressing_ table_white_100x48cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:85fba97fa680dbbebcea9ae2a7115a20699431a7a5a7d31c56f9a0fc367e3ae1 +size 181235 diff --git a/Articulated_objects/Ikea_furniture/TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm/.collect.mapping.json b/Articulated_objects/Ikea_furniture/TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm/.collect.mapping.json new file mode 100755 index 0000000000000000000000000000000000000000..3703f566f7c94637f6b464f28d92429b6c49d9d7 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm/.collect.mapping.json @@ -0,0 +1,29 @@ +{ + "version": "1.0", + "file_records": [ + { + "source_url": "C:/xufang/USD Room/IKEA/Three/TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm/model_TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm.usd", + "source_hash": "58f7b0affbaf0de91c00e629f7e91555d476c5b7", + "target_url": "./model_TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm.usd", + "target_hash": "b7318b0f955c47e28e4adc226bc1d5c00166b4ec" + }, + { + "source_url": "C:/NVIDIA/Materials/2023_1/Base/Glass/Clear_Glass.mdl", + "source_hash": "4f0a8491bb73517be6b84a9bb9abd025e2b1d06c", + "target_url": "./NVIDIA/Materials/2023_1/Base/Glass/Clear_Glass.mdl", + "target_hash": "5385c445996e5161eaa90d9dc1e1f968deffcbd2" + }, + { + "source_url": "C:/xufang/USD Room/IKEA/Three/TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm/resource/img/4ef85973f68cbab6254a8863eff1c8e0.png", + "source_hash": "5532fffed172a7fc395d4d8e7eaf8651b67be8c1", + "target_url": "./resource/img/4ef85973f68cbab6254a8863eff1c8e0.png", + "target_hash": "5532fffed172a7fc395d4d8e7eaf8651b67be8c1" + }, + { + "source_url": "C:/xufang/USD Room/IKEA/Three/TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm/resource/img/5c4d20a8e9bda80eecd0a095f926107d.png", + "source_hash": "05e42012090745d7c97ac5075fbdbc88c92ac607", + "target_url": "./resource/img/5c4d20a8e9bda80eecd0a095f926107d.png", + "target_hash": "05e42012090745d7c97ac5075fbdbc88c92ac607" + } + ] +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm/NVIDIA/Materials/2023_1/Base/Glass/Clear_Glass.mdl b/Articulated_objects/Ikea_furniture/TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm/NVIDIA/Materials/2023_1/Base/Glass/Clear_Glass.mdl new file mode 100755 index 0000000000000000000000000000000000000000..d6c08a66ec3d6465474bf1e93968a42c369059a1 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm/NVIDIA/Materials/2023_1/Base/Glass/Clear_Glass.mdl @@ -0,0 +1,43 @@ +mdl 1.3; + +import ::OmniGlass::OmniGlass; +import ::tex::gamma_mode; +import ::state::normal; + +export material Clear_Glass(*) + = OmniGlass::OmniGlass( + absorption_coeff: color(1.f, 1.f, 1.f), + glass_color: color(1.f, 1.f, 1.f), + use_glass_color_texture: false, + glass_color_texture: texture_2d(), + frosting_roughness: 0.f, + glass_ior: 1.52f, + thin_walled: true, + project_uvw: false, + world_or_object: false, + uv_space_index: 0, + texture_translate: float2(0.f), + texture_rotate: 0.f, + texture_scale: float2(1.f)); + +/* +mdl 1.5; + +import ::Library::AEC::Materials::Templates::GlassWithVolume::GlassWithVolume; +import ::tex::gamma_mode; +import ::state::normal; + +export material Clear_Glass(*) + = ::Library::AEC::Materials::Templates::GlassWithVolume::GlassWithVolume( + thin_walled: true, + transmission_color: color(1.f, 1.f, 1.f), + roughness_texture: texture_2d(), + ior: 1.52f, + transmission_color_texture: texture_2d(), + roughness_texture_influence: 0.f, + roughness: 0.f, + reflection_color_texture: texture_2d(), + reflection_color: color(1.f, 1.f, 1.f), + depth: 0.0001f, + normal_map_texture: texture_2d()); +*/ diff --git a/Articulated_objects/Ikea_furniture/TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm/model_TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm.usd b/Articulated_objects/Ikea_furniture/TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm/model_TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..baf693b187f3dfbbc7875da76ad7b6e8823b7b10 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm/model_TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aad7cf1a22d5c02d093fbac736a7194d6afa08cde31bbfa0dc8b3276246acda6 +size 18125 diff --git a/Articulated_objects/Ikea_furniture/TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm/resource/img/4ef85973f68cbab6254a8863eff1c8e0.png b/Articulated_objects/Ikea_furniture/TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm/resource/img/4ef85973f68cbab6254a8863eff1c8e0.png new file mode 100755 index 0000000000000000000000000000000000000000..6c13f5f4d9559c079a1a86c08dea06386bd2f8db --- /dev/null +++ b/Articulated_objects/Ikea_furniture/TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm/resource/img/4ef85973f68cbab6254a8863eff1c8e0.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:267a1e0f8120663f7862c29156118217c87d28c7c5d8564b1bd35ceb0be55160 +size 84004 diff --git a/Articulated_objects/Ikea_furniture/TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm/resource/img/5c4d20a8e9bda80eecd0a095f926107d.png b/Articulated_objects/Ikea_furniture/TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm/resource/img/5c4d20a8e9bda80eecd0a095f926107d.png new file mode 100755 index 0000000000000000000000000000000000000000..978c22bb8eba06a7d24b31a20f4ac1b945e5470b --- /dev/null +++ b/Articulated_objects/Ikea_furniture/TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm/resource/img/5c4d20a8e9bda80eecd0a095f926107d.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d393fd6bcf08ddf1ecf533d12f0d096a190e895fe00917aab235c2b10600bff +size 701715 diff --git a/Articulated_objects/Ikea_furniture/TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm/resource/material.usd b/Articulated_objects/Ikea_furniture/TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..4b3f54e2f2e46670c2d5ea8005f858c4cc6e108d --- /dev/null +++ b/Articulated_objects/Ikea_furniture/TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4a6bdc70c1c91f080b97e409cc7d977a2bb437f554b3cf315eec39c50d8cb6e +size 2829 diff --git a/Articulated_objects/Ikea_furniture/TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..2614be9d56d3e029f826a061833d9486248f74a5 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/TONSTAD_Cabinet_with_sliding_glass_doors_brown_stained_oak_veneer_121x37x120cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c53b194ef31bf4e1586cac488a6e70dd661d32d8b863d615d675eb3ee759d83a +size 1362790 diff --git a/Articulated_objects/Ikea_furniture/TONSTAD_Side_table_off_white_64x40cm/model_TONSTAD_Side_table_off_white_64x40cm(1).usd b/Articulated_objects/Ikea_furniture/TONSTAD_Side_table_off_white_64x40cm/model_TONSTAD_Side_table_off_white_64x40cm(1).usd new file mode 100755 index 0000000000000000000000000000000000000000..6f93921c7b276e96e8fcfd817b31323ee54f8337 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/TONSTAD_Side_table_off_white_64x40cm/model_TONSTAD_Side_table_off_white_64x40cm(1).usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1aeccf4db451f7b2f7ebe379da367be3202eb58dff40dabede6e8005c2b5f171 +size 14865 diff --git a/Articulated_objects/Ikea_furniture/TONSTAD_Side_table_off_white_64x40cm/resource/img/ae9a0e8cc24ab949267c23b4e7737fb2.png b/Articulated_objects/Ikea_furniture/TONSTAD_Side_table_off_white_64x40cm/resource/img/ae9a0e8cc24ab949267c23b4e7737fb2.png new file mode 100755 index 0000000000000000000000000000000000000000..da9cb3b667e383ae33ac033d60c25a2c9d1d7adb --- /dev/null +++ b/Articulated_objects/Ikea_furniture/TONSTAD_Side_table_off_white_64x40cm/resource/img/ae9a0e8cc24ab949267c23b4e7737fb2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9ea673a1787b0861ca9260d3d48c56d2346165346b0f727fa04ffbd902bcc67c +size 33291 diff --git a/Articulated_objects/Ikea_furniture/TONSTAD_Side_table_off_white_64x40cm/resource/img/effdfaad612583405524cadfa6cd919c.png b/Articulated_objects/Ikea_furniture/TONSTAD_Side_table_off_white_64x40cm/resource/img/effdfaad612583405524cadfa6cd919c.png new file mode 100755 index 0000000000000000000000000000000000000000..a3012ede8b1586282869e056789edebd12219a1f --- /dev/null +++ b/Articulated_objects/Ikea_furniture/TONSTAD_Side_table_off_white_64x40cm/resource/img/effdfaad612583405524cadfa6cd919c.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e1c4b6cb5fbf31e0f0325f5f4d04894c5c636905aad12a8e4522020fe76697e +size 16166 diff --git a/Articulated_objects/Ikea_furniture/TONSTAD_Side_table_off_white_64x40cm/resource/material.usd b/Articulated_objects/Ikea_furniture/TONSTAD_Side_table_off_white_64x40cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..65f5d194842211037f825bb12195131b7214f0d7 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/TONSTAD_Side_table_off_white_64x40cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d11c2c84b3c326f815b30d4c6707adaab2fde6d065857160601172451e17f2b +size 2313 diff --git a/Articulated_objects/Ikea_furniture/TONSTAD_Side_table_off_white_64x40cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/TONSTAD_Side_table_off_white_64x40cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..6e32d8b8069db509a399fdab8177348e85f9be96 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/TONSTAD_Side_table_off_white_64x40cm/resource/v_69323/element_path.json @@ -0,0 +1,10 @@ +{ + "1": "/root/E_TONSTAD_Side_table_off_white_64x40cm_1", + "10": "/root/E_TONSTAD_Side_table_off_white_64x40cm_1/E_tabletop_10", + "11": "/root/E_TONSTAD_Side_table_off_white_64x40cm_1/E_shelf_11", + "12": "/root/E_TONSTAD_Side_table_off_white_64x40cm_1/E_part1_12", + "13": "/root/E_TONSTAD_Side_table_off_white_64x40cm_1/E_part3_13", + "16": "/root/E_TONSTAD_Side_table_off_white_64x40cm_1/E_part2_16", + "1Geo": "/root/E_TONSTAD_Side_table_off_white_64x40cm_1/E_TONSTAD_Side_table_off_white_64x40cm_1Geo", + "2": "/root/E_drawer_2" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/TONSTAD_Side_table_off_white_64x40cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/TONSTAD_Side_table_off_white_64x40cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..2d9db8758a4f7fc92ad4a4ee6f2481350195e0c8 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/TONSTAD_Side_table_off_white_64x40cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a99fa453f00ba7bcb15c25e90d33ee0c46f605c83003d54688d4d8970d85a1d +size 1164553 diff --git a/Articulated_objects/Ikea_furniture/VIHALS_Sideboard_white_140x37x75cm/model_VIHALS_Sideboard_white_140x37x75cm.usd b/Articulated_objects/Ikea_furniture/VIHALS_Sideboard_white_140x37x75cm/model_VIHALS_Sideboard_white_140x37x75cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..5d99424f598728ae029b4b8da3b07902146345b3 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/VIHALS_Sideboard_white_140x37x75cm/model_VIHALS_Sideboard_white_140x37x75cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e66017316bef20a01c4709bd41da705691db3af0a3c6c11eab44cf1680b5451 +size 39835 diff --git a/Articulated_objects/Ikea_furniture/VIHALS_Sideboard_white_140x37x75cm/resource/img/e16c9ee4b6c49308654d1a55352547fa.png b/Articulated_objects/Ikea_furniture/VIHALS_Sideboard_white_140x37x75cm/resource/img/e16c9ee4b6c49308654d1a55352547fa.png new file mode 100755 index 0000000000000000000000000000000000000000..0cb447f17abaef3ef980fc6c8e58c133cafb3b76 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/VIHALS_Sideboard_white_140x37x75cm/resource/img/e16c9ee4b6c49308654d1a55352547fa.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9437fff6b0f9787d43e8c056248e509e84578c4c4b9de3d520e67348348d6eaf +size 82527 diff --git a/Articulated_objects/Ikea_furniture/VIHALS_Sideboard_white_140x37x75cm/resource/material.usd b/Articulated_objects/Ikea_furniture/VIHALS_Sideboard_white_140x37x75cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..3190da68f92ea7c401352f083a0e14356afe0517 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/VIHALS_Sideboard_white_140x37x75cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:21c0137ce3b6e14ba00e9aa232474ba45735279f153dd24389ecde3676fa8cca +size 2019 diff --git a/Articulated_objects/Ikea_furniture/VIHALS_Sideboard_white_140x37x75cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/VIHALS_Sideboard_white_140x37x75cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..670fe29d484049a415e7f473692771d8e3fcfcee --- /dev/null +++ b/Articulated_objects/Ikea_furniture/VIHALS_Sideboard_white_140x37x75cm/resource/v_69323/element_path.json @@ -0,0 +1,25 @@ +{ + "25": "/root/E_VIHALS_Sideboard_white_140x37x75cm_25", + "25Geo": "/root/E_VIHALS_Sideboard_white_140x37x75cm_25/E_VIHALS_Sideboard_white_140x37x75cm_25Geo", + "35": "/root/E_door1_35", + "35Geo": "/root/E_door1_35/E_door1_35Geo", + "37": "/root/E_drawer1_37", + "37Geo": "/root/E_drawer1_37/E_drawer1_37Geo", + "40": "/root/E_door3_40", + "40Geo": "/root/E_door3_40/E_door3_40Geo", + "41": "/root/E_doorr4_41", + "41Geo": "/root/E_doorr4_41/E_doorr4_41Geo", + "42": "/root/E_door2_42", + "42Geo": "/root/E_door2_42/E_door2_42Geo", + "44": "/root/E_drawer2_44", + "44Geo": "/root/E_drawer2_44/E_drawer2_44Geo", + "47": "/root/E_VIHALS_Sideboard_white_140x37x75cm_25/E_tabletop_47", + "48": "/root/E_VIHALS_Sideboard_white_140x37x75cm_25/E_shelf_48", + "49": "/root/E_VIHALS_Sideboard_white_140x37x75cm_25/E_shelf_49", + "51": "/root/E_door1_35/E_handle_51", + "52": "/root/E_door2_42/E_handle_52", + "53": "/root/E_door3_40/E_handle_53", + "54": "/root/E_doorr4_41/E_handle_54", + "55": "/root/E_drawer2_44/E_handle_55", + "56": "/root/E_drawer1_37/E_handle_56" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/VIHALS_Sideboard_white_140x37x75cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/VIHALS_Sideboard_white_140x37x75cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..52d04b6bc03126e754fbd6d1f3733bae36488f99 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/VIHALS_Sideboard_white_140x37x75cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:13a3a020169f3ad5529c6e6db9d60eba72a00786e2e842bfd0ae8e28072f3952 +size 99131 diff --git a/Articulated_objects/Ikea_furniture/VIKHAMMER_bedside_table_walnut_veneer_40x39cm/model_VIKHAMMER_bedside_table_walnut_veneer_40x39cm.usd b/Articulated_objects/Ikea_furniture/VIKHAMMER_bedside_table_walnut_veneer_40x39cm/model_VIKHAMMER_bedside_table_walnut_veneer_40x39cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..5fb4b1c4299beef80be25506c7875d78374702a3 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/VIKHAMMER_bedside_table_walnut_veneer_40x39cm/model_VIKHAMMER_bedside_table_walnut_veneer_40x39cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff7182b38c73f5a7c6402a25ceb642ebb052eb31d769f6c96f40d63fb08fe9f4 +size 13051 diff --git a/Articulated_objects/Ikea_furniture/VIKHAMMER_bedside_table_walnut_veneer_40x39cm/resource/img/ae9a0e8cc24ab949267c23b4e7737fb2.png b/Articulated_objects/Ikea_furniture/VIKHAMMER_bedside_table_walnut_veneer_40x39cm/resource/img/ae9a0e8cc24ab949267c23b4e7737fb2.png new file mode 100755 index 0000000000000000000000000000000000000000..e46fcc7401b7e2ff05f0a770aa186c57c9859290 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/VIKHAMMER_bedside_table_walnut_veneer_40x39cm/resource/img/ae9a0e8cc24ab949267c23b4e7737fb2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4c92c8d995bfcf20eedca96a50d13f9d1c4dddd4cb5c22dc9f025cdc43ba6a9 +size 40816 diff --git a/Articulated_objects/Ikea_furniture/VIKHAMMER_bedside_table_walnut_veneer_40x39cm/resource/img/b82c1d924ce634316ba5b5470b7529a6.png b/Articulated_objects/Ikea_furniture/VIKHAMMER_bedside_table_walnut_veneer_40x39cm/resource/img/b82c1d924ce634316ba5b5470b7529a6.png new file mode 100755 index 0000000000000000000000000000000000000000..50c0d2aaeb4d7d95df602a4c8ebf12bd90fd0d79 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/VIKHAMMER_bedside_table_walnut_veneer_40x39cm/resource/img/b82c1d924ce634316ba5b5470b7529a6.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:214c36377eec8e6da0afffb5ae1a5ecf9726196f1d06ffa1b1b694176101f3f9 +size 21749 diff --git a/Articulated_objects/Ikea_furniture/VIKHAMMER_bedside_table_walnut_veneer_40x39cm/resource/material.usd b/Articulated_objects/Ikea_furniture/VIKHAMMER_bedside_table_walnut_veneer_40x39cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..d1382a436daddb95c7808be008e4c65c611aca57 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/VIKHAMMER_bedside_table_walnut_veneer_40x39cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e61032fdd0b3cd8aa400698f6523cfbb50ba16faae243d1cf38a5b205a526a20 +size 2292 diff --git a/Articulated_objects/Ikea_furniture/VIKHAMMER_bedside_table_walnut_veneer_40x39cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/VIKHAMMER_bedside_table_walnut_veneer_40x39cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..64403e2e736c977b3a93ce231bfc48016c9eaf65 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/VIKHAMMER_bedside_table_walnut_veneer_40x39cm/resource/v_69323/element_path.json @@ -0,0 +1,8 @@ +{ + "6": "/root/E_VIKHAMMER_bedside_table_walnut_veneer_40x39cm_6", + "15": "/root/E_VIKHAMMER_bedside_table_walnut_veneer_40x39cm_6/E_shelf_15", + "16": "/root/E_VIKHAMMER_bedside_table_walnut_veneer_40x39cm_6/E_tabletop_16", + "2": "/root/E_VIKHAMMER_bedside_table_walnut_veneer_40x39cm_6/E_part02_2", + "3": "/root/E_drawer_3", + "8": "/root/E_VIKHAMMER_bedside_table_walnut_veneer_40x39cm_6/E_part01_8" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/VIKHAMMER_bedside_table_walnut_veneer_40x39cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/VIKHAMMER_bedside_table_walnut_veneer_40x39cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..bcb9e6444c536a4e8ad0cccc27194808df784f3d --- /dev/null +++ b/Articulated_objects/Ikea_furniture/VIKHAMMER_bedside_table_walnut_veneer_40x39cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:38971dfef813b47df3b9ae1385e5833261638f60d0d001963643270ceaadace3 +size 822914 diff --git a/Articulated_objects/Ikea_furniture/VITBERGET_shoe_cabinet_storage_white_105x40x107cm/model_VITBERGET_shoe_cabinet_storage_white_105x40x107cm.usd b/Articulated_objects/Ikea_furniture/VITBERGET_shoe_cabinet_storage_white_105x40x107cm/model_VITBERGET_shoe_cabinet_storage_white_105x40x107cm.usd new file mode 100755 index 0000000000000000000000000000000000000000..25b6074f54c2fa4766bd65905bb3611fe76fca44 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/VITBERGET_shoe_cabinet_storage_white_105x40x107cm/model_VITBERGET_shoe_cabinet_storage_white_105x40x107cm.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d7b966d31cbde3ebe33c88419afc46f9e43d7a23f963ec0fa333cca4417c758d +size 79717 diff --git a/Articulated_objects/Ikea_furniture/VITBERGET_shoe_cabinet_storage_white_105x40x107cm/resource/img/7ddd7c0217630d6497b4caf35c2bacb2.png b/Articulated_objects/Ikea_furniture/VITBERGET_shoe_cabinet_storage_white_105x40x107cm/resource/img/7ddd7c0217630d6497b4caf35c2bacb2.png new file mode 100755 index 0000000000000000000000000000000000000000..48bc39c201dc82a597698bd14936e64a20a670a9 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/VITBERGET_shoe_cabinet_storage_white_105x40x107cm/resource/img/7ddd7c0217630d6497b4caf35c2bacb2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c44010723de341c9c42eecbc159b5ef93cd42675256d56f2ca5e3a29fc8742ed +size 26654 diff --git a/Articulated_objects/Ikea_furniture/VITBERGET_shoe_cabinet_storage_white_105x40x107cm/resource/material.usd b/Articulated_objects/Ikea_furniture/VITBERGET_shoe_cabinet_storage_white_105x40x107cm/resource/material.usd new file mode 100755 index 0000000000000000000000000000000000000000..08e6fa75a02356ffa96e73a614b77e86a532ea97 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/VITBERGET_shoe_cabinet_storage_white_105x40x107cm/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef31c282cb0030d7ac7ece81813c6bc1f59fa4bc9ce812c47eab8809dd97ba62 +size 2255 diff --git a/Articulated_objects/Ikea_furniture/VITBERGET_shoe_cabinet_storage_white_105x40x107cm/resource/v_69323/element_path.json b/Articulated_objects/Ikea_furniture/VITBERGET_shoe_cabinet_storage_white_105x40x107cm/resource/v_69323/element_path.json new file mode 100755 index 0000000000000000000000000000000000000000..53c14429a8c902d9fd3a46eac8ce0205176291d0 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/VITBERGET_shoe_cabinet_storage_white_105x40x107cm/resource/v_69323/element_path.json @@ -0,0 +1,25 @@ +{ + "29": "/root/E_door2_29", + "29Geo": "/root/E_door2_29/E_door2_29Geo", + "33": "/root/E_door2_29/E_handle_33", + "34": "/root/E_door1_34", + "34Geo": "/root/E_door1_34/E_door1_34Geo", + "35": "/root/E_door1_34/E_handle_35", + "42": "/root/E_drawer1_42", + "37": "/root/E_drawer1_42/E_handle_37", + "42Geo": "/root/E_drawer1_42/E_drawer1_42Geo", + "46": "/root/E_VITBERGET_shoe_cabinet_storage_white_105x40x107cm_46", + "46Geo": "/root/E_VITBERGET_shoe_cabinet_storage_white_105x40x107cm_46/E_VITBERGET_shoe_cabinet_storage_white_105x40x107cm_46Geo", + "54": "/root/E_drawer2_54", + "51": "/root/E_drawer2_54/E_handle_51", + "54Geo": "/root/E_drawer2_54/E_drawer2_54Geo", + "58": "/root/E_VITBERGET_shoe_cabinet_storage_white_105x40x107cm_46/E_part1_58", + "60": "/root/E_VITBERGET_shoe_cabinet_storage_white_105x40x107cm_46/E_part2_60", + "61": "/root/E_VITBERGET_shoe_cabinet_storage_white_105x40x107cm_46/E_tabletop_61", + "62": "/root/E_VITBERGET_shoe_cabinet_storage_white_105x40x107cm_46/E_shelf_62", + "63": "/root/E_VITBERGET_shoe_cabinet_storage_white_105x40x107cm_46/E_shelf_63", + "64": "/root/E_VITBERGET_shoe_cabinet_storage_white_105x40x107cm_46/E_shelf_64", + "65": "/root/E_VITBERGET_shoe_cabinet_storage_white_105x40x107cm_46/E_shelf_65", + "66": "/root/E_VITBERGET_shoe_cabinet_storage_white_105x40x107cm_46/E_shelf_66", + "67": "/root/E_VITBERGET_shoe_cabinet_storage_white_105x40x107cm_46/E_shelf_67" +} \ No newline at end of file diff --git a/Articulated_objects/Ikea_furniture/VITBERGET_shoe_cabinet_storage_white_105x40x107cm/resource/v_69323/link_0.usd b/Articulated_objects/Ikea_furniture/VITBERGET_shoe_cabinet_storage_white_105x40x107cm/resource/v_69323/link_0.usd new file mode 100755 index 0000000000000000000000000000000000000000..40d6cda9f97e17abf2ab1342d26844be79a265d3 --- /dev/null +++ b/Articulated_objects/Ikea_furniture/VITBERGET_shoe_cabinet_storage_white_105x40x107cm/resource/v_69323/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e56b6d128ded75c2c138ecb50b47461fc3c4b1399ea49c7f6dc9e49c2bba94f5 +size 185358 diff --git a/Articulated_objects/Medical_equipment/anesthesia_machine/.collect.mapping.json b/Articulated_objects/Medical_equipment/anesthesia_machine/.collect.mapping.json new file mode 100644 index 0000000000000000000000000000000000000000..12d49cb2179c1a247481caf2b21468d769f1e065 --- /dev/null +++ b/Articulated_objects/Medical_equipment/anesthesia_machine/.collect.mapping.json @@ -0,0 +1,41 @@ +{ + "version": "1.0", + "file_records": [ + { + "source_url": "https://omniverse-content-production.s3.us-west-2.amazonaws.com/Materials/2023_2_1/Base/Glass/Clear_Glass.mdl", + "source_hash": "b852150663322d4624fa32e1f0acd06a8ceacbdf", + "target_url": "./omniverse-content-production.s3.us-west-2.amazonaws.com/Materials/2023_2_1/Base/Glass/Clear_Glass.mdl", + "target_hash": "cc9eb12272734bfc4ca29152fd27a865a88b2671" + }, + { + "source_url": "D:/\u624b\u672f\u5ba4/operating_room/anesthesia_machine/resource/img/0186e847f4f84ad5e7514871692183b2.png", + "source_hash": "96a5ca530fa47c943a46ece8973388b3eda4ac6b", + "target_url": "./resource/img/0186e847f4f84ad5e7514871692183b2.png", + "target_hash": "96a5ca530fa47c943a46ece8973388b3eda4ac6b" + }, + { + "source_url": "D:/\u624b\u672f\u5ba4/operating_room/anesthesia_machine/resource/img/18cdcca066072dee175362d0d9cf1937.png", + "source_hash": "bf1d35e94a62cc3b1d6e593b8fe9d2b796ce9eeb", + "target_url": "./resource/img/18cdcca066072dee175362d0d9cf1937.png", + "target_hash": "bf1d35e94a62cc3b1d6e593b8fe9d2b796ce9eeb" + }, + { + "source_url": "D:/\u624b\u672f\u5ba4/operating_room/anesthesia_machine/resource/img/5f7290bee74825bd9a0a6f96eabcc188.png", + "source_hash": "20db6a38202985e1278cb69fbeea7cf17062150f", + "target_url": "./resource/img/5f7290bee74825bd9a0a6f96eabcc188.png", + "target_hash": "20db6a38202985e1278cb69fbeea7cf17062150f" + }, + { + "source_url": "D:/\u624b\u672f\u5ba4/operating_room/anesthesia_machine/resource/img/9e596e9e95f4270254c994e2a78b0dfb.png", + "source_hash": "dd4a7d4a161af52430940b14e617d9c13f397d68", + "target_url": "./resource/img/9e596e9e95f4270254c994e2a78b0dfb.png", + "target_hash": "dd4a7d4a161af52430940b14e617d9c13f397d68" + }, + { + "source_url": "D:/\u624b\u672f\u5ba4/operating_room/anesthesia_machine/resource/img/bcb8b32fa2442b07e5d3c4efb4965b4f.png", + "source_hash": "43ae97cb81366ab414d4456a017f06a37680d269", + "target_url": "./resource/img/bcb8b32fa2442b07e5d3c4efb4965b4f.png", + "target_hash": "43ae97cb81366ab414d4456a017f06a37680d269" + } + ] +} \ No newline at end of file diff --git a/Articulated_objects/Medical_equipment/anesthesia_machine/model_anesthesia_machine.usd b/Articulated_objects/Medical_equipment/anesthesia_machine/model_anesthesia_machine.usd new file mode 100644 index 0000000000000000000000000000000000000000..cc3c9da3428060ee7943582ee7ba644701342d8a --- /dev/null +++ b/Articulated_objects/Medical_equipment/anesthesia_machine/model_anesthesia_machine.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07bac24a39526945e2f934f7ef65759f98805dec2962c68fbe282deba2535b1d +size 1161292 diff --git a/Articulated_objects/Medical_equipment/anesthesia_machine/omniverse-content-production.s3.us-west-2.amazonaws.com/Materials/2023_2_1/Base/Glass/Clear_Glass.mdl b/Articulated_objects/Medical_equipment/anesthesia_machine/omniverse-content-production.s3.us-west-2.amazonaws.com/Materials/2023_2_1/Base/Glass/Clear_Glass.mdl new file mode 100644 index 0000000000000000000000000000000000000000..d6c08a66ec3d6465474bf1e93968a42c369059a1 --- /dev/null +++ b/Articulated_objects/Medical_equipment/anesthesia_machine/omniverse-content-production.s3.us-west-2.amazonaws.com/Materials/2023_2_1/Base/Glass/Clear_Glass.mdl @@ -0,0 +1,43 @@ +mdl 1.3; + +import ::OmniGlass::OmniGlass; +import ::tex::gamma_mode; +import ::state::normal; + +export material Clear_Glass(*) + = OmniGlass::OmniGlass( + absorption_coeff: color(1.f, 1.f, 1.f), + glass_color: color(1.f, 1.f, 1.f), + use_glass_color_texture: false, + glass_color_texture: texture_2d(), + frosting_roughness: 0.f, + glass_ior: 1.52f, + thin_walled: true, + project_uvw: false, + world_or_object: false, + uv_space_index: 0, + texture_translate: float2(0.f), + texture_rotate: 0.f, + texture_scale: float2(1.f)); + +/* +mdl 1.5; + +import ::Library::AEC::Materials::Templates::GlassWithVolume::GlassWithVolume; +import ::tex::gamma_mode; +import ::state::normal; + +export material Clear_Glass(*) + = ::Library::AEC::Materials::Templates::GlassWithVolume::GlassWithVolume( + thin_walled: true, + transmission_color: color(1.f, 1.f, 1.f), + roughness_texture: texture_2d(), + ior: 1.52f, + transmission_color_texture: texture_2d(), + roughness_texture_influence: 0.f, + roughness: 0.f, + reflection_color_texture: texture_2d(), + reflection_color: color(1.f, 1.f, 1.f), + depth: 0.0001f, + normal_map_texture: texture_2d()); +*/ diff --git a/Articulated_objects/Medical_equipment/anesthesia_machine/resource/img/0186e847f4f84ad5e7514871692183b2.png b/Articulated_objects/Medical_equipment/anesthesia_machine/resource/img/0186e847f4f84ad5e7514871692183b2.png new file mode 100644 index 0000000000000000000000000000000000000000..6a652337ebb67959ef7db58a94d06d14a89c4b8e --- /dev/null +++ b/Articulated_objects/Medical_equipment/anesthesia_machine/resource/img/0186e847f4f84ad5e7514871692183b2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f466ce4f629c10b10596cf665d074064cca590a6e5c7ed9e554bb4603309df70 +size 60584 diff --git a/Articulated_objects/Medical_equipment/anesthesia_machine/resource/img/18cdcca066072dee175362d0d9cf1937.png b/Articulated_objects/Medical_equipment/anesthesia_machine/resource/img/18cdcca066072dee175362d0d9cf1937.png new file mode 100644 index 0000000000000000000000000000000000000000..5f38f6b153fc5ee33f2a0c31b4418dcee705a1a1 --- /dev/null +++ b/Articulated_objects/Medical_equipment/anesthesia_machine/resource/img/18cdcca066072dee175362d0d9cf1937.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea595b4ec97dcac5f7ddcfbd731b9ef0561d08106e91e962e6d920c7890ad76b +size 27838 diff --git a/Articulated_objects/Medical_equipment/anesthesia_machine/resource/img/5f7290bee74825bd9a0a6f96eabcc188.png b/Articulated_objects/Medical_equipment/anesthesia_machine/resource/img/5f7290bee74825bd9a0a6f96eabcc188.png new file mode 100644 index 0000000000000000000000000000000000000000..c2b609a7b27e4de0bdbd8f3366fd831c1cff87df --- /dev/null +++ b/Articulated_objects/Medical_equipment/anesthesia_machine/resource/img/5f7290bee74825bd9a0a6f96eabcc188.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c450e33fe75b993b29acbc6d35a8385e1321a65f891292bcc8f967a77ab595bc +size 6390 diff --git a/Articulated_objects/Medical_equipment/anesthesia_machine/resource/img/9e596e9e95f4270254c994e2a78b0dfb.png b/Articulated_objects/Medical_equipment/anesthesia_machine/resource/img/9e596e9e95f4270254c994e2a78b0dfb.png new file mode 100644 index 0000000000000000000000000000000000000000..93141b027a5502932e36a15587eec1292f1ca8f5 --- /dev/null +++ b/Articulated_objects/Medical_equipment/anesthesia_machine/resource/img/9e596e9e95f4270254c994e2a78b0dfb.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56440b9b67d1b9ce03c1f7e3c1a6a13f6ed99153cae19bf64d400efe99a93664 +size 129590 diff --git a/Articulated_objects/Medical_equipment/anesthesia_machine/resource/img/bcb8b32fa2442b07e5d3c4efb4965b4f.png b/Articulated_objects/Medical_equipment/anesthesia_machine/resource/img/bcb8b32fa2442b07e5d3c4efb4965b4f.png new file mode 100644 index 0000000000000000000000000000000000000000..2f74e69cc60bb21c6472ed62ecaf90071f41480f --- /dev/null +++ b/Articulated_objects/Medical_equipment/anesthesia_machine/resource/img/bcb8b32fa2442b07e5d3c4efb4965b4f.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e477deee8b9c9478f129c1db5303c00dc09ce951e71e9dc28266d8f0e9bd812 +size 31754 diff --git a/Articulated_objects/Medical_equipment/anesthesia_machine/resource/material.usd b/Articulated_objects/Medical_equipment/anesthesia_machine/resource/material.usd new file mode 100644 index 0000000000000000000000000000000000000000..461302e789a43915557f9248810d3bc518b1913d --- /dev/null +++ b/Articulated_objects/Medical_equipment/anesthesia_machine/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8435ef161657ba6d7db4ac41df7008238ba105f935f58cbab625ef1cd499224c +size 4081 diff --git a/Articulated_objects/Medical_equipment/anesthesia_machine/resource/v_0/link_0.usd b/Articulated_objects/Medical_equipment/anesthesia_machine/resource/v_0/link_0.usd new file mode 100644 index 0000000000000000000000000000000000000000..29423b91afba2c7c31dc22c55c056a2c8f41f823 --- /dev/null +++ b/Articulated_objects/Medical_equipment/anesthesia_machine/resource/v_0/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3679241e8e6b92e67927d0ebb3cf86c9efe21e7ded8d3e463c2aebad8e3d6e2b +size 30182693 diff --git a/Articulated_objects/Medical_equipment/anesthesia_machine001/model_anesthesia_machine001.usd b/Articulated_objects/Medical_equipment/anesthesia_machine001/model_anesthesia_machine001.usd new file mode 100644 index 0000000000000000000000000000000000000000..429d91fea5485aa0f1112c20b0456e338c5aa54a --- /dev/null +++ b/Articulated_objects/Medical_equipment/anesthesia_machine001/model_anesthesia_machine001.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a98f29b1c69fb87ecaca24cc503db3b504a9484b514b3d8723e77f901d61bc58 +size 30020 diff --git a/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/0924af59d61201d3417e4be10d0cb8b8.png b/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/0924af59d61201d3417e4be10d0cb8b8.png new file mode 100644 index 0000000000000000000000000000000000000000..cb89de8698846978de50292e4197d0d05354d776 --- /dev/null +++ b/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/0924af59d61201d3417e4be10d0cb8b8.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c683faff53cbcf3c6f8861d94ec02e857c17c346548e64a626d778dca23085bf +size 121490 diff --git a/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/16d677c5531102d62f3152748300e280.png b/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/16d677c5531102d62f3152748300e280.png new file mode 100644 index 0000000000000000000000000000000000000000..2c17108cc5b71a8631049cb70096ba0f3733554d --- /dev/null +++ b/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/16d677c5531102d62f3152748300e280.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a11ef9b2e9a0dc13e36eda4b9ef4d8e3563b5424cda40df7a9c04936bd76c2d +size 78018 diff --git a/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/4524969b505e504a0c1612d131d46a19.png b/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/4524969b505e504a0c1612d131d46a19.png new file mode 100644 index 0000000000000000000000000000000000000000..e311fafe27b0b9db021778b3d56fa7e5045f6d07 --- /dev/null +++ b/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/4524969b505e504a0c1612d131d46a19.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:75cbbd94e9b3e78bd9bba933c4504b506c14a0af4cd80622acce7e65a7d264b7 +size 318745 diff --git a/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/4b1134153d4640097fbe6bc4024492c7.png b/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/4b1134153d4640097fbe6bc4024492c7.png new file mode 100644 index 0000000000000000000000000000000000000000..41312d662440b4a227ef7242c1a21cc54cc861e3 --- /dev/null +++ b/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/4b1134153d4640097fbe6bc4024492c7.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:64772519d9846ef8a0e931a9a5f5447b02f0009e691aa6693ab6b5be049f9316 +size 64642 diff --git a/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/6a9d518bf8474ec9268c86cd7d0532a3.png b/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/6a9d518bf8474ec9268c86cd7d0532a3.png new file mode 100644 index 0000000000000000000000000000000000000000..5efb909b31241016d84b6b1cffe555736b165bf2 --- /dev/null +++ b/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/6a9d518bf8474ec9268c86cd7d0532a3.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96e557a95159c129740303fc56494b52de4a9d0660e8a77f255bb4bf2617a314 +size 38161 diff --git a/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/71f740f3c2655778fa8f2a023db9672d.png b/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/71f740f3c2655778fa8f2a023db9672d.png new file mode 100644 index 0000000000000000000000000000000000000000..3e473f9a64f2b99eb5bc25f7c6e829d85a055d18 --- /dev/null +++ b/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/71f740f3c2655778fa8f2a023db9672d.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ca91b969d636901e4762661f8332594bda003597b46afb4640f24725a5f59c6 +size 253592 diff --git a/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/792060f8594d216c99febe997a38c6fb.png b/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/792060f8594d216c99febe997a38c6fb.png new file mode 100644 index 0000000000000000000000000000000000000000..b0f892c9b18ae8b65271df70ba4b4189541c039f --- /dev/null +++ b/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/792060f8594d216c99febe997a38c6fb.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c2db084d1996548362d8ab6254deac77f1167bcea84e7950dde4744c026d742 +size 41871 diff --git a/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/976a21b3183293d0a6a362976664853d.png b/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/976a21b3183293d0a6a362976664853d.png new file mode 100644 index 0000000000000000000000000000000000000000..29cc7b26cfdece8080404d5f393601bb889bd1aa --- /dev/null +++ b/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/976a21b3183293d0a6a362976664853d.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc675e785589951d3c1a2c1ef6a9cdc7e2f65760cf4842bd781200a9f06b5ce9 +size 46573 diff --git a/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/985b2886d9d7ced596b65d8a56080e91.png b/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/985b2886d9d7ced596b65d8a56080e91.png new file mode 100644 index 0000000000000000000000000000000000000000..c78b286a958b655586bfafd252924a9d9b023a98 --- /dev/null +++ b/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/985b2886d9d7ced596b65d8a56080e91.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c828ebaef42864c5475e31e9373280a3029ebc7a28949470c9de2a7aa2ae6116 +size 6404 diff --git a/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/ed2b11aad41fcde9a6666eebd1942d49.png b/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/ed2b11aad41fcde9a6666eebd1942d49.png new file mode 100644 index 0000000000000000000000000000000000000000..396cf86009d72df07973b22bd4f02b3e2c466487 --- /dev/null +++ b/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/img/ed2b11aad41fcde9a6666eebd1942d49.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:27d616353635116f6df0ce19536750c61f3814a200d116f6c972e2989e0d70a9 +size 54702 diff --git a/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/material.usd b/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/material.usd new file mode 100644 index 0000000000000000000000000000000000000000..ecd923091f2c3a97f40af34f822ec6e2febd7902 --- /dev/null +++ b/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb940d1e28b079643b93b2d771d6970d83b56db365ce7c0840e4b996b7e30f05 +size 5892 diff --git a/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/v_0/element_path.json b/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/v_0/element_path.json new file mode 100644 index 0000000000000000000000000000000000000000..0fb0630e8e3f4e3073fa9b2ee7f61197175dd309 --- /dev/null +++ b/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/v_0/element_path.json @@ -0,0 +1,42 @@ +{ + "1": "/root/E_knob01_1", + "10": "/root/E_body_10", + "11": "/root/E_body_10/E_Component154_11", + "12": "/root/E_body_10/E_Component152_12", + "13": "/root/E_body_10/E_Component151_13", + "14": "/root/E_body_10/E_Component155_14", + "15": "/root/E_body_10/E_Component153_15", + "16": "/root/E_body_10/E_Component228_16", + "17": "/root/E_body_10/E_Component228_16/E_Component227_17", + "18": "/root/E_body_10/E_Component228_16/E_Component229M1_18", + "19": "/root/E_body_10/E_Component228_16/E_Component230M1_19", + "2": "/root/E_knob02_2", + "20": "/root/E_body_10/E_Component228_16/E_Component231_20", + "21": "/root/E_body_10/E_Component228_16/E_Component232_21", + "22": "/root/E_body_10/E_Component228_16/E_Component233M1_22", + "23": "/root/E_body_10/E_Component228_16/E_Component234_23", + "24": "/root/E_body_10/E_Component228_16/E_Component235_24", + "25": "/root/E_body_10/E_Component228_16/E_Component236_25", + "26": "/root/E_body_10/E_Component228_16/E_Component238_26", + "27": "/root/E_body_10/E_Component228_16/E_Component239_27", + "28": "/root/E_body_10/E_Component139_28", + "29": "/root/E_body_10/E_Component135_29", + "3": "/root/E_knob03_3", + "30": "/root/E_body_10/E_Component140_30", + "31": "/root/E_body_10/E_Component141_31", + "32": "/root/E_body_10/E_Component148_32", + "33": "/root/E_body_10/E_Component138_33", + "34": "/root/E_body_10/E_Component143_34", + "35": "/root/E_body_10/E_Component147_35", + "36": "/root/E_body_10/E_Component149_36", + "37": "/root/E_body_10/E_Component144_37", + "38": "/root/E_body_10/E_Component145_38", + "39": "/root/E_body_10/E_Component142_39", + "4": "/root/E_drawer_4", + "40": "/root/E_body_10/E_Component146_40", + "5": "/root/E_drawer_4/E_Group_5", + "6": "/root/E_drawer_4/E_handle_6", + "7": "/root/E_drawer_7", + "8": "/root/E_drawer_7/E_Group_8", + "9": "/root/E_drawer_7/E_handle_9" +} \ No newline at end of file diff --git a/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/v_0/link_0.usd b/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/v_0/link_0.usd new file mode 100644 index 0000000000000000000000000000000000000000..83011b6f4fce4c1a05b123bd7c4aba0baa9489a8 --- /dev/null +++ b/Articulated_objects/Medical_equipment/anesthesia_machine001/resource/v_0/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87a4e4018051e39ddadebcad1c00a8f1d3a2b3c5d539299f1185854cf53ec644 +size 23086826 diff --git a/Articulated_objects/Medical_equipment/delivery_bed/model_delivery_bed.usd b/Articulated_objects/Medical_equipment/delivery_bed/model_delivery_bed.usd new file mode 100644 index 0000000000000000000000000000000000000000..f182e056058086d6e87b30d48ca7bfce5c284504 --- /dev/null +++ b/Articulated_objects/Medical_equipment/delivery_bed/model_delivery_bed.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31195eb88da03a04a9c785def32c3dc2c13bacb6fc4f5ce4d075757c74ea7526 +size 10517069 diff --git a/Articulated_objects/Medical_equipment/delivery_bed/resource/img/7f5dcebc76f098d3b166e6c7179c31dd.png b/Articulated_objects/Medical_equipment/delivery_bed/resource/img/7f5dcebc76f098d3b166e6c7179c31dd.png new file mode 100644 index 0000000000000000000000000000000000000000..b44d700ceafbfaddd1756ad56e4abc0a53e439bc --- /dev/null +++ b/Articulated_objects/Medical_equipment/delivery_bed/resource/img/7f5dcebc76f098d3b166e6c7179c31dd.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31cc9fc997e0cfe7903818d7634e38bf0bbce59c56eb9cc35f38e4a891ded642 +size 43850 diff --git a/Articulated_objects/Medical_equipment/delivery_bed/resource/material.usd b/Articulated_objects/Medical_equipment/delivery_bed/resource/material.usd new file mode 100644 index 0000000000000000000000000000000000000000..5204bc117039f0c9e3242fc6019cdd8a3ec0627c --- /dev/null +++ b/Articulated_objects/Medical_equipment/delivery_bed/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8cf79bdf6afa1c9be243b242c9aa6560ae4f24808c0c03432b7bdfcf3e61dce4 +size 2729 diff --git a/Articulated_objects/Medical_equipment/delivery_bed/resource/v_0/element_path.json b/Articulated_objects/Medical_equipment/delivery_bed/resource/v_0/element_path.json new file mode 100644 index 0000000000000000000000000000000000000000..d0e0ec3f120b59a1ff6c7529a6ee627823fdefa4 --- /dev/null +++ b/Articulated_objects/Medical_equipment/delivery_bed/resource/v_0/element_path.json @@ -0,0 +1,187 @@ +{ + "1": "/root/E_body_1", + "10": "/root/E_body_1/E_Component246_10", + "100": "/root/E_body_1/E_Component291_100", + "101": "/root/E_body_1/E_Component291_101", + "102": "/root/E_body_1/E_Component292_102", + "103": "/root/E_body_1/E_Component292_103", + "104": "/root/E_body_1/E_link_104", + "105": "/root/E_body_1/E_link_105", + "106": "/root/E_body_1/E_link_106", + "107": "/root/E_body_1/E_link_107", + "108": "/root/E_body_1/E_wheel_108", + "109": "/root/E_body_1/E_wheel_109", + "11": "/root/E_body_1/E_Component243_11", + "110": "/root/E_body_1/E_wheel_110", + "111": "/root/E_body_1/E_wheel_111", + "112": "/root/E_body_1/E_Component344_112", + "113": "/root/E_body_1/E_Component333_113", + "114": "/root/E_left_114", + "115": "/root/E_left_114/E_Component266_115", + "116": "/root/E_left_114/E_Component266_116", + "117": "/root/E_left_114/E_Component276_117", + "118": "/root/E_left_114/E_Component266_118", + "119": "/root/E_left_114/E_Component266_119", + "12": "/root/E_body_1/E_Component246_12", + "120": "/root/E_left_114/E_Component278_120", + "121": "/root/E_left_114/E_Component269_121", + "122": "/root/E_left_114/E_Component267_122", + "123": "/root/E_left_114/E_Component273_123", + "124": "/root/E_left_114/E_Component279_124", + "125": "/root/E_left_114/E_Component279_125", + "126": "/root/E_right_126", + "127": "/root/E_right_126/E_Component266_127", + "128": "/root/E_right_126/E_Component266_128", + "129": "/root/E_right_126/E_Component266_129", + "13": "/root/E_body_1/E_Component247_13", + "130": "/root/E_right_126/E_Component266_130", + "131": "/root/E_right_126/E_Component279_131", + "132": "/root/E_right_126/E_Component269_132", + "133": "/root/E_right_126/E_Component279_133", + "134": "/root/E_right_126/E_Component276_134", + "135": "/root/E_right_126/E_Component271_135", + "136": "/root/E_right_126/E_Component278_136", + "137": "/root/E_right_126/E_Component267_137", + "138": "/root/E_left1_138", + "139": "/root/E_left1_138/E_Component339_139", + "14": "/root/E_body_1/E_Component248_14", + "140": "/root/E_left1_138/E_Component341_140", + "141": "/root/E_left1_138/E_Component338_141", + "142": "/root/E_left1_138/E_Component338_142", + "143": "/root/E_left1_138/E_Component332_143", + "144": "/root/E_left1_138/E_Component335_144", + "145": "/root/E_left1_138/E_Component334_145", + "146": "/root/E_left1_138/E_Component336_146", + "147": "/root/E_left1_138/E_Component337_147", + "148": "/root/E_left1_138/E_Component342_148", + "149": "/root/E_handle1_149", + "15": "/root/E_body_1/E_Component249_15", + "150": "/root/E_handle1_149/E_Component345_150", + "151": "/root/E_handle1_149/E_Component345_151", + "152": "/root/E_handle1_149/E_Component347_152", + "153": "/root/E_handle1_149/E_Component345_153", + "154": "/root/E_handle1_149/E_Component347_154", + "155": "/root/E_handle1_149/E_Component348_155", + "156": "/root/E_link1_156", + "157": "/root/E_link1_156/E_Group_157", + "158": "/root/E_link1_156/E_Component253_158", + "159": "/root/E_link1_159", + "16": "/root/E_body_1/E_Component249_16", + "160": "/root/E_link1_159/E_Group_160", + "161": "/root/E_link1_159/E_Component253_161", + "162": "/root/E_handle2_162", + "163": "/root/E_handle2_162/E_Component345_163", + "164": "/root/E_handle2_162/E_Component347_164", + "165": "/root/E_handle2_162/E_Component345_165", + "166": "/root/E_handle2_162/E_Component345_166", + "167": "/root/E_handle2_162/E_Component347_167", + "168": "/root/E_handle2_162/E_Component348_168", + "169": "/root/E_link1_169", + "17": "/root/E_body_1/E_Component248_17", + "170": "/root/E_link1_169/E_Group_170", + "171": "/root/E_link1_169/E_Component253_171", + "172": "/root/E_link1_172", + "173": "/root/E_link1_172/E_Group_173", + "174": "/root/E_link1_172/E_Component253_174", + "175": "/root/E_left1_175", + "176": "/root/E_left1_175/E_Component339_176", + "177": "/root/E_left1_175/E_Component341_177", + "178": "/root/E_left1_175/E_Component338_178", + "179": "/root/E_left1_175/E_Component338_179", + "18": "/root/E_body_1/E_Component249_18", + "180": "/root/E_left1_175/E_Component332_180", + "181": "/root/E_left1_175/E_Component335_181", + "182": "/root/E_left1_175/E_Component334_182", + "183": "/root/E_left1_175/E_Component336_183", + "184": "/root/E_left1_175/E_Component337_184", + "185": "/root/E_left1_175/E_Component342_185", + "19": "/root/E_body_1/E_Component249_19", + "2": "/root/E_body_1/E_Component240_2", + "20": "/root/E_body_1/E_Component244_20", + "21": "/root/E_body_1/E_Component250_21", + "22": "/root/E_body_1/E_Component251_22", + "23": "/root/E_body_1/E_Component244_23", + "24": "/root/E_body_1/E_Component244_24", + "25": "/root/E_body_1/E_Component244_25", + "26": "/root/E_body_1/E_Component244_26", + "27": "/root/E_body_1/E_Component244_27", + "28": "/root/E_body_1/E_Component244_28", + "29": "/root/E_body_1/E_Component244_29", + "3": "/root/E_body_1/E_Component242_3", + "30": "/root/E_body_1/E_Component244_30", + "31": "/root/E_body_1/E_Component244_31", + "32": "/root/E_body_1/E_Component244_32", + "33": "/root/E_body_1/E_Component251_33", + "34": "/root/E_body_1/E_Component254_34", + "35": "/root/E_body_1/E_Component250_35", + "36": "/root/E_body_1/E_Component250_36", + "37": "/root/E_body_1/E_Component253_37", + "38": "/root/E_body_1/E_Component253_38", + "39": "/root/E_body_1/E_Component255_39", + "4": "/root/E_body_1/E_Component243_4", + "40": "/root/E_body_1/E_Component250_40", + "41": "/root/E_body_1/E_Component255_41", + "42": "/root/E_body_1/E_Component256_42", + "43": "/root/E_body_1/E_Component256_43", + "44": "/root/E_body_1/E_Component257_44", + "45": "/root/E_body_1/E_Component254_45", + "46": "/root/E_body_1/E_Component253_46", + "47": "/root/E_body_1/E_Component253_47", + "48": "/root/E_body_1/E_Component253_48", + "49": "/root/E_body_1/E_Component253_49", + "5": "/root/E_body_1/E_Component244_5", + "50": "/root/E_body_1/E_Component254_50", + "51": "/root/E_body_1/E_Component258_51", + "52": "/root/E_body_1/E_Component259_52", + "53": "/root/E_body_1/E_Component260_53", + "54": "/root/E_body_1/E_Component259_54", + "55": "/root/E_body_1/E_Component262_55", + "56": "/root/E_body_1/E_Component263_56", + "57": "/root/E_body_1/E_Component259_57", + "58": "/root/E_body_1/E_Component258_58", + "59": "/root/E_body_1/E_Component259_59", + "6": "/root/E_body_1/E_Component244_6", + "60": "/root/E_body_1/E_Component262_60", + "61": "/root/E_body_1/E_Component263_61", + "62": "/root/E_body_1/E_Component262_62", + "63": "/root/E_body_1/E_Component263_63", + "64": "/root/E_body_1/E_Component260_64", + "65": "/root/E_body_1/E_Component263_65", + "66": "/root/E_body_1/E_Component264_66", + "67": "/root/E_body_1/E_Component265_67", + "68": "/root/E_body_1/E_Component268_68", + "69": "/root/E_body_1/E_Component270_69", + "7": "/root/E_body_1/E_Component244_7", + "70": "/root/E_body_1/E_Component262_70", + "71": "/root/E_body_1/E_Component272_71", + "72": "/root/E_body_1/E_Component272_72", + "73": "/root/E_body_1/E_Component268_73", + "74": "/root/E_body_1/E_Component274_74", + "75": "/root/E_body_1/E_Component275_75", + "76": "/root/E_body_1/E_Component277_76", + "77": "/root/E_body_1/E_Component277_77", + "78": "/root/E_body_1/E_Component280_78", + "79": "/root/E_body_1/E_Component280_79", + "8": "/root/E_body_1/E_Component245_8", + "80": "/root/E_body_1/E_Component281_80", + "81": "/root/E_body_1/E_Component281_81", + "82": "/root/E_body_1/E_Component282_82", + "83": "/root/E_body_1/E_Component283_83", + "84": "/root/E_body_1/E_Component283_84", + "85": "/root/E_body_1/E_Component284_85", + "86": "/root/E_body_1/E_Component285_86", + "87": "/root/E_body_1/E_Component286_87", + "88": "/root/E_body_1/E_Component287_88", + "89": "/root/E_body_1/E_Component288_89", + "9": "/root/E_body_1/E_Component242_9", + "90": "/root/E_body_1/E_Component289_90", + "91": "/root/E_body_1/E_Component290_91", + "92": "/root/E_body_1/E_Component291_92", + "93": "/root/E_body_1/E_Component291_93", + "94": "/root/E_body_1/E_Component291_94", + "95": "/root/E_body_1/E_Component291_95", + "96": "/root/E_body_1/E_Component291_96", + "97": "/root/E_body_1/E_Component291_97", + "98": "/root/E_body_1/E_Component291_98", + "99": "/root/E_body_1/E_Component290_99" +} \ No newline at end of file diff --git a/Articulated_objects/Medical_equipment/delivery_bed/resource/v_0/link_0.usd b/Articulated_objects/Medical_equipment/delivery_bed/resource/v_0/link_0.usd new file mode 100644 index 0000000000000000000000000000000000000000..9775d81fbc8b2df8fe9d269f6f1c830f081a6855 --- /dev/null +++ b/Articulated_objects/Medical_equipment/delivery_bed/resource/v_0/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5da7ab8eb17b022b682eeca18ccd7294d0a48abb96d0ddf0d7560dd54d410b9e +size 39023163 diff --git a/Articulated_objects/Medical_equipment/gastric-lavage_machine/model_gastric_lavage_machine.usd b/Articulated_objects/Medical_equipment/gastric-lavage_machine/model_gastric_lavage_machine.usd new file mode 100644 index 0000000000000000000000000000000000000000..8f57b05cae76c0880e2202a26c3d33e9843b85c2 --- /dev/null +++ b/Articulated_objects/Medical_equipment/gastric-lavage_machine/model_gastric_lavage_machine.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c24ddd1928d2d90391f9369529ae085c56253dc82059bd7b35a8d6ff9588dbb +size 15617 diff --git a/Articulated_objects/Medical_equipment/gastric-lavage_machine/resource/img/86e09c5288c77b6ff33458d3f35c67e2.png b/Articulated_objects/Medical_equipment/gastric-lavage_machine/resource/img/86e09c5288c77b6ff33458d3f35c67e2.png new file mode 100644 index 0000000000000000000000000000000000000000..4b4f78dd5b7a7e4731fac20937a83832b797d70a --- /dev/null +++ b/Articulated_objects/Medical_equipment/gastric-lavage_machine/resource/img/86e09c5288c77b6ff33458d3f35c67e2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f12c2e2301b94a6f1d20eb30d2b4965a0a687c024ffd5005b4cf79cfd59a0665 +size 5802 diff --git a/Articulated_objects/Medical_equipment/gastric-lavage_machine/resource/img/9a6fbf96b76d15b00053a85345e6a990.png b/Articulated_objects/Medical_equipment/gastric-lavage_machine/resource/img/9a6fbf96b76d15b00053a85345e6a990.png new file mode 100644 index 0000000000000000000000000000000000000000..de2868fcdd7cc61c37b9ece7f3d7d8c727e894d1 --- /dev/null +++ b/Articulated_objects/Medical_equipment/gastric-lavage_machine/resource/img/9a6fbf96b76d15b00053a85345e6a990.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f29fddc9008ecb87869cdc95099c4ccc04ddfa8623076c3bc0b1d8b6dc85343c +size 9973 diff --git a/Articulated_objects/Medical_equipment/gastric-lavage_machine/resource/img/a61e5222d8e6c74f8ca316ab60af99ce.png b/Articulated_objects/Medical_equipment/gastric-lavage_machine/resource/img/a61e5222d8e6c74f8ca316ab60af99ce.png new file mode 100644 index 0000000000000000000000000000000000000000..03d29d880da2efba7a3fd8963613eb0f7cb28388 --- /dev/null +++ b/Articulated_objects/Medical_equipment/gastric-lavage_machine/resource/img/a61e5222d8e6c74f8ca316ab60af99ce.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:946f43139bb500953d71831b9b7669b15a22810dc4fbf60ffab11857d99e0134 +size 49552 diff --git a/Articulated_objects/Medical_equipment/gastric-lavage_machine/resource/material.usd b/Articulated_objects/Medical_equipment/gastric-lavage_machine/resource/material.usd new file mode 100644 index 0000000000000000000000000000000000000000..7101a8666264ffbdd2766cf793c07b77744ca959 --- /dev/null +++ b/Articulated_objects/Medical_equipment/gastric-lavage_machine/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:18bc33b38a26a922530843492baff331b06e69b32f0115644097732b42ed6524 +size 3279 diff --git a/Articulated_objects/Medical_equipment/gastric-lavage_machine/resource/v_0/element_path.json b/Articulated_objects/Medical_equipment/gastric-lavage_machine/resource/v_0/element_path.json new file mode 100644 index 0000000000000000000000000000000000000000..ed0fe28b2f223d7d2ee25e66f135ff6beb96ad01 --- /dev/null +++ b/Articulated_objects/Medical_equipment/gastric-lavage_machine/resource/v_0/element_path.json @@ -0,0 +1,17 @@ +{ + "1": "/root/E_Component7_1", + "10": "/root/E_Component7_1/E_part4_10", + "11": "/root/E_Component7_1/E_handle_11", + "12": "/root/E_Component7_1/E_part5_12", + "13": "/root/E_Component7_1/E_part6_13", + "14": "/root/E_knob_14", + "15": "/root/E_button_15", + "2": "/root/E_Component7_1/E_com1_2", + "3": "/root/E_Component7_1/E_part1_3", + "4": "/root/E_Component7_1/E_part2_4", + "5": "/root/E_Component7_1/E_wheel_5", + "6": "/root/E_Component7_1/E_wheel_6", + "7": "/root/E_Component7_1/E_wheel_7", + "8": "/root/E_Component7_1/E_wheel_8", + "9": "/root/E_Component7_1/E_part3_9" +} \ No newline at end of file diff --git a/Articulated_objects/Medical_equipment/gastric-lavage_machine/resource/v_0/link_0.usd b/Articulated_objects/Medical_equipment/gastric-lavage_machine/resource/v_0/link_0.usd new file mode 100644 index 0000000000000000000000000000000000000000..05c271ff5b03b9595f97ceacb4a9ac71f3dfade3 --- /dev/null +++ b/Articulated_objects/Medical_equipment/gastric-lavage_machine/resource/v_0/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:64cae31df7a623f92832597ba3f549153c0e784560370a3eed71827ccda0f62f +size 2466233 diff --git a/Articulated_objects/Medical_equipment/incubator/model_incubator.usd b/Articulated_objects/Medical_equipment/incubator/model_incubator.usd new file mode 100644 index 0000000000000000000000000000000000000000..0d9723b7047c971c884ae221ea0369bc875ffcf8 --- /dev/null +++ b/Articulated_objects/Medical_equipment/incubator/model_incubator.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d63c692bc5c7da7d98373a6bced90be7745662f5c1e5148eee8a396bf5f64b4b +size 5145027 diff --git a/Articulated_objects/Medical_equipment/incubator/resource/img/1f836f7db89c46226c5eed6aa5e5d7a8.png b/Articulated_objects/Medical_equipment/incubator/resource/img/1f836f7db89c46226c5eed6aa5e5d7a8.png new file mode 100644 index 0000000000000000000000000000000000000000..4c40a7600cf801486f744d70f4cf0130fd00fe40 --- /dev/null +++ b/Articulated_objects/Medical_equipment/incubator/resource/img/1f836f7db89c46226c5eed6aa5e5d7a8.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:095fa3e5dec8e89fe74030641d5a96c6d90455bfd3dd3ea8a3bd1395ff0aa80e +size 262771 diff --git a/Articulated_objects/Medical_equipment/incubator/resource/img/24f846ff174c8672e74dd751c224e142.png b/Articulated_objects/Medical_equipment/incubator/resource/img/24f846ff174c8672e74dd751c224e142.png new file mode 100644 index 0000000000000000000000000000000000000000..77b19d53e04d593660429bb6ecf6dc4957f84942 --- /dev/null +++ b/Articulated_objects/Medical_equipment/incubator/resource/img/24f846ff174c8672e74dd751c224e142.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:29fcec3f4dc2837b30ad32276a5f8789d22a482c3ad5d31fd955b9cafdab4be5 +size 312109 diff --git a/Articulated_objects/Medical_equipment/incubator/resource/img/31d8d037b7eae9180d01a62d5eb0c7ea.png b/Articulated_objects/Medical_equipment/incubator/resource/img/31d8d037b7eae9180d01a62d5eb0c7ea.png new file mode 100644 index 0000000000000000000000000000000000000000..049fe96cbf357def7de7f1461d67f2ee09fcad73 --- /dev/null +++ b/Articulated_objects/Medical_equipment/incubator/resource/img/31d8d037b7eae9180d01a62d5eb0c7ea.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f410f062eebaa1f2b2e67d4751f1f51fde5ef0b74de38478561b3422136523d +size 375451 diff --git a/Articulated_objects/Medical_equipment/incubator/resource/img/35762ed517551189db2f2520dc42c80c.png b/Articulated_objects/Medical_equipment/incubator/resource/img/35762ed517551189db2f2520dc42c80c.png new file mode 100644 index 0000000000000000000000000000000000000000..7b859cf16193f8256adfbc32879929a400984b64 --- /dev/null +++ b/Articulated_objects/Medical_equipment/incubator/resource/img/35762ed517551189db2f2520dc42c80c.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:721610e884a9c2aea84d913014f3566099533aa98c2ec717e353867dcc73fb0f +size 81585 diff --git a/Articulated_objects/Medical_equipment/incubator/resource/img/43aa713ef2e529f606a2bc7908f0403b.png b/Articulated_objects/Medical_equipment/incubator/resource/img/43aa713ef2e529f606a2bc7908f0403b.png new file mode 100644 index 0000000000000000000000000000000000000000..96aaad3a37853cc05e1c9be243d139e701b63603 --- /dev/null +++ b/Articulated_objects/Medical_equipment/incubator/resource/img/43aa713ef2e529f606a2bc7908f0403b.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ee331c2ce23497a293ff5105109073045dad97598d2fc46fcac6291d95dfde25 +size 46204 diff --git a/Articulated_objects/Medical_equipment/incubator/resource/img/4656dc538a89805e8b340b3a9b442e76.png b/Articulated_objects/Medical_equipment/incubator/resource/img/4656dc538a89805e8b340b3a9b442e76.png new file mode 100644 index 0000000000000000000000000000000000000000..d56bff3b0d9344d3c8561582897944d9c6804f76 --- /dev/null +++ b/Articulated_objects/Medical_equipment/incubator/resource/img/4656dc538a89805e8b340b3a9b442e76.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7ee5b397fe31e1e560b3b33908293c981f96ff0929b0c3c722460d2a91766b39 +size 38349 diff --git a/Articulated_objects/Medical_equipment/incubator/resource/img/5056dca783b394fd87e6ce8ca7e2b514.png b/Articulated_objects/Medical_equipment/incubator/resource/img/5056dca783b394fd87e6ce8ca7e2b514.png new file mode 100644 index 0000000000000000000000000000000000000000..778779615a34df5cddc592a8ca07fa3665c19bb8 --- /dev/null +++ b/Articulated_objects/Medical_equipment/incubator/resource/img/5056dca783b394fd87e6ce8ca7e2b514.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47fb3534c5d6b7b657848fb71d7e0a936fa37b3a1a4d87bf2df141e051f019b8 +size 30453 diff --git a/Articulated_objects/Medical_equipment/incubator/resource/img/6166515638ef1e30742b5106682a580a.png b/Articulated_objects/Medical_equipment/incubator/resource/img/6166515638ef1e30742b5106682a580a.png new file mode 100644 index 0000000000000000000000000000000000000000..6b0156355fe588ed704982c9afe72a31a8a223a0 --- /dev/null +++ b/Articulated_objects/Medical_equipment/incubator/resource/img/6166515638ef1e30742b5106682a580a.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:577da62582810a53e8b8bf1aa63d4075c69ffcbd6447b06f66c35addef23b969 +size 486430 diff --git a/Articulated_objects/Medical_equipment/incubator/resource/img/66a5a4a3f38d5260de789c6087d867a0.png b/Articulated_objects/Medical_equipment/incubator/resource/img/66a5a4a3f38d5260de789c6087d867a0.png new file mode 100644 index 0000000000000000000000000000000000000000..5ebd8dff253ae7673cf6f3d0825a1bc8ce6f6dc8 --- /dev/null +++ b/Articulated_objects/Medical_equipment/incubator/resource/img/66a5a4a3f38d5260de789c6087d867a0.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ee294a0a4f173dd7a1b6fc4fe3f96540fe66ad3a2146081d060336a3f7792ac +size 637298 diff --git a/Articulated_objects/Medical_equipment/incubator/resource/img/8f79f0cf759e9cf996d4d67e674013a5.png b/Articulated_objects/Medical_equipment/incubator/resource/img/8f79f0cf759e9cf996d4d67e674013a5.png new file mode 100644 index 0000000000000000000000000000000000000000..b495651204ee93579eea739923af78e164ed03e3 --- /dev/null +++ b/Articulated_objects/Medical_equipment/incubator/resource/img/8f79f0cf759e9cf996d4d67e674013a5.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9ec355ac0550e8070c5aed7a047be1a9f66d1286565c94ed8a2db4075e4c67f2 +size 164265 diff --git a/Articulated_objects/Medical_equipment/incubator/resource/img/a7169951e2027aefb609cd301f88cf1e.png b/Articulated_objects/Medical_equipment/incubator/resource/img/a7169951e2027aefb609cd301f88cf1e.png new file mode 100644 index 0000000000000000000000000000000000000000..1ce84fc0a5432f3f30b4105c3fff5b9256796f94 --- /dev/null +++ b/Articulated_objects/Medical_equipment/incubator/resource/img/a7169951e2027aefb609cd301f88cf1e.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:caaa74b19e8c650e95aa7e906876c98a6d66d2bf57acd360053ef6ad373a9e4c +size 38087 diff --git a/Articulated_objects/Medical_equipment/incubator/resource/img/fdba58f263b207ebc2632a889c050052.png b/Articulated_objects/Medical_equipment/incubator/resource/img/fdba58f263b207ebc2632a889c050052.png new file mode 100644 index 0000000000000000000000000000000000000000..f4040bcb68356fa902ea6c8d5da7e9afdd412c18 --- /dev/null +++ b/Articulated_objects/Medical_equipment/incubator/resource/img/fdba58f263b207ebc2632a889c050052.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2f258ade314cce246f3ae09e6a36bfa49c3b2fd2e5d1201485f240c5496642f +size 2257 diff --git a/Articulated_objects/Medical_equipment/incubator/resource/material.usd b/Articulated_objects/Medical_equipment/incubator/resource/material.usd new file mode 100644 index 0000000000000000000000000000000000000000..689104e230d9635adbbe02ac6496e38a28da164c --- /dev/null +++ b/Articulated_objects/Medical_equipment/incubator/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b3a2c7b3c6cb4e16053dd1e0083430f1518f801d75a57e86d0f28c4e53a7d16 +size 6322 diff --git a/Articulated_objects/Medical_equipment/incubator/resource/v_0/element_path.json b/Articulated_objects/Medical_equipment/incubator/resource/v_0/element_path.json new file mode 100644 index 0000000000000000000000000000000000000000..1a0b15d9659353f768443ca199a7ae6e0ec3fe2a --- /dev/null +++ b/Articulated_objects/Medical_equipment/incubator/resource/v_0/element_path.json @@ -0,0 +1,103 @@ +{ + "1": "/root/E_pedal_1", + "10": "/root/E_link_10", + "100": "/root/E_knob1_100", + "101": "/root/E_knob1_101", + "11": "/root/E_body_11", + "12": "/root/E_body_11/E_part_12", + "13": "/root/E_body_11/E_part_13", + "14": "/root/E_body_11/E_part_14", + "15": "/root/E_body_11/E_part_15", + "16": "/root/E_body_11/E_part_16", + "17": "/root/E_body_11/E_part_17", + "18": "/root/E_body_11/E_part_18", + "19": "/root/E_body_11/E_part_19", + "2": "/root/E_pedal1_2", + "20": "/root/E_body_11/E_part_20", + "21": "/root/E_body_11/E_part_21", + "22": "/root/E_body_11/E_part_22", + "23": "/root/E_body_11/E_part_23", + "24": "/root/E_body_11/E_part_24", + "25": "/root/E_body_11/E_part_25", + "26": "/root/E_body_11/E_part_26", + "27": "/root/E_body_11/E_part_27", + "28": "/root/E_body_11/E_part_28", + "29": "/root/E_body_11/E_part_29", + "3": "/root/E_wheel_3", + "30": "/root/E_body_11/E_part_30", + "31": "/root/E_body_11/E_part_31", + "32": "/root/E_body_11/E_part_32", + "33": "/root/E_body_11/E_part_33", + "34": "/root/E_body_11/E_part_34", + "35": "/root/E_body_11/E_part_35", + "36": "/root/E_body_11/E_part_36", + "37": "/root/E_body_11/E_part_37", + "38": "/root/E_body_11/E_part_38", + "39": "/root/E_body_11/E_part_39", + "4": "/root/E_link_4", + "40": "/root/E_body_11/E_part_40", + "41": "/root/E_body_11/E_part_41", + "42": "/root/E_body_11/E_part_42", + "43": "/root/E_body_11/E_part_43", + "44": "/root/E_body_11/E_part_44", + "45": "/root/E_body_11/E_part_45", + "46": "/root/E_body_11/E_part_46", + "47": "/root/E_body_11/E_part_47", + "48": "/root/E_body_11/E_part_48", + "49": "/root/E_body_11/E_part_49", + "5": "/root/E_wheel_5", + "50": "/root/E_body_11/E_part_50", + "51": "/root/E_body_11/E_part_51", + "52": "/root/E_body_11/E_part_52", + "53": "/root/E_body_11/E_part_53", + "54": "/root/E_body_11/E_part_54", + "55": "/root/E_body_11/E_part_55", + "56": "/root/E_body_11/E_Plane075_56", + "57": "/root/E_body_11/E_Plane071_57", + "58": "/root/E_body_11/E_Object20250246_58", + "59": "/root/E_body_11/E_Object21725760_59", + "6": "/root/E_link_6", + "60": "/root/E_body_11/E_Cylinder475078_60", + "61": "/root/E_body_11/E_Cylinder713922_61", + "62": "/root/E_body_11/E_Object20250246_62", + "63": "/root/E_body_11/E_Arc003_63", + "64": "/root/E_body_11/E_Object20250246_64", + "65": "/root/E_body_11/E_Object20250246_65", + "66": "/root/E_body_11/E_Object20250246_66", + "67": "/root/E_body_11/E_Object20430148_67", + "68": "/root/E_body_11/E_Object21725760_68", + "69": "/root/E_body_11/E_Object20430148_69", + "7": "/root/E_wheel_7", + "70": "/root/E_body_11/E_Object20430148_70", + "71": "/root/E_body_11/E_Cylinder101586_71", + "72": "/root/E_body_11/E_Cylinder475078_72", + "73": "/root/E_body_11/E_Cylinder101586_73", + "74": "/root/E_body_11/E_Object20250246_74", + "75": "/root/E_body_11/E_Arc003_75", + "76": "/root/E_body_11/E_Cylinder523283_76", + "77": "/root/E_body_11/E_Cylinder523283_77", + "78": "/root/E_body_11/E_Cylinder713922_78", + "79": "/root/E_drawer_79", + "8": "/root/E_link_8", + "80": "/root/E_drawer_79/E_Group_80", + "81": "/root/E_drawer_79/E_handle_81", + "82": "/root/E_drawer1_82", + "83": "/root/E_drawer1_82/E_Group_83", + "84": "/root/E_drawer1_82/E_handle_84", + "85": "/root/E_doorleft_85", + "86": "/root/E_doorright_86", + "87": "/root/E_switch_87", + "88": "/root/E_switch1_88", + "89": "/root/E_switch2_89", + "9": "/root/E_wheel_9", + "90": "/root/E_switch3_90", + "91": "/root/E_door_f_91", + "92": "/root/E_door_f_91/E_Group_92", + "93": "/root/E_door_f_91/E_part_93", + "94": "/root/E_door_f_91/E_part_94", + "95": "/root/E_door_f_91/E_part_95", + "96": "/root/E_door_f_91/E_Cylinder523283_96", + "97": "/root/E_door_f_91/E_Object21725760_97", + "98": "/root/E_door_f_91/E_Cylinder523283_98", + "99": "/root/E_door_f_91/E_Object21725760_99" +} \ No newline at end of file diff --git a/Articulated_objects/Medical_equipment/incubator/resource/v_0/link_0.usd b/Articulated_objects/Medical_equipment/incubator/resource/v_0/link_0.usd new file mode 100644 index 0000000000000000000000000000000000000000..8dd1ca9544064b228503cd1056689cc82a31b419 --- /dev/null +++ b/Articulated_objects/Medical_equipment/incubator/resource/v_0/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:233470413879894ec97f7fcea19378b4dea2d1a215f18fb9229b960df7aed707 +size 113236045 diff --git a/Articulated_objects/Medical_equipment/medical_cart/model_medical_cart.usd b/Articulated_objects/Medical_equipment/medical_cart/model_medical_cart.usd new file mode 100644 index 0000000000000000000000000000000000000000..683fe3482292816503666a780945dadd30f3e188 --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_cart/model_medical_cart.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a3fc944601d44206510c6d1f604b409cd8c10656a254c75cf611fe830b3cb58 +size 26175 diff --git a/Articulated_objects/Medical_equipment/medical_cart/resource/img/1fef45d45b705830030d44968434c911.png b/Articulated_objects/Medical_equipment/medical_cart/resource/img/1fef45d45b705830030d44968434c911.png new file mode 100644 index 0000000000000000000000000000000000000000..a905ef613a559f13705025f5098b6b0a7269cdf3 --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_cart/resource/img/1fef45d45b705830030d44968434c911.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4064eb623fb1a42480aa968cdde17af635cddd8b5d371af6f7c6b7ff6ac11fe +size 12864 diff --git a/Articulated_objects/Medical_equipment/medical_cart/resource/img/9dbbb630641a081b3be996c9d27129a1.png b/Articulated_objects/Medical_equipment/medical_cart/resource/img/9dbbb630641a081b3be996c9d27129a1.png new file mode 100644 index 0000000000000000000000000000000000000000..cde7143e46783fd361c2eb5af675ea8d3b29a107 --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_cart/resource/img/9dbbb630641a081b3be996c9d27129a1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c9fc54c89d7aa76473c5eb314cd821f1420ff3d04edb3fc426136d55d5769f29 +size 16302 diff --git a/Articulated_objects/Medical_equipment/medical_cart/resource/img/eadbfe6529eb73cc913e5910cff5e673.png b/Articulated_objects/Medical_equipment/medical_cart/resource/img/eadbfe6529eb73cc913e5910cff5e673.png new file mode 100644 index 0000000000000000000000000000000000000000..2eef10c3ab979663eb9fc58e3dd11e3f48ff3bce --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_cart/resource/img/eadbfe6529eb73cc913e5910cff5e673.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:08686e0baff0893040099d0f255b8c9b94426625ce956fd8155527923d8b471d +size 55747 diff --git a/Articulated_objects/Medical_equipment/medical_cart/resource/material.usd b/Articulated_objects/Medical_equipment/medical_cart/resource/material.usd new file mode 100644 index 0000000000000000000000000000000000000000..a6787635053c63f978b7fc6d39259cefc33477cd --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_cart/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d4eeb79e100f04720ed9715dcc31a72d3c0056502d35616df1eade7f2ec3cccc +size 3923 diff --git a/Articulated_objects/Medical_equipment/medical_cart/resource/v_0/element_path.json b/Articulated_objects/Medical_equipment/medical_cart/resource/v_0/element_path.json new file mode 100644 index 0000000000000000000000000000000000000000..09e6803198ac4b31a7b83cf05e050576facd8ca0 --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_cart/resource/v_0/element_path.json @@ -0,0 +1,70 @@ +{ + "1": "/root/E_Component44M1_1", + "10": "/root/E_Component44M1_1/E_Component56M1_10", + "11": "/root/E_Component44M1_1/E_plate_11", + "12": "/root/E_Component44M1_1/E_towel1_12", + "13": "/root/E_Component44M1_1/E_needle_13", + "14": "/root/E_Component44M1_1/E_needle_13/E_Group_14", + "15": "/root/E_Component44M1_1/E_needle_13/E_Component119M1_15", + "16": "/root/E_Component44M1_1/E_needle_13/E_Component117M1_16", + "17": "/root/E_Component44M1_1/E_needle_13/E_Component86_17", + "18": "/root/E_Component44M1_1/E_needle_13/E_Component118M1_18", + "19": "/root/E_Component44M1_1/E_towel_19", + "2": "/root/E_Component44M1_1/E_Component45M1_2", + "20": "/root/E_Component44M1_1/E_medicine_20", + "21": "/root/E_Component44M1_1/E_medicine_20/E_Group_21", + "22": "/root/E_Component44M1_1/E_medicine_20/E_Component103M1_22", + "23": "/root/E_Component44M1_1/E_medicine_20/E_Component104M1_23", + "24": "/root/E_Component44M1_1/E_shelf_24", + "25": "/root/E_Component44M1_1/E_shelf_25", + "26": "/root/E_Component44M1_1/E_medicine_26", + "27": "/root/E_Component44M1_1/E_medicine_26/E_Group_27", + "28": "/root/E_Component44M1_1/E_medicine_26/E_Component103M1_28", + "29": "/root/E_Component44M1_1/E_medicine_26/E_Component104M1_29", + "3": "/root/E_Component44M1_1/E_dissector_3", + "30": "/root/E_Component44M1_1/E_medicine_30", + "31": "/root/E_Component44M1_1/E_medicine_30/E_Group_31", + "32": "/root/E_Component44M1_1/E_medicine_30/E_Component103M1_32", + "33": "/root/E_Component44M1_1/E_medicine_30/E_Component104M1_33", + "34": "/root/E_Component44M1_1/E_disposablesyringe_34", + "35": "/root/E_Component44M1_1/E_disposablesyringe_34/E_Component80_35", + "36": "/root/E_Component44M1_1/E_disposablesyringe_34/E_Component83_36", + "37": "/root/E_Component44M1_1/E_disposablesyringe_34/E_Component81_37", + "38": "/root/E_Component44M1_1/E_disposablesyringe_34/E_Component78_38", + "39": "/root/E_Component44M1_1/E_disposablesyringe_34/E_Component79_39", + "4": "/root/E_Component44M1_1/E_tweezers_4", + "40": "/root/E_Component44M1_1/E_disposablesyringe_34/E_Component82_40", + "41": "/root/E_Component44M1_1/E_disposablesyringe1_41", + "42": "/root/E_Component44M1_1/E_disposablesyringe1_41/E_Component72_42", + "43": "/root/E_Component44M1_1/E_disposablesyringe1_41/E_Component90_43", + "44": "/root/E_Component44M1_1/E_disposablesyringe1_41/E_Component91_44", + "45": "/root/E_Component44M1_1/E_disposablesyringe2_45", + "46": "/root/E_Component44M1_1/E_disposablesyringe2_45/E_Component106M1_46", + "47": "/root/E_Component44M1_1/E_disposablesyringe2_45/E_Component107M1_47", + "48": "/root/E_Component44M1_1/E_disposablesyringe2_45/E_Component105M1_48", + "49": "/root/E_Component44M1_1/E_needle_49", + "5": "/root/E_Component44M1_1/E_crochethook_5", + "50": "/root/E_Component44M1_1/E_needle_49/E_Group_50", + "51": "/root/E_Component44M1_1/E_needle_49/E_Component119M1_51", + "52": "/root/E_Component44M1_1/E_needle_49/E_Component117M1_52", + "53": "/root/E_Component44M1_1/E_needle_49/E_Component86_53", + "54": "/root/E_Component44M1_1/E_needle_49/E_Component118M1_54", + "55": "/root/E_Component44M1_1/E_needle_55", + "56": "/root/E_Component44M1_1/E_needle_55/E_Group_56", + "57": "/root/E_Component44M1_1/E_needle_55/E_Component119M1_57", + "58": "/root/E_Component44M1_1/E_needle_55/E_Component117M1_58", + "59": "/root/E_Component44M1_1/E_needle_55/E_Component86_59", + "6": "/root/E_Component44M1_1/E_scissors_6", + "60": "/root/E_Component44M1_1/E_needle_55/E_Component118M1_60", + "61": "/root/E_link_61", + "62": "/root/E_link_62", + "63": "/root/E_link_63", + "64": "/root/E_link_64", + "65": "/root/E_wheel1_65", + "66": "/root/E_wheel1_66", + "67": "/root/E_wheel1_67", + "68": "/root/E_wheel1_68", + "7": "/root/E_Component44M1_1/E_plate1_7", + "8": "/root/E_Component44M1_1/E_sterile_cloth_8", + "9": "/root/E_Component44M1_1/E_basin_9" +} \ No newline at end of file diff --git a/Articulated_objects/Medical_equipment/medical_cart/resource/v_0/link_0.usd b/Articulated_objects/Medical_equipment/medical_cart/resource/v_0/link_0.usd new file mode 100644 index 0000000000000000000000000000000000000000..6386f95cadded8e762c590cbd6ec0cd2be634813 --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_cart/resource/v_0/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ccdbd04c267f61cba23b90cf2e0c818346b676790a19386758782ae5eca41d73 +size 14570050 diff --git a/Articulated_objects/Medical_equipment/medical_cart001/model_medical_cart001.usd b/Articulated_objects/Medical_equipment/medical_cart001/model_medical_cart001.usd new file mode 100644 index 0000000000000000000000000000000000000000..458aa0ef284b37d39caadbf721d18883ed224684 --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_cart001/model_medical_cart001.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e225aebe12eed082162e9eef4071a2b6312df48f7b3e0610e94c979778e2861 +size 19877 diff --git a/Articulated_objects/Medical_equipment/medical_cart001/resource/material.usd b/Articulated_objects/Medical_equipment/medical_cart001/resource/material.usd new file mode 100644 index 0000000000000000000000000000000000000000..eec062ce5954c41b626f8edc576084707c4cb842 --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_cart001/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:41b247a9a0133cde62b47fd00d6e520c051e0990e60eeb91a3ba9da0700faae4 +size 1449 diff --git a/Articulated_objects/Medical_equipment/medical_cart001/resource/v_0/element_path.json b/Articulated_objects/Medical_equipment/medical_cart001/resource/v_0/element_path.json new file mode 100644 index 0000000000000000000000000000000000000000..a62f3c343280478af46920c7e131dd1a0dd511d3 --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_cart001/resource/v_0/element_path.json @@ -0,0 +1,36 @@ +{ + "1": "/root/E_Component212_1", + "10": "/root/E_Component212_1/E_leg_10", + "11": "/root/E_Component212_1/E_Component221_11", + "12": "/root/E_Component212_1/E_Component221_12", + "13": "/root/E_Component212_1/E_railing_13", + "14": "/root/E_Component212_1/E_railing_14", + "15": "/root/E_Component212_1/E_railing_15", + "16": "/root/E_Component212_1/E_Component226_16", + "17": "/root/E_Component212_1/E_Component226_17", + "18": "/root/E_Component212_1/E_Component226_18", + "19": "/root/E_wheel_19", + "2": "/root/E_Component212_1/E_part_2", + "20": "/root/E_wheel_20", + "21": "/root/E_wheel_21", + "22": "/root/E_wheel_22", + "23": "/root/E_link1_23", + "24": "/root/E_link1_24", + "25": "/root/E_link1_25", + "26": "/root/E_link1_26", + "27": "/root/E_drawer_27", + "28": "/root/E_drawer_27/E_Group_28", + "29": "/root/E_drawer_27/E_handle_29", + "3": "/root/E_Component212_1/E_part_3", + "30": "/root/E_drawer_30", + "31": "/root/E_drawer_30/E_Group_31", + "32": "/root/E_drawer_30/E_handle_32", + "33": "/root/E_part_33", + "34": "/root/E_part1_34", + "4": "/root/E_Component212_1/E_Component211_4", + "5": "/root/E_Component212_1/E_Component211_5", + "6": "/root/E_Component212_1/E_Component214_6", + "7": "/root/E_Component212_1/E_shelf_7", + "8": "/root/E_Component212_1/E_Component216_8", + "9": "/root/E_Component212_1/E_shelf_9" +} \ No newline at end of file diff --git a/Articulated_objects/Medical_equipment/medical_cart001/resource/v_0/link_0.usd b/Articulated_objects/Medical_equipment/medical_cart001/resource/v_0/link_0.usd new file mode 100644 index 0000000000000000000000000000000000000000..b5ac0063d94b16291e13b4c2240b3a9205a6f0ad --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_cart001/resource/v_0/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44607e2aa72c7817b637c5762e89606f9a6b3f145c8663bb421d17482b011a0a +size 3882330 diff --git a/Articulated_objects/Medical_equipment/medical_monitor/model_medical_monitor.usd b/Articulated_objects/Medical_equipment/medical_monitor/model_medical_monitor.usd new file mode 100644 index 0000000000000000000000000000000000000000..1baee515c8fd58201f3de02c9bad9df437be27c5 --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_monitor/model_medical_monitor.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e310601c926942a64f3364658bee6ed9f7577851342c39eb15cb2d556fbb056d +size 5257829 diff --git a/Articulated_objects/Medical_equipment/medical_monitor/resource/img/5f322808bc083a87b417d64d4e81b7fb.png b/Articulated_objects/Medical_equipment/medical_monitor/resource/img/5f322808bc083a87b417d64d4e81b7fb.png new file mode 100644 index 0000000000000000000000000000000000000000..6c9d56f9deedb880e3dfae732ed7ea3cde438089 --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_monitor/resource/img/5f322808bc083a87b417d64d4e81b7fb.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa626ec9d38ba935f37c3d8a5db19969610ee0706769256dcc4007b2411d664f +size 153433 diff --git a/Articulated_objects/Medical_equipment/medical_monitor/resource/material.usd b/Articulated_objects/Medical_equipment/medical_monitor/resource/material.usd new file mode 100644 index 0000000000000000000000000000000000000000..b024bb6f55faba0ceb40c4879d72d72e6f0b20f7 --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_monitor/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd834639b630217aac075a6971648d65cc56d6edbfb898cc8dee3336fc22d91a +size 2625 diff --git a/Articulated_objects/Medical_equipment/medical_monitor/resource/v_0/element_path.json b/Articulated_objects/Medical_equipment/medical_monitor/resource/v_0/element_path.json new file mode 100644 index 0000000000000000000000000000000000000000..50ac21b4769ca69e13e730afbe25b61cb967b6a7 --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_monitor/resource/v_0/element_path.json @@ -0,0 +1,83 @@ +{ + "1": "/root/E_door_1", + "2": "/root/E_shelf_2", + "10": "/root/E_shelf_2/E_qingmo_def_127_10", + "11": "/root/E_shelf_2/E_qingmo_def_138_11", + "12": "/root/E_shelf_2/E_qingmo_def_137_12", + "13": "/root/E_shelf_2/E_qingmo_def_157_13", + "14": "/root/E_shelf_2/E_qingmo_def_157_14", + "15": "/root/E_shelf_2/E_qingmo_def_157_15", + "16": "/root/E_shelf_2/E_qingmo_def_157_16", + "17": "/root/E_shelf_2/E_qingmo_def_157_17", + "18": "/root/E_shelf_2/E_qingmo_def_157_18", + "19": "/root/E_shelf_2/E_qingmo_def_157_19", + "20": "/root/E_shelf_2/E_qingmo_def_136_20", + "21": "/root/E_shelf_2/E_qingmo_def_157_21", + "22": "/root/E_shelf_2/E_qingmo_def_157_22", + "23": "/root/E_shelf_2/E_qingmo_def_157_23", + "24": "/root/E_shelf_2/E_qingmo_def_139_24", + "25": "/root/E_shelf_25", + "26": "/root/E_shelf_25/E_qingmo_def_136_26", + "27": "/root/E_shelf_25/E_qingmo_def_136_27", + "28": "/root/E_shelf_25/E_qingmo_def_157_28", + "29": "/root/E_shelf_25/E_qingmo_def_128_29", + "3": "/root/E_shelf_2/E_qingmo_def_136_3", + "30": "/root/E_shelf_25/E_qingmo_def_138_30", + "31": "/root/E_shelf_25/E_qingmo_def_157_31", + "32": "/root/E_shelf_25/E_qingmo_def_136_32", + "33": "/root/E_shelf_25/E_qingmo_def_127_33", + "34": "/root/E_shelf_25/E_qingmo_def_138_34", + "35": "/root/E_shelf_25/E_qingmo_def_137_35", + "36": "/root/E_shelf_25/E_qingmo_def_157_36", + "37": "/root/E_shelf_25/E_qingmo_def_157_37", + "38": "/root/E_shelf_25/E_qingmo_def_157_38", + "39": "/root/E_shelf_25/E_qingmo_def_157_39", + "4": "/root/E_shelf_2/E_qingmo_def_136_4", + "40": "/root/E_shelf_25/E_qingmo_def_157_40", + "41": "/root/E_shelf_25/E_qingmo_def_157_41", + "42": "/root/E_shelf_25/E_qingmo_def_157_42", + "43": "/root/E_shelf_25/E_qingmo_def_136_43", + "44": "/root/E_shelf_25/E_qingmo_def_157_44", + "45": "/root/E_shelf_25/E_qingmo_def_157_45", + "46": "/root/E_shelf_25/E_qingmo_def_157_46", + "47": "/root/E_shelf_25/E_qingmo_def_139_47", + "48": "/root/E_body_48", + "49": "/root/E_body_48/E_screen_49", + "5": "/root/E_shelf_2/E_qingmo_def_157_5", + "50": "/root/E_body_48/E_screen_50", + "51": "/root/E_body_48/E_qingmo_def_340_51", + "52": "/root/E_body_48/E_qingmo_def_340_51/E_qingmo_def_228_52", + "53": "/root/E_body_48/E_qingmo_def_340_51/E_qingmo_def_227_53", + "54": "/root/E_body_48/E_qingmo_def_340_51/E_qingmo_def_222_54", + "55": "/root/E_body_48/E_qingmo_def_340_51/E_qingmo_def_221_55", + "56": "/root/E_body_48/E_qingmo_def_340_51/E_handle_56", + "57": "/root/E_body_48/E_qingmo_def_340_51/E_handle1_57", + "58": "/root/E_body_48/E_qingmo_def_140_58", + "59": "/root/E_body_48/E_qingmo_def_140_59", + "6": "/root/E_shelf_2/E_qingmo_def_128_6", + "60": "/root/E_body_48/E_qingmo_def_182_60", + "61": "/root/E_body_48/E_qingmo_def_180_61", + "62": "/root/E_body_48/E_qingmo_def_175_62", + "63": "/root/E_body_48/E_qingmo_def_182_63", + "64": "/root/E_body_48/E_qingmo_def_182_64", + "65": "/root/E_body_48/E_qingmo_def_180_65", + "66": "/root/E_body_48/E_qingmo_def_175_66", + "67": "/root/E_body_48/E_qingmo_def_182_67", + "68": "/root/E_body_48/E_button_68", + "69": "/root/E_body_48/E_button_69", + "7": "/root/E_shelf_2/E_qingmo_def_138_7", + "70": "/root/E_body_48/E_button_70", + "71": "/root/E_body_48/E_button_71", + "72": "/root/E_body_48/E_button_72", + "73": "/root/E_body_48/E_button_73", + "74": "/root/E_link_74", + "75": "/root/E_wheel_75", + "76": "/root/E_wheel_76", + "77": "/root/E_link_77", + "78": "/root/E_wheel_78", + "79": "/root/E_link_79", + "8": "/root/E_shelf_2/E_qingmo_def_157_8", + "80": "/root/E_wheel_80", + "81": "/root/E_link_81", + "9": "/root/E_shelf_2/E_qingmo_def_136_9" +} \ No newline at end of file diff --git a/Articulated_objects/Medical_equipment/medical_monitor/resource/v_0/link_0.usd b/Articulated_objects/Medical_equipment/medical_monitor/resource/v_0/link_0.usd new file mode 100644 index 0000000000000000000000000000000000000000..8e6207b567382f81eaae97bcce4af274616059a2 --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_monitor/resource/v_0/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2df5db3afa378d857866a11e65fa7f56ab9115e26304adb3c2f6f74bb90cb8a7 +size 9185204 diff --git a/Articulated_objects/Medical_equipment/medical_ultrasound_scanner/model_medical_ultrasound_scanner.usd b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner/model_medical_ultrasound_scanner.usd new file mode 100644 index 0000000000000000000000000000000000000000..42ef4bce0ed50d35ef4d8dcd352ae01994b7d3e3 --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner/model_medical_ultrasound_scanner.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0826f7ecc6709d760ca3211e8293220e133d79c850fa9e0bda3fe32bd7f57557 +size 13000 diff --git a/Articulated_objects/Medical_equipment/medical_ultrasound_scanner/resource/img/0ba2095f043c040b97624957b4be479d.png b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner/resource/img/0ba2095f043c040b97624957b4be479d.png new file mode 100644 index 0000000000000000000000000000000000000000..55d8aa392d8aa8e14b4b370abfc221bd84805408 --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner/resource/img/0ba2095f043c040b97624957b4be479d.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab8f16e6005bb60092889cf8731f5d3d765116d494a35e41441d7273bb958849 +size 67386 diff --git a/Articulated_objects/Medical_equipment/medical_ultrasound_scanner/resource/img/9d3fa2b13a83adf4fcb511ffe4388f79.png b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner/resource/img/9d3fa2b13a83adf4fcb511ffe4388f79.png new file mode 100644 index 0000000000000000000000000000000000000000..4ee1e07469977f94dc633543b54bcc688fa53ff1 --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner/resource/img/9d3fa2b13a83adf4fcb511ffe4388f79.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f708fa4200315e9afb2d9e64f555d6651a76bc335dacaff9afb5706dd62d28de +size 27178 diff --git a/Articulated_objects/Medical_equipment/medical_ultrasound_scanner/resource/img/c5a8fa5fcf97fc25925b56869b45155f.png b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner/resource/img/c5a8fa5fcf97fc25925b56869b45155f.png new file mode 100644 index 0000000000000000000000000000000000000000..b3100a2f3855250444a55dbebae2b40eefe4b87c --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner/resource/img/c5a8fa5fcf97fc25925b56869b45155f.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a62051b547103e403c3702db72d975d34bbf9e40fa7214ef2b3c2267407ebb4b +size 54516 diff --git a/Articulated_objects/Medical_equipment/medical_ultrasound_scanner/resource/img/d87ee0664b09e3c755b7ea32eb1ee8a2.png b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner/resource/img/d87ee0664b09e3c755b7ea32eb1ee8a2.png new file mode 100644 index 0000000000000000000000000000000000000000..35e6df60151b6605c5dbd0b7c4863e3990cc4c9c --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner/resource/img/d87ee0664b09e3c755b7ea32eb1ee8a2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d89389596536dcbb7c32c39980a5d831f89098e0e190bdd3fb689701ae2cf8c4 +size 96380 diff --git a/Articulated_objects/Medical_equipment/medical_ultrasound_scanner/resource/material.usd b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner/resource/material.usd new file mode 100644 index 0000000000000000000000000000000000000000..c420e5c1d5ea5c763f70eb18ae64aa6652528a74 --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d1b57561bec83dc99447ff3b35784ad36a677ed4d049d4dc61af9afb04506d3 +size 3395 diff --git a/Articulated_objects/Medical_equipment/medical_ultrasound_scanner/resource/v_0/element_path.json b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner/resource/v_0/element_path.json new file mode 100644 index 0000000000000000000000000000000000000000..1c7244507432a0e4fec1b548bad83e5a516aba56 --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner/resource/v_0/element_path.json @@ -0,0 +1,22 @@ +{ + "1": "/root/E_Component32M1_1", + "10": "/root/E_Component32M1_1/E_Component41M1_10", + "11": "/root/E_Component32M1_1/E_part1_11", + "12": "/root/E_Component32M1_1/E_part_12", + "13": "/root/E_wheel_13", + "14": "/root/E_link_14", + "15": "/root/E_wheel_15", + "16": "/root/E_link_16", + "17": "/root/E_link_17", + "18": "/root/E_wheel_18", + "19": "/root/E_link_19", + "2": "/root/E_Component32M1_1/E_Component31M1_2", + "20": "/root/E_wheel_20", + "3": "/root/E_Component32M1_1/E_Component34M1_3", + "4": "/root/E_Component32M1_1/E_Component35M1_4", + "5": "/root/E_Component32M1_1/E_Component36M1_5", + "6": "/root/E_Component32M1_1/E_Component37M1_6", + "7": "/root/E_Component32M1_1/E_Component38M1_7", + "8": "/root/E_Component32M1_1/E_Component39M1_8", + "9": "/root/E_Component32M1_1/E_Component40M1_9" +} \ No newline at end of file diff --git a/Articulated_objects/Medical_equipment/medical_ultrasound_scanner/resource/v_0/link_0.usd b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner/resource/v_0/link_0.usd new file mode 100644 index 0000000000000000000000000000000000000000..0497624dda2fc4e313fe9f5082f19898e4f8113e --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner/resource/v_0/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:833d0680aa05d3d5e5ab056154a081d622f9e2bc4800a126728976c86369aa01 +size 19874662 diff --git a/Articulated_objects/Medical_equipment/medical_ultrasound_scanner001/model_medical_ultrasound_scanner001.usd b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner001/model_medical_ultrasound_scanner001.usd new file mode 100644 index 0000000000000000000000000000000000000000..c28e01b10168a8a8dab9cdbbb78c6a1ad9097f76 --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner001/model_medical_ultrasound_scanner001.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:32a31885091cd16a89732a8699c9f8a98b440a7080f1f23e40f8e084eeeb0964 +size 19519 diff --git a/Articulated_objects/Medical_equipment/medical_ultrasound_scanner001/resource/img/4a8605fc98268c4d13eb3fa2963f3d2d.png b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner001/resource/img/4a8605fc98268c4d13eb3fa2963f3d2d.png new file mode 100644 index 0000000000000000000000000000000000000000..d70a6f289095d2ecd4dc6af8504685852f9c4da7 --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner001/resource/img/4a8605fc98268c4d13eb3fa2963f3d2d.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:68b2f58bf146af6bccf0e547fa2898a2ef26615500b59d48ddda64ffbea6ada0 +size 77158 diff --git a/Articulated_objects/Medical_equipment/medical_ultrasound_scanner001/resource/img/8e656bddb008d7e9051586fa06d8846a.png b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner001/resource/img/8e656bddb008d7e9051586fa06d8846a.png new file mode 100644 index 0000000000000000000000000000000000000000..fdbd37393a813161241873c84df72634e420c3d4 --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner001/resource/img/8e656bddb008d7e9051586fa06d8846a.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b83d546b236aaaca20a9de87f81e3859e5bc31afe87d46143ab19754143dade +size 33047 diff --git a/Articulated_objects/Medical_equipment/medical_ultrasound_scanner001/resource/img/95b8e31dfaecb9eb56e5fd34572fd6dc.png b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner001/resource/img/95b8e31dfaecb9eb56e5fd34572fd6dc.png new file mode 100644 index 0000000000000000000000000000000000000000..20921799e167c947b76e0f71dd604f7e9bb8f5ed --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner001/resource/img/95b8e31dfaecb9eb56e5fd34572fd6dc.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2dc3fad13ee4e35616f7401f00b8e7298b113f392b12a7a9e807d4bee494ad53 +size 72749 diff --git a/Articulated_objects/Medical_equipment/medical_ultrasound_scanner001/resource/img/a21006ec4c7eb038b48efc4308be5c14.png b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner001/resource/img/a21006ec4c7eb038b48efc4308be5c14.png new file mode 100644 index 0000000000000000000000000000000000000000..7219dd7ab016f2fc56fffe9682be2d20c592384c --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner001/resource/img/a21006ec4c7eb038b48efc4308be5c14.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a652fdefb1d472931114e8f9a6fb455ea364eacb2d4e14f439febe5e7e5e062d +size 32032 diff --git a/Articulated_objects/Medical_equipment/medical_ultrasound_scanner001/resource/img/a38fea079c8d6ac2de6d805008b3985d.png b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner001/resource/img/a38fea079c8d6ac2de6d805008b3985d.png new file mode 100644 index 0000000000000000000000000000000000000000..35bbdf602aa10137da8b746e9a93315df08fd903 --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner001/resource/img/a38fea079c8d6ac2de6d805008b3985d.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:11f4a85286fa2ed50ad4a328eb633c0debb289d5139e28e37fd0ef329d23a74c +size 32668 diff --git a/Articulated_objects/Medical_equipment/medical_ultrasound_scanner001/resource/material.usd b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner001/resource/material.usd new file mode 100644 index 0000000000000000000000000000000000000000..64a3b228523d6311a5e20d581d3201789d59459e --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner001/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d4cd89f7b0c0a048436ec77dc90f2d1cfdf4f7added9e0590a72d34133b6ba07 +size 4109 diff --git a/Articulated_objects/Medical_equipment/medical_ultrasound_scanner001/resource/v_0/element_path.json b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner001/resource/v_0/element_path.json new file mode 100644 index 0000000000000000000000000000000000000000..b579b8cfbd7bc52bb4ec19d1bde864fdada76549 --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner001/resource/v_0/element_path.json @@ -0,0 +1,23 @@ +{ + "1": "/root/E_knob_1", + "5": "/root/E_body_5", + "7": "/root/E_body_5/E_screen_7", + "10": "/root/E_body_5/E_screen_7/E_leg1_10", + "11": "/root/E_body_5/E_base_11", + "12": "/root/E_body_5/E_handle_12", + "13": "/root/E_body_5/E_part_13", + "14": "/root/E_link1_14", + "15": "/root/E_wheel_15", + "16": "/root/E_link1_16", + "17": "/root/E_wheel_17", + "18": "/root/E_link1_18", + "19": "/root/E_wheel_19", + "2": "/root/E_button1_2", + "20": "/root/E_link1_20", + "21": "/root/E_wheel_21", + "3": "/root/E_knob1_3", + "4": "/root/E_button_4", + "6": "/root/E_body_5/E_Group_6", + "8": "/root/E_body_5/E_screen_7/E_Group_8", + "9": "/root/E_body_5/E_screen_7/E_leg_9" +} \ No newline at end of file diff --git a/Articulated_objects/Medical_equipment/medical_ultrasound_scanner001/resource/v_0/link_0.usd b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner001/resource/v_0/link_0.usd new file mode 100644 index 0000000000000000000000000000000000000000..90e07ad429937530cff234437f18f4213e5fbe0c --- /dev/null +++ b/Articulated_objects/Medical_equipment/medical_ultrasound_scanner001/resource/v_0/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b406bcb89bb36ae2aaecb02ac696d924eb390332b2218e474523bdaf85e406b0 +size 11096629 diff --git a/Articulated_objects/Medical_equipment/neonatal_radiant_warmer/model_neonatal_radiant_warmer.usd b/Articulated_objects/Medical_equipment/neonatal_radiant_warmer/model_neonatal_radiant_warmer.usd new file mode 100644 index 0000000000000000000000000000000000000000..2f2ac9cba4b8cfdab40d3f48e849fbe38edbc2ea --- /dev/null +++ b/Articulated_objects/Medical_equipment/neonatal_radiant_warmer/model_neonatal_radiant_warmer.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b90065a9456c49ed5149e1ed13768d3213297916a678725e0f009a111f0e38cb +size 43420 diff --git a/Articulated_objects/Medical_equipment/neonatal_radiant_warmer/resource/img/f0cedb4233a7a03fd3a397c6406899bf.png b/Articulated_objects/Medical_equipment/neonatal_radiant_warmer/resource/img/f0cedb4233a7a03fd3a397c6406899bf.png new file mode 100644 index 0000000000000000000000000000000000000000..000296cafaa5534b8f7c3d54797d35908b13c882 --- /dev/null +++ b/Articulated_objects/Medical_equipment/neonatal_radiant_warmer/resource/img/f0cedb4233a7a03fd3a397c6406899bf.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2389d9a7349d6c9d573d28384b5548a1a6c15ee2dce8a8ea1f6455fb80c38f65 +size 31393 diff --git a/Articulated_objects/Medical_equipment/neonatal_radiant_warmer/resource/material.usd b/Articulated_objects/Medical_equipment/neonatal_radiant_warmer/resource/material.usd new file mode 100644 index 0000000000000000000000000000000000000000..3bfd1fe3efabd0b62b0b8577d11ae0c861d02fe3 --- /dev/null +++ b/Articulated_objects/Medical_equipment/neonatal_radiant_warmer/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef9ee7f173d182b5fd3702cb457e5737a345232d13a50bfa02b2b5c051914389 +size 2801 diff --git a/Articulated_objects/Medical_equipment/neonatal_radiant_warmer/resource/v_0/element_path.json b/Articulated_objects/Medical_equipment/neonatal_radiant_warmer/resource/v_0/element_path.json new file mode 100644 index 0000000000000000000000000000000000000000..30536c38db667f4b9cf3a2e97c7ff06b2e332c61 --- /dev/null +++ b/Articulated_objects/Medical_equipment/neonatal_radiant_warmer/resource/v_0/element_path.json @@ -0,0 +1,106 @@ +{ + "1": "/root/E_body_1", + "10": "/root/E_body_1/E_qingmo_def_089_10", + "100": "/root/E_link_100", + "101": "/root/E_wheel_101", + "102": "/root/E_wheel_102", + "103": "/root/E_link1_103", + "104": "/root/E_link1_104", + "11": "/root/E_body_1/E_qingmo_def_091_11", + "12": "/root/E_body_1/E_qingmo_def_091_12", + "13": "/root/E_body_1/E_qingmo_def_094_13", + "14": "/root/E_body_1/E_qingmo_def_086_14", + "15": "/root/E_body_1/E_mattress_15", + "16": "/root/E_body_1/E_qingmo_def_089_16", + "17": "/root/E_body_1/E_qingmo_def_084_17", + "18": "/root/E_body_1/E_qingmo_def_091_18", + "19": "/root/E_body_1/E_qingmo_def_074_19", + "2": "/root/E_body_1/E_qingmo_def_091_2", + "20": "/root/E_body_1/E_qingmo_def_081_20", + "21": "/root/E_body_1/E_qingmo_def_067_21", + "22": "/root/E_body_1/E_qingmo_def_075_22", + "23": "/root/E_body_1/E_qingmo_def_069_23", + "24": "/root/E_body_1/E_qingmo_def_089_24", + "25": "/root/E_body_1/E_qingmo_def_091_25", + "26": "/root/E_body_1/E_qingmo_def_071_26", + "27": "/root/E_body_1/E_qingmo_def_075_27", + "28": "/root/E_body_1/E_qingmo_def_086_28", + "29": "/root/E_body_1/E_qingmo_def_078_29", + "3": "/root/E_body_1/E_qingmo_def_091_3", + "30": "/root/E_body_1/E_qingmo_def_082_30", + "31": "/root/E_body_1/E_qingmo_def_076_31", + "32": "/root/E_body_1/E_qingmo_def_090_32", + "33": "/root/E_body_1/E_qingmo_def_083_33", + "34": "/root/E_body_1/E_light_34", + "35": "/root/E_body_1/E_qingmo_def_094_35", + "36": "/root/E_body_1/E_qingmo_def_077_36", + "37": "/root/E_body_1/E_qingmo_def_080_37", + "38": "/root/E_body_1/E_qingmo_def_094_38", + "39": "/root/E_body_1/E_qingmo_def_094_39", + "4": "/root/E_body_1/E_qingmo_def_088_4", + "40": "/root/E_body_1/E_qingmo_def_077_40", + "41": "/root/E_body_1/E_qingmo_def_069_41", + "42": "/root/E_body_1/E_light1_42", + "43": "/root/E_body_1/E_qingmo_def_071_43", + "44": "/root/E_body_1/E_box1_44", + "45": "/root/E_body_1/E_qingmo_def_067_45", + "46": "/root/E_body_1/E_qingmo_def_086_46", + "47": "/root/E_body_1/E_qingmo_def_095_47", + "48": "/root/E_body_1/E_qingmo_def_079_48", + "49": "/root/E_body_1/E_qingmo_def_095_49", + "5": "/root/E_body_1/E_light1_5", + "50": "/root/E_body_1/E_qingmo_def_085_50", + "51": "/root/E_body_1/E_qingmo_def_091_51", + "52": "/root/E_body_1/E_qingmo_def_086_52", + "53": "/root/E_body_1/E_qingmo_def_095_53", + "54": "/root/E_body_1/E_qingmo_def_095_54", + "55": "/root/E_body_1/E_qingmo_def_091_55", + "56": "/root/E_body_1/E_qingmo_def_094_56", + "57": "/root/E_body_1/E_qingmo_def_074_57", + "58": "/root/E_body_1/E_qingmo_def_094_58", + "59": "/root/E_body_1/E_qingmo_def_090_59", + "6": "/root/E_body_1/E_qingmo_def_091_6", + "60": "/root/E_body_1/E_light1_60", + "61": "/root/E_body_1/E_box_61", + "62": "/root/E_body_1/E_qingmo_def_091_62", + "63": "/root/E_body_1/E_light_63", + "64": "/root/E_body_1/E_qingmo_def_094_64", + "65": "/root/E_body_1/E_qingmo_def_084_65", + "66": "/root/E_body_1/E_qingmo_def_091_66", + "67": "/root/E_body_1/E_qingmo_def_095_67", + "68": "/root/E_body_1/E_pillow_68", + "69": "/root/E_body_1/E_light1_69", + "7": "/root/E_body_1/E_qingmo_def_086_7", + "70": "/root/E_body_1/E_light1_70", + "71": "/root/E_body_1/E_qingmo_def_094_71", + "72": "/root/E_body_1/E_qingmo_def_094_72", + "73": "/root/E_body_1/E_light1_73", + "74": "/root/E_body_1/E_qingmo_def_094_74", + "75": "/root/E_body_1/E_qingmo_def_095_75", + "76": "/root/E_body_1/E_qingmo_def_094_76", + "77": "/root/E_body_1/E_qingmo_def_094_77", + "78": "/root/E_body_1/E_qingmo_def_095_78", + "79": "/root/E_body_1/E_qingmo_def_094_79", + "8": "/root/E_body_1/E_qingmo_def_085_8", + "80": "/root/E_body_1/E_qingmo_def_095_80", + "81": "/root/E_body_1/E_light1_81", + "82": "/root/E_body_1/E_qingmo_def_094_82", + "83": "/root/E_body_1/E_qingmo_def_089_83", + "84": "/root/E_body_1/E_qingmo_def_094_84", + "85": "/root/E_body_1/E_qingmo_def_094_85", + "86": "/root/E_body_1/E_qingmo_def_091_86", + "87": "/root/E_body_1/E_qingmo_def_068_87", + "88": "/root/E_body_1/E_qingmo_def_096_88", + "89": "/root/E_body_1/E_light_89", + "9": "/root/E_body_1/E_qingmo_def_091_9", + "90": "/root/E_body_1/E_qingmo_def_096_90", + "91": "/root/E_body_1/E_light1_91", + "92": "/root/E_body_1/E_qingmo_def_091_92", + "93": "/root/E_body_1/E_light_93", + "94": "/root/E_body_1/E_qingmo_def_086_94", + "95": "/root/E_body_1/E_qingmo_def_088_95", + "96": "/root/E_body_1/E_qingmo_def_091_96", + "97": "/root/E_wheel_97", + "98": "/root/E_wheel_98", + "99": "/root/E_link_99" +} \ No newline at end of file diff --git a/Articulated_objects/Medical_equipment/neonatal_radiant_warmer/resource/v_0/link_0.usd b/Articulated_objects/Medical_equipment/neonatal_radiant_warmer/resource/v_0/link_0.usd new file mode 100644 index 0000000000000000000000000000000000000000..cf7e43d5e671e79f3640594b568b0784ec293d9c --- /dev/null +++ b/Articulated_objects/Medical_equipment/neonatal_radiant_warmer/resource/v_0/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:441b410cefd6c18ff51f9c20b9f4853464abb7f5488c2513c2316abde9843712 +size 1738310 diff --git a/Articulated_objects/Medical_equipment/surgical_ceiling_pendant/model_surgical_ceiling_pendant.usd b/Articulated_objects/Medical_equipment/surgical_ceiling_pendant/model_surgical_ceiling_pendant.usd new file mode 100644 index 0000000000000000000000000000000000000000..eb780b8a361d9e7fb4dd659ec3c10948019f8160 --- /dev/null +++ b/Articulated_objects/Medical_equipment/surgical_ceiling_pendant/model_surgical_ceiling_pendant.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af4dd828cfbb32d87b6914b0554ef9668020cbfba1467d4d9c2736291c136c45 +size 17477 diff --git a/Articulated_objects/Medical_equipment/surgical_ceiling_pendant/resource/img/8b0cc0be5e2cf5162bc36e7486f95817.png b/Articulated_objects/Medical_equipment/surgical_ceiling_pendant/resource/img/8b0cc0be5e2cf5162bc36e7486f95817.png new file mode 100644 index 0000000000000000000000000000000000000000..9e47373209c56bdaf085a263077019d1615b2851 --- /dev/null +++ b/Articulated_objects/Medical_equipment/surgical_ceiling_pendant/resource/img/8b0cc0be5e2cf5162bc36e7486f95817.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d8e9fe2bc32e3553604f3c66b0c90d0ebccc273f457a5d6cd45794c2ead79c5b +size 17011 diff --git a/Articulated_objects/Medical_equipment/surgical_ceiling_pendant/resource/material.usd b/Articulated_objects/Medical_equipment/surgical_ceiling_pendant/resource/material.usd new file mode 100644 index 0000000000000000000000000000000000000000..f1d9c43a0aa1810d5909f8ea76f75f8f6021a06d --- /dev/null +++ b/Articulated_objects/Medical_equipment/surgical_ceiling_pendant/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bbfc5b90fd90b9f519618eb440f1260f3459e070b733d7f7ca89c8136b843a4e +size 2682 diff --git a/Articulated_objects/Medical_equipment/surgical_ceiling_pendant/resource/v_0/element_path.json b/Articulated_objects/Medical_equipment/surgical_ceiling_pendant/resource/v_0/element_path.json new file mode 100644 index 0000000000000000000000000000000000000000..7a38f45bf9d3406dfbc1a5ec3c8ed9061eff0194 --- /dev/null +++ b/Articulated_objects/Medical_equipment/surgical_ceiling_pendant/resource/v_0/element_path.json @@ -0,0 +1,36 @@ +{ + "1": "/root/E_body_1", + "6": "/root/E_leg2_6", + "10": "/root/E_leg2_6/E_Obj3d66M2120_10", + "11": "/root/E_leg2_6/E_Obj3d66M8209_11", + "12": "/root/E_leg2_6/E_Obj3d66M9391_12", + "13": "/root/E_leg2_6/E_Obj3d66M6650_13", + "14": "/root/E_leg2_6/E_Obj3d66M7107_14", + "15": "/root/E_leg2_6/E_Obj3d66M7458_15", + "16": "/root/E_leg2_6/E_Obj3d66M9391_16", + "17": "/root/E_leg2_6/E_socket_17", + "18": "/root/E_leg2_6/E_Obj3d66M7107_18", + "19": "/root/E_leg2_6/E_Obj3d66M7107_19", + "2": "/root/E_leg_2", + "20": "/root/E_leg2_6/E_Obj3d66M5023_20", + "21": "/root/E_leg2_6/E_Obj3d66M8285_21", + "22": "/root/E_leg2_6/E_socket_22", + "23": "/root/E_leg2_6/E_shelf_23", + "24": "/root/E_leg2_6/E_Obj3d66M7107_24", + "25": "/root/E_leg2_6/E_socket02_25", + "26": "/root/E_leg2_6/E_Obj3d66M7107_26", + "27": "/root/E_leg2_6/E_Obj3d66M3417_27", + "28": "/root/E_leg2_6/E_Obj3d66M4891_28", + "29": "/root/E_leg2_6/E_Obj3d66M1046_29", + "3": "/root/E_leg1_3", + "30": "/root/E_leg2_6/E_shelf_30", + "31": "/root/E_leg2_6/E_Obj3d66M7458_31", + "32": "/root/E_leg2_6/E_Obj3d66M2120_32", + "33": "/root/E_leg2_6/E_Obj3d66M7107_33", + "34": "/root/E_leg2_6/E_socket002_34", + "4": "/root/E_leg1_3/E_part_4", + "5": "/root/E_button_5", + "7": "/root/E_leg2_6/E_Group_7", + "8": "/root/E_leg2_6/E_socket01_8", + "9": "/root/E_leg2_6/E_shelf_9" +} \ No newline at end of file diff --git a/Articulated_objects/Medical_equipment/surgical_ceiling_pendant/resource/v_0/link_0.usd b/Articulated_objects/Medical_equipment/surgical_ceiling_pendant/resource/v_0/link_0.usd new file mode 100644 index 0000000000000000000000000000000000000000..d706b0ce45d2339d4f2cc1eff61ab33e411dace2 --- /dev/null +++ b/Articulated_objects/Medical_equipment/surgical_ceiling_pendant/resource/v_0/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ca06d914fd8627ffe3d73659e60a3e035db582182363fe517e624b4ac779e6e +size 4751093 diff --git a/Articulated_objects/Medical_equipment/surgical_ceiling_pendant001/model_surgical_ceiling_pendant001.usd b/Articulated_objects/Medical_equipment/surgical_ceiling_pendant001/model_surgical_ceiling_pendant001.usd new file mode 100644 index 0000000000000000000000000000000000000000..f15aaf4e77fcce795a7d74393393c0e7b679d7dd --- /dev/null +++ b/Articulated_objects/Medical_equipment/surgical_ceiling_pendant001/model_surgical_ceiling_pendant001.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0d5b26a54b25006a4d2985907a8620ad65e84bb9a1c724583ee24a2520a1e5a +size 29830 diff --git a/Articulated_objects/Medical_equipment/surgical_ceiling_pendant001/resource/material.usd b/Articulated_objects/Medical_equipment/surgical_ceiling_pendant001/resource/material.usd new file mode 100644 index 0000000000000000000000000000000000000000..d181bfe49107e002d7de50a880c39bcbf97b957f --- /dev/null +++ b/Articulated_objects/Medical_equipment/surgical_ceiling_pendant001/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e12014d70a9678d62c3ab7e70890268f42c6e29112c52fa3aaa583f58f95f7e0 +size 1660 diff --git a/Articulated_objects/Medical_equipment/surgical_ceiling_pendant001/resource/v_0/element_path.json b/Articulated_objects/Medical_equipment/surgical_ceiling_pendant001/resource/v_0/element_path.json new file mode 100644 index 0000000000000000000000000000000000000000..ab27bde26782a2a91043a2a25df6767d987e48ca --- /dev/null +++ b/Articulated_objects/Medical_equipment/surgical_ceiling_pendant001/resource/v_0/element_path.json @@ -0,0 +1,56 @@ +{ + "1": "/root/E_body_1", + "9": "/root/E_leg01_9", + "10": "/root/E_leg01_9/E_Group_10", + "11": "/root/E_leg01_9/E_Component293_11", + "12": "/root/E_leg01_9/E_Component300_12", + "13": "/root/E_leg01_9/E_Component301_13", + "14": "/root/E_leg01_9/E_Component309_14", + "15": "/root/E_leg01_9/E_Component301_15", + "16": "/root/E_leg01_9/E_Component301_16", + "17": "/root/E_leg01_9/E_Component316_17", + "18": "/root/E_leg01_9/E_Component317_18", + "19": "/root/E_leg01_9/E_Component296_19", + "2": "/root/E_body_1/E_Group_2", + "20": "/root/E_leg01_9/E_Component301_20", + "21": "/root/E_leg01_9/E_Component309_21", + "22": "/root/E_leg01_9/E_Component315_22", + "23": "/root/E_leg01_9/E_Component296_23", + "24": "/root/E_leg01_9/E_Component414_24", + "25": "/root/E_leg01_9/E_Component414_24/E_Component356_25", + "26": "/root/E_leg01_9/E_Component414_24/E_Component358_26", + "27": "/root/E_leg01_9/E_Component414_24/E_Component358_27", + "28": "/root/E_leg01_9/E_Component415_28", + "29": "/root/E_leg01_9/E_Component415_28/E_Component356_29", + "3": "/root/E_body_1/E_Component299_3", + "30": "/root/E_leg01_9/E_Component415_28/E_Component358_30", + "31": "/root/E_leg01_9/E_Component415_28/E_Component358_31", + "32": "/root/E_leg01_9/E_Component416_32", + "33": "/root/E_leg01_9/E_Component416_32/E_Component358_33", + "34": "/root/E_leg01_9/E_Component416_32/E_Component356_34", + "35": "/root/E_leg01_9/E_Component416_32/E_Component358_35", + "36": "/root/E_leg01_9/E_Component417_36", + "37": "/root/E_leg01_9/E_Component417_36/E_Component358_37", + "38": "/root/E_leg01_9/E_Component417_36/E_Component356_38", + "39": "/root/E_leg01_9/E_Component417_36/E_Component358_39", + "4": "/root/E_body_1/E_Component298_4", + "40": "/root/E_leg01_9/E_Component296_40", + "41": "/root/E_leg01_9/E_Component309_41", + "42": "/root/E_leg01_9/E_Component305_42", + "43": "/root/E_leg01_9/E_Component309_43", + "44": "/root/E_leg01_9/E_Component301_44", + "45": "/root/E_leg01_9/E_Component296_45", + "46": "/root/E_leg01_9/E_Component296_46", + "47": "/root/E_leg01_9/E_Component317_47", + "48": "/root/E_leg01_9/E_Component297_48", + "49": "/root/E_leg01_9/E_Component315_49", + "5": "/root/E_body_1/E_Component298_5", + "50": "/root/E_leg01_9/E_Component306_50", + "51": "/root/E_leg01_9/E_shelf_51", + "52": "/root/E_leg01_9/E_shelf_52", + "53": "/root/E_leg01_9/E_socket002_53", + "54": "/root/E_buttonM1_54", + "6": "/root/E_leg_6", + "7": "/root/E_leg_6/E_Group_7", + "8": "/root/E_leg_6/E_Component313_8" +} \ No newline at end of file diff --git a/Articulated_objects/Medical_equipment/surgical_ceiling_pendant001/resource/v_0/link_0.usd b/Articulated_objects/Medical_equipment/surgical_ceiling_pendant001/resource/v_0/link_0.usd new file mode 100644 index 0000000000000000000000000000000000000000..f0639cfa9320c7df616132dcfca64635cc29151c --- /dev/null +++ b/Articulated_objects/Medical_equipment/surgical_ceiling_pendant001/resource/v_0/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e6d15c01ef44844835b19d74b15a0e5f718d2c6ad26d1d2032edc8c88971941 +size 1209932 diff --git a/Articulated_objects/Medical_equipment/surgical_shadowless_lamp/model_surgical_shadowless_lamp.usd b/Articulated_objects/Medical_equipment/surgical_shadowless_lamp/model_surgical_shadowless_lamp.usd new file mode 100644 index 0000000000000000000000000000000000000000..b4e198629d1616687d2e5a992d62ce547e38d395 --- /dev/null +++ b/Articulated_objects/Medical_equipment/surgical_shadowless_lamp/model_surgical_shadowless_lamp.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b35b3168f9b27fedca5081cd767eb6151f55b1fd153227d7c71d8586f1750df +size 526281 diff --git a/Articulated_objects/Medical_equipment/surgical_shadowless_lamp/resource/img/262f3f9416f3d681d3788fe5be289a01.png b/Articulated_objects/Medical_equipment/surgical_shadowless_lamp/resource/img/262f3f9416f3d681d3788fe5be289a01.png new file mode 100644 index 0000000000000000000000000000000000000000..071fae566b83821c32a00b0faa9a5af12947c439 --- /dev/null +++ b/Articulated_objects/Medical_equipment/surgical_shadowless_lamp/resource/img/262f3f9416f3d681d3788fe5be289a01.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37739080534945339b1f68ee82dbf2fab5c474dec748e3485d188967b5affb66 +size 17012 diff --git a/Articulated_objects/Medical_equipment/surgical_shadowless_lamp/resource/material.usd b/Articulated_objects/Medical_equipment/surgical_shadowless_lamp/resource/material.usd new file mode 100644 index 0000000000000000000000000000000000000000..2130fd6b34b9bc8d8eb4ec6d21f1e9fff6bf432e --- /dev/null +++ b/Articulated_objects/Medical_equipment/surgical_shadowless_lamp/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6121df1281358a1bacd7d1606ff7921e68732504134d548e67cdbb723c4ad85 +size 2677 diff --git a/Articulated_objects/Medical_equipment/surgical_shadowless_lamp/resource/v_0/element_path.json b/Articulated_objects/Medical_equipment/surgical_shadowless_lamp/resource/v_0/element_path.json new file mode 100644 index 0000000000000000000000000000000000000000..f397dab58537cc20237f669af61ffe05b337fc46 --- /dev/null +++ b/Articulated_objects/Medical_equipment/surgical_shadowless_lamp/resource/v_0/element_path.json @@ -0,0 +1,161 @@ +{ + "1": "/root/E_body_1", + "6": "/root/E_leg0001_6", + "10": "/root/E_leg0001_6/E_Obj3d66M5671_10", + "100": "/root/E_leg_03_100", + "101": "/root/E_leg_02_101", + "102": "/root/E_leg00002_102", + "103": "/root/E_leg00002_102/E_Obj3d66M6274_103", + "104": "/root/E_leg00002_102/E_Obj3d66M5369_104", + "105": "/root/E_leg00002_102/E_Obj3d66M1894_105", + "106": "/root/E_leg0002_106", + "107": "/root/E_leg0002_106/E_Obj3d66M6455_107", + "108": "/root/E_leg0002_106/E_Obj3d66M6857_108", + "109": "/root/E_leg0002_106/E_Obj3d66M7576_109", + "11": "/root/E_leg0001_6/E_Obj3d66M5866_11", + "110": "/root/E_leg0002_106/E_Obj3d66M3049_110", + "111": "/root/E_leg0002_106/E_Obj3d66M8678_111", + "112": "/root/E_leg002_112", + "113": "/root/E_leg002_112/E_Obj3d66M4978_113", + "114": "/root/E_leg002_112/E_Obj3d66M6686_114", + "115": "/root/E_lignt1_115", + "116": "/root/E_lignt1_115/E_Obj3d66M745_116", + "117": "/root/E_lignt1_115/E_Obj3d66M9448_117", + "118": "/root/E_lignt1_115/E_Obj3d66M6258_118", + "119": "/root/E_lignt1_115/E_Obj3d66M8341_119", + "12": "/root/E_leg00001_12", + "120": "/root/E_lignt1_115/E_Obj3d66M3145_120", + "121": "/root/E_lignt1_115/E_Obj3d66M1696_121", + "122": "/root/E_lignt1_115/E_Obj3d66M3159_122", + "123": "/root/E_lignt1_115/E_Obj3d66M2764_123", + "124": "/root/E_lignt1_115/E_Obj3d66M9636_124", + "125": "/root/E_lignt1_115/E_Obj3d66M9929_125", + "126": "/root/E_lignt1_115/E_Obj3d66M8937_126", + "127": "/root/E_lignt1_115/E_Obj3d66M4122_127", + "128": "/root/E_lignt1_115/E_Obj3d66M5658_128", + "129": "/root/E_lignt1_115/E_Obj3d66M2014_129", + "13": "/root/E_leg00001_12/E_Group_13", + "130": "/root/E_lignt1_115/E_Obj3d66M2279_130", + "131": "/root/E_lignt1_115/E_Obj3d66M5836_131", + "132": "/root/E_lignt1_115/E_Obj3d66M3568_132", + "133": "/root/E_lignt1_115/E_Obj3d66M8583_133", + "134": "/root/E_lignt1_115/E_Obj3d66M3578_134", + "135": "/root/E_lignt1_115/E_Obj3d66M5614_135", + "136": "/root/E_lignt1_115/E_Obj3d66M6643_136", + "137": "/root/E_lignt1_115/E_Obj3d66M3900_137", + "138": "/root/E_lignt1_115/E_Obj3d66M9194_138", + "139": "/root/E_lignt1_115/E_Obj3d66M9558_139", + "14": "/root/E_leg00001_12/E_Obj3d66M1721_14", + "140": "/root/E_lignt1_115/E_Obj3d66M5177_140", + "141": "/root/E_lignt1_115/E_Obj3d66M868_141", + "142": "/root/E_lignt1_115/E_Obj3d66M9354_142", + "143": "/root/E_lignt1_115/E_Obj3d66M2593_143", + "144": "/root/E_lignt1_115/E_Obj3d66M309_144", + "145": "/root/E_lignt1_115/E_Obj3d66M1479_145", + "146": "/root/E_lignt1_115/E_Obj3d66M2729_146", + "147": "/root/E_lignt1_115/E_Obj3d66M7787_147", + "148": "/root/E_lignt1_115/E_Obj3d66M2810_148", + "149": "/root/E_lignt1_115/E_Obj3d66M4736_149", + "15": "/root/E_leg00001_12/E_Obj3d66M7882_15", + "150": "/root/E_lignt1_115/E_Obj3d66M1171_150", + "151": "/root/E_lignt1_115/E_Obj3d66M4501_151", + "152": "/root/E_lignt1_115/E_Obj3d66M3343_152", + "153": "/root/E_lignt1_115/E_Obj3d66M3786_153", + "154": "/root/E_lignt1_115/E_Obj3d66M471_154", + "155": "/root/E_lignt1_115/E_Obj3d66M7723_155", + "156": "/root/E_lignt1_115/E_Obj3d66M6869_156", + "157": "/root/E_lignt1_115/E_Obj3d66M1417_157", + "158": "/root/E_lignt1_115/E_Obj3d66M5292_158", + "159": "/root/E_lignt1_115/E_Obj3d66M51_159", + "16": "/root/E_light_16", + "17": "/root/E_light_16/E_Obj3d66M4292_17", + "18": "/root/E_light_16/E_Obj3d66M2705_18", + "19": "/root/E_light_16/E_Obj3d66M9973_19", + "2": "/root/E_leg_2", + "20": "/root/E_light_16/E_Obj3d66M2380_20", + "21": "/root/E_light_16/E_Obj3d66M5382_21", + "22": "/root/E_light_16/E_Obj3d66M2384_22", + "23": "/root/E_light_16/E_Obj3d66M7237_23", + "24": "/root/E_light_16/E_Obj3d66M6271_24", + "25": "/root/E_light_16/E_Obj3d66M583_25", + "26": "/root/E_light_16/E_Obj3d66M458_26", + "27": "/root/E_light_16/E_Obj3d66M1749_27", + "28": "/root/E_light_16/E_Obj3d66M8560_28", + "29": "/root/E_light_16/E_Obj3d66M2113_29", + "3": "/root/E_leg1_3", + "30": "/root/E_light_16/E_Obj3d66M5532_30", + "31": "/root/E_light_16/E_Obj3d66M4789_31", + "32": "/root/E_light_16/E_Obj3d66M6539_32", + "33": "/root/E_light_16/E_Obj3d66M1031_33", + "34": "/root/E_light_16/E_Obj3d66M484_34", + "35": "/root/E_light_16/E_Obj3d66M8013_35", + "36": "/root/E_light_16/E_Obj3d66M808_36", + "37": "/root/E_light_16/E_Obj3d66M9263_37", + "38": "/root/E_light_16/E_Obj3d66M9960_38", + "39": "/root/E_light_16/E_Obj3d66M1035_39", + "4": "/root/E_leg2_4", + "40": "/root/E_light_16/E_Obj3d66M1698_40", + "41": "/root/E_light_16/E_Obj3d66M4678_41", + "42": "/root/E_light_16/E_Obj3d66M2770_42", + "43": "/root/E_light_16/E_Obj3d66M5617_43", + "44": "/root/E_light_16/E_Obj3d66M4706_44", + "45": "/root/E_light_16/E_Obj3d66M4645_45", + "46": "/root/E_light_16/E_Obj3d66M56_46", + "47": "/root/E_light_16/E_Obj3d66M2566_47", + "48": "/root/E_light_16/E_Obj3d66M6632_48", + "49": "/root/E_light_16/E_Obj3d66M6926_49", + "5": "/root/E_leg01_5", + "50": "/root/E_light_16/E_Obj3d66M2460_50", + "51": "/root/E_light_16/E_Obj3d66M8633_51", + "52": "/root/E_light_16/E_Obj3d66M5912_52", + "53": "/root/E_light_16/E_Obj3d66M2329_53", + "54": "/root/E_light_16/E_Obj3d66M8646_54", + "55": "/root/E_light_16/E_Obj3d66M2248_55", + "56": "/root/E_light_16/E_Obj3d66M5250_56", + "57": "/root/E_light_16/E_Obj3d66M374_57", + "58": "/root/E_light_16/E_Obj3d66M4727_58", + "59": "/root/E_light_16/E_Obj3d66M4941_59", + "60": "/root/E_light_16/E_Obj3d66M6160_60", + "61": "/root/E_light_16/E_Obj3d66M3023_61", + "62": "/root/E_light_16/E_Obj3d66M3616_62", + "63": "/root/E_light_16/E_Obj3d66M9981_63", + "64": "/root/E_light_16/E_Obj3d66M2551_64", + "65": "/root/E_light_16/E_Obj3d66M50_65", + "66": "/root/E_light_16/E_Obj3d66M9085_66", + "67": "/root/E_light_16/E_Obj3d66M6730_67", + "68": "/root/E_light_16/E_Obj3d66M2147_68", + "69": "/root/E_light_16/E_Obj3d66M2905_69", + "7": "/root/E_leg0001_6/E_Obj3d66M7943_7", + "70": "/root/E_light_16/E_Obj3d66M2755_70", + "71": "/root/E_light_16/E_Obj3d66M1879_71", + "72": "/root/E_light_16/E_Obj3d66M1570_72", + "73": "/root/E_light_16/E_Obj3d66M2182_73", + "74": "/root/E_light_16/E_Obj3d66M2347_74", + "75": "/root/E_light_16/E_Obj3d66M7465_75", + "76": "/root/E_light_16/E_Obj3d66M4060_76", + "77": "/root/E_light_16/E_Obj3d66M6549_77", + "78": "/root/E_light_16/E_Obj3d66M5535_78", + "79": "/root/E_light_16/E_Obj3d66M9316_79", + "8": "/root/E_leg0001_6/E_Obj3d66M5543_8", + "80": "/root/E_light_16/E_Obj3d66M9260_80", + "81": "/root/E_light_16/E_Obj3d66M4999_81", + "82": "/root/E_light_16/E_Obj3d66M6621_82", + "83": "/root/E_light_16/E_Obj3d66M2557_83", + "84": "/root/E_light_16/E_Obj3d66M1356_84", + "85": "/root/E_light_16/E_Obj3d66M6212_85", + "86": "/root/E_light_16/E_Obj3d66M2483_86", + "87": "/root/E_light_16/E_Obj3d66M7995_87", + "88": "/root/E_light_16/E_Obj3d66M4699_88", + "89": "/root/E_light_16/E_Obj3d66M9039_89", + "9": "/root/E_leg0001_6/E_Obj3d66M1236_9", + "90": "/root/E_light_16/E_Obj3d66M6516_90", + "91": "/root/E_light_16/E_Obj3d66M2288_91", + "92": "/root/E_light_16/E_Obj3d66M503_92", + "93": "/root/E_leg001_93", + "94": "/root/E_leg001_93/E_Obj3d66M6692_94", + "95": "/root/E_leg001_93/E_Obj3d66M8403_95", + "96": "/root/E_screen_96", + "97": "/root/E_screen_96/E_Obj3d66M5287_97", + "98": "/root/E_screen_96/E_Obj3d66M8252_98", + "99": "/root/E_leg_01_99" +} \ No newline at end of file diff --git a/Articulated_objects/Medical_equipment/surgical_shadowless_lamp/resource/v_0/link_0.usd b/Articulated_objects/Medical_equipment/surgical_shadowless_lamp/resource/v_0/link_0.usd new file mode 100644 index 0000000000000000000000000000000000000000..a2fb543aa81d392da004d19293edff0416e8edb4 --- /dev/null +++ b/Articulated_objects/Medical_equipment/surgical_shadowless_lamp/resource/v_0/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:97881b555993ef7c78ba76110573342981b3e2a59556c6528d2cb4e695380659 +size 115259799 diff --git a/Articulated_objects/Medical_equipment/surgical_shadowless_lamp001/model_surgical_shadowless_lamp001.usd b/Articulated_objects/Medical_equipment/surgical_shadowless_lamp001/model_surgical_shadowless_lamp001.usd new file mode 100644 index 0000000000000000000000000000000000000000..90ef1653f79d296aef628e3d0f883d9e91900edf --- /dev/null +++ b/Articulated_objects/Medical_equipment/surgical_shadowless_lamp001/model_surgical_shadowless_lamp001.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4bd9ef43cbf7005545ab12772dfe7e6782c6ce14a7e2c20ddb00aa009fb85864 +size 201067 diff --git a/Articulated_objects/Medical_equipment/surgical_shadowless_lamp001/resource/material.usd b/Articulated_objects/Medical_equipment/surgical_shadowless_lamp001/resource/material.usd new file mode 100644 index 0000000000000000000000000000000000000000..30d29e4fae93cae9a3cf69d737530237ef66ea24 --- /dev/null +++ b/Articulated_objects/Medical_equipment/surgical_shadowless_lamp001/resource/material.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87ba6b3d1a233aa0431670c3fedc6579473a557962915343bccb8380c30e7ed7 +size 1514 diff --git a/Articulated_objects/Medical_equipment/surgical_shadowless_lamp001/resource/v_0/element_path.json b/Articulated_objects/Medical_equipment/surgical_shadowless_lamp001/resource/v_0/element_path.json new file mode 100644 index 0000000000000000000000000000000000000000..79b88cedd13fe9b9a023c58d3dbf8ede24158db1 --- /dev/null +++ b/Articulated_objects/Medical_equipment/surgical_shadowless_lamp001/resource/v_0/element_path.json @@ -0,0 +1,118 @@ +{ + "1": "/root/E_leg04_1", + "8": "/root/E_leg03_8", + "10": "/root/E_leg03_8/E_Component362_10", + "100": "/root/E_leg04_2_100", + "101": "/root/E_leg04_2_100/E_Component402_101", + "102": "/root/E_leg04_2_100/E_Component403_102", + "103": "/root/E_leg04_2_100/E_Component368_103", + "104": "/root/E_leg04_2_100/E_Component405_104", + "105": "/root/E_leg04_1_105", + "106": "/root/E_leg04_1_105/E_Component404_106", + "107": "/root/E_leg04_1_105/E_Component367_107", + "108": "/root/E_leg04_1_105/E_Component367_108", + "109": "/root/E_leg04_3_109", + "11": "/root/E_leg03_8/E_Component367_11", + "110": "/root/E_leg04_3_109/E_Component408_110", + "111": "/root/E_leg04_3_109/E_Component409_111", + "112": "/root/E_leg04_3_109/E_Component410_112", + "113": "/root/E_leg04_3_109/E_Component411_113", + "114": "/root/E_leg04_3_109/E_Component365_114", + "115": "/root/E_leg04_3_109/E_Component407_115", + "116": "/root/E_leg04_3_109/E_Component365_116", + "12": "/root/E_leg03_8/E_Component366_12", + "13": "/root/E_leg03_8/E_Component367_13", + "14": "/root/E_leg03_8/E_Component380_14", + "15": "/root/E_leg03_8/E_Component383_15", + "16": "/root/E_leg01_16", + "17": "/root/E_leg01_16/E_Group_17", + "18": "/root/E_leg01_16/E_Component362_18", + "19": "/root/E_leg01_16/E_Component367_19", + "2": "/root/E_leg04_1/E_Group_2", + "20": "/root/E_leg01_16/E_Component367_20", + "21": "/root/E_leg01_16/E_Component366_21", + "22": "/root/E_leg01_16/E_Component392_22", + "23": "/root/E_leg02_23", + "24": "/root/E_leg02_23/E_Group_24", + "25": "/root/E_leg02_23/E_Component398_25", + "26": "/root/E_leg02_23/E_Component366_26", + "27": "/root/E_leg02_23/E_Component367_27", + "28": "/root/E_leg02_23/E_Component367_28", + "29": "/root/E_leg02_23/E_Component362_29", + "3": "/root/E_leg04_1/E_Component400_3", + "30": "/root/E_body_30", + "31": "/root/E_leg01_1_31", + "32": "/root/E_leg01_1_31/E_Component367_32", + "33": "/root/E_leg01_1_31/E_Component367_33", + "34": "/root/E_leg01_1_31/E_Component370_34", + "35": "/root/E_leg01_1_31/E_Component368_35", + "36": "/root/E_leg01_1_31/E_Component365_36", + "37": "/root/E_leg01_1_31/E_Component385_37", + "38": "/root/E_leg01_2_38", + "39": "/root/E_leg01_2_38/E_Component386_39", + "4": "/root/E_leg04_1/E_Component367_4", + "40": "/root/E_leg01_2_38/E_Component372_40", + "41": "/root/E_leg01_2_38/E_Component387_41", + "42": "/root/E_leg01_2_38/E_Component393_42", + "43": "/root/E_leg01_3_43", + "44": "/root/E_leg01_3_43/E_Component371_44", + "45": "/root/E_leg01_3_43/E_Component369_45", + "46": "/root/E_leg01_3_43/E_Component388_46", + "47": "/root/E_leg01_3_43/E_Component391_47", + "48": "/root/E_leg01_4_48", + "49": "/root/E_leg01_4_48/E_Component374_49", + "5": "/root/E_leg04_1/E_Component366_5", + "50": "/root/E_leg01_4_48/E_Component390_50", + "51": "/root/E_leg01_4_48/E_Component373_51", + "52": "/root/E_leg01_4_48/E_Component389_52", + "53": "/root/E_leg01_4_48/E_Component377_53", + "54": "/root/E_leg02_4_54", + "55": "/root/E_leg02_4_54/E_Component374_55", + "56": "/root/E_leg02_4_54/E_Component364_56", + "57": "/root/E_leg02_4_54/E_Component378_57", + "58": "/root/E_leg02_4_54/E_Component377_58", + "59": "/root/E_leg02_4_54/E_Component373_59", + "6": "/root/E_leg04_1/E_Component367_6", + "60": "/root/E_leg02_1_60", + "61": "/root/E_leg02_1_60/E_Component367_61", + "62": "/root/E_leg02_1_60/E_Component370_62", + "63": "/root/E_leg02_1_60/E_Component365_63", + "64": "/root/E_leg02_1_60/E_Component366_64", + "65": "/root/E_leg02_1_60/E_Component367_65", + "66": "/root/E_leg02_1_60/E_Component368_66", + "67": "/root/E_leg02_3_67", + "68": "/root/E_leg02_3_67/E_Component371_68", + "69": "/root/E_leg02_3_67/E_Component372_69", + "7": "/root/E_leg04_1/E_Component406_7", + "70": "/root/E_leg02_3_67/E_Component396_70", + "71": "/root/E_leg02_3_67/E_Component382_71", + "72": "/root/E_leg02_2_72", + "73": "/root/E_leg02_2_72/E_Component399_73", + "74": "/root/E_leg02_2_72/E_Component369_74", + "75": "/root/E_leg02_2_72/E_Component395_75", + "76": "/root/E_leg02_2_72/E_Component365_76", + "77": "/root/E_leg02_2_72/E_Component397_77", + "78": "/root/E_leg03_4_78", + "79": "/root/E_leg03_4_78/E_Component364_79", + "80": "/root/E_leg03_4_78/E_Component378_80", + "81": "/root/E_leg03_4_78/E_Component373_81", + "82": "/root/E_leg03_4_78/E_Component376_82", + "83": "/root/E_leg03_4_78/E_Component374_83", + "84": "/root/E_leg03_4_78/E_Component377_84", + "85": "/root/E_leg03_3_85", + "86": "/root/E_leg03_3_85/E_Component371_86", + "87": "/root/E_leg03_3_85/E_Component372_87", + "88": "/root/E_leg03_2_88", + "89": "/root/E_leg03_2_88/E_Component379_89", + "9": "/root/E_leg03_8/E_Group_9", + "90": "/root/E_leg03_2_88/E_Component381_90", + "91": "/root/E_leg03_2_88/E_Component369_91", + "92": "/root/E_leg03_2_88/E_Component375_92", + "93": "/root/E_leg03_1_93", + "94": "/root/E_leg03_1_93/E_Component367_94", + "95": "/root/E_leg03_1_93/E_Component367_95", + "96": "/root/E_leg03_1_93/E_Component366_96", + "97": "/root/E_leg03_1_93/E_Component365_97", + "98": "/root/E_leg03_1_93/E_Component368_98", + "99": "/root/E_leg03_1_93/E_Component370_99" +} \ No newline at end of file diff --git a/Articulated_objects/Medical_equipment/surgical_shadowless_lamp001/resource/v_0/link_0.usd b/Articulated_objects/Medical_equipment/surgical_shadowless_lamp001/resource/v_0/link_0.usd new file mode 100644 index 0000000000000000000000000000000000000000..a8eab453f2c1208079647049d66937d5823db2de --- /dev/null +++ b/Articulated_objects/Medical_equipment/surgical_shadowless_lamp001/resource/v_0/link_0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d8f704b6011fda31ead03851f7e254482461c3d9d80ee55b22895dbc4119d6eb +size 6484626 diff --git a/Articulated_objects/household_items/trash_can/steping_dustbin_20/model_steping_dustbin_20.usd b/Articulated_objects/household_items/trash_can/steping_dustbin_20/model_steping_dustbin_20.usd index 5e1edd3c72df33e50325c7173060ca8089f1bb96..70254d8e3b3e61eb5749c88ee03df4086de03f91 100644 --- a/Articulated_objects/household_items/trash_can/steping_dustbin_20/model_steping_dustbin_20.usd +++ b/Articulated_objects/household_items/trash_can/steping_dustbin_20/model_steping_dustbin_20.usd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6e9ccc94008a41d14c2de3a3c42d68cc3153b7633265a7ef0bb8164e60e0f21e -size 3155140 +oid sha256:f54270bb2d663f6fb485e801941388f2f9e26fd834d0814b2ccac68e0cfeef62 +size 3160368 diff --git a/Articulated_objects/household_items/trash_can/steping_dustbin_20/resource/trashcan_control.py b/Articulated_objects/household_items/trash_can/steping_dustbin_20/resource/trashcan_control.py index 0a0f94cff1c153da0516d73d59662bb3b5e43c83..fc351464ffc81102b20b5f240ce01e1a0c4c9a1f 100644 --- a/Articulated_objects/household_items/trash_can/steping_dustbin_20/resource/trashcan_control.py +++ b/Articulated_objects/household_items/trash_can/steping_dustbin_20/resource/trashcan_control.py @@ -1,18 +1,12 @@ import carb +import math +import torch +import omni.usd from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands +from omni.isaac.core import SimulationContext from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import PhysxSchema, UsdGeom, UsdPhysics -import math -from omni.isaac.core import SimulationContext, World -# from isaacsim.core.prims import XFormPrim -# stiffness :0.8 Damping: 0.05 +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: @@ -34,62 +28,42 @@ def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path -# # 1. prim init -# button_prim = XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Xform") -# door_prim = XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/oven/oven_door") -# # 2. articulation Root prim -# root_articulation_prim = "/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/oven/oven_base" -# # 3. joint name -# joint_names = ["PrismaticJoint", "RevoluteJoint"] -# # 4. joint num -# num_arm_dof = 2 - -# light_scopes=[XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Lights_on"), -# XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Lights_on_1"), -# ] -# for i in range(0, light_scopes.__len__()): -# light_scopes[i].set_visibility(False) -# index = random.randint(0, len(light_scopes)-1) -# light_scopes[index].set_visibility(True) button_prim = XFormPrim(find_prim_path_by_name("E_pedal_17")) print("button_prim", button_prim.prim_path) -# door_prim = XFormPrim(find_prim_path_by_name("oven_E_door_4")) -# print("door_prim", door_prim.prim_path) + root_articulation_prim = find_prim_path_by_name("E_body_13") print("root_articulation_prim", root_articulation_prim) -joint_names = ["RevoluteJoint_steping_dustbin_20_down", "RevoluteJoint_steping_dustbin_20_up1","RevoluteJoint_steping_dustbin_20_up"] -# light_scopes=[XFormPrim(find_prim_path_by_name("oven_light")) - # ] -revolutejoint_path = find_prim_path_by_name("RevoluteJoint_steping_dustbin_20_down") +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_13"] +JOINT_NAMES = [ + "RevoluteJoint_steping_dustbin_20_down", + "RevoluteJoint_steping_dustbin_20_up1", + "RevoluteJoint_steping_dustbin_20_up", +] -class MicrowaveOverControl(BehaviorScript): +class TrashcanControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # light_scopes[0].set_visibility(False) - self.Stiffness_max = 0.8 - self.Stiffness_min = 0.08 - - # 初始化门的锁定状态 - self.door_locked = True - - # init_pose + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.use_torch = None + self.joint_limits = None + self.local_pose_button, self.local_ort_drawer_down = button_prim.get_local_pose() - # self.local_pose_door, self.local_ort_drawer_up = door_prim.get_local_pose() - - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - stage = omni.usd.get_context().get_stage() - self.revoluteJoint_drive_path = stage.GetPrimAtPath(revolutejoint_path) - self.revoluteJoint_drive = UsdPhysics.DriveAPI.Get(self.revoluteJoint_drive_path, "angular") - - - def on_destroy(self): - pass def on_play(self): self.simulation_context = SimulationContext( @@ -98,51 +72,66 @@ class MicrowaveOverControl(BehaviorScript): rendering_dt=1.0/120 ) - - def on_pause(self): - pass - def on_stop(self): - self.init_start=True - - self.door_locked = True carb.log_info(f"{type(self).__name__}.on_stop()->{self.prim_path}") - pass def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.dc = _dynamic_control.acquire_dynamic_control_interface() - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - # print("self.joint_handles",self.joint_handles) + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): - self.trashcan_control() - def trashcan_control(self): - - self.Joint0_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - self.Joint1_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - self.Joint2_state = self.dc.get_dof_state(self.joint_handles[2], _dynamic_control.STATE_ALL).pos - # print("self.Joint0_state", self.Joint0_state) - # print("self.Joint1_state", self.Joint1_state) - # 按钮被按下且门处于锁定状态 - if self.Joint0_state > math.radians(20): - self.dc.set_dof_position_target(self.joint_handles[1], math.radians(40)) - self.dc.set_dof_position_target(self.joint_handles[2], math.radians(-90)) + if not self.initialized or self.art is None: + return + self.target_pose_control() + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) + + def target_pose_control(self): + positions = self.art.get_joint_positions().squeeze() + button_idx = self.joint_indices[0] + button_state = self._get_scalar_value(positions[button_idx]) + + control_indices = self.joint_indices[1:] + if button_state > math.radians(20): + targets = [math.radians(40), math.radians(-90)] else: - self.dc.set_dof_position_target(self.joint_handles[1], math.radians(0)) - self.dc.set_dof_position_target(self.joint_handles[2], math.radians(0)) + targets = [0.0, 0.0] - + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(control_indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=control_indices) + + self.art.apply_action(action) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + dof_limits = self.art.get_dof_limits().squeeze() + self.joint_limits = [ + {"lower": dof_limits[idx, 0], "upper": dof_limits[idx, 1]} + for idx in self.joint_indices + ] + self.initialized = True + except AttributeError as exc: + print(f"Physics not ready yet, will retry: {exc}") + return diff --git a/Articulated_objects/household_items/trash_can/stepping_dustbin_16/resource/trashcan_control.py b/Articulated_objects/household_items/trash_can/stepping_dustbin_16/resource/trashcan_control.py index c6795526d918d35929badbd57bf2d521d59cb546..c330ea1657d0341a0e6415d9172fe201fe26f00a 100644 --- a/Articulated_objects/household_items/trash_can/stepping_dustbin_16/resource/trashcan_control.py +++ b/Articulated_objects/household_items/trash_can/stepping_dustbin_16/resource/trashcan_control.py @@ -1,18 +1,12 @@ import carb +import math +import torch +import omni.usd from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands +from omni.isaac.core import SimulationContext from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import PhysxSchema, UsdGeom, UsdPhysics -import math -from omni.isaac.core import SimulationContext, World -# from isaacsim.core.prims import XFormPrim -# stiffness :0.8 Damping: 0.05 +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: @@ -34,62 +28,40 @@ def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path -# # 1. prim init -# button_prim = XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Xform") -# door_prim = XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/oven/oven_door") -# # 2. articulation Root prim -# root_articulation_prim = "/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/oven/oven_base" -# # 3. joint name -# joint_names = ["PrismaticJoint", "RevoluteJoint"] -# # 4. joint num -# num_arm_dof = 2 - -# light_scopes=[XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Lights_on"), -# XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Lights_on_1"), -# ] -# for i in range(0, light_scopes.__len__()): -# light_scopes[i].set_visibility(False) -# index = random.randint(0, len(light_scopes)-1) -# light_scopes[index].set_visibility(True) button_prim = XFormPrim(find_prim_path_by_name("E_pedal_1")) print("button_prim", button_prim.prim_path) -# door_prim = XFormPrim(find_prim_path_by_name("oven_E_door_4")) -# print("door_prim", door_prim.prim_path) root_articulation_prim = find_prim_path_by_name("E_body_3") print("root_articulation_prim", root_articulation_prim) -joint_names = ["RevoluteJoint_Stepping_dustbin_16_down", "RevoluteJoint_Stepping_dustbin_16_up"] -# light_scopes=[XFormPrim(find_prim_path_by_name("oven_light")) - # ] -revolutejoint_path = find_prim_path_by_name("RevoluteJoint_Stepping_dustbin_16_down") +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_3"] +JOINT_NAMES = [ + "RevoluteJoint_Stepping_dustbin_16_down", + "RevoluteJoint_Stepping_dustbin_16_up", +] class MicrowaveOverControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # light_scopes[0].set_visibility(False) - self.Stiffness_max = 0.8 - self.Stiffness_min = 0.08 - - # 初始化门的锁定状态 - self.door_locked = True - - # init_pose + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.use_torch = None + self.joint_limits = None + self.local_pose_button, self.local_ort_drawer_down = button_prim.get_local_pose() - # self.local_pose_door, self.local_ort_drawer_up = door_prim.get_local_pose() - - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - stage = omni.usd.get_context().get_stage() - self.revoluteJoint_drive_path = stage.GetPrimAtPath(revolutejoint_path) - self.revoluteJoint_drive = UsdPhysics.DriveAPI.Get(self.revoluteJoint_drive_path, "angular") - - - def on_destroy(self): - pass def on_play(self): self.simulation_context = SimulationContext( @@ -99,48 +71,64 @@ class MicrowaveOverControl(BehaviorScript): ) - def on_pause(self): - pass - def on_stop(self): - self.init_start=True - - self.door_locked = True carb.log_info(f"{type(self).__name__}.on_stop()->{self.prim_path}") - pass def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.dc = _dynamic_control.acquire_dynamic_control_interface() - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - # print("self.joint_handles",self.joint_handles) + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): - self.trashcan_control() - def trashcan_control(self): - - self.Joint0_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - self.Joint1_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - # print("self.Joint0_state", self.Joint0_state) - # print("self.Joint1_state", self.Joint1_state) - # 按钮被按下且门处于锁定状态 - if self.Joint0_state > math.radians(20): - self.dc.set_dof_position_target(self.joint_handles[1], math.radians(-90)) + if not self.initialized or self.art is None: + return + self.target_pose_control() + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) + + def target_pose_control(self): + positions = self.art.get_joint_positions().squeeze() + pedal_idx = self.joint_indices[0] + pedal_state = self._get_scalar_value(positions[pedal_idx]) + + lid_idx = [self.joint_indices[1]] + targets = [math.radians(-90) if pedal_state > math.radians(20) else 0.0] + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(lid_idx, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) else: - self.dc.set_dof_position_target(self.joint_handles[1], math.radians(0)) + action = ArticulationActions(targets, joint_indices=lid_idx) + self.art.apply_action(action) + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + dof_limits = self.art.get_dof_limits().squeeze() + self.joint_limits = [ + {"lower": dof_limits[idx, 0], "upper": dof_limits[idx, 1]} + for idx in self.joint_indices + ] + self.initialized = True + except AttributeError as exc: + print(f"Physics not ready yet, will retry: {exc}") + return diff --git a/Articulated_objects/household_items/trash_can/stepping_dustbin_4/resource/trashcan_control.py b/Articulated_objects/household_items/trash_can/stepping_dustbin_4/resource/trashcan_control.py index 92a6edafbd26c3a28c27887cb903064c1e746247..7b00be0a5e75025680bc9823c5eda9634fedd7a5 100644 --- a/Articulated_objects/household_items/trash_can/stepping_dustbin_4/resource/trashcan_control.py +++ b/Articulated_objects/household_items/trash_can/stepping_dustbin_4/resource/trashcan_control.py @@ -1,18 +1,12 @@ import carb +import math +import torch +import omni.usd from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands +from omni.isaac.core import SimulationContext from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import PhysxSchema, UsdGeom, UsdPhysics -import math -from omni.isaac.core import SimulationContext, World -# from isaacsim.core.prims import XFormPrim -# stiffness :0.8 Damping: 0.05 +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: @@ -34,62 +28,40 @@ def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path -# # 1. prim init -# button_prim = XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Xform") -# door_prim = XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/oven/oven_door") -# # 2. articulation Root prim -# root_articulation_prim = "/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/oven/oven_base" -# # 3. joint name -# joint_names = ["PrismaticJoint", "RevoluteJoint"] -# # 4. joint num -# num_arm_dof = 2 - -# light_scopes=[XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Lights_on"), -# XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Lights_on_1"), -# ] -# for i in range(0, light_scopes.__len__()): -# light_scopes[i].set_visibility(False) -# index = random.randint(0, len(light_scopes)-1) -# light_scopes[index].set_visibility(True) button_prim = XFormPrim(find_prim_path_by_name("E_pedal_5")) print("button_prim", button_prim.prim_path) -# door_prim = XFormPrim(find_prim_path_by_name("oven_E_door_4")) -# print("door_prim", door_prim.prim_path) root_articulation_prim = find_prim_path_by_name("E_body_2") print("root_articulation_prim", root_articulation_prim) -joint_names = ["RevoluteJoint_stepping_dustbin_4_down", "RevoluteJoint_stepping_dustbin_4_up"] -# light_scopes=[XFormPrim(find_prim_path_by_name("oven_light")) - # ] -revolutejoint_path = find_prim_path_by_name("RevoluteJoint_stepping_dustbin_4_down") +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_2"] +JOINT_NAMES = [ + "RevoluteJoint_stepping_dustbin_4_down", + "RevoluteJoint_stepping_dustbin_4_up", +] -class MicrowaveOverControl(BehaviorScript): +class TrashcanControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # light_scopes[0].set_visibility(False) - self.Stiffness_max = 0.8 - self.Stiffness_min = 0.08 - - # 初始化门的锁定状态 - self.door_locked = True - - # init_pose + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.use_torch = None + self.joint_limits = None + self.local_pose_button, self.local_ort_drawer_down = button_prim.get_local_pose() - # self.local_pose_door, self.local_ort_drawer_up = door_prim.get_local_pose() - - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - stage = omni.usd.get_context().get_stage() - self.revoluteJoint_drive_path = stage.GetPrimAtPath(revolutejoint_path) - self.revoluteJoint_drive = UsdPhysics.DriveAPI.Get(self.revoluteJoint_drive_path, "angular") - - - def on_destroy(self): - pass def on_play(self): self.simulation_context = SimulationContext( @@ -98,49 +70,64 @@ class MicrowaveOverControl(BehaviorScript): rendering_dt=1.0/120 ) - - def on_pause(self): - pass - def on_stop(self): - self.init_start=True - - self.door_locked = True carb.log_info(f"{type(self).__name__}.on_stop()->{self.prim_path}") - pass def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.dc = _dynamic_control.acquire_dynamic_control_interface() - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - # print("self.joint_handles",self.joint_handles) + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): - self.trashcan_control() - def trashcan_control(self): - - self.Joint0_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - self.Joint1_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - # print("self.Joint0_state", self.Joint0_state) - # print("self.Joint1_state", self.Joint1_state) - # 按钮被按下且门处于锁定状态 - if self.Joint0_state > math.radians(20): - self.dc.set_dof_position_target(self.joint_handles[1], math.radians(-45)) + if not self.initialized or self.art is None: + return + self.target_pose_control() + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) + + def target_pose_control(self): + positions = self.art.get_joint_positions().squeeze() + pedal_idx = self.joint_indices[0] + pedal_state = self._get_scalar_value(positions[pedal_idx]) + + lid_idx = [self.joint_indices[1]] + targets = [math.radians(-45) if pedal_state > math.radians(20) else 0.0] + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(lid_idx, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) else: - self.dc.set_dof_position_target(self.joint_handles[1], math.radians(0)) + action = ArticulationActions(targets, joint_indices=lid_idx) + self.art.apply_action(action) + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + dof_limits = self.art.get_dof_limits().squeeze() + self.joint_limits = [ + {"lower": dof_limits[idx, 0], "upper": dof_limits[idx, 1]} + for idx in self.joint_indices + ] + self.initialized = True + except AttributeError as exc: + print(f"Physics not ready yet, will retry: {exc}") + return diff --git a/Articulated_objects/household_items/trash_can/stepping_dustbin_6/resource/trashcan_control.py b/Articulated_objects/household_items/trash_can/stepping_dustbin_6/resource/trashcan_control.py index dbb896bb5a14ebe54edc7f77ca5cb479cbe7865b..728a7477aa60e0d5c111a3600874ae9590a4006b 100644 --- a/Articulated_objects/household_items/trash_can/stepping_dustbin_6/resource/trashcan_control.py +++ b/Articulated_objects/household_items/trash_can/stepping_dustbin_6/resource/trashcan_control.py @@ -1,18 +1,12 @@ import carb +import math +import torch +import omni.usd from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands +from omni.isaac.core import SimulationContext from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import PhysxSchema, UsdGeom, UsdPhysics -import math -from omni.isaac.core import SimulationContext, World -# from isaacsim.core.prims import XFormPrim -# stiffness :0.8 Damping: 0.05 +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: @@ -34,62 +28,40 @@ def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path -# # 1. prim init -# button_prim = XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Xform") -# door_prim = XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/oven/oven_door") -# # 2. articulation Root prim -# root_articulation_prim = "/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/oven/oven_base" -# # 3. joint name -# joint_names = ["PrismaticJoint", "RevoluteJoint"] -# # 4. joint num -# num_arm_dof = 2 - -# light_scopes=[XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Lights_on"), -# XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Lights_on_1"), -# ] -# for i in range(0, light_scopes.__len__()): -# light_scopes[i].set_visibility(False) -# index = random.randint(0, len(light_scopes)-1) -# light_scopes[index].set_visibility(True) button_prim = XFormPrim(find_prim_path_by_name("E_pedal_1")) print("button_prim", button_prim.prim_path) -# door_prim = XFormPrim(find_prim_path_by_name("oven_E_door_4")) -# print("door_prim", door_prim.prim_path) root_articulation_prim = find_prim_path_by_name("E_body_2") print("root_articulation_prim", root_articulation_prim) -joint_names = ["PrismaticJoint_Stepping_dustbin_6_down", "RevoluteJoint_Stepping_dustbin_6_up"] -# light_scopes=[XFormPrim(find_prim_path_by_name("oven_light")) - # ] -PrismaticJoint_path = find_prim_path_by_name("PrismaticJoint_Stepping_dustbin_6_down") +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_2"] +JOINT_NAMES = [ + "PrismaticJoint_Stepping_dustbin_6_down", + "RevoluteJoint_Stepping_dustbin_6_up", +] -class MicrowaveOverControl(BehaviorScript): +class TrashcanControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # light_scopes[0].set_visibility(False) - self.Stiffness_max = 0.8 - self.Stiffness_min = 0.08 - - # 初始化门的锁定状态 - self.door_locked = True - - # init_pose + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.use_torch = None + self.joint_limits = None + self.local_pose_button, self.local_ort_drawer_down = button_prim.get_local_pose() - # self.local_pose_door, self.local_ort_drawer_up = door_prim.get_local_pose() - - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - stage = omni.usd.get_context().get_stage() - self.revoluteJoint_drive_path = stage.GetPrimAtPath(PrismaticJoint_path) - self.revoluteJoint_drive = UsdPhysics.DriveAPI.Get(self.revoluteJoint_drive_path, "linear") - - - def on_destroy(self): - pass def on_play(self): self.simulation_context = SimulationContext( @@ -98,49 +70,64 @@ class MicrowaveOverControl(BehaviorScript): rendering_dt=1.0/120 ) - - def on_pause(self): - pass - def on_stop(self): - self.init_start=True - - self.door_locked = True carb.log_info(f"{type(self).__name__}.on_stop()->{self.prim_path}") - pass def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.dc = _dynamic_control.acquire_dynamic_control_interface() - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - # print("self.joint_handles",self.joint_handles) + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): - self.trashcan_control() - def trashcan_control(self): - - self.Joint0_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - self.Joint1_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - # print("self.Joint0_state", self.Joint0_state) - # print("self.Joint1_state", self.Joint1_state) - # 按钮被按下且门处于锁定状态 - if self.Joint0_state < -0.01 : - self.dc.set_dof_position_target(self.joint_handles[1], math.radians(-45)) + if not self.initialized or self.art is None: + return + self.target_pose_control() + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) + + def target_pose_control(self): + positions = self.art.get_joint_positions().squeeze() + slider_idx = self.joint_indices[0] + slider_state = self._get_scalar_value(positions[slider_idx]) + + lid_idx = [self.joint_indices[1]] + targets = [math.radians(-45) if slider_state < -0.01 else 0.0] + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(lid_idx, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) else: - self.dc.set_dof_position_target(self.joint_handles[1], math.radians(0)) + action = ArticulationActions(targets, joint_indices=lid_idx) + self.art.apply_action(action) + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + dof_limits = self.art.get_dof_limits().squeeze() + self.joint_limits = [ + {"lower": dof_limits[idx, 0], "upper": dof_limits[idx, 1]} + for idx in self.joint_indices + ] + self.initialized = True + except AttributeError as exc: + print(f"Physics not ready yet, will retry: {exc}") + return diff --git a/Articulated_objects/household_items/trash_can/stepping_dustbin_9/resource/trashcan_control.py b/Articulated_objects/household_items/trash_can/stepping_dustbin_9/resource/trashcan_control.py index 5da7c2d66641bd92dfeb8c158733473399f4a2fb..102e8155fd9c1b8b9feda081db0f7cce76b2b4ab 100644 --- a/Articulated_objects/household_items/trash_can/stepping_dustbin_9/resource/trashcan_control.py +++ b/Articulated_objects/household_items/trash_can/stepping_dustbin_9/resource/trashcan_control.py @@ -1,18 +1,12 @@ import carb +import math +import torch +import omni.usd from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands +from omni.isaac.core import SimulationContext from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import PhysxSchema, UsdGeom, UsdPhysics -import math -from omni.isaac.core import SimulationContext, World -# from isaacsim.core.prims import XFormPrim -# stiffness :0.8 Damping: 0.05 +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: @@ -34,62 +28,41 @@ def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path -# # 1. prim init -# button_prim = XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Xform") -# door_prim = XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/oven/oven_door") -# # 2. articulation Root prim -# root_articulation_prim = "/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/oven/oven_base" -# # 3. joint name -# joint_names = ["PrismaticJoint", "RevoluteJoint"] -# # 4. joint num -# num_arm_dof = 2 - -# light_scopes=[XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Lights_on"), -# XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Lights_on_1"), -# ] -# for i in range(0, light_scopes.__len__()): -# light_scopes[i].set_visibility(False) -# index = random.randint(0, len(light_scopes)-1) -# light_scopes[index].set_visibility(True) button_prim = XFormPrim(find_prim_path_by_name("E_pedal_2")) print("button_prim", button_prim.prim_path) -# door_prim = XFormPrim(find_prim_path_by_name("oven_E_door_4")) -# print("door_prim", door_prim.prim_path) root_articulation_prim = find_prim_path_by_name("E_body_4") print("root_articulation_prim", root_articulation_prim) -joint_names = ["RevoluteJoint_Stepping_dustbin_9_down", "RevoluteJoint_Stepping_dustbin_9_up_2","RevoluteJoint_Stepping_dustbin_9_up_1"] -# light_scopes=[XFormPrim(find_prim_path_by_name("oven_light")) - # ] -revolutejoint_path = find_prim_path_by_name("RevoluteJoint_Stepping_dustbin_9_down") +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_4"] +JOINT_NAMES = [ + "RevoluteJoint_Stepping_dustbin_9_down", + "RevoluteJoint_Stepping_dustbin_9_up_2", + "RevoluteJoint_Stepping_dustbin_9_up_1", +] class TrashcanControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # light_scopes[0].set_visibility(False) - self.Stiffness_max = 0.8 - self.Stiffness_min = 0.08 - - # 初始化门的锁定状态 - self.door_locked = True - - # init_pose + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.use_torch = None + self.joint_limits = None + self.local_pose_button, self.local_ort_drawer_down = button_prim.get_local_pose() - # self.local_pose_door, self.local_ort_drawer_up = door_prim.get_local_pose() - - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - stage = omni.usd.get_context().get_stage() - self.revoluteJoint_drive_path = stage.GetPrimAtPath(revolutejoint_path) - self.revoluteJoint_drive = UsdPhysics.DriveAPI.Get(self.revoluteJoint_drive_path, "angular") - - - def on_destroy(self): - pass def on_play(self): self.simulation_context = SimulationContext( @@ -97,52 +70,66 @@ class TrashcanControl(BehaviorScript): physics_dt=1.0/120, rendering_dt=1.0/120 ) - - - def on_pause(self): - pass - def on_stop(self): - self.init_start=True - - self.door_locked = True carb.log_info(f"{type(self).__name__}.on_stop()->{self.prim_path}") - pass def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.dc = _dynamic_control.acquire_dynamic_control_interface() - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - # print("self.joint_handles",self.joint_handles) + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): - self.trashcan_control() - def trashcan_control(self): - - self.Joint0_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - self.Joint1_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - self.Joint2_state = self.dc.get_dof_state(self.joint_handles[2], _dynamic_control.STATE_ALL).pos - # print("self.Joint0_state", self.Joint0_state) - # print("self.Joint1_state", self.Joint1_state) - # 按钮被按下且门处于锁定状态 - if self.Joint0_state > math.radians(10): - self.dc.set_dof_position_target(self.joint_handles[1], math.radians(90.0)) - self.dc.set_dof_position_target(self.joint_handles[2], math.radians(-180.0)) + if not self.initialized or self.art is None: + return + self.target_pose_control() + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) + + def target_pose_control(self): + positions = self.art.get_joint_positions().squeeze() + pedal_idx = self.joint_indices[0] + pedal_state = self._get_scalar_value(positions[pedal_idx]) + + control_indices = self.joint_indices[1:] + if pedal_state > math.radians(10): + targets = [math.radians(90.0), math.radians(-180.0)] else: - self.dc.set_dof_position_target(self.joint_handles[1], math.radians(0)) - self.dc.set_dof_position_target(self.joint_handles[2], math.radians(0)) + targets = [0.0, 0.0] - + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(control_indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=control_indices) + + self.art.apply_action(action) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + dof_limits = self.art.get_dof_limits().squeeze() + self.joint_limits = [ + {"lower": dof_limits[idx, 0], "upper": dof_limits[idx, 1]} + for idx in self.joint_indices + ] + self.initialized = True + except AttributeError as exc: + print(f"Physics not ready yet, will retry: {exc}") + return diff --git a/Articulated_objects/large_furniture/cupboard/cupboard_1/resource/cupboard_control.py b/Articulated_objects/large_furniture/cupboard/cupboard_1/resource/cupboard_control.py index 4499baa869e288e6e78ab0483267d24746dc1522..2c4f1d24d83bf0a8a714092705c725b74e182fdd 100644 --- a/Articulated_objects/large_furniture/cupboard/cupboard_1/resource/cupboard_control.py +++ b/Articulated_objects/large_furniture/cupboard/cupboard_1/resource/cupboard_control.py @@ -1,26 +1,16 @@ -import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils +import torch +from omni.kit.scripting import BehaviorScript +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +import omni.usd from pxr import PhysxSchema, UsdGeom, UsdPhysics import math - def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - def _find_prim(prim): if prim.GetName() == prim_name: return prim.GetPath().pathString @@ -29,213 +19,195 @@ def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: if result: return result return None - found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path - -# 1. prim init -# joint_prim = XFormPrim(find_prim_path_by_name("fridge_E_body_61")) -# right_revolutejoint_path = find_prim_path_by_name("RevoluteJoint_fridge_right") -# left_revolutejoint_path = find_prim_path_by_name("RevoluteJoint_fridge_left") - -# 2. articulation Root prim -root_articulation_prim = find_prim_path_by_name("E_body_4") -stage = omni.usd.get_context().get_stage() -# 3. joint name -joint_names = ["RevoluteJoint_cupboard_1_up1","RevoluteJoint_cupboard_1_up2","RevoluteJoint_cupboard_1_up7","RevoluteJoint_cupboard_1_up3","RevoluteJoint_cupboard_1_up4","RevoluteJoint_cupboard_1_up5","RevoluteJoint_cupboard_1_down1","RevoluteJoint_cupboard_1_down4","RevoluteJoint_cupboard_1_down5","RevoluteJoint_cupboard_1_up6","RevoluteJoint_cupboard_1_up6","RevoluteJoint_cupboard_1_down2","RevoluteJoint_cupboard_1_down3","RevoluteJoint_cupboard_1_down7"] -joint_threshold = 0.3 -# 4. Joint information -joints_info = {} -for joint_name in joint_names: - joint_prim_path = find_prim_path_by_name(joint_name) - joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) - joint = UsdPhysics.RevoluteJoint(joint_prim_obj) - - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() - } +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_4"] -# 5. Joint limits and limit differences -joint_limits = {} -joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): - joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] - } - joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] - ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] -# 5. light prim -# light_scopes=[ -# XFormPrim(find_prim_path_by_name("fridge_light")) -# ] +JOINT_NAMES = ["RevoluteJoint_cupboard_1_up1", + "RevoluteJoint_cupboard_1_up2", + "RevoluteJoint_cupboard_1_up7", + "RevoluteJoint_cupboard_1_up3", + "RevoluteJoint_cupboard_1_up4", + "RevoluteJoint_cupboard_1_up5", + "RevoluteJoint_cupboard_1_down1", + "RevoluteJoint_cupboard_1_down4", + "RevoluteJoint_cupboard_1_down5", + "RevoluteJoint_cupboard_1_up6", + "RevoluteJoint_cupboard_1_up6", + "RevoluteJoint_cupboard_1_down2", + "RevoluteJoint_cupboard_1_down3", + "RevoluteJoint_cupboard_1_down7"] +JOINT_THRESHOLD = 0.3 class CupboardControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # light_scopes[0].set_visibility(False) - # light_scopes[1].set_visibility(False) - # init_pose - # self.local_pose_button, self.local_ort_button_down = joint_prim.get_local_pose() - # self.local_pose_door, self.local_ort_drawer_up = door_prim.get_local_pose() + # 尝试找到articulation根路径 + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - - def on_destroy(self): - pass + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.joint_limits = None + self.joint_limit_diffs = None + self.use_torch = None + self.joint_threshold = JOINT_THRESHOLD + # 保留原始的 joints_info 用于 calculate_stiffness + stage = omni.usd.get_context().get_stage() + self.joints_info = {} + for joint_name in self.joint_names: + joint_prim_path = find_prim_path_by_name(joint_name) + joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) + joint = UsdPhysics.RevoluteJoint(joint_prim_obj) + self.joints_info[joint_name] = { + 'prim': joint, + 'lower_limit': joint.GetLowerLimitAttr().Get(), + 'upper_limit': joint.GetUpperLimitAttr().Get() + } def on_play(self): - # - self.simulation_context = SimulationContext( - stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 - ) - - def on_pause(self): - pass - - def on_stop(self): - self.init_start=True - # for light in light_scopes: - # light.set_visibility(False) - # light_scopes[0].set_visibility(False) - # light_scopes[1].set_visibility(False) - # back to initial pose - # joint_prim.set_local_pose(translation=self.local_pose_button) - pass + self._initialize_articulation() - def on_update(self, current_time: float, delta_time: float): - if delta_time <= 0: - return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) + def on_update(self, current_time, delta_time): + if delta_time <= 0: return + # 延迟初始化,确保physics准备好 + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return # 如果还没初始化成功,跳过本次更新 - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + self.apply_behavior() + def apply_behavior(self): - # self.light_control() + if not self.initialized or self.art is None: + return self.damping_stiffness_change() self.target_pose_control() - - - def light_control(self): - self.left_joint_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - self.right_joint_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - # print("self.Joint1_state",self.Joint1_state) - # 联合判断双门状态 - doors_open = [ - self.left_joint_state < math.radians(-30), - self.right_joint_state > math.radians(30) - ] - # 灯光控制逻辑 - current_visibility = light_scopes[0].get_visibility() - if any(doors_open): - if not current_visibility: - for light in light_scopes: - light.set_visibility(True) + def _get_scalar_value(self, value): + """将值转换为标量(支持torch tensor和普通数值)""" + if isinstance(value, torch.Tensor): + return value.item() + elif hasattr(value, 'item'): + return value.item() else: - if current_visibility: - for light in light_scopes: - light.set_visibility(False) - - # if self.right_joint_state > math.radians(30) : - # if light_scopes[0].get_visibility() == False: - # for light in light_scopes: - # light.set_visibility(True) - # # self.dc.set_dof_position_target(self.joint_handles[1], 140) - - # elif self.right_joint_state < math.radians(30): - # if light_scopes[0].get_visibility() == True: - # for light in light_scopes: - # light.set_visibility(False) - self.dc.set_dof_position_target(self.joint_handles[1], 0) - + return float(value) - def damping_stiffness_change(self): - - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API - joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) - joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "angular") - # Get joint limit difference and set stiffness - - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - def calculate_stiffness(self,joint_state): - """Calculate stiffness value based on joint angle + def calculate_stiffness(self, joint_state, joint_idx): + """Calculate stiffness value based on joint angle (自动适配torch tensor或普通数值)""" + max_stiffness = 20 + min_stiffness = 2 + decay_rate = 3 + + # 转换为标量值进行比较 + joint_state_scalar = self._get_scalar_value(joint_state) + joint_name = self.joint_names[joint_idx] + threshold_value = self.joint_threshold * (self.joints_info[joint_name]['upper_limit'] + self.joints_info[joint_name]['lower_limit']) - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 20 # 最大刚度 - # max_stiffness = 50 # 最大刚度 - min_stiffness = 2 # 最小刚度 - decay_rate = 3 # 衰减率 # 使用指数衰减函数计算刚度 - if abs(joint_state) >= abs(math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit']))): + if abs(joint_state_scalar) >= abs(math.radians(threshold_value)): return min_stiffness - # 计算刚度值:stiffness = max_stiffness * e^(-decay_rate * angle) - stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) + # 根据平台选择计算方式 + if self.use_torch: + # Isaac Lab: 使用torch tensor计算 + device = joint_state.device if isinstance(joint_state, torch.Tensor) else torch.device('cuda' if torch.cuda.is_available() else 'cpu') + stiffness = max_stiffness * torch.exp(torch.tensor(-decay_rate * abs(joint_state_scalar), device=device)) + stiffness = max(min_stiffness, min(stiffness.item(), max_stiffness)) + else: + # Isaac Sim: 使用math计算 + stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state_scalar)) + stiffness = max(min_stiffness, min(stiffness, max_stiffness)) - # 确保刚度值在最小值和最大值之间 - return max(min_stiffness, min(stiffness, max_stiffness)) - + return stiffness + + def damping_stiffness_change(self): + positions = self.art.get_joint_positions().squeeze() + stage = omni.usd.get_context().get_stage() + for i, idx in enumerate(self.joint_indices): + joint_name = self.joint_names[i] + joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) + joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "angular") + joint_state = positions[idx] + joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state, i)) + def target_pose_control(self): - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos + positions = self.art.get_joint_positions().squeeze() + targets = [] + indices = [] + + for i, idx in enumerate(self.joint_indices): + joint_state = positions[idx] + joint_state_scalar = self._get_scalar_value(joint_state) + joint_name = self.joint_names[i] + lower_limit = self.joints_info[joint_name]['lower_limit'] + upper_limit = self.joints_info[joint_name]['upper_limit'] + threshold_value = self.joint_threshold * (upper_limit + lower_limit) - # print("joint_state", joint_state) - # print("joints_info[joint_names[i]]['upper_limit']", joints_info[joint_names[i]]['upper_limit']) - # Get joint limit difference - # Set target position based on joint state - if abs(joints_info[joint_names[i]]['lower_limit']) <= math.radians(abs(joints_info[joint_names[i]]['upper_limit'])): - if joint_state > math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit'])): - - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['upper_limit'])) + # 保留原有的复杂判断逻辑 + if abs(lower_limit) <= math.radians(abs(upper_limit)): + if joint_state_scalar > math.radians(threshold_value): + targets.append(math.radians(upper_limit)) else: - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['lower_limit'])) + targets.append(math.radians(lower_limit)) else: - if joint_state < math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit'])): - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['lower_limit'])) + if joint_state_scalar < math.radians(threshold_value): + targets.append(math.radians(lower_limit)) else: - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['upper_limit'])) - # print("self.dc.get_dof_position_target=",self.dc.get_dof_position_target(joint_handle)) + targets.append(math.radians(upper_limit)) + indices.append(idx) + + # 根据平台选择不同的action创建方式 + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + + self.art.apply_action(action) + + def _initialize_articulation(self): + """延迟初始化,在physics准备好后调用""" + if self.initialized: + return + + try: + self.art = Articulation(self.articulation_root_path) + print("self.art :", self.art) + self.art.initialize() + + # 检测返回类型:torch tensor 还是 numpy/普通数值 + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + print(f"Detected platform: {'Isaac Lab (torch)' if self.use_torch else 'Isaac Sim (numpy/math)'}") + + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + dof_limits = self.art.get_dof_limits().squeeze() + self.joint_limits = [{ + "lower": dof_limits[idx, 0], + "upper": dof_limits[idx, 1] + } for idx in self.joint_indices] + self.joint_limit_diffs = [ + abs(lim["upper"] - lim["lower"]) for lim in self.joint_limits + ] + self.initialized = True + except AttributeError as e: + # Physics还没准备好,下次再试 + print(f"Physics not ready yet, will retry: {e}") + return diff --git a/Articulated_objects/large_furniture/cupboard/cupboard_2/resource/cupboard_control.py b/Articulated_objects/large_furniture/cupboard/cupboard_2/resource/cupboard_control.py index b49875718614dea78d1f9c5922cd2faf8931f283..3fce7e5edabdf0bcc56b4333ddbe224f7e7c9b2e 100644 --- a/Articulated_objects/large_furniture/cupboard/cupboard_2/resource/cupboard_control.py +++ b/Articulated_objects/large_furniture/cupboard/cupboard_2/resource/cupboard_control.py @@ -1,26 +1,16 @@ -import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils +import torch +from omni.kit.scripting import BehaviorScript +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +import omni.usd from pxr import PhysxSchema, UsdGeom, UsdPhysics import math - def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - def _find_prim(prim): if prim.GetName() == prim_name: return prim.GetPath().pathString @@ -29,213 +19,193 @@ def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: if result: return result return None - found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path - -# 1. prim init -# joint_prim = XFormPrim(find_prim_path_by_name("fridge_E_body_61")) -# right_revolutejoint_path = find_prim_path_by_name("RevoluteJoint_fridge_right") -# left_revolutejoint_path = find_prim_path_by_name("RevoluteJoint_fridge_left") - -# 2. articulation Root prim -root_articulation_prim = find_prim_path_by_name("E_body_9") -stage = omni.usd.get_context().get_stage() -# 3. joint name -joint_names = ["RevoluteJoint_cupboard_2_up_1","RevoluteJoint_cupboard_2_up_4","RevoluteJoint_cupboard_2_up_8","RevoluteJoint_cupboard_2_down_1","RevoluteJoint_cupboard_2_down_8","RevoluteJoint_cupboard_2_up_2","RevoluteJoint_cupboard_2_down_9","RevoluteJoint_cupboard_2_down_10","RevoluteJoint_cupboard_2_up_3","RevoluteJoint_cupboard_2_up_5","RevoluteJoint_cupboard_2_up_6","RevoluteJoint_cupboard_2_up_7"] -joint_threshold = 0.3 -# 4. Joint information -joints_info = {} -for joint_name in joint_names: - joint_prim_path = find_prim_path_by_name(joint_name) - joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) - joint = UsdPhysics.RevoluteJoint(joint_prim_obj) - - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() - } +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_9"] +JOINT_NAMES = ["RevoluteJoint_cupboard_2_up_1", + "RevoluteJoint_cupboard_2_up_4", + "RevoluteJoint_cupboard_2_up_8", + "RevoluteJoint_cupboard_2_down_1", + "RevoluteJoint_cupboard_2_down_8", + "RevoluteJoint_cupboard_2_up_2", + "RevoluteJoint_cupboard_2_down_9", + "RevoluteJoint_cupboard_2_down_10", + "RevoluteJoint_cupboard_2_up_3", + "RevoluteJoint_cupboard_2_up_5", + "RevoluteJoint_cupboard_2_up_6", + "RevoluteJoint_cupboard_2_up_7"] -# 5. Joint limits and limit differences -joint_limits = {} -joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): - joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] - } - joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] - ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] -# 5. light prim -# light_scopes=[ -# XFormPrim(find_prim_path_by_name("fridge_light")) -# ] +JOINT_THRESHOLD = 0.3 class CupboardControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # light_scopes[0].set_visibility(False) - # light_scopes[1].set_visibility(False) - # init_pose - # self.local_pose_button, self.local_ort_button_down = joint_prim.get_local_pose() - # self.local_pose_door, self.local_ort_drawer_up = door_prim.get_local_pose() + # 尝试找到articulation根路径 + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - - def on_destroy(self): - pass + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.joint_limits = None + self.joint_limit_diffs = None + self.use_torch = None + self.joint_threshold = JOINT_THRESHOLD + # 保留原始的 joints_info 用于 calculate_stiffness + stage = omni.usd.get_context().get_stage() + self.joints_info = {} + for joint_name in self.joint_names: + joint_prim_path = find_prim_path_by_name(joint_name) + joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) + joint = UsdPhysics.RevoluteJoint(joint_prim_obj) + self.joints_info[joint_name] = { + 'prim': joint, + 'lower_limit': joint.GetLowerLimitAttr().Get(), + 'upper_limit': joint.GetUpperLimitAttr().Get() + } def on_play(self): - # - self.simulation_context = SimulationContext( - stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 - ) - - def on_pause(self): - pass - - def on_stop(self): - self.init_start=True - # for light in light_scopes: - # light.set_visibility(False) - # light_scopes[0].set_visibility(False) - # light_scopes[1].set_visibility(False) - # back to initial pose - # joint_prim.set_local_pose(translation=self.local_pose_button) - pass + self._initialize_articulation() - def on_update(self, current_time: float, delta_time: float): - if delta_time <= 0: - return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) + def on_update(self, current_time, delta_time): + if delta_time <= 0: return + # 延迟初始化,确保physics准备好 + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return # 如果还没初始化成功,跳过本次更新 - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + self.apply_behavior() + def apply_behavior(self): - # self.light_control() + if not self.initialized or self.art is None: + return self.damping_stiffness_change() self.target_pose_control() - - - def light_control(self): - self.left_joint_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - self.right_joint_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - # print("self.Joint1_state",self.Joint1_state) - # 联合判断双门状态 - doors_open = [ - self.left_joint_state < math.radians(-30), - self.right_joint_state > math.radians(30) - ] - # 灯光控制逻辑 - current_visibility = light_scopes[0].get_visibility() - if any(doors_open): - if not current_visibility: - for light in light_scopes: - light.set_visibility(True) + def _get_scalar_value(self, value): + """将值转换为标量(支持torch tensor和普通数值)""" + if isinstance(value, torch.Tensor): + return value.item() + elif hasattr(value, 'item'): + return value.item() else: - if current_visibility: - for light in light_scopes: - light.set_visibility(False) - - # if self.right_joint_state > math.radians(30) : - # if light_scopes[0].get_visibility() == False: - # for light in light_scopes: - # light.set_visibility(True) - # # self.dc.set_dof_position_target(self.joint_handles[1], 140) - - # elif self.right_joint_state < math.radians(30): - # if light_scopes[0].get_visibility() == True: - # for light in light_scopes: - # light.set_visibility(False) - self.dc.set_dof_position_target(self.joint_handles[1], 0) - + return float(value) - def damping_stiffness_change(self): - - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API - joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) - joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "angular") - # Get joint limit difference and set stiffness - - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - def calculate_stiffness(self,joint_state): - """Calculate stiffness value based on joint angle + def calculate_stiffness(self, joint_state, joint_idx): + """Calculate stiffness value based on joint angle (自动适配torch tensor或普通数值)""" + max_stiffness = 20 + min_stiffness = 2 + decay_rate = 3 + + # 转换为标量值进行比较 + joint_state_scalar = self._get_scalar_value(joint_state) + joint_name = self.joint_names[joint_idx] + threshold_value = self.joint_threshold * (self.joints_info[joint_name]['upper_limit'] + self.joints_info[joint_name]['lower_limit']) - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 20 # 最大刚度 - # max_stiffness = 50 # 最大刚度 - min_stiffness = 2 # 最小刚度 - decay_rate = 3 # 衰减率 # 使用指数衰减函数计算刚度 - if abs(joint_state) >= abs(math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit']))): + if abs(joint_state_scalar) >= abs(math.radians(threshold_value)): return min_stiffness - # 计算刚度值:stiffness = max_stiffness * e^(-decay_rate * angle) - stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) + # 根据平台选择计算方式 + if self.use_torch: + # Isaac Lab: 使用torch tensor计算 + device = joint_state.device if isinstance(joint_state, torch.Tensor) else torch.device('cuda' if torch.cuda.is_available() else 'cpu') + stiffness = max_stiffness * torch.exp(torch.tensor(-decay_rate * abs(joint_state_scalar), device=device)) + stiffness = max(min_stiffness, min(stiffness.item(), max_stiffness)) + else: + # Isaac Sim: 使用math计算 + stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state_scalar)) + stiffness = max(min_stiffness, min(stiffness, max_stiffness)) - # 确保刚度值在最小值和最大值之间 - return max(min_stiffness, min(stiffness, max_stiffness)) - + return stiffness + + def damping_stiffness_change(self): + positions = self.art.get_joint_positions().squeeze() + stage = omni.usd.get_context().get_stage() + for i, idx in enumerate(self.joint_indices): + joint_name = self.joint_names[i] + joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) + joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "angular") + joint_state = positions[idx] + joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state, i)) + def target_pose_control(self): - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos + positions = self.art.get_joint_positions().squeeze() + targets = [] + indices = [] + + for i, idx in enumerate(self.joint_indices): + joint_state = positions[idx] + joint_state_scalar = self._get_scalar_value(joint_state) + joint_name = self.joint_names[i] + lower_limit = self.joints_info[joint_name]['lower_limit'] + upper_limit = self.joints_info[joint_name]['upper_limit'] + threshold_value = self.joint_threshold * (upper_limit + lower_limit) - # print("joint_state", joint_state) - # print("joints_info[joint_names[i]]['upper_limit']", joints_info[joint_names[i]]['upper_limit']) - # Get joint limit difference - # Set target position based on joint state - if abs(joints_info[joint_names[i]]['lower_limit']) <= math.radians(abs(joints_info[joint_names[i]]['upper_limit'])): - if joint_state > math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit'])): - - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['upper_limit'])) + # 保留原有的复杂判断逻辑 + if abs(lower_limit) <= math.radians(abs(upper_limit)): + if joint_state_scalar > math.radians(threshold_value): + targets.append(math.radians(upper_limit)) else: - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['lower_limit'])) + targets.append(math.radians(lower_limit)) else: - if joint_state < math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit'])): - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['lower_limit'])) + if joint_state_scalar < math.radians(threshold_value): + targets.append(math.radians(lower_limit)) else: - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['upper_limit'])) - # print("self.dc.get_dof_position_target=",self.dc.get_dof_position_target(joint_handle)) + targets.append(math.radians(upper_limit)) + indices.append(idx) + + # 根据平台选择不同的action创建方式 + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + + self.art.apply_action(action) + + def _initialize_articulation(self): + """延迟初始化,在physics准备好后调用""" + if self.initialized: + return + + try: + self.art = Articulation(self.articulation_root_path) + print("self.art :", self.art) + self.art.initialize() + + # 检测返回类型:torch tensor 还是 numpy/普通数值 + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + print(f"Detected platform: {'Isaac Lab (torch)' if self.use_torch else 'Isaac Sim (numpy/math)'}") + + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + dof_limits = self.art.get_dof_limits().squeeze() + self.joint_limits = [{ + "lower": dof_limits[idx, 0], + "upper": dof_limits[idx, 1] + } for idx in self.joint_indices] + self.joint_limit_diffs = [ + abs(lim["upper"] - lim["lower"]) for lim in self.joint_limits + ] + self.initialized = True + except AttributeError as e: + # Physics还没准备好,下次再试 + print(f"Physics not ready yet, will retry: {e}") + return diff --git a/Articulated_objects/major_appliances/dishwasher/dishwasher_1/resource/dishwasher_control.py b/Articulated_objects/major_appliances/dishwasher/dishwasher_1/resource/dishwasher_control.py index 7d0f124d7e736b60ef56dac0024ca4928b4f782e..0b5ea6ba44fd5038c3da58a679a423bcd4f0f77d 100644 --- a/Articulated_objects/major_appliances/dishwasher/dishwasher_1/resource/dishwasher_control.py +++ b/Articulated_objects/major_appliances/dishwasher/dishwasher_1/resource/dishwasher_control.py @@ -1,236 +1,209 @@ import carb +import math +import torch +import numpy as np +import omni.usd from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands +from isaacsim.core.prims import Articulation from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils -from pxr import PhysxSchema, UsdGeom, UsdPhysics -import math +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): + + def _find_prim(current): + if current.GetName() == prim_name: + return current.GetPath().pathString + for child in current.GetChildren(): result = _find_prim(child) if result: return result return None - + found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path - -# 1. prim init -# joint_prim = XFormPrim(find_prim_path_by_name("fridge_E_body_61")) -# right_revolutejoint_path = find_prim_path_by_name("RevoluteJoint_fridge_right") -# left_revolutejoint_path = find_prim_path_by_name("RevoluteJoint_fridge_left") - -# 2. articulation Root prim -root_articulation_prim = find_prim_path_by_name("E_body_1") -stage = omni.usd.get_context().get_stage() -# 3. joint name -joint_names = ["RevoluteJoint_dishwasher_1_middle"] -joint_threshold = 0.3 -# 4. Joint information -joints_info = {} -for joint_name in joint_names: - joint_prim_path = find_prim_path_by_name(joint_name) - joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) - joint = UsdPhysics.RevoluteJoint(joint_prim_obj) - - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() - } - -# 5. Joint limits and limit differences -joint_limits = {} -joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): - joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] - } - joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] - ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] -# 5. light prim -light_scopes=[ - XFormPrim(find_prim_path_by_name("fridge_light")) -] +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_1"] +JOINT_NAMES = ["RevoluteJoint_dishwasher_1_middle"] +JOINT_THRESHOLD = 0.3 + class MagneticFridgeControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - light_scopes[0].set_visibility(False) - # light_scopes[1].set_visibility(False) - # init_pose - # self.local_pose_button, self.local_ort_button_down = joint_prim.get_local_pose() - # self.local_pose_door, self.local_ort_drawer_up = door_prim.get_local_pose() - - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - - def on_destroy(self): - pass + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.joint_limits = None + self.joint_limit_diffs = None + self.use_torch = None + self.joint_threshold = JOINT_THRESHOLD + + self.light_scopes = [XFormPrim(find_prim_path_by_name(LIGHT_PRIM_NAME))] + self.light_scopes[0].set_visibility(False) + + stage = omni.usd.get_context().get_stage() + self.joints_info = {} + for joint_name in self.joint_names: + joint_prim_path = find_prim_path_by_name(joint_name) + joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) + joint = UsdPhysics.RevoluteJoint(joint_prim_obj) + self.joints_info[joint_name] = { + "prim": joint, + "lower_limit": joint.GetLowerLimitAttr().Get(), + "upper_limit": joint.GetUpperLimitAttr().Get(), + } def on_play(self): - # - self.simulation_context = SimulationContext( - stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 - ) - - def on_pause(self): - pass + self._initialize_articulation() def on_stop(self): - self.init_start=True - for light in light_scopes: + for light in self.light_scopes: light.set_visibility(False) - # light_scopes[0].set_visibility(False) - # light_scopes[1].set_visibility(False) - # back to initial pose - # joint_prim.set_local_pose(translation=self.local_pose_button) - pass def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): - # self.light_control() + if not self.initialized or self.art is None: + return self.damping_stiffness_change() self.target_pose_control() - - - def light_control(self): - self.left_joint_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - self.right_joint_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - # print("self.Joint1_state",self.Joint1_state) - # 联合判断双门状态 - doors_open = [ - self.left_joint_state < math.radians(-30), - self.right_joint_state > math.radians(30) - ] - - # 灯光控制逻辑 - current_visibility = light_scopes[0].get_visibility() - if any(doors_open): - if not current_visibility: - for light in light_scopes: - light.set_visibility(True) + + def _initialize_articulation(self): + """Initialize the articulation object and get joint information""" + if self.initialized: + return + + try: + self.art = Articulation(self.articulation_root_path) + if self.art is None: + return + + # Get joint indices + self.joint_indices = [] + for joint_name in self.joint_names: + idx = self.art.get_dof_index(joint_name) + if idx is not None: + self.joint_indices.append(idx) + else: + print(f"Warning: Could not find joint index for {joint_name}") + + if not self.joint_indices: + print("Warning: No valid joint indices found") + return + + # Detect if using torch + positions = self.art.get_joint_positions() + self.use_torch = isinstance(positions, torch.Tensor) + print(f"Detected platform: {'Isaac Lab (torch)' if self.use_torch else 'Isaac Sim (numpy/math)'}") + + self.initialized = True + except Exception as e: + print(f"Error initializing articulation: {e}") + self.initialized = False + + def _get_scalar_value(self, value): + """Convert a value (potentially a torch.Tensor) to a scalar float""" + if isinstance(value, torch.Tensor): + return value.item() + elif isinstance(value, (list, tuple, np.ndarray)): + return float(value[0] if len(value) > 0 else 0.0) else: - if current_visibility: - for light in light_scopes: - light.set_visibility(False) - - # if self.right_joint_state > math.radians(30) : - # if light_scopes[0].get_visibility() == False: - # for light in light_scopes: - # light.set_visibility(True) - # # self.dc.set_dof_position_target(self.joint_handles[1], 140) - - # elif self.right_joint_state < math.radians(30): - # if light_scopes[0].get_visibility() == True: - # for light in light_scopes: - # light.set_visibility(False) - self.dc.set_dof_position_target(self.joint_handles[1], 0) - - + return float(value) + def damping_stiffness_change(self): - - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API + positions = self.art.get_joint_positions().squeeze() + stage = omni.usd.get_context().get_stage() + + for i, joint_name in enumerate(self.joint_names): + if i >= len(self.joint_indices): + continue + joint_idx = self.joint_indices[i] + joint_state = self._get_scalar_value(positions[joint_idx]) + joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "angular") - # Get joint limit difference and set stiffness - - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - def calculate_stiffness(self,joint_state): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 50 # 最大刚度 - # max_stiffness = 50 # 最大刚度 - min_stiffness = 5 # 最小刚度 - decay_rate = 3 # 衰减率 - # 使用指数衰减函数计算刚度 - if abs(joint_state) >= abs(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit'])): + joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state, i)) + + def calculate_stiffness(self, joint_state, joint_idx): + """Calculate stiffness value based on joint angle""" + max_stiffness = 50 + min_stiffness = 5 + decay_rate = 3 + + joint_name = self.joint_names[joint_idx] + threshold_value = abs(self.joint_threshold * (self.joints_info[joint_name]['upper_limit'] + self.joints_info[joint_name]['lower_limit'])) + if abs(joint_state) >= threshold_value: return min_stiffness - - # 计算刚度值:stiffness = max_stiffness * e^(-decay_rate * angle) + stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) - - # 确保刚度值在最小值和最大值之间 - return max(min_stiffness, min(stiffness, max_stiffness)) - + return max(min_stiffness, min(stiffness, max_stiffness)) + def target_pose_control(self): - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - # Get joint limit difference - # Set target position based on joint state - if abs(joints_info[joint_names[i]]['lower_limit']) <= abs(joints_info[joint_names[i]]['upper_limit']): - if joint_state > joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit']): - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['upper_limit']) + positions = self.art.get_joint_positions().squeeze() + targets = [] + indices = [] + + for i, joint_name in enumerate(self.joint_names): + if i >= len(self.joint_indices): + continue + joint_idx = self.joint_indices[i] + joint_state = self._get_scalar_value(positions[joint_idx]) + + lower_limit = self.joints_info[joint_name]['lower_limit'] + upper_limit = self.joints_info[joint_name]['upper_limit'] + threshold_value = self.joint_threshold * (upper_limit + lower_limit) + + if abs(lower_limit) <= abs(upper_limit): + if joint_state > threshold_value: + target = upper_limit else: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['lower_limit']) + target = lower_limit else: - if joint_state > joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit']): - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['lower_limit']) + if joint_state > threshold_value: + target = lower_limit else: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['upper_limit']) + target = upper_limit + + targets.append(target) + indices.append(joint_idx) + + if not targets: + return + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + + self.art.apply_action(action) diff --git a/Articulated_objects/major_appliances/dishwasher/dishwasher_2/resource/dishwasher_control.py b/Articulated_objects/major_appliances/dishwasher/dishwasher_2/resource/dishwasher_control.py index 7a418d766ae61e4acd1d3a92aea57f36aaa14016..0961b6218c5a1817639de85993bc66526e5252e3 100644 --- a/Articulated_objects/major_appliances/dishwasher/dishwasher_2/resource/dishwasher_control.py +++ b/Articulated_objects/major_appliances/dishwasher/dishwasher_2/resource/dishwasher_control.py @@ -1,241 +1,239 @@ import carb +import math +import torch +import numpy as np +import omni.usd from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands +from isaacsim.core.prims import Articulation from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils -from pxr import PhysxSchema, UsdGeom, UsdPhysics -import math +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): + + def _find_prim(current): + if current.GetName() == prim_name: + return current.GetPath().pathString + for child in current.GetChildren(): result = _find_prim(child) if result: return result return None - + found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path - -# 1. prim init -# joint_prim = XFormPrim(find_prim_path_by_name("fridge_E_body_61")) -# right_revolutejoint_path = find_prim_path_by_name("RevoluteJoint_fridge_right") -# left_revolutejoint_path = find_prim_path_by_name("RevoluteJoint_fridge_left") - -# 2. articulation Root prim -root_articulation_prim = find_prim_path_by_name("E_body_5") -stage = omni.usd.get_context().get_stage() -# 3. joint name -joint_names = ["RevoluteJoint_dishwasher_2_middle"] -joint_threshold = 0.3 -# 4. Joint information -joints_info = {} -for joint_name in joint_names: - joint_prim_path = find_prim_path_by_name(joint_name) - joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) - joint = UsdPhysics.RevoluteJoint(joint_prim_obj) - - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() - } - -# 5. Joint limits and limit differences -joint_limits = {} -joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): - joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] - } - joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] - ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] -# 5. light prim -# light_scopes=[ -# XFormPrim(find_prim_path_by_name("fridge_light")) -# ] +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_5"] +JOINT_NAMES = ["RevoluteJoint_dishwasher_2_middle"] +JOINT_THRESHOLD = 0.3 + class MagneticFridgeControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # light_scopes[0].set_visibility(False) - # light_scopes[1].set_visibility(False) - # init_pose - # self.local_pose_button, self.local_ort_button_down = joint_prim.get_local_pose() - # self.local_pose_door, self.local_ort_drawer_up = door_prim.get_local_pose() - - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - - def on_destroy(self): - pass + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.joint_limits = None + self.joint_limit_diffs = None + self.use_torch = None + self.joint_threshold = JOINT_THRESHOLD + + stage = omni.usd.get_context().get_stage() + self.joints_info = {} + for joint_name in self.joint_names: + joint_prim_path = find_prim_path_by_name(joint_name) + joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) + joint = UsdPhysics.RevoluteJoint(joint_prim_obj) + self.joints_info[joint_name] = { + "prim": joint, + "lower_limit": joint.GetLowerLimitAttr().Get(), + "upper_limit": joint.GetUpperLimitAttr().Get(), + } def on_play(self): - # - self.simulation_context = SimulationContext( - stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 - ) - - def on_pause(self): - pass + self._initialize_articulation() def on_stop(self): - self.init_start=True - # for light in light_scopes: - # light.set_visibility(False) - # light_scopes[0].set_visibility(False) - # light_scopes[1].set_visibility(False) - # back to initial pose - # joint_prim.set_local_pose(translation=self.local_pose_button) pass def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.art is None: + return # self.light_control() self.damping_stiffness_change() self.target_pose_control() - - + + def _initialize_articulation(self): + """Initialize the articulation object and get joint information""" + if self.initialized: + return + + try: + self.art = Articulation(self.articulation_root_path) + if self.art is None: + return + + # Get joint indices + self.joint_indices = [] + for joint_name in self.joint_names: + idx = self.art.get_dof_index(joint_name) + if idx is not None: + self.joint_indices.append(idx) + else: + print(f"Warning: Could not find joint index for {joint_name}") + + if not self.joint_indices: + print("Warning: No valid joint indices found") + return + + # # Get joint limits from articulation + # dof_properties = self.art.get_dof_properties() + # self.joint_limits = {} + # self.joint_limit_diffs = {} + # for i, joint_name in enumerate(self.joint_names): + # if i < len(self.joint_indices): + # idx = self.joint_indices[i] + # if idx < len(dof_properties): + # lower = dof_properties[idx]["lower"] + # upper = dof_properties[idx]["upper"] + # self.joint_limits[joint_name] = {"lower": lower, "upper": upper} + # self.joint_limit_diffs[joint_name] = upper - lower + + # Detect if using torch + positions = self.art.get_joint_positions() + self.use_torch = isinstance(positions, torch.Tensor) + print(f"Detected platform: {'Isaac Lab (torch)' if self.use_torch else 'Isaac Sim (numpy/math)'}") + + self.initialized = True + except Exception as e: + print(f"Error initializing articulation: {e}") + self.initialized = False + + def _get_scalar_value(self, value): + """Convert a value (potentially a torch.Tensor) to a scalar float""" + if isinstance(value, torch.Tensor): + return value.item() + elif isinstance(value, (list, tuple, np.ndarray)): + return float(value[0] if len(value) > 0 else 0.0) + else: + return float(value) + def light_control(self): - self.left_joint_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - self.right_joint_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - # print("self.Joint1_state",self.Joint1_state) - # 联合判断双门状态 + positions = self.art.get_joint_positions().squeeze() + left_joint_state = self._get_scalar_value(positions[self.joint_indices[0]]) + right_joint_state = self._get_scalar_value(positions[self.joint_indices[1]]) if len(self.joint_indices) > 1 else 0.0 + doors_open = [ - self.left_joint_state < math.radians(-30), - self.right_joint_state > math.radians(30) + left_joint_state < math.radians(-30), + right_joint_state > math.radians(30) ] - # 灯光控制逻辑 - current_visibility = light_scopes[0].get_visibility() + current_visibility = self.light_scopes[0].get_visibility() if any(doors_open): if not current_visibility: - for light in light_scopes: + for light in self.light_scopes: light.set_visibility(True) else: if current_visibility: - for light in light_scopes: + for light in self.light_scopes: light.set_visibility(False) - - # if self.right_joint_state > math.radians(30) : - # if light_scopes[0].get_visibility() == False: - # for light in light_scopes: - # light.set_visibility(True) - # # self.dc.set_dof_position_target(self.joint_handles[1], 140) - - # elif self.right_joint_state < math.radians(30): - # if light_scopes[0].get_visibility() == True: - # for light in light_scopes: - # light.set_visibility(False) - self.dc.set_dof_position_target(self.joint_handles[1], 0) - - + def damping_stiffness_change(self): - - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API + positions = self.art.get_joint_positions().squeeze() + stage = omni.usd.get_context().get_stage() + + for i, joint_name in enumerate(self.joint_names): + if i >= len(self.joint_indices): + continue + joint_idx = self.joint_indices[i] + joint_state = self._get_scalar_value(positions[joint_idx]) + joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "angular") - # Get joint limit difference and set stiffness - - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - def calculate_stiffness(self,joint_state): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 20 # 最大刚度 - # max_stiffness = 50 # 最大刚度 - min_stiffness = 2 # 最小刚度 - decay_rate = 3 # 衰减率 - # 使用指数衰减函数计算刚度 - if abs(joint_state) >= abs(math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit']))): + joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state, i)) + + def calculate_stiffness(self, joint_state, joint_idx): + """Calculate stiffness value based on joint angle""" + max_stiffness = 10 + min_stiffness = 2 + decay_rate = 3 + + joint_name = self.joint_names[joint_idx] + threshold_value = abs(math.radians(self.joint_threshold * (self.joints_info[joint_name]['upper_limit'] + self.joints_info[joint_name]['lower_limit']))) + if abs(joint_state) >= threshold_value: return min_stiffness - - # 计算刚度值:stiffness = max_stiffness * e^(-decay_rate * angle) + stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) - - # 确保刚度值在最小值和最大值之间 - return max(min_stiffness, min(stiffness, max_stiffness)) - + return max(min_stiffness, min(stiffness, max_stiffness)) + def target_pose_control(self): - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - - # print("joint_state", joint_state) - # print("joints_info[joint_names[i]]['upper_limit']", joints_info[joint_names[i]]['upper_limit']) - # Get joint limit difference - # Set target position based on joint state - if abs(joints_info[joint_names[i]]['lower_limit']) <= math.radians(abs(joints_info[joint_names[i]]['upper_limit'])): - if joint_state > math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit'])): - - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['upper_limit'])) + positions = self.art.get_joint_positions().squeeze() + targets = [] + indices = [] + + for i, joint_name in enumerate(self.joint_names): + if i >= len(self.joint_indices): + continue + joint_idx = self.joint_indices[i] + joint_state = self._get_scalar_value(positions[joint_idx]) + + lower_limit = self.joints_info[joint_name]['lower_limit'] + upper_limit = self.joints_info[joint_name]['upper_limit'] + threshold_value = math.radians(self.joint_threshold * (upper_limit + lower_limit)) + + if abs(lower_limit) <= math.radians(abs(upper_limit)): + if joint_state > threshold_value: + target = math.radians(upper_limit) else: - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['lower_limit'])) + target = math.radians(lower_limit) else: - if joint_state > math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit'])): - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['lower_limit'])) + if joint_state > threshold_value: + target = math.radians(lower_limit) else: - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['upper_limit'])) - # print("self.dc.get_dof_position_target=",self.dc.get_dof_position_target(joint_handle)) + target = math.radians(upper_limit) + + targets.append(target) + indices.append(joint_idx) + + if not targets: + return + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + + self.art.apply_action(action) diff --git a/Articulated_objects/major_appliances/dishwasher/dishwasher_3/model_dishwasher_3.usd b/Articulated_objects/major_appliances/dishwasher/dishwasher_3/model_dishwasher_3.usd index 8c4e712f5a8701c33c3c81f480dfacfbf45efdb8..90ed90ad2513f00c38c1fdae6ac35fe844e5edb6 100644 --- a/Articulated_objects/major_appliances/dishwasher/dishwasher_3/model_dishwasher_3.usd +++ b/Articulated_objects/major_appliances/dishwasher/dishwasher_3/model_dishwasher_3.usd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8db3f74cbb494855048fd51d221e45c996034661416489fcd95c8d833f535629 -size 2638558 +oid sha256:f622c9874ad39f27fcabf708f414ffa240af50663a44e1b01fc710160081c980 +size 2641627 diff --git a/Articulated_objects/major_appliances/dishwasher/dishwasher_3/resource/dishwasher_control.py b/Articulated_objects/major_appliances/dishwasher/dishwasher_3/resource/dishwasher_control.py index 9c15de0cb7e99a66922b91a42787276f1c61f777..0ac7cfce29c841ba7fb7a51e1bcb61cc35a0d956 100644 --- a/Articulated_objects/major_appliances/dishwasher/dishwasher_3/resource/dishwasher_control.py +++ b/Articulated_objects/major_appliances/dishwasher/dishwasher_3/resource/dishwasher_control.py @@ -1,241 +1,239 @@ import carb +import math +import torch +import numpy as np +import omni.usd from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands +from isaacsim.core.prims import Articulation from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils -from pxr import PhysxSchema, UsdGeom, UsdPhysics -import math +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): + + def _find_prim(current): + if current.GetName() == prim_name: + return current.GetPath().pathString + for child in current.GetChildren(): result = _find_prim(child) if result: return result return None - + found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path - -# 1. prim init -# joint_prim = XFormPrim(find_prim_path_by_name("fridge_E_body_61")) -# right_revolutejoint_path = find_prim_path_by_name("RevoluteJoint_fridge_right") -# left_revolutejoint_path = find_prim_path_by_name("RevoluteJoint_fridge_left") - -# 2. articulation Root prim -root_articulation_prim = find_prim_path_by_name("E_body_6") -stage = omni.usd.get_context().get_stage() -# 3. joint name -joint_names = ["RevoluteJoint_dishwasher_3_middle"] -joint_threshold = 0.3 -# 4. Joint information -joints_info = {} -for joint_name in joint_names: - joint_prim_path = find_prim_path_by_name(joint_name) - joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) - joint = UsdPhysics.RevoluteJoint(joint_prim_obj) - - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() - } - -# 5. Joint limits and limit differences -joint_limits = {} -joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): - joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] - } - joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] - ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] -# 5. light prim -# light_scopes=[ -# XFormPrim(find_prim_path_by_name("fridge_light")) -# ] +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_6"] +JOINT_NAMES = ["RevoluteJoint_dishwasher_3_middle"] +JOINT_THRESHOLD = 0.3 + class MagneticFridgeControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # light_scopes[0].set_visibility(False) - # light_scopes[1].set_visibility(False) - # init_pose - # self.local_pose_button, self.local_ort_button_down = joint_prim.get_local_pose() - # self.local_pose_door, self.local_ort_drawer_up = door_prim.get_local_pose() - - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - - def on_destroy(self): - pass + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.joint_limits = None + self.joint_limit_diffs = None + self.use_torch = None + self.joint_threshold = JOINT_THRESHOLD + + stage = omni.usd.get_context().get_stage() + self.joints_info = {} + for joint_name in self.joint_names: + joint_prim_path = find_prim_path_by_name(joint_name) + joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) + joint = UsdPhysics.RevoluteJoint(joint_prim_obj) + self.joints_info[joint_name] = { + "prim": joint, + "lower_limit": joint.GetLowerLimitAttr().Get(), + "upper_limit": joint.GetUpperLimitAttr().Get(), + } def on_play(self): - # - self.simulation_context = SimulationContext( - stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 - ) - - def on_pause(self): - pass + self._initialize_articulation() def on_stop(self): - self.init_start=True - # for light in light_scopes: - # light.set_visibility(False) - # light_scopes[0].set_visibility(False) - # light_scopes[1].set_visibility(False) - # back to initial pose - # joint_prim.set_local_pose(translation=self.local_pose_button) pass def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.art is None: + return # self.light_control() self.damping_stiffness_change() self.target_pose_control() - - + + def _initialize_articulation(self): + """Initialize the articulation object and get joint information""" + if self.initialized: + return + + try: + self.art = Articulation(self.articulation_root_path) + if self.art is None: + return + + # Get joint indices + self.joint_indices = [] + for joint_name in self.joint_names: + idx = self.art.get_dof_index(joint_name) + if idx is not None: + self.joint_indices.append(idx) + else: + print(f"Warning: Could not find joint index for {joint_name}") + + if not self.joint_indices: + print("Warning: No valid joint indices found") + return + + # # Get joint limits from articulation + # dof_properties = self.art.get_dof_properties() + # self.joint_limits = {} + # self.joint_limit_diffs = {} + # for i, joint_name in enumerate(self.joint_names): + # if i < len(self.joint_indices): + # idx = self.joint_indices[i] + # if idx < len(dof_properties): + # lower = dof_properties[idx]["lower"] + # upper = dof_properties[idx]["upper"] + # self.joint_limits[joint_name] = {"lower": lower, "upper": upper} + # self.joint_limit_diffs[joint_name] = upper - lower + + # Detect if using torch + positions = self.art.get_joint_positions() + self.use_torch = isinstance(positions, torch.Tensor) + print(f"Detected platform: {'Isaac Lab (torch)' if self.use_torch else 'Isaac Sim (numpy/math)'}") + + self.initialized = True + except Exception as e: + print(f"Error initializing articulation: {e}") + self.initialized = False + + def _get_scalar_value(self, value): + """Convert a value (potentially a torch.Tensor) to a scalar float""" + if isinstance(value, torch.Tensor): + return value.item() + elif isinstance(value, (list, tuple, np.ndarray)): + return float(value[0] if len(value) > 0 else 0.0) + else: + return float(value) + def light_control(self): - self.left_joint_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - self.right_joint_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - # print("self.Joint1_state",self.Joint1_state) - # 联合判断双门状态 + positions = self.art.get_joint_positions().squeeze() + left_joint_state = self._get_scalar_value(positions[self.joint_indices[0]]) + right_joint_state = self._get_scalar_value(positions[self.joint_indices[1]]) if len(self.joint_indices) > 1 else 0.0 + doors_open = [ - self.left_joint_state < math.radians(-30), - self.right_joint_state > math.radians(30) + left_joint_state < math.radians(-30), + right_joint_state > math.radians(30) ] - # 灯光控制逻辑 - current_visibility = light_scopes[0].get_visibility() + current_visibility = self.light_scopes[0].get_visibility() if any(doors_open): if not current_visibility: - for light in light_scopes: + for light in self.light_scopes: light.set_visibility(True) else: if current_visibility: - for light in light_scopes: + for light in self.light_scopes: light.set_visibility(False) - - # if self.right_joint_state > math.radians(30) : - # if light_scopes[0].get_visibility() == False: - # for light in light_scopes: - # light.set_visibility(True) - # # self.dc.set_dof_position_target(self.joint_handles[1], 140) - - # elif self.right_joint_state < math.radians(30): - # if light_scopes[0].get_visibility() == True: - # for light in light_scopes: - # light.set_visibility(False) - self.dc.set_dof_position_target(self.joint_handles[1], 0) - - + def damping_stiffness_change(self): - - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API + positions = self.art.get_joint_positions().squeeze() + stage = omni.usd.get_context().get_stage() + + for i, joint_name in enumerate(self.joint_names): + if i >= len(self.joint_indices): + continue + joint_idx = self.joint_indices[i] + joint_state = self._get_scalar_value(positions[joint_idx]) + joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "angular") - # Get joint limit difference and set stiffness - - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - def calculate_stiffness(self,joint_state): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 20 # 最大刚度 - # max_stiffness = 50 # 最大刚度 - min_stiffness = 2 # 最小刚度 - decay_rate = 3 # 衰减率 - # 使用指数衰减函数计算刚度 - if abs(joint_state) >= abs(math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit']))): + joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state, i)) + + def calculate_stiffness(self, joint_state, joint_idx): + """Calculate stiffness value based on joint angle""" + max_stiffness = 20 + min_stiffness = 2 + decay_rate = 3 + + joint_name = self.joint_names[joint_idx] + threshold_value = abs(math.radians(self.joint_threshold * (self.joints_info[joint_name]['upper_limit'] + self.joints_info[joint_name]['lower_limit']))) + if abs(joint_state) >= threshold_value: return min_stiffness - - # 计算刚度值:stiffness = max_stiffness * e^(-decay_rate * angle) + stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) - - # 确保刚度值在最小值和最大值之间 - return max(min_stiffness, min(stiffness, max_stiffness)) - + return max(min_stiffness, min(stiffness, max_stiffness)) + def target_pose_control(self): - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - - # print("joint_state", joint_state) - # print("joints_info[joint_names[i]]['upper_limit']", joints_info[joint_names[i]]['upper_limit']) - # Get joint limit difference - # Set target position based on joint state - if abs(joints_info[joint_names[i]]['lower_limit']) <= math.radians(abs(joints_info[joint_names[i]]['upper_limit'])): - if joint_state > math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit'])): - - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['upper_limit'])) + positions = self.art.get_joint_positions().squeeze() + targets = [] + indices = [] + + for i, joint_name in enumerate(self.joint_names): + if i >= len(self.joint_indices): + continue + joint_idx = self.joint_indices[i] + joint_state = self._get_scalar_value(positions[joint_idx]) + + lower_limit = self.joints_info[joint_name]['lower_limit'] + upper_limit = self.joints_info[joint_name]['upper_limit'] + threshold_value = math.radians(self.joint_threshold * (upper_limit + lower_limit)) + + if abs(lower_limit) <= math.radians(abs(upper_limit)): + if joint_state > threshold_value: + target = math.radians(upper_limit) else: - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['lower_limit'])) + target = math.radians(lower_limit) else: - if joint_state > math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit'])): - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['lower_limit'])) + if joint_state > threshold_value: + target = math.radians(lower_limit) else: - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['upper_limit'])) - # print("self.dc.get_dof_position_target=",self.dc.get_dof_position_target(joint_handle)) + target = math.radians(upper_limit) + + targets.append(target) + indices.append(joint_idx) + + if not targets: + return + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + + self.art.apply_action(action) diff --git a/Articulated_objects/major_appliances/dishwasher/l_dishwasher_1/resource/dishwasher_control.py b/Articulated_objects/major_appliances/dishwasher/l_dishwasher_1/resource/dishwasher_control.py index 1a525c8fc5560d5ecc3093cad7d467e284009245..4e7a2dc9a9330eec83615c77cbe0ea217e61f835 100644 --- a/Articulated_objects/major_appliances/dishwasher/l_dishwasher_1/resource/dishwasher_control.py +++ b/Articulated_objects/major_appliances/dishwasher/l_dishwasher_1/resource/dishwasher_control.py @@ -1,28 +1,16 @@ -import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils +import torch +from omni.kit.scripting import BehaviorScript +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +import omni.usd from pxr import PhysxSchema, UsdGeom, UsdPhysics import math -# import nvidia.srl.usd.prim_helper as prim_helper - - def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - def _find_prim(prim): if prim.GetName() == prim_name: return prim.GetPath().pathString @@ -31,157 +19,155 @@ def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: if result: return result return None - found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path -def calculate_stiffness(joint_state, joint_limit): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 50 - min_stiffness = 5 - decay_rate = 4 - # threshold = math.radians(20) - # threshold = 0.3 * joint_limit - threshold = 0.5 * joint_threshold - if joint_state < threshold: - return min_stiffness - stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) - return max(min_stiffness, min(stiffness, max_stiffness)) - - -# 1. Articulation Root prim -root_articulation_prim = find_prim_path_by_name("E_body_1") -joint_threshold = -0.3 -# 2. Joint names -joint_names = ["PrismaticJoint_l_dishwasher_1_up","PrismaticJoint_l_dishwasher_1_down"] -joint1_prim = find_prim_path_by_name(joint_names[0]) -# joint2_prim = find_prim_path_by_name(joint_names[1]) -stage = omni.usd.get_context().get_stage() -joints_info = {} +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_1"] +JOINT_NAMES = ["PrismaticJoint_l_dishwasher_1_up", "PrismaticJoint_l_dishwasher_1_down"] +JOINT_THRESHOLD = -0.3 -# 3. Joint information -for joint_name in joint_names: - joint_prim_path = find_prim_path_by_name(joint_name) - joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) - joint = UsdPhysics.PrismaticJoint(joint_prim_obj) - - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() - } - -# joint1_lower_limit = joints_info[joint_names[0]]['lower_limit'] -# joint1_upper_limit = joints_info[joint_names[0]]['upper_limit'] -# joint2_lower_limit = joints_info[joint_names[1]]['lower_limit'] -# joint2_upper_limit = joints_info[joint_names[1]]['upper_limit'] - - -# 4. Joint limits and limit differences -joint_limits = {} -joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): - joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] - } - joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] - ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] - - -class TableControl(BehaviorScript): +class DishwasherControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - def on_destroy(self): - pass + # 尝试找到articulation根路径 + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.joint_limits = None + self.joint_limit_diffs = None + self.use_torch = None + self.joint_threshold = JOINT_THRESHOLD def on_play(self): - # Initialize simulation context - self.simulation_context = SimulationContext( - stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 - ) - - def on_pause(self): - pass - - def on_stop(self): - self.init_start=True - pass - - def on_update(self, current_time: float, delta_time: float): - if delta_time <= 0: - return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) + self._initialize_articulation() + + def on_update(self, current_time, delta_time): + if delta_time <= 0: return + # 延迟初始化,确保physics准备好 + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return # 如果还没初始化成功,跳过本次更新 - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.art is None: + return self.target_pose_control() self.damping_stiffness_change() + + def _get_scalar_value(self, value): + """将值转换为标量(支持torch tensor和普通数值)""" + if isinstance(value, torch.Tensor): + return value.item() + elif hasattr(value, 'item'): + return value.item() + else: + return float(value) + def calculate_stiffness(self, joint_state, joint_limit): + """Calculate stiffness value based on joint angle (自动适配torch tensor或普通数值)""" + max_stiffness = 50 + min_stiffness = 5 + decay_rate = 4 + threshold = 0.5 * self.joint_threshold + + # 转换为标量值进行比较 + joint_state_scalar = self._get_scalar_value(joint_state) + + if joint_state_scalar < threshold: + return min_stiffness + + # 根据平台选择计算方式 + if self.use_torch: + # Isaac Lab: 使用torch tensor计算 + device = joint_state.device if isinstance(joint_state, torch.Tensor) else torch.device('cuda' if torch.cuda.is_available() else 'cpu') + stiffness = max_stiffness * torch.exp(torch.tensor(-decay_rate * abs(joint_state_scalar), device=device)) + stiffness = max(min_stiffness, min(stiffness.item(), max_stiffness)) + else: + # Isaac Sim: 使用math计算 + stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state_scalar)) + stiffness = max(min_stiffness, min(stiffness, max_stiffness)) + + return stiffness + def damping_stiffness_change(self): + positions = self.art.get_joint_positions().squeeze() stage = omni.usd.get_context().get_stage() - # Process all joints - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API + for i, idx in enumerate(self.joint_indices): + joint_name = self.joint_names[i] joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "linear") - # Get joint limit difference and set stiffness - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(calculate_stiffness(joint_state, joint_limit_diff)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - + joint_state = positions[idx] + joint_limit_diff = self.joint_limit_diffs[i] + joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state, joint_limit_diff)) + def target_pose_control(self): - # Process all joints - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - # Get joint limit difference - joint_limit_diff = joint_limit_diffs[joint_names[i]] - # Set target position based on joint state - if joint_state > 0.5 * joint_threshold: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['upper_limit']) - # print("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++") + positions = self.art.get_joint_positions().squeeze() + targets = [] + for i, idx in enumerate(self.joint_indices): + joint_state = positions[idx] + # 转换为标量值进行比较 + joint_state_scalar = self._get_scalar_value(joint_state) + + if joint_state_scalar > 0.5 * self.joint_threshold: + targets.append(self.joint_limits[i]["upper"]) else: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['lower_limit']) - # print("------------------------------------------------------------") + targets.append(self.joint_limits[i]["lower"]) + + # 根据平台选择不同的action创建方式 + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(self.joint_indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=self.joint_indices) + + self.art.apply_action(action) + + def _initialize_articulation(self): + """延迟初始化,在physics准备好后调用""" + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + print("self.art :", self.art) + self.art.initialize() + + # 检测返回类型:torch tensor 还是 numpy/普通数值 + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + print(f"Detected platform: {'Isaac Lab (torch)' if self.use_torch else 'Isaac Sim (numpy/math)'}") + + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + dof_limits = self.art.get_dof_limits().squeeze() + self.joint_limits = [{ + "lower": dof_limits[idx, 0], + "upper": dof_limits[idx, 1] + } for idx in self.joint_indices] + self.joint_limit_diffs = [ + abs(lim["upper"] - lim["lower"]) for lim in self.joint_limits + ] + self.initialized = True + except AttributeError as e: + # Physics还没准备好,下次再试 + print(f"Physics not ready yet, will retry: {e}") + return diff --git a/Articulated_objects/major_appliances/dishwasher/l_dishwasher_2/model_l_dishwasher_2.usd b/Articulated_objects/major_appliances/dishwasher/l_dishwasher_2/model_l_dishwasher_2.usd index 2d76f7101fe32ddb02bdd8d7132adf0c868de79f..12951e6a2aea6cba13c18c9534d558677e53eaa6 100644 --- a/Articulated_objects/major_appliances/dishwasher/l_dishwasher_2/model_l_dishwasher_2.usd +++ b/Articulated_objects/major_appliances/dishwasher/l_dishwasher_2/model_l_dishwasher_2.usd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e9fde39fe32fb422118e70035e5bf3acb3e558ded6bcdc0b39645cbf28e336fc -size 13229 +oid sha256:7a16a80c71d7717f04f3d449274bb4b44d0b9cf3121afa9eeeed3145ba0f5c4d +size 15709 diff --git a/Articulated_objects/major_appliances/dishwasher/l_dishwasher_2/resource/dishwasher_control.py b/Articulated_objects/major_appliances/dishwasher/l_dishwasher_2/resource/dishwasher_control.py index a20dd5f3b87eca55cf7d2f14e12f79ef652adbbd..7b9b71dbf01aae0f069ed68039c26bb1c74c23db 100644 --- a/Articulated_objects/major_appliances/dishwasher/l_dishwasher_2/resource/dishwasher_control.py +++ b/Articulated_objects/major_appliances/dishwasher/l_dishwasher_2/resource/dishwasher_control.py @@ -1,28 +1,16 @@ -import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils +import torch +from omni.kit.scripting import BehaviorScript +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +import omni.usd from pxr import PhysxSchema, UsdGeom, UsdPhysics import math -# import nvidia.srl.usd.prim_helper as prim_helper - - def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - def _find_prim(prim): if prim.GetName() == prim_name: return prim.GetPath().pathString @@ -31,157 +19,155 @@ def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: if result: return result return None - found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path -def calculate_stiffness(joint_state, joint_limit): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 50 - min_stiffness = 5 - decay_rate = 4 - # threshold = math.radians(20) - # threshold = 0.3 * joint_limit - threshold = 0.5 * joint_threshold - if joint_state < threshold: - return min_stiffness - stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) - return max(min_stiffness, min(stiffness, max_stiffness)) - - -# 1. Articulation Root prim -root_articulation_prim = find_prim_path_by_name("E_body_3") -joint_threshold = -0.2 -# 2. Joint names -joint_names = ["PrismaticJoint_l_dishwasher_2_down","PrismaticJoint_l_dishwasher_2_up"] -joint1_prim = find_prim_path_by_name(joint_names[0]) -# joint2_prim = find_prim_path_by_name(joint_names[1]) -stage = omni.usd.get_context().get_stage() -joints_info = {} +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_3"] +JOINT_NAMES = ["PrismaticJoint_l_dishwasher_2_down", "PrismaticJoint_l_dishwasher_2_up"] +JOINT_THRESHOLD = -0.2 -# 3. Joint information -for joint_name in joint_names: - joint_prim_path = find_prim_path_by_name(joint_name) - joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) - joint = UsdPhysics.PrismaticJoint(joint_prim_obj) - - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() - } - -# joint1_lower_limit = joints_info[joint_names[0]]['lower_limit'] -# joint1_upper_limit = joints_info[joint_names[0]]['upper_limit'] -# joint2_lower_limit = joints_info[joint_names[1]]['lower_limit'] -# joint2_upper_limit = joints_info[joint_names[1]]['upper_limit'] - - -# 4. Joint limits and limit differences -joint_limits = {} -joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): - joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] - } - joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] - ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] - - -class TableControl(BehaviorScript): +class DishwasherControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - def on_destroy(self): - pass + # 尝试找到articulation根路径 + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.joint_limits = None + self.joint_limit_diffs = None + self.use_torch = None + self.joint_threshold = JOINT_THRESHOLD def on_play(self): - # Initialize simulation context - self.simulation_context = SimulationContext( - stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 - ) - - def on_pause(self): - pass - - def on_stop(self): - self.init_start=True - pass - - def on_update(self, current_time: float, delta_time: float): - if delta_time <= 0: - return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) + self._initialize_articulation() + + def on_update(self, current_time, delta_time): + if delta_time <= 0: return + # 延迟初始化,确保physics准备好 + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return # 如果还没初始化成功,跳过本次更新 - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.art is None: + return self.target_pose_control() self.damping_stiffness_change() + + def _get_scalar_value(self, value): + """将值转换为标量(支持torch tensor和普通数值)""" + if isinstance(value, torch.Tensor): + return value.item() + elif hasattr(value, 'item'): + return value.item() + else: + return float(value) + def calculate_stiffness(self, joint_state, joint_limit): + """Calculate stiffness value based on joint angle (自动适配torch tensor或普通数值)""" + max_stiffness = 50 + min_stiffness = 5 + decay_rate = 4 + threshold = 0.5 * self.joint_threshold + + # 转换为标量值进行比较 + joint_state_scalar = self._get_scalar_value(joint_state) + + if joint_state_scalar < threshold: + return min_stiffness + + # 根据平台选择计算方式 + if self.use_torch: + # Isaac Lab: 使用torch tensor计算 + device = joint_state.device if isinstance(joint_state, torch.Tensor) else torch.device('cuda' if torch.cuda.is_available() else 'cpu') + stiffness = max_stiffness * torch.exp(torch.tensor(-decay_rate * abs(joint_state_scalar), device=device)) + stiffness = max(min_stiffness, min(stiffness.item(), max_stiffness)) + else: + # Isaac Sim: 使用math计算 + stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state_scalar)) + stiffness = max(min_stiffness, min(stiffness, max_stiffness)) + + return stiffness + def damping_stiffness_change(self): + positions = self.art.get_joint_positions().squeeze() stage = omni.usd.get_context().get_stage() - # Process all joints - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API + for i, idx in enumerate(self.joint_indices): + joint_name = self.joint_names[i] joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "linear") - # Get joint limit difference and set stiffness - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(calculate_stiffness(joint_state, joint_limit_diff)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - + joint_state = positions[idx] + joint_limit_diff = self.joint_limit_diffs[i] + joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state, joint_limit_diff)) + def target_pose_control(self): - # Process all joints - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - # Get joint limit difference - joint_limit_diff = joint_limit_diffs[joint_names[i]] - # Set target position based on joint state - if joint_state > 0.5 * joint_threshold: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['upper_limit']) - # print("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++") + positions = self.art.get_joint_positions().squeeze() + targets = [] + for i, idx in enumerate(self.joint_indices): + joint_state = positions[idx] + # 转换为标量值进行比较 + joint_state_scalar = self._get_scalar_value(joint_state) + + if joint_state_scalar > 0.5 * self.joint_threshold: + targets.append(self.joint_limits[i]["upper"]) else: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['lower_limit']) - # print("------------------------------------------------------------") + targets.append(self.joint_limits[i]["lower"]) + + # 根据平台选择不同的action创建方式 + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(self.joint_indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=self.joint_indices) + + self.art.apply_action(action) + + def _initialize_articulation(self): + """延迟初始化,在physics准备好后调用""" + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + print("self.art :", self.art) + self.art.initialize() + + # 检测返回类型:torch tensor 还是 numpy/普通数值 + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + print(f"Detected platform: {'Isaac Lab (torch)' if self.use_torch else 'Isaac Sim (numpy/math)'}") + + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + dof_limits = self.art.get_dof_limits().squeeze() + self.joint_limits = [{ + "lower": dof_limits[idx, 0], + "upper": dof_limits[idx, 1] + } for idx in self.joint_indices] + self.joint_limit_diffs = [ + abs(lim["upper"] - lim["lower"]) for lim in self.joint_limits + ] + self.initialized = True + except AttributeError as e: + # Physics还没准备好,下次再试 + print(f"Physics not ready yet, will retry: {e}") + return diff --git a/Articulated_objects/major_appliances/dishwasher/l_dishwasher_3/model_l_dishwasher_3.usda b/Articulated_objects/major_appliances/dishwasher/l_dishwasher_3/model_l_dishwasher_3.usda index 7f188a00cf3464ed7d79975fb4f9fa5da88681d1..c0404f959eea5f41229b1fe0f0250f56abfcb3b0 100644 --- a/Articulated_objects/major_appliances/dishwasher/l_dishwasher_3/model_l_dishwasher_3.usda +++ b/Articulated_objects/major_appliances/dishwasher/l_dishwasher_3/model_l_dishwasher_3.usda @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f2537217de7383728067c920ad76c2fd75af2ffd9a1a0bee73ef83fa5ff44631 -size 415874 +oid sha256:dcdf052bf24b028d21a97f489698d0eb249045cfe1cc20fec8c759fd0f384128 +size 418759 diff --git a/Articulated_objects/major_appliances/dishwasher/l_dishwasher_3/resource/dishwasher_control.py b/Articulated_objects/major_appliances/dishwasher/l_dishwasher_3/resource/dishwasher_control.py index 9885ee2167c3af6f7bc205b47690831689f4a5fc..c83018bf487d65bae84458781943255272f03d0b 100644 --- a/Articulated_objects/major_appliances/dishwasher/l_dishwasher_3/resource/dishwasher_control.py +++ b/Articulated_objects/major_appliances/dishwasher/l_dishwasher_3/resource/dishwasher_control.py @@ -1,28 +1,16 @@ -import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils +import torch +from omni.kit.scripting import BehaviorScript +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +import omni.usd from pxr import PhysxSchema, UsdGeom, UsdPhysics import math -# import nvidia.srl.usd.prim_helper as prim_helper - - def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - def _find_prim(prim): if prim.GetName() == prim_name: return prim.GetPath().pathString @@ -31,157 +19,155 @@ def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: if result: return result return None - found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path -def calculate_stiffness(joint_state, joint_limit): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 50 - min_stiffness = 5 - decay_rate = 4 - # threshold = math.radians(20) - # threshold = 0.3 * joint_limit - threshold = 0.5 * joint_threshold - if joint_state < threshold: - return min_stiffness - stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) - return max(min_stiffness, min(stiffness, max_stiffness)) - - -# 1. Articulation Root prim -root_articulation_prim = find_prim_path_by_name("E_body_3") -joint_threshold = -0.3 -# 2. Joint names -joint_names = ["PrismaticJoint_l_dishwasher_3_down","PrismaticJoint_l_dishwasher_3_up"] -joint1_prim = find_prim_path_by_name(joint_names[0]) -# joint2_prim = find_prim_path_by_name(joint_names[1]) -stage = omni.usd.get_context().get_stage() -joints_info = {} +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_3"] +JOINT_NAMES = ["PrismaticJoint_l_dishwasher_3_down", "PrismaticJoint_l_dishwasher_3_up"] +JOINT_THRESHOLD = -0.3 -# 3. Joint information -for joint_name in joint_names: - joint_prim_path = find_prim_path_by_name(joint_name) - joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) - joint = UsdPhysics.PrismaticJoint(joint_prim_obj) - - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() - } - -# joint1_lower_limit = joints_info[joint_names[0]]['lower_limit'] -# joint1_upper_limit = joints_info[joint_names[0]]['upper_limit'] -# joint2_lower_limit = joints_info[joint_names[1]]['lower_limit'] -# joint2_upper_limit = joints_info[joint_names[1]]['upper_limit'] - - -# 4. Joint limits and limit differences -joint_limits = {} -joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): - joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] - } - joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] - ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] - - -class TableControl(BehaviorScript): +class DishwasherControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - def on_destroy(self): - pass + # 尝试找到articulation根路径 + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.joint_limits = None + self.joint_limit_diffs = None + self.use_torch = None + self.joint_threshold = JOINT_THRESHOLD def on_play(self): - # Initialize simulation context - self.simulation_context = SimulationContext( - stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 - ) - - def on_pause(self): - pass - - def on_stop(self): - self.init_start=True - pass - - def on_update(self, current_time: float, delta_time: float): - if delta_time <= 0: - return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) + self._initialize_articulation() + + def on_update(self, current_time, delta_time): + if delta_time <= 0: return + # 延迟初始化,确保physics准备好 + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return # 如果还没初始化成功,跳过本次更新 - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.art is None: + return self.target_pose_control() self.damping_stiffness_change() + + def _get_scalar_value(self, value): + """将值转换为标量(支持torch tensor和普通数值)""" + if isinstance(value, torch.Tensor): + return value.item() + elif hasattr(value, 'item'): + return value.item() + else: + return float(value) + def calculate_stiffness(self, joint_state, joint_limit): + """Calculate stiffness value based on joint angle (自动适配torch tensor或普通数值)""" + max_stiffness = 50 + min_stiffness = 5 + decay_rate = 4 + threshold = 0.5 * self.joint_threshold + + # 转换为标量值进行比较 + joint_state_scalar = self._get_scalar_value(joint_state) + + if joint_state_scalar < threshold: + return min_stiffness + + # 根据平台选择计算方式 + if self.use_torch: + # Isaac Lab: 使用torch tensor计算 + device = joint_state.device if isinstance(joint_state, torch.Tensor) else torch.device('cuda' if torch.cuda.is_available() else 'cpu') + stiffness = max_stiffness * torch.exp(torch.tensor(-decay_rate * abs(joint_state_scalar), device=device)) + stiffness = max(min_stiffness, min(stiffness.item(), max_stiffness)) + else: + # Isaac Sim: 使用math计算 + stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state_scalar)) + stiffness = max(min_stiffness, min(stiffness, max_stiffness)) + + return stiffness + def damping_stiffness_change(self): + positions = self.art.get_joint_positions().squeeze() stage = omni.usd.get_context().get_stage() - # Process all joints - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API + for i, idx in enumerate(self.joint_indices): + joint_name = self.joint_names[i] joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "linear") - # Get joint limit difference and set stiffness - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(calculate_stiffness(joint_state, joint_limit_diff)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - + joint_state = positions[idx] + joint_limit_diff = self.joint_limit_diffs[i] + joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state, joint_limit_diff)) + def target_pose_control(self): - # Process all joints - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - # Get joint limit difference - joint_limit_diff = joint_limit_diffs[joint_names[i]] - # Set target position based on joint state - if joint_state > 0.5 * joint_threshold: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['upper_limit']) - # print("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++") + positions = self.art.get_joint_positions().squeeze() + targets = [] + for i, idx in enumerate(self.joint_indices): + joint_state = positions[idx] + # 转换为标量值进行比较 + joint_state_scalar = self._get_scalar_value(joint_state) + + if joint_state_scalar > 0.5 * self.joint_threshold: + targets.append(self.joint_limits[i]["upper"]) else: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['lower_limit']) - # print("------------------------------------------------------------") + targets.append(self.joint_limits[i]["lower"]) + + # 根据平台选择不同的action创建方式 + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(self.joint_indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=self.joint_indices) + + self.art.apply_action(action) + + def _initialize_articulation(self): + """延迟初始化,在physics准备好后调用""" + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + print("self.art :", self.art) + self.art.initialize() + + # 检测返回类型:torch tensor 还是 numpy/普通数值 + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + print(f"Detected platform: {'Isaac Lab (torch)' if self.use_torch else 'Isaac Sim (numpy/math)'}") + + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + dof_limits = self.art.get_dof_limits().squeeze() + self.joint_limits = [{ + "lower": dof_limits[idx, 0], + "upper": dof_limits[idx, 1] + } for idx in self.joint_indices] + self.joint_limit_diffs = [ + abs(lim["upper"] - lim["lower"]) for lim in self.joint_limits + ] + self.initialized = True + except AttributeError as e: + # Physics还没准备好,下次再试 + print(f"Physics not ready yet, will retry: {e}") + return diff --git a/Articulated_objects/major_appliances/refrigerator/fridge_1/model_fridge_1.usd b/Articulated_objects/major_appliances/refrigerator/fridge_1/model_fridge_1.usd index 1121eb0b1f4b05708fd7806796b104a21340cc10..6ae8d69965c7ff3911246b0d03560276b2cc8abe 100644 --- a/Articulated_objects/major_appliances/refrigerator/fridge_1/model_fridge_1.usd +++ b/Articulated_objects/major_appliances/refrigerator/fridge_1/model_fridge_1.usd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2c3f68d54563f991fd5ac4ceaf3d928856a87fc9e8e587960d2b6cafe80c59f8 -size 4223654 +oid sha256:5b324773016908336d1e120af072578b586e0710cdfb4acd39050432b9efd880 +size 4227299 diff --git a/Articulated_objects/major_appliances/refrigerator/fridge_1/resource/cupboard_control.py b/Articulated_objects/major_appliances/refrigerator/fridge_1/resource/cupboard_control.py deleted file mode 100644 index 1bac39f6f422901677b9cfcfaa98ac2500474f0f..0000000000000000000000000000000000000000 --- a/Articulated_objects/major_appliances/refrigerator/fridge_1/resource/cupboard_control.py +++ /dev/null @@ -1,241 +0,0 @@ -import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils -from pxr import PhysxSchema, UsdGeom, UsdPhysics -import math - - -def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: - """Recursively find the full path by Prim name""" - stage = omni.usd.get_context().get_stage() - prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): - result = _find_prim(child) - if result: - return result - return None - - found_path = _find_prim(prim) - if not found_path: - raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") - return found_path - - - -# 1. prim init -# joint_prim = XFormPrim(find_prim_path_by_name("fridge_E_body_61")) -# right_revolutejoint_path = find_prim_path_by_name("RevoluteJoint_fridge_right") -# left_revolutejoint_path = find_prim_path_by_name("RevoluteJoint_fridge_left") - -# 2. articulation Root prim -root_articulation_prim = find_prim_path_by_name("E_body_12") -stage = omni.usd.get_context().get_stage() -# 3. joint name -joint_names = ["RevoluteJoint_fridge_1_up","RevoluteJoint_fridge_1_down"] -joint_threshold = 0.3 -# 4. Joint information -joints_info = {} -for joint_name in joint_names: - joint_prim_path = find_prim_path_by_name(joint_name) - joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) - joint = UsdPhysics.RevoluteJoint(joint_prim_obj) - - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() - } - -# 5. Joint limits and limit differences -joint_limits = {} -joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): - joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] - } - joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] - ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] -# 5. light prim -light_scopes=[ - XFormPrim(find_prim_path_by_name("fridge_1_light")) -] - -class CupboardControl(BehaviorScript): - def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - light_scopes[0].set_visibility(False) - # light_scopes[1].set_visibility(False) - # init_pose - # self.local_pose_button, self.local_ort_button_down = joint_prim.get_local_pose() - # self.local_pose_door, self.local_ort_drawer_up = door_prim.get_local_pose() - - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - - def on_destroy(self): - pass - - def on_play(self): - # - self.simulation_context = SimulationContext( - stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 - ) - - def on_pause(self): - pass - - def on_stop(self): - self.init_start=True - # for light in light_scopes: - # light.set_visibility(False) - light_scopes[0].set_visibility(False) - # light_scopes[1].set_visibility(False) - # back to initial pose - # joint_prim.set_local_pose(translation=self.local_pose_button) - pass - - def on_update(self, current_time: float, delta_time: float): - if delta_time <= 0: - return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - - def apply_behavior(self): - self.light_control() - self.damping_stiffness_change() - self.target_pose_control() - - - def light_control(self): - self.left_joint_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - self.right_joint_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - # print("self.Joint1_state",self.Joint1_state) - # 联合判断双门状态 - doors_open = [ - self.left_joint_state > math.radians(30), - self.right_joint_state > math.radians(30) - ] - - # 灯光控制逻辑 - current_visibility = light_scopes[0].get_visibility() - if any(doors_open): - if not current_visibility: - for light in light_scopes: - light.set_visibility(True) - else: - if current_visibility: - for light in light_scopes: - light.set_visibility(False) - - # if self.right_joint_state > math.radians(30) : - # if light_scopes[0].get_visibility() == False: - # for light in light_scopes: - # light.set_visibility(True) - # # self.dc.set_dof_position_target(self.joint_handles[1], 140) - - # elif self.right_joint_state < math.radians(30): - # if light_scopes[0].get_visibility() == True: - # for light in light_scopes: - # light.set_visibility(False) - # self.dc.set_dof_position_target(self.joint_handles[1], 0) - - - def damping_stiffness_change(self): - - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API - joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) - joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "angular") - # Get joint limit difference and set stiffness - - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - def calculate_stiffness(self,joint_state): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 20 # 最大刚度 - # max_stiffness = 50 # 最大刚度 - min_stiffness = 2 # 最小刚度 - decay_rate = 3 # 衰减率 - # 使用指数衰减函数计算刚度 - if abs(joint_state) >= abs(math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit']))): - return min_stiffness - - # 计算刚度值:stiffness = max_stiffness * e^(-decay_rate * angle) - stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) - - # 确保刚度值在最小值和最大值之间 - return max(min_stiffness, min(stiffness, max_stiffness)) - - def target_pose_control(self): - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - - # print("joint_state", joint_state) - # print("joints_info[joint_names[i]]['upper_limit']", joints_info[joint_names[i]]['upper_limit']) - # Get joint limit difference - # Set target position based on joint state - if abs(joints_info[joint_names[i]]['lower_limit']) <= math.radians(abs(joints_info[joint_names[i]]['upper_limit'])): - if joint_state > math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit'])): - - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['upper_limit'])) - else: - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['lower_limit'])) - else: - if joint_state < math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit'])): - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['lower_limit'])) - else: - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['upper_limit'])) - # print("self.dc.get_dof_position_target=",self.dc.get_dof_position_target(joint_handle)) diff --git a/Articulated_objects/major_appliances/refrigerator/fridge_1/resource/refrigherator_control.py b/Articulated_objects/major_appliances/refrigerator/fridge_1/resource/refrigherator_control.py new file mode 100644 index 0000000000000000000000000000000000000000..b11df476c7f985e3c5e13511339f0c89b6fafc83 --- /dev/null +++ b/Articulated_objects/major_appliances/refrigerator/fridge_1/resource/refrigherator_control.py @@ -0,0 +1,207 @@ +import carb +import math +import torch +import omni.usd +from omni.kit.scripting import BehaviorScript +from isaacsim.core.prims import Articulation +from omni.isaac.core.prims import XFormPrim +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics + + +def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: + """Recursively find the full path by Prim name""" + stage = omni.usd.get_context().get_stage() + prim = stage.GetPrimAtPath(root_path) + + def _find_prim(current): + if current.GetName() == prim_name: + return current.GetPath().pathString + for child in current.GetChildren(): + result = _find_prim(child) + if result: + return result + return None + + found_path = _find_prim(prim) + if not found_path: + raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") + return found_path + + +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_12"] +JOINT_NAMES = ["RevoluteJoint_fridge_1_up", "RevoluteJoint_fridge_1_down"] +JOINT_THRESHOLD = 0.3 +LIGHT_PRIM_NAME = "fridge_1_light" + + +class CupboardControl(BehaviorScript): + def on_init(self): + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.joint_limits = None + self.joint_limit_diffs = None + self.use_torch = None + self.joint_threshold = JOINT_THRESHOLD + + self.light_scopes = [XFormPrim(find_prim_path_by_name(LIGHT_PRIM_NAME))] + self.light_scopes[0].set_visibility(False) + + stage = omni.usd.get_context().get_stage() + self.joints_info = {} + for joint_name in self.joint_names: + joint_prim_path = find_prim_path_by_name(joint_name) + joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) + joint = UsdPhysics.RevoluteJoint(joint_prim_obj) + self.joints_info[joint_name] = { + "prim": joint, + "lower_limit": joint.GetLowerLimitAttr().Get(), + "upper_limit": joint.GetUpperLimitAttr().Get(), + } + + def on_play(self): + self._initialize_articulation() + + def on_stop(self): + self.light_scopes[0].set_visibility(False) + + def on_update(self, current_time: float, delta_time: float): + if delta_time <= 0: + return + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + + def apply_behavior(self): + if not self.initialized or self.art is None: + return + self.light_control() + self.damping_stiffness_change() + self.target_pose_control() + + def light_control(self): + positions = self.art.get_joint_positions().squeeze() + left_state = self._get_scalar_value(positions[self.joint_indices[0]]) + right_state = self._get_scalar_value(positions[self.joint_indices[1]]) + + doors_open = [ + left_state > math.radians(30), + right_state > math.radians(30), + ] + current_visibility = self.light_scopes[0].get_visibility() + if any(doors_open) and not current_visibility: + for light in self.light_scopes: + light.set_visibility(True) + elif not any(doors_open) and current_visibility: + for light in self.light_scopes: + light.set_visibility(False) + + def damping_stiffness_change(self): + positions = self.art.get_joint_positions().squeeze() + stage = omni.usd.get_context().get_stage() + for i, idx in enumerate(self.joint_indices): + joint_name = self.joint_names[i] + joint_state = positions[idx] + joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) + joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "angular") + joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state, i)) + + def calculate_stiffness(self, joint_state, joint_idx): + max_stiffness = 20 + min_stiffness = 2 + decay_rate = 3 + joint_state_scalar = self._get_scalar_value(joint_state) + joint_name = self.joint_names[joint_idx] + threshold = self.joint_threshold * ( + self.joints_info[joint_name]["upper_limit"] + self.joints_info[joint_name]["lower_limit"] + ) + + if abs(joint_state_scalar) >= abs(math.radians(threshold)): + return min_stiffness + + if self.use_torch and isinstance(joint_state, torch.Tensor): + stiffness = max_stiffness * torch.exp(torch.tensor(-decay_rate * abs(joint_state_scalar), device=joint_state.device)) + return float(max(min_stiffness, min(stiffness.item(), max_stiffness))) + stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state_scalar)) + return max(min_stiffness, min(stiffness, max_stiffness)) + + def target_pose_control(self): + positions = self.art.get_joint_positions().squeeze() + targets = [] + indices = [] + for i, idx in enumerate(self.joint_indices): + joint_state = self._get_scalar_value(positions[idx]) + joint_name = self.joint_names[i] + lower_limit = self.joints_info[joint_name]["lower_limit"] + upper_limit = self.joints_info[joint_name]["upper_limit"] + threshold = self.joint_threshold * (upper_limit + lower_limit) + + if abs(lower_limit) <= math.radians(abs(upper_limit)): + if joint_state > math.radians(threshold): + targets.append(math.radians(upper_limit)) + else: + targets.append(math.radians(lower_limit)) + else: + if joint_state < math.radians(threshold): + targets.append(math.radians(lower_limit)) + else: + targets.append(math.radians(upper_limit)) + indices.append(idx) + + if not targets: + return + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + self.art.apply_action(action) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + dof_limits = self.art.get_dof_limits().squeeze() + self.joint_limits = [ + {"lower": dof_limits[idx, 0], "upper": dof_limits[idx, 1]} + for idx in self.joint_indices + ] + self.joint_limit_diffs = [ + abs(lim["upper"] - lim["lower"]) for lim in self.joint_limits + ] + self.initialized = True + except AttributeError as e: + print(f"Physics not ready yet, will retry: {e}") + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) + diff --git a/Articulated_objects/major_appliances/refrigerator/fridge_2/model_fridge_2.usd b/Articulated_objects/major_appliances/refrigerator/fridge_2/model_fridge_2.usd index 80b82eff1913838b7ab81657709d5c593e18217f..4020c97ee2d66501be7dfbd9ceb12123426a315a 100644 --- a/Articulated_objects/major_appliances/refrigerator/fridge_2/model_fridge_2.usd +++ b/Articulated_objects/major_appliances/refrigerator/fridge_2/model_fridge_2.usd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e8110df5e4be60ef8151f924746a5c85fe17eae17cd2e20162594e1988ac951e -size 4204633 +oid sha256:d26248ed0fa9843e180562c9763b19c176381040677b1246656d8fb52fcc493e +size 4208307 diff --git a/Articulated_objects/major_appliances/refrigerator/fridge_2/resource/cupboard_control.py b/Articulated_objects/major_appliances/refrigerator/fridge_2/resource/cupboard_control.py deleted file mode 100644 index 0aeb2a9333a594709228d92a2a88b5b3848681ca..0000000000000000000000000000000000000000 --- a/Articulated_objects/major_appliances/refrigerator/fridge_2/resource/cupboard_control.py +++ /dev/null @@ -1,241 +0,0 @@ -import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils -from pxr import PhysxSchema, UsdGeom, UsdPhysics -import math - - -def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: - """Recursively find the full path by Prim name""" - stage = omni.usd.get_context().get_stage() - prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): - result = _find_prim(child) - if result: - return result - return None - - found_path = _find_prim(prim) - if not found_path: - raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") - return found_path - - - -# 1. prim init -# joint_prim = XFormPrim(find_prim_path_by_name("fridge_E_body_61")) -# right_revolutejoint_path = find_prim_path_by_name("RevoluteJoint_fridge_right") -# left_revolutejoint_path = find_prim_path_by_name("RevoluteJoint_fridge_left") - -# 2. articulation Root prim -root_articulation_prim = find_prim_path_by_name("E_body_11") -stage = omni.usd.get_context().get_stage() -# 3. joint name -joint_names = ["RevoluteJoint_fridge_2_up","RevoluteJoint_fridge_2_down"] -joint_threshold = 0.3 -# 4. Joint information -joints_info = {} -for joint_name in joint_names: - joint_prim_path = find_prim_path_by_name(joint_name) - joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) - joint = UsdPhysics.RevoluteJoint(joint_prim_obj) - - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() - } - -# 5. Joint limits and limit differences -joint_limits = {} -joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): - joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] - } - joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] - ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] -# 5. light prim -light_scopes=[ - XFormPrim(find_prim_path_by_name("fridge_2_light")) -] - -class Fridge2Control(BehaviorScript): - def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - light_scopes[0].set_visibility(False) - # light_scopes[1].set_visibility(False) - # init_pose - # self.local_pose_button, self.local_ort_button_down = joint_prim.get_local_pose() - # self.local_pose_door, self.local_ort_drawer_up = door_prim.get_local_pose() - - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - - def on_destroy(self): - pass - - def on_play(self): - # - self.simulation_context = SimulationContext( - stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 - ) - - def on_pause(self): - pass - - def on_stop(self): - self.init_start=True - # for light in light_scopes: - # light.set_visibility(False) - light_scopes[0].set_visibility(False) - # light_scopes[1].set_visibility(False) - # back to initial pose - # joint_prim.set_local_pose(translation=self.local_pose_button) - pass - - def on_update(self, current_time: float, delta_time: float): - if delta_time <= 0: - return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - - def apply_behavior(self): - self.light_control() - self.damping_stiffness_change() - self.target_pose_control() - - - def light_control(self): - self.left_joint_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - self.right_joint_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - # print("self.Joint1_state",self.Joint1_state) - # 联合判断双门状态 - doors_open = [ - self.left_joint_state > math.radians(30), - self.right_joint_state > math.radians(30) - ] - - # 灯光控制逻辑 - current_visibility = light_scopes[0].get_visibility() - if any(doors_open): - if not current_visibility: - for light in light_scopes: - light.set_visibility(True) - else: - if current_visibility: - for light in light_scopes: - light.set_visibility(False) - - # if self.right_joint_state > math.radians(30) : - # if light_scopes[0].get_visibility() == False: - # for light in light_scopes: - # light.set_visibility(True) - # # self.dc.set_dof_position_target(self.joint_handles[1], 140) - - # elif self.right_joint_state < math.radians(30): - # if light_scopes[0].get_visibility() == True: - # for light in light_scopes: - # light.set_visibility(False) - # self.dc.set_dof_position_target(self.joint_handles[1], 0) - - - def damping_stiffness_change(self): - - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API - joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) - joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "angular") - # Get joint limit difference and set stiffness - - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - def calculate_stiffness(self,joint_state): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 20 # 最大刚度 - # max_stiffness = 50 # 最大刚度 - min_stiffness = 2 # 最小刚度 - decay_rate = 3 # 衰减率 - # 使用指数衰减函数计算刚度 - if abs(joint_state) >= abs(math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit']))): - return min_stiffness - - # 计算刚度值:stiffness = max_stiffness * e^(-decay_rate * angle) - stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) - - # 确保刚度值在最小值和最大值之间 - return max(min_stiffness, min(stiffness, max_stiffness)) - - def target_pose_control(self): - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - - # print("joint_state", joint_state) - # print("joints_info[joint_names[i]]['upper_limit']", joints_info[joint_names[i]]['upper_limit']) - # Get joint limit difference - # Set target position based on joint state - if abs(joints_info[joint_names[i]]['lower_limit']) <= math.radians(abs(joints_info[joint_names[i]]['upper_limit'])): - if joint_state > math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit'])): - - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['upper_limit'])) - else: - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['lower_limit'])) - else: - if joint_state < math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit'])): - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['lower_limit'])) - else: - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['upper_limit'])) - # print("self.dc.get_dof_position_target=",self.dc.get_dof_position_target(joint_handle)) diff --git a/Articulated_objects/major_appliances/refrigerator/fridge_2/resource/refrigherator_control.py b/Articulated_objects/major_appliances/refrigerator/fridge_2/resource/refrigherator_control.py new file mode 100644 index 0000000000000000000000000000000000000000..7ab26ee8d0f0e8b8b895194b61c48b31a50b6665 --- /dev/null +++ b/Articulated_objects/major_appliances/refrigerator/fridge_2/resource/refrigherator_control.py @@ -0,0 +1,207 @@ +import carb +import math +import torch +import omni.usd +from omni.kit.scripting import BehaviorScript +from isaacsim.core.prims import Articulation +from omni.isaac.core.prims import XFormPrim +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics + + +def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: + """Recursively find the full path by Prim name""" + stage = omni.usd.get_context().get_stage() + prim = stage.GetPrimAtPath(root_path) + + def _find_prim(current): + if current.GetName() == prim_name: + return current.GetPath().pathString + for child in current.GetChildren(): + result = _find_prim(child) + if result: + return result + return None + + found_path = _find_prim(prim) + if not found_path: + raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") + return found_path + + +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_11"] +JOINT_NAMES = ["RevoluteJoint_fridge_2_up", "RevoluteJoint_fridge_2_down"] +JOINT_THRESHOLD = 0.3 +LIGHT_PRIM_NAME = "fridge_2_light" + + +class Fridge2Control(BehaviorScript): + def on_init(self): + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.joint_limits = None + self.joint_limit_diffs = None + self.use_torch = None + self.joint_threshold = JOINT_THRESHOLD + + self.light_scopes = [XFormPrim(find_prim_path_by_name(LIGHT_PRIM_NAME))] + self.light_scopes[0].set_visibility(False) + + stage = omni.usd.get_context().get_stage() + self.joints_info = {} + for joint_name in self.joint_names: + joint_prim_path = find_prim_path_by_name(joint_name) + joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) + joint = UsdPhysics.RevoluteJoint(joint_prim_obj) + self.joints_info[joint_name] = { + "prim": joint, + "lower_limit": joint.GetLowerLimitAttr().Get(), + "upper_limit": joint.GetUpperLimitAttr().Get(), + } + + def on_play(self): + self._initialize_articulation() + + def on_stop(self): + self.light_scopes[0].set_visibility(False) + + def on_update(self, current_time: float, delta_time: float): + if delta_time <= 0: + return + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + + def apply_behavior(self): + if not self.initialized or self.art is None: + return + self.light_control() + self.damping_stiffness_change() + self.target_pose_control() + + def light_control(self): + positions = self.art.get_joint_positions().squeeze() + left_state = self._get_scalar_value(positions[self.joint_indices[0]]) + right_state = self._get_scalar_value(positions[self.joint_indices[1]]) + + doors_open = [ + left_state > math.radians(30), + right_state > math.radians(30), + ] + current_visibility = self.light_scopes[0].get_visibility() + if any(doors_open) and not current_visibility: + for light in self.light_scopes: + light.set_visibility(True) + elif not any(doors_open) and current_visibility: + for light in self.light_scopes: + light.set_visibility(False) + + def damping_stiffness_change(self): + positions = self.art.get_joint_positions().squeeze() + stage = omni.usd.get_context().get_stage() + for i, idx in enumerate(self.joint_indices): + joint_name = self.joint_names[i] + joint_state = positions[idx] + joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) + joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "angular") + joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state, i)) + + def calculate_stiffness(self, joint_state, joint_idx): + max_stiffness = 20 + min_stiffness = 2 + decay_rate = 3 + joint_state_scalar = self._get_scalar_value(joint_state) + joint_name = self.joint_names[joint_idx] + threshold = self.joint_threshold * ( + self.joints_info[joint_name]["upper_limit"] + self.joints_info[joint_name]["lower_limit"] + ) + + if abs(joint_state_scalar) >= abs(math.radians(threshold)): + return min_stiffness + + if self.use_torch and isinstance(joint_state, torch.Tensor): + stiffness = max_stiffness * torch.exp(torch.tensor(-decay_rate * abs(joint_state_scalar), device=joint_state.device)) + return float(max(min_stiffness, min(stiffness.item(), max_stiffness))) + stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state_scalar)) + return max(min_stiffness, min(stiffness, max_stiffness)) + + def target_pose_control(self): + positions = self.art.get_joint_positions().squeeze() + targets = [] + indices = [] + for i, idx in enumerate(self.joint_indices): + joint_state = self._get_scalar_value(positions[idx]) + joint_name = self.joint_names[i] + lower_limit = self.joints_info[joint_name]["lower_limit"] + upper_limit = self.joints_info[joint_name]["upper_limit"] + threshold = self.joint_threshold * (upper_limit + lower_limit) + + if abs(lower_limit) <= math.radians(abs(upper_limit)): + if joint_state > math.radians(threshold): + targets.append(math.radians(upper_limit)) + else: + targets.append(math.radians(lower_limit)) + else: + if joint_state < math.radians(threshold): + targets.append(math.radians(lower_limit)) + else: + targets.append(math.radians(upper_limit)) + indices.append(idx) + + if not targets: + return + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + self.art.apply_action(action) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + dof_limits = self.art.get_dof_limits().squeeze() + self.joint_limits = [ + {"lower": dof_limits[idx, 0], "upper": dof_limits[idx, 1]} + for idx in self.joint_indices + ] + self.joint_limit_diffs = [ + abs(lim["upper"] - lim["lower"]) for lim in self.joint_limits + ] + self.initialized = True + except AttributeError as e: + print(f"Physics not ready yet, will retry: {e}") + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) + diff --git a/Articulated_objects/major_appliances/refrigerator/fridge_3/model_fridge_3.usda b/Articulated_objects/major_appliances/refrigerator/fridge_3/model_fridge_3.usda index 1fb424f164c97ccd4ae0eb056eeb9cb5be327fb8..d2f11a1017471acca25ad9136c57ca1f4e1df41c 100644 --- a/Articulated_objects/major_appliances/refrigerator/fridge_3/model_fridge_3.usda +++ b/Articulated_objects/major_appliances/refrigerator/fridge_3/model_fridge_3.usda @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:93b1c6e1bc45ed24711799b64d6e9cc5775c256531b1aba7b8ececd2d26ac36a -size 91519733 +oid sha256:f7b309677a2fad8c7044672a119019299aeee0912cd2a8272f6dcc16979c0c84 +size 91522678 diff --git a/Articulated_objects/major_appliances/refrigerator/fridge_3/resource/cupboard_control.py b/Articulated_objects/major_appliances/refrigerator/fridge_3/resource/cupboard_control.py deleted file mode 100644 index 68879c485b510cd0faaa3d376c456e76a61eb3a9..0000000000000000000000000000000000000000 --- a/Articulated_objects/major_appliances/refrigerator/fridge_3/resource/cupboard_control.py +++ /dev/null @@ -1,241 +0,0 @@ -import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils -from pxr import PhysxSchema, UsdGeom, UsdPhysics -import math - - -def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: - """Recursively find the full path by Prim name""" - stage = omni.usd.get_context().get_stage() - prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): - result = _find_prim(child) - if result: - return result - return None - - found_path = _find_prim(prim) - if not found_path: - raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") - return found_path - - - -# 1. prim init -# joint_prim = XFormPrim(find_prim_path_by_name("fridge_E_body_61")) -# right_revolutejoint_path = find_prim_path_by_name("RevoluteJoint_fridge_right") -# left_revolutejoint_path = find_prim_path_by_name("RevoluteJoint_fridge_left") - -# 2. articulation Root prim -root_articulation_prim = find_prim_path_by_name("E_body_8") -stage = omni.usd.get_context().get_stage() -# 3. joint name -joint_names = ["RevoluteJoint_fridge_3_down","RevoluteJoint_fridge_3_up"] -joint_threshold = 0.3 -# 4. Joint information -joints_info = {} -for joint_name in joint_names: - joint_prim_path = find_prim_path_by_name(joint_name) - joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) - joint = UsdPhysics.RevoluteJoint(joint_prim_obj) - - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() - } - -# 5. Joint limits and limit differences -joint_limits = {} -joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): - joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] - } - joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] - ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] -# 5. light prim -light_scopes=[ - XFormPrim(find_prim_path_by_name("fridge_3_light")) -] - -class Fridge3Control(BehaviorScript): - def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - light_scopes[0].set_visibility(False) - # light_scopes[1].set_visibility(False) - # init_pose - # self.local_pose_button, self.local_ort_button_down = joint_prim.get_local_pose() - # self.local_pose_door, self.local_ort_drawer_up = door_prim.get_local_pose() - - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - - def on_destroy(self): - pass - - def on_play(self): - # - self.simulation_context = SimulationContext( - stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 - ) - - def on_pause(self): - pass - - def on_stop(self): - self.init_start=True - # for light in light_scopes: - # light.set_visibility(False) - light_scopes[0].set_visibility(False) - # light_scopes[1].set_visibility(False) - # back to initial pose - # joint_prim.set_local_pose(translation=self.local_pose_button) - pass - - def on_update(self, current_time: float, delta_time: float): - if delta_time <= 0: - return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - - def apply_behavior(self): - self.light_control() - self.damping_stiffness_change() - self.target_pose_control() - - - def light_control(self): - self.left_joint_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - self.right_joint_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - # print("self.Joint1_state",self.Joint1_state) - # 联合判断双门状态 - doors_open = [ - self.left_joint_state > math.radians(30), - self.right_joint_state > math.radians(30) - ] - - # 灯光控制逻辑 - current_visibility = light_scopes[0].get_visibility() - if any(doors_open): - if not current_visibility: - for light in light_scopes: - light.set_visibility(True) - else: - if current_visibility: - for light in light_scopes: - light.set_visibility(False) - - # if self.right_joint_state > math.radians(30) : - # if light_scopes[0].get_visibility() == False: - # for light in light_scopes: - # light.set_visibility(True) - # # self.dc.set_dof_position_target(self.joint_handles[1], 140) - - # elif self.right_joint_state < math.radians(30): - # if light_scopes[0].get_visibility() == True: - # for light in light_scopes: - # light.set_visibility(False) - # self.dc.set_dof_position_target(self.joint_handles[1], 0) - - - def damping_stiffness_change(self): - - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API - joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) - joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "angular") - # Get joint limit difference and set stiffness - - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - def calculate_stiffness(self,joint_state): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 20 # 最大刚度 - # max_stiffness = 50 # 最大刚度 - min_stiffness = 2 # 最小刚度 - decay_rate = 3 # 衰减率 - # 使用指数衰减函数计算刚度 - if abs(joint_state) >= abs(math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit']))): - return min_stiffness - - # 计算刚度值:stiffness = max_stiffness * e^(-decay_rate * angle) - stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) - - # 确保刚度值在最小值和最大值之间 - return max(min_stiffness, min(stiffness, max_stiffness)) - - def target_pose_control(self): - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - - # print("joint_state", joint_state) - # print("joints_info[joint_names[i]]['upper_limit']", joints_info[joint_names[i]]['upper_limit']) - # Get joint limit difference - # Set target position based on joint state - if abs(joints_info[joint_names[i]]['lower_limit']) <= math.radians(abs(joints_info[joint_names[i]]['upper_limit'])): - if joint_state > math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit'])): - - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['upper_limit'])) - else: - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['lower_limit'])) - else: - if joint_state < math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit'])): - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['lower_limit'])) - else: - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['upper_limit'])) - # print("self.dc.get_dof_position_target=",self.dc.get_dof_position_target(joint_handle)) diff --git a/Articulated_objects/major_appliances/refrigerator/fridge_3/resource/refrigherator_control.py b/Articulated_objects/major_appliances/refrigerator/fridge_3/resource/refrigherator_control.py new file mode 100644 index 0000000000000000000000000000000000000000..a48eba3bd770d5a2968a15e53942d543b85c206b --- /dev/null +++ b/Articulated_objects/major_appliances/refrigerator/fridge_3/resource/refrigherator_control.py @@ -0,0 +1,207 @@ +import carb +import math +import torch +import omni.usd +from omni.kit.scripting import BehaviorScript +from isaacsim.core.prims import Articulation +from omni.isaac.core.prims import XFormPrim +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics + + +def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: + """Recursively find the full path by Prim name""" + stage = omni.usd.get_context().get_stage() + prim = stage.GetPrimAtPath(root_path) + + def _find_prim(current): + if current.GetName() == prim_name: + return current.GetPath().pathString + for child in current.GetChildren(): + result = _find_prim(child) + if result: + return result + return None + + found_path = _find_prim(prim) + if not found_path: + raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") + return found_path + + +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_8"] +JOINT_NAMES = ["RevoluteJoint_fridge_3_down", "RevoluteJoint_fridge_3_up"] +JOINT_THRESHOLD = 0.3 +LIGHT_PRIM_NAME = "fridge_3_light" + + +class Fridge3Control(BehaviorScript): + def on_init(self): + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.joint_limits = None + self.joint_limit_diffs = None + self.use_torch = None + self.joint_threshold = JOINT_THRESHOLD + + self.light_scopes = [XFormPrim(find_prim_path_by_name(LIGHT_PRIM_NAME))] + self.light_scopes[0].set_visibility(False) + + stage = omni.usd.get_context().get_stage() + self.joints_info = {} + for joint_name in self.joint_names: + joint_prim_path = find_prim_path_by_name(joint_name) + joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) + joint = UsdPhysics.RevoluteJoint(joint_prim_obj) + self.joints_info[joint_name] = { + "prim": joint, + "lower_limit": joint.GetLowerLimitAttr().Get(), + "upper_limit": joint.GetUpperLimitAttr().Get(), + } + + def on_play(self): + self._initialize_articulation() + + def on_stop(self): + self.light_scopes[0].set_visibility(False) + + def on_update(self, current_time: float, delta_time: float): + if delta_time <= 0: + return + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + + def apply_behavior(self): + if not self.initialized or self.art is None: + return + self.light_control() + self.damping_stiffness_change() + self.target_pose_control() + + def light_control(self): + positions = self.art.get_joint_positions().squeeze() + left_state = self._get_scalar_value(positions[self.joint_indices[0]]) + right_state = self._get_scalar_value(positions[self.joint_indices[1]]) + + doors_open = [ + left_state > math.radians(30), + right_state > math.radians(30), + ] + current_visibility = self.light_scopes[0].get_visibility() + if any(doors_open) and not current_visibility: + for light in self.light_scopes: + light.set_visibility(True) + elif not any(doors_open) and current_visibility: + for light in self.light_scopes: + light.set_visibility(False) + + def damping_stiffness_change(self): + positions = self.art.get_joint_positions().squeeze() + stage = omni.usd.get_context().get_stage() + for i, idx in enumerate(self.joint_indices): + joint_name = self.joint_names[i] + joint_state = positions[idx] + joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) + joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "angular") + joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state, i)) + + def calculate_stiffness(self, joint_state, joint_idx): + max_stiffness = 20 + min_stiffness = 2 + decay_rate = 3 + joint_state_scalar = self._get_scalar_value(joint_state) + joint_name = self.joint_names[joint_idx] + threshold = self.joint_threshold * ( + self.joints_info[joint_name]["upper_limit"] + self.joints_info[joint_name]["lower_limit"] + ) + + if abs(joint_state_scalar) >= abs(math.radians(threshold)): + return min_stiffness + + if self.use_torch and isinstance(joint_state, torch.Tensor): + stiffness = max_stiffness * torch.exp(torch.tensor(-decay_rate * abs(joint_state_scalar), device=joint_state.device)) + return float(max(min_stiffness, min(stiffness.item(), max_stiffness))) + stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state_scalar)) + return max(min_stiffness, min(stiffness, max_stiffness)) + + def target_pose_control(self): + positions = self.art.get_joint_positions().squeeze() + targets = [] + indices = [] + for i, idx in enumerate(self.joint_indices): + joint_state = self._get_scalar_value(positions[idx]) + joint_name = self.joint_names[i] + lower_limit = self.joints_info[joint_name]["lower_limit"] + upper_limit = self.joints_info[joint_name]["upper_limit"] + threshold = self.joint_threshold * (upper_limit + lower_limit) + + if abs(lower_limit) <= math.radians(abs(upper_limit)): + if joint_state > math.radians(threshold): + targets.append(math.radians(upper_limit)) + else: + targets.append(math.radians(lower_limit)) + else: + if joint_state < math.radians(threshold): + targets.append(math.radians(lower_limit)) + else: + targets.append(math.radians(upper_limit)) + indices.append(idx) + + if not targets: + return + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + self.art.apply_action(action) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + dof_limits = self.art.get_dof_limits().squeeze() + self.joint_limits = [ + {"lower": dof_limits[idx, 0], "upper": dof_limits[idx, 1]} + for idx in self.joint_indices + ] + self.joint_limit_diffs = [ + abs(lim["upper"] - lim["lower"]) for lim in self.joint_limits + ] + self.initialized = True + except AttributeError as e: + print(f"Physics not ready yet, will retry: {e}") + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) + diff --git a/Articulated_objects/major_appliances/refrigerator/fridge_4/model_fridge_4.usd b/Articulated_objects/major_appliances/refrigerator/fridge_4/model_fridge_4.usd index e826846e000f480b5abdfb10f5a2019adf66aa74..2ed50aef41888d44e5b7eb0633a7138a591967b9 100644 --- a/Articulated_objects/major_appliances/refrigerator/fridge_4/model_fridge_4.usd +++ b/Articulated_objects/major_appliances/refrigerator/fridge_4/model_fridge_4.usd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:98623589768523bf5c79e53ab6af4217d570acd2e210954b6573f4b723d00497 -size 17434297 +oid sha256:3715121c97d0f9e5867bf6be43a5b677f8e98d1c57f6d30563eaa6a99ba55cf4 +size 17438335 diff --git a/Articulated_objects/major_appliances/refrigerator/fridge_4/resource/cupboard_control.py b/Articulated_objects/major_appliances/refrigerator/fridge_4/resource/refrigherator_control.py similarity index 100% rename from Articulated_objects/major_appliances/refrigerator/fridge_4/resource/cupboard_control.py rename to Articulated_objects/major_appliances/refrigerator/fridge_4/resource/refrigherator_control.py diff --git a/Articulated_objects/major_appliances/refrigerator/refrigerator_1/model_refrigerator_1.usd b/Articulated_objects/major_appliances/refrigerator/refrigerator_1/model_refrigerator_1.usd index 077633877d8ba66be5e4e025c1a2bc6badc6b668..1cf1f09a5e32b798bf02d95c468bf23b61eda05b 100644 --- a/Articulated_objects/major_appliances/refrigerator/refrigerator_1/model_refrigerator_1.usd +++ b/Articulated_objects/major_appliances/refrigerator/refrigerator_1/model_refrigerator_1.usd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:64d1ffaf6fbab75278779c78d8dc64269920095a31b793705be878c4a3a96e8d -size 4025705 +oid sha256:f02a7ffd12b5a25c13f50e104240eaa0ad031dea4e2b55a7fd27416ccba4dc19 +size 4030632 diff --git a/Articulated_objects/major_appliances/refrigerator/refrigerator_1/resource/cupboard_control.py b/Articulated_objects/major_appliances/refrigerator/refrigerator_1/resource/cupboard_control.py deleted file mode 100644 index e8974ade8413aa0324638edeb0a272466f2df619..0000000000000000000000000000000000000000 --- a/Articulated_objects/major_appliances/refrigerator/refrigerator_1/resource/cupboard_control.py +++ /dev/null @@ -1,241 +0,0 @@ -import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils -from pxr import PhysxSchema, UsdGeom, UsdPhysics -import math - - -def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: - """Recursively find the full path by Prim name""" - stage = omni.usd.get_context().get_stage() - prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): - result = _find_prim(child) - if result: - return result - return None - - found_path = _find_prim(prim) - if not found_path: - raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") - return found_path - - - -# 1. prim init -# joint_prim = XFormPrim(find_prim_path_by_name("fridge_E_body_61")) -# right_revolutejoint_path = find_prim_path_by_name("RevoluteJoint_fridge_right") -# left_revolutejoint_path = find_prim_path_by_name("RevoluteJoint_fridge_left") - -# 2. articulation Root prim -root_articulation_prim = find_prim_path_by_name("E_body_16") -stage = omni.usd.get_context().get_stage() -# 3. joint name -joint_names = ["RevoluteJoint_refrigerator_left1","RevoluteJoint_refrigerator_right1","RevoluteJoint_refrigerator_left2","RevoluteJoint_refrigerator_right2"] -joint_threshold = 0.3 -# 4. Joint information -joints_info = {} -for joint_name in joint_names: - joint_prim_path = find_prim_path_by_name(joint_name) - joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) - joint = UsdPhysics.RevoluteJoint(joint_prim_obj) - - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() - } - -# 5. Joint limits and limit differences -joint_limits = {} -joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): - joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] - } - joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] - ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] -# 5. light prim -light_scopes=[ - XFormPrim(find_prim_path_by_name("refrigerator_1_light")) -] - -class Fridge4Control(BehaviorScript): - def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - light_scopes[0].set_visibility(False) - # light_scopes[1].set_visibility(False) - # init_pose - # self.local_pose_button, self.local_ort_button_down = joint_prim.get_local_pose() - # self.local_pose_door, self.local_ort_drawer_up = door_prim.get_local_pose() - - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - - def on_destroy(self): - pass - - def on_play(self): - # - self.simulation_context = SimulationContext( - stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 - ) - - def on_pause(self): - pass - - def on_stop(self): - self.init_start=True - # for light in light_scopes: - # light.set_visibility(False) - light_scopes[0].set_visibility(False) - # light_scopes[1].set_visibility(False) - # back to initial pose - # joint_prim.set_local_pose(translation=self.local_pose_button) - pass - - def on_update(self, current_time: float, delta_time: float): - if delta_time <= 0: - return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - - def apply_behavior(self): - self.light_control() - self.damping_stiffness_change() - self.target_pose_control() - - - def light_control(self): - self.left_joint_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - self.right_joint_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - # print("self.Joint1_state",self.Joint1_state) - # 联合判断双门状态 - doors_open = [ - self.left_joint_state > math.radians(30), - self.right_joint_state > math.radians(30) - ] - - # 灯光控制逻辑 - current_visibility = light_scopes[0].get_visibility() - if any(doors_open): - if not current_visibility: - for light in light_scopes: - light.set_visibility(True) - else: - if current_visibility: - for light in light_scopes: - light.set_visibility(False) - - # if self.right_joint_state > math.radians(30) : - # if light_scopes[0].get_visibility() == False: - # for light in light_scopes: - # light.set_visibility(True) - # # self.dc.set_dof_position_target(self.joint_handles[1], 140) - - # elif self.right_joint_state < math.radians(30): - # if light_scopes[0].get_visibility() == True: - # for light in light_scopes: - # light.set_visibility(False) - # self.dc.set_dof_position_target(self.joint_handles[1], 0) - - - def damping_stiffness_change(self): - - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API - joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) - joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "angular") - # Get joint limit difference and set stiffness - - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - def calculate_stiffness(self,joint_state): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 20 # 最大刚度 - # max_stiffness = 50 # 最大刚度 - min_stiffness = 2 # 最小刚度 - decay_rate = 3 # 衰减率 - # 使用指数衰减函数计算刚度 - if abs(joint_state) >= abs(math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit']))): - return min_stiffness - - # 计算刚度值:stiffness = max_stiffness * e^(-decay_rate * angle) - stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) - - # 确保刚度值在最小值和最大值之间 - return max(min_stiffness, min(stiffness, max_stiffness)) - - def target_pose_control(self): - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - - # print("joint_state", joint_state) - # print("joints_info[joint_names[i]]['upper_limit']", joints_info[joint_names[i]]['upper_limit']) - # Get joint limit difference - # Set target position based on joint state - if abs(joints_info[joint_names[i]]['lower_limit']) <= math.radians(abs(joints_info[joint_names[i]]['upper_limit'])): - if joint_state > math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit'])): - - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['upper_limit'])) - else: - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['lower_limit'])) - else: - if joint_state < math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit'])): - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['lower_limit'])) - else: - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['upper_limit'])) - # print("self.dc.get_dof_position_target=",self.dc.get_dof_position_target(joint_handle)) diff --git a/Articulated_objects/major_appliances/refrigerator/refrigerator_1/resource/refrigherator_control.py b/Articulated_objects/major_appliances/refrigerator/refrigerator_1/resource/refrigherator_control.py new file mode 100644 index 0000000000000000000000000000000000000000..420e6e7b958b41a2a574d24de95313a7bb830c61 --- /dev/null +++ b/Articulated_objects/major_appliances/refrigerator/refrigerator_1/resource/refrigherator_control.py @@ -0,0 +1,213 @@ +import carb +import math +import torch +import omni.usd +from omni.kit.scripting import BehaviorScript +from isaacsim.core.prims import Articulation +from omni.isaac.core.prims import XFormPrim +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics + + +def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: + """Recursively find the full path by Prim name""" + stage = omni.usd.get_context().get_stage() + prim = stage.GetPrimAtPath(root_path) + + def _find_prim(current): + if current.GetName() == prim_name: + return current.GetPath().pathString + for child in current.GetChildren(): + result = _find_prim(child) + if result: + return result + return None + + found_path = _find_prim(prim) + if not found_path: + raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") + return found_path + + + +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_16"] +JOINT_NAMES = [ + "RevoluteJoint_refrigerator_left1", + "RevoluteJoint_refrigerator_right1", + "RevoluteJoint_refrigerator_left2", + "RevoluteJoint_refrigerator_right2", +] +JOINT_THRESHOLD = 0.3 +LIGHT_PRIM_NAME = "refrigerator_1_light" + + +class Fridge4Control(BehaviorScript): + def on_init(self): + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.joint_limits = None + self.joint_limit_diffs = None + self.use_torch = None + self.joint_threshold = JOINT_THRESHOLD + + self.light_scopes = [XFormPrim(find_prim_path_by_name(LIGHT_PRIM_NAME))] + self.light_scopes[0].set_visibility(False) + + stage = omni.usd.get_context().get_stage() + self.joints_info = {} + for joint_name in self.joint_names: + joint_prim_path = find_prim_path_by_name(joint_name) + joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) + joint = UsdPhysics.RevoluteJoint(joint_prim_obj) + self.joints_info[joint_name] = { + "prim": joint, + "lower_limit": joint.GetLowerLimitAttr().Get(), + "upper_limit": joint.GetUpperLimitAttr().Get(), + } + + def on_play(self): + self._initialize_articulation() + + def on_stop(self): + self.light_scopes[0].set_visibility(False) + + def on_update(self, current_time: float, delta_time: float): + if delta_time <= 0: + return + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + + def apply_behavior(self): + if not self.initialized or self.art is None: + return + self.light_control() + self.damping_stiffness_change() + self.target_pose_control() + + def light_control(self): + positions = self.art.get_joint_positions().squeeze() + left_state = self._get_scalar_value(positions[self.joint_indices[0]]) + right_state = self._get_scalar_value(positions[self.joint_indices[1]]) + + doors_open = [ + left_state > math.radians(30), + right_state > math.radians(30), + ] + current_visibility = self.light_scopes[0].get_visibility() + if any(doors_open) and not current_visibility: + for light in self.light_scopes: + light.set_visibility(True) + elif not any(doors_open) and current_visibility: + for light in self.light_scopes: + light.set_visibility(False) + + def damping_stiffness_change(self): + positions = self.art.get_joint_positions().squeeze() + stage = omni.usd.get_context().get_stage() + for i, idx in enumerate(self.joint_indices): + joint_name = self.joint_names[i] + joint_state = positions[idx] + joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) + joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "angular") + joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state, i)) + + def calculate_stiffness(self, joint_state, joint_idx): + max_stiffness = 20 + min_stiffness = 2 + decay_rate = 3 + joint_state_scalar = self._get_scalar_value(joint_state) + joint_name = self.joint_names[joint_idx] + threshold = self.joint_threshold * ( + self.joints_info[joint_name]["upper_limit"] + self.joints_info[joint_name]["lower_limit"] + ) + + if abs(joint_state_scalar) >= abs(math.radians(threshold)): + return min_stiffness + + if self.use_torch and isinstance(joint_state, torch.Tensor): + stiffness = max_stiffness * torch.exp(torch.tensor(-decay_rate * abs(joint_state_scalar), device=joint_state.device)) + return float(max(min_stiffness, min(stiffness.item(), max_stiffness))) + stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state_scalar)) + return max(min_stiffness, min(stiffness, max_stiffness)) + + def target_pose_control(self): + positions = self.art.get_joint_positions().squeeze() + targets = [] + indices = [] + for i, idx in enumerate(self.joint_indices): + joint_state = self._get_scalar_value(positions[idx]) + joint_name = self.joint_names[i] + lower_limit = self.joints_info[joint_name]["lower_limit"] + upper_limit = self.joints_info[joint_name]["upper_limit"] + threshold = self.joint_threshold * (upper_limit + lower_limit) + + if abs(lower_limit) <= math.radians(abs(upper_limit)): + if joint_state > math.radians(threshold): + targets.append(math.radians(upper_limit)) + else: + targets.append(math.radians(lower_limit)) + else: + if joint_state < math.radians(threshold): + targets.append(math.radians(lower_limit)) + else: + targets.append(math.radians(upper_limit)) + indices.append(idx) + + if not targets: + return + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + self.art.apply_action(action) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + dof_limits = self.art.get_dof_limits().squeeze() + self.joint_limits = [ + {"lower": dof_limits[idx, 0], "upper": dof_limits[idx, 1]} + for idx in self.joint_indices + ] + self.joint_limit_diffs = [ + abs(lim["upper"] - lim["lower"]) for lim in self.joint_limits + ] + self.initialized = True + except AttributeError as e: + print(f"Physics not ready yet, will retry: {e}") + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) + diff --git a/Articulated_objects/major_appliances/refrigerator/refrigerator_6/model_refrigerator_6.usd b/Articulated_objects/major_appliances/refrigerator/refrigerator_6/model_refrigerator_6.usd index 4a1fe537ea0a248ef34cad7c6fed503ea9470fed..0c19589d0de0bd3ee9d7496d9f5e9c749fd7eaa9 100644 --- a/Articulated_objects/major_appliances/refrigerator/refrigerator_6/model_refrigerator_6.usd +++ b/Articulated_objects/major_appliances/refrigerator/refrigerator_6/model_refrigerator_6.usd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:123dba06477614436b4e44b1345cb753959758e479b44eeb3e1ab7cea20ec28b -size 6272160 +oid sha256:a6fe905b05115fb7ed75291a9b1eead39f9383fc96e44c6e3e7b7d80f313399a +size 6278881 diff --git a/Articulated_objects/major_appliances/refrigerator/refrigerator_6/resource/cupboard_control.py b/Articulated_objects/major_appliances/refrigerator/refrigerator_6/resource/cupboard_control.py deleted file mode 100644 index 4b39603e981f755694b70ed9653b1c0685d32759..0000000000000000000000000000000000000000 --- a/Articulated_objects/major_appliances/refrigerator/refrigerator_6/resource/cupboard_control.py +++ /dev/null @@ -1,241 +0,0 @@ -import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils -from pxr import PhysxSchema, UsdGeom, UsdPhysics -import math - - -def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: - """Recursively find the full path by Prim name""" - stage = omni.usd.get_context().get_stage() - prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): - result = _find_prim(child) - if result: - return result - return None - - found_path = _find_prim(prim) - if not found_path: - raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") - return found_path - - - -# 1. prim init -# joint_prim = XFormPrim(find_prim_path_by_name("fridge_E_body_61")) -# right_revolutejoint_path = find_prim_path_by_name("RevoluteJoint_fridge_right") -# left_revolutejoint_path = find_prim_path_by_name("RevoluteJoint_fridge_left") - -# 2. articulation Root prim -root_articulation_prim = find_prim_path_by_name("E_body_15") -stage = omni.usd.get_context().get_stage() -# 3. joint name -joint_names = ["RevoluteJoint_refrigerator_6_right","RevoluteJoint_refrigerator_6_left"] -joint_threshold = 0.3 -# 4. Joint information -joints_info = {} -for joint_name in joint_names: - joint_prim_path = find_prim_path_by_name(joint_name) - joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) - joint = UsdPhysics.RevoluteJoint(joint_prim_obj) - - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() - } - -# 5. Joint limits and limit differences -joint_limits = {} -joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): - joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] - } - joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] - ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] -# 5. light prim -light_scopes=[ - XFormPrim(find_prim_path_by_name("refrigerator_6_light")) -] - -class Fridge6Control(BehaviorScript): - def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - light_scopes[0].set_visibility(False) - # light_scopes[1].set_visibility(False) - # init_pose - # self.local_pose_button, self.local_ort_button_down = joint_prim.get_local_pose() - # self.local_pose_door, self.local_ort_drawer_up = door_prim.get_local_pose() - - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - - def on_destroy(self): - pass - - def on_play(self): - # - self.simulation_context = SimulationContext( - stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 - ) - - def on_pause(self): - pass - - def on_stop(self): - self.init_start=True - # for light in light_scopes: - # light.set_visibility(False) - light_scopes[0].set_visibility(False) - # light_scopes[1].set_visibility(False) - # back to initial pose - # joint_prim.set_local_pose(translation=self.local_pose_button) - pass - - def on_update(self, current_time: float, delta_time: float): - if delta_time <= 0: - return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - - def apply_behavior(self): - self.light_control() - self.damping_stiffness_change() - self.target_pose_control() - - - def light_control(self): - self.left_joint_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - self.right_joint_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - # print("self.Joint1_state",self.Joint1_state) - # 联合判断双门状态 - doors_open = [ - self.left_joint_state > math.radians(30), - self.right_joint_state > math.radians(30) - ] - - # 灯光控制逻辑 - current_visibility = light_scopes[0].get_visibility() - if any(doors_open): - if not current_visibility: - for light in light_scopes: - light.set_visibility(True) - else: - if current_visibility: - for light in light_scopes: - light.set_visibility(False) - - # if self.right_joint_state > math.radians(30) : - # if light_scopes[0].get_visibility() == False: - # for light in light_scopes: - # light.set_visibility(True) - # # self.dc.set_dof_position_target(self.joint_handles[1], 140) - - # elif self.right_joint_state < math.radians(30): - # if light_scopes[0].get_visibility() == True: - # for light in light_scopes: - # light.set_visibility(False) - # self.dc.set_dof_position_target(self.joint_handles[1], 0) - - - def damping_stiffness_change(self): - - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API - joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) - joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "angular") - # Get joint limit difference and set stiffness - - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - def calculate_stiffness(self,joint_state): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 20 # 最大刚度 - # max_stiffness = 50 # 最大刚度 - min_stiffness = 2 # 最小刚度 - decay_rate = 3 # 衰减率 - # 使用指数衰减函数计算刚度 - if abs(joint_state) >= abs(math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit']))): - return min_stiffness - - # 计算刚度值:stiffness = max_stiffness * e^(-decay_rate * angle) - stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) - - # 确保刚度值在最小值和最大值之间 - return max(min_stiffness, min(stiffness, max_stiffness)) - - def target_pose_control(self): - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - - # print("joint_state", joint_state) - # print("joints_info[joint_names[i]]['upper_limit']", joints_info[joint_names[i]]['upper_limit']) - # Get joint limit difference - # Set target position based on joint state - if abs(joints_info[joint_names[i]]['lower_limit']) <= math.radians(abs(joints_info[joint_names[i]]['upper_limit'])): - if joint_state > math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit'])): - - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['upper_limit'])) - else: - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['lower_limit'])) - else: - if joint_state < math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit'])): - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['lower_limit'])) - else: - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['upper_limit'])) - # print("self.dc.get_dof_position_target=",self.dc.get_dof_position_target(joint_handle)) diff --git a/Articulated_objects/major_appliances/refrigerator/refrigerator_6/resource/refrigherator_control.py b/Articulated_objects/major_appliances/refrigerator/refrigerator_6/resource/refrigherator_control.py new file mode 100644 index 0000000000000000000000000000000000000000..7dd9031486781e40a28a520e29a413d0aec84965 --- /dev/null +++ b/Articulated_objects/major_appliances/refrigerator/refrigerator_6/resource/refrigherator_control.py @@ -0,0 +1,207 @@ +import carb +import math +import torch +import omni.usd +from omni.kit.scripting import BehaviorScript +from isaacsim.core.prims import Articulation +from omni.isaac.core.prims import XFormPrim +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics + + +def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: + """Recursively find the full path by Prim name""" + stage = omni.usd.get_context().get_stage() + prim = stage.GetPrimAtPath(root_path) + + def _find_prim(current): + if current.GetName() == prim_name: + return current.GetPath().pathString + for child in current.GetChildren(): + result = _find_prim(child) + if result: + return result + return None + + found_path = _find_prim(prim) + if not found_path: + raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") + return found_path + + +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_15"] +JOINT_NAMES = ["RevoluteJoint_refrigerator_6_right", "RevoluteJoint_refrigerator_6_left"] +JOINT_THRESHOLD = 0.3 +LIGHT_PRIM_NAME = "refrigerator_6_light" + + +class Fridge6Control(BehaviorScript): + def on_init(self): + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.joint_limits = None + self.joint_limit_diffs = None + self.use_torch = None + self.joint_threshold = JOINT_THRESHOLD + + self.light_scopes = [XFormPrim(find_prim_path_by_name(LIGHT_PRIM_NAME))] + self.light_scopes[0].set_visibility(False) + + stage = omni.usd.get_context().get_stage() + self.joints_info = {} + for joint_name in self.joint_names: + joint_prim_path = find_prim_path_by_name(joint_name) + joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) + joint = UsdPhysics.RevoluteJoint(joint_prim_obj) + self.joints_info[joint_name] = { + "prim": joint, + "lower_limit": joint.GetLowerLimitAttr().Get(), + "upper_limit": joint.GetUpperLimitAttr().Get(), + } + + def on_play(self): + self._initialize_articulation() + + def on_stop(self): + self.light_scopes[0].set_visibility(False) + + def on_update(self, current_time: float, delta_time: float): + if delta_time <= 0: + return + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + + def apply_behavior(self): + if not self.initialized or self.art is None: + return + self.light_control() + self.damping_stiffness_change() + self.target_pose_control() + + def light_control(self): + positions = self.art.get_joint_positions().squeeze() + left_state = self._get_scalar_value(positions[self.joint_indices[0]]) + right_state = self._get_scalar_value(positions[self.joint_indices[1]]) + + doors_open = [ + left_state > math.radians(30), + right_state > math.radians(30), + ] + current_visibility = self.light_scopes[0].get_visibility() + if any(doors_open) and not current_visibility: + for light in self.light_scopes: + light.set_visibility(True) + elif not any(doors_open) and current_visibility: + for light in self.light_scopes: + light.set_visibility(False) + + def damping_stiffness_change(self): + positions = self.art.get_joint_positions().squeeze() + stage = omni.usd.get_context().get_stage() + for i, idx in enumerate(self.joint_indices): + joint_name = self.joint_names[i] + joint_state = positions[idx] + joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) + joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "angular") + joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state, i)) + + def calculate_stiffness(self, joint_state, joint_idx): + max_stiffness = 20 + min_stiffness = 2 + decay_rate = 3 + joint_state_scalar = self._get_scalar_value(joint_state) + joint_name = self.joint_names[joint_idx] + threshold = self.joint_threshold * ( + self.joints_info[joint_name]["upper_limit"] + self.joints_info[joint_name]["lower_limit"] + ) + + if abs(joint_state_scalar) >= abs(math.radians(threshold)): + return min_stiffness + + if self.use_torch and isinstance(joint_state, torch.Tensor): + stiffness = max_stiffness * torch.exp(torch.tensor(-decay_rate * abs(joint_state_scalar), device=joint_state.device)) + return float(max(min_stiffness, min(stiffness.item(), max_stiffness))) + stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state_scalar)) + return max(min_stiffness, min(stiffness, max_stiffness)) + + def target_pose_control(self): + positions = self.art.get_joint_positions().squeeze() + targets = [] + indices = [] + for i, idx in enumerate(self.joint_indices): + joint_state = self._get_scalar_value(positions[idx]) + joint_name = self.joint_names[i] + lower_limit = self.joints_info[joint_name]["lower_limit"] + upper_limit = self.joints_info[joint_name]["upper_limit"] + threshold = self.joint_threshold * (upper_limit + lower_limit) + + if abs(lower_limit) <= math.radians(abs(upper_limit)): + if joint_state > math.radians(threshold): + targets.append(math.radians(upper_limit)) + else: + targets.append(math.radians(lower_limit)) + else: + if joint_state < math.radians(threshold): + targets.append(math.radians(lower_limit)) + else: + targets.append(math.radians(upper_limit)) + indices.append(idx) + + if not targets: + return + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + self.art.apply_action(action) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + dof_limits = self.art.get_dof_limits().squeeze() + self.joint_limits = [ + {"lower": dof_limits[idx, 0], "upper": dof_limits[idx, 1]} + for idx in self.joint_indices + ] + self.joint_limit_diffs = [ + abs(lim["upper"] - lim["lower"]) for lim in self.joint_limits + ] + self.initialized = True + except AttributeError as e: + print(f"Physics not ready yet, will retry: {e}") + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) + diff --git a/Articulated_objects/major_appliances/refrigerator/refrigerator_7/model_refrigerator_7.usd b/Articulated_objects/major_appliances/refrigerator/refrigerator_7/model_refrigerator_7.usd index 08aab94a691ea7e6227ebf7967467624e962f8e7..102599abf2e1332f05471c23379b029e1875968c 100644 --- a/Articulated_objects/major_appliances/refrigerator/refrigerator_7/model_refrigerator_7.usd +++ b/Articulated_objects/major_appliances/refrigerator/refrigerator_7/model_refrigerator_7.usd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:26f3b109b64429b7eab29d5f30b9c1561cb164e005109a5fb4f628c0813d6c08 -size 5631301 +oid sha256:1ee306d3fea913204e714f4860ba7544c5b766d2bf4aa50450fa18c46d813ba9 +size 5635431 diff --git a/Articulated_objects/major_appliances/refrigerator/refrigerator_7/resource/cupboard_control.py b/Articulated_objects/major_appliances/refrigerator/refrigerator_7/resource/cupboard_control.py deleted file mode 100644 index 3b7ac67f289c8eecdb1bac37c39208709216a298..0000000000000000000000000000000000000000 --- a/Articulated_objects/major_appliances/refrigerator/refrigerator_7/resource/cupboard_control.py +++ /dev/null @@ -1,241 +0,0 @@ -import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils -from pxr import PhysxSchema, UsdGeom, UsdPhysics -import math - - -def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: - """Recursively find the full path by Prim name""" - stage = omni.usd.get_context().get_stage() - prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): - result = _find_prim(child) - if result: - return result - return None - - found_path = _find_prim(prim) - if not found_path: - raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") - return found_path - - - -# 1. prim init -# joint_prim = XFormPrim(find_prim_path_by_name("fridge_E_body_61")) -# right_revolutejoint_path = find_prim_path_by_name("RevoluteJoint_fridge_right") -# left_revolutejoint_path = find_prim_path_by_name("RevoluteJoint_fridge_left") - -# 2. articulation Root prim -root_articulation_prim = find_prim_path_by_name("E_body_9") -stage = omni.usd.get_context().get_stage() -# 3. joint name -joint_names = ["RevoluteJoint_refrigerator_7_right","RevoluteJoint_refrigerator_7_left"] -joint_threshold = 0.3 -# 4. Joint information -joints_info = {} -for joint_name in joint_names: - joint_prim_path = find_prim_path_by_name(joint_name) - joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) - joint = UsdPhysics.RevoluteJoint(joint_prim_obj) - - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() - } - -# 5. Joint limits and limit differences -joint_limits = {} -joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): - joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] - } - joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] - ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] -# 5. light prim -light_scopes=[ - XFormPrim(find_prim_path_by_name("refrigerator_7_light")) -] - -class Fridge7Control(BehaviorScript): - def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - light_scopes[0].set_visibility(False) - # light_scopes[1].set_visibility(False) - # init_pose - # self.local_pose_button, self.local_ort_button_down = joint_prim.get_local_pose() - # self.local_pose_door, self.local_ort_drawer_up = door_prim.get_local_pose() - - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - - def on_destroy(self): - pass - - def on_play(self): - # - self.simulation_context = SimulationContext( - stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 - ) - - def on_pause(self): - pass - - def on_stop(self): - self.init_start=True - # for light in light_scopes: - # light.set_visibility(False) - light_scopes[0].set_visibility(False) - # light_scopes[1].set_visibility(False) - # back to initial pose - # joint_prim.set_local_pose(translation=self.local_pose_button) - pass - - def on_update(self, current_time: float, delta_time: float): - if delta_time <= 0: - return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - - def apply_behavior(self): - self.light_control() - self.damping_stiffness_change() - self.target_pose_control() - - - def light_control(self): - self.left_joint_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - self.right_joint_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - # print("self.Joint1_state",self.Joint1_state) - # 联合判断双门状态 - doors_open = [ - self.left_joint_state > math.radians(30), - self.right_joint_state > math.radians(30) - ] - - # 灯光控制逻辑 - current_visibility = light_scopes[0].get_visibility() - if any(doors_open): - if not current_visibility: - for light in light_scopes: - light.set_visibility(True) - else: - if current_visibility: - for light in light_scopes: - light.set_visibility(False) - - # if self.right_joint_state > math.radians(30) : - # if light_scopes[0].get_visibility() == False: - # for light in light_scopes: - # light.set_visibility(True) - # # self.dc.set_dof_position_target(self.joint_handles[1], 140) - - # elif self.right_joint_state < math.radians(30): - # if light_scopes[0].get_visibility() == True: - # for light in light_scopes: - # light.set_visibility(False) - # self.dc.set_dof_position_target(self.joint_handles[1], 0) - - - def damping_stiffness_change(self): - - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API - joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) - joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "angular") - # Get joint limit difference and set stiffness - - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - def calculate_stiffness(self,joint_state): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 20 # 最大刚度 - # max_stiffness = 50 # 最大刚度 - min_stiffness = 2 # 最小刚度 - decay_rate = 3 # 衰减率 - # 使用指数衰减函数计算刚度 - if abs(joint_state) >= abs(math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit']))): - return min_stiffness - - # 计算刚度值:stiffness = max_stiffness * e^(-decay_rate * angle) - stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) - - # 确保刚度值在最小值和最大值之间 - return max(min_stiffness, min(stiffness, max_stiffness)) - - def target_pose_control(self): - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - - # print("joint_state", joint_state) - # print("joints_info[joint_names[i]]['upper_limit']", joints_info[joint_names[i]]['upper_limit']) - # Get joint limit difference - # Set target position based on joint state - if abs(joints_info[joint_names[i]]['lower_limit']) <= math.radians(abs(joints_info[joint_names[i]]['upper_limit'])): - if joint_state > math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit'])): - - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['upper_limit'])) - else: - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['lower_limit'])) - else: - if joint_state < math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit'])): - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['lower_limit'])) - else: - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['upper_limit'])) - # print("self.dc.get_dof_position_target=",self.dc.get_dof_position_target(joint_handle)) diff --git a/Articulated_objects/major_appliances/refrigerator/refrigerator_7/resource/refrigherator_control.py b/Articulated_objects/major_appliances/refrigerator/refrigerator_7/resource/refrigherator_control.py new file mode 100644 index 0000000000000000000000000000000000000000..c41dcc2e6580007cc0d5384c9ca300444addfd0d --- /dev/null +++ b/Articulated_objects/major_appliances/refrigerator/refrigerator_7/resource/refrigherator_control.py @@ -0,0 +1,207 @@ +import carb +import math +import torch +import omni.usd +from omni.kit.scripting import BehaviorScript +from isaacsim.core.prims import Articulation +from omni.isaac.core.prims import XFormPrim +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics + + +def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: + """Recursively find the full path by Prim name""" + stage = omni.usd.get_context().get_stage() + prim = stage.GetPrimAtPath(root_path) + + def _find_prim(current): + if current.GetName() == prim_name: + return current.GetPath().pathString + for child in current.GetChildren(): + result = _find_prim(child) + if result: + return result + return None + + found_path = _find_prim(prim) + if not found_path: + raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") + return found_path + + +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_9"] +JOINT_NAMES = ["RevoluteJoint_refrigerator_7_right", "RevoluteJoint_refrigerator_7_left"] +JOINT_THRESHOLD = 0.3 +LIGHT_PRIM_NAME = "refrigerator_7_light" + + +class Fridge7Control(BehaviorScript): + def on_init(self): + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.joint_limits = None + self.joint_limit_diffs = None + self.use_torch = None + self.joint_threshold = JOINT_THRESHOLD + + self.light_scopes = [XFormPrim(find_prim_path_by_name(LIGHT_PRIM_NAME))] + self.light_scopes[0].set_visibility(False) + + stage = omni.usd.get_context().get_stage() + self.joints_info = {} + for joint_name in self.joint_names: + joint_prim_path = find_prim_path_by_name(joint_name) + joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) + joint = UsdPhysics.RevoluteJoint(joint_prim_obj) + self.joints_info[joint_name] = { + "prim": joint, + "lower_limit": joint.GetLowerLimitAttr().Get(), + "upper_limit": joint.GetUpperLimitAttr().Get(), + } + + def on_play(self): + self._initialize_articulation() + + def on_stop(self): + self.light_scopes[0].set_visibility(False) + + def on_update(self, current_time: float, delta_time: float): + if delta_time <= 0: + return + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + + def apply_behavior(self): + if not self.initialized or self.art is None: + return + self.light_control() + self.damping_stiffness_change() + self.target_pose_control() + + def light_control(self): + positions = self.art.get_joint_positions().squeeze() + left_state = self._get_scalar_value(positions[self.joint_indices[0]]) + right_state = self._get_scalar_value(positions[self.joint_indices[1]]) + + doors_open = [ + left_state > math.radians(30), + right_state > math.radians(30), + ] + current_visibility = self.light_scopes[0].get_visibility() + if any(doors_open) and not current_visibility: + for light in self.light_scopes: + light.set_visibility(True) + elif not any(doors_open) and current_visibility: + for light in self.light_scopes: + light.set_visibility(False) + + def damping_stiffness_change(self): + positions = self.art.get_joint_positions().squeeze() + stage = omni.usd.get_context().get_stage() + for i, idx in enumerate(self.joint_indices): + joint_name = self.joint_names[i] + joint_state = positions[idx] + joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) + joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "angular") + joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state, i)) + + def calculate_stiffness(self, joint_state, joint_idx): + max_stiffness = 20 + min_stiffness = 2 + decay_rate = 3 + joint_state_scalar = self._get_scalar_value(joint_state) + joint_name = self.joint_names[joint_idx] + threshold = self.joint_threshold * ( + self.joints_info[joint_name]["upper_limit"] + self.joints_info[joint_name]["lower_limit"] + ) + + if abs(joint_state_scalar) >= abs(math.radians(threshold)): + return min_stiffness + + if self.use_torch and isinstance(joint_state, torch.Tensor): + stiffness = max_stiffness * torch.exp(torch.tensor(-decay_rate * abs(joint_state_scalar), device=joint_state.device)) + return float(max(min_stiffness, min(stiffness.item(), max_stiffness))) + stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state_scalar)) + return max(min_stiffness, min(stiffness, max_stiffness)) + + def target_pose_control(self): + positions = self.art.get_joint_positions().squeeze() + targets = [] + indices = [] + for i, idx in enumerate(self.joint_indices): + joint_state = self._get_scalar_value(positions[idx]) + joint_name = self.joint_names[i] + lower_limit = self.joints_info[joint_name]["lower_limit"] + upper_limit = self.joints_info[joint_name]["upper_limit"] + threshold = self.joint_threshold * (upper_limit + lower_limit) + + if abs(lower_limit) <= math.radians(abs(upper_limit)): + if joint_state > math.radians(threshold): + targets.append(math.radians(upper_limit)) + else: + targets.append(math.radians(lower_limit)) + else: + if joint_state < math.radians(threshold): + targets.append(math.radians(lower_limit)) + else: + targets.append(math.radians(upper_limit)) + indices.append(idx) + + if not targets: + return + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + self.art.apply_action(action) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + dof_limits = self.art.get_dof_limits().squeeze() + self.joint_limits = [ + {"lower": dof_limits[idx, 0], "upper": dof_limits[idx, 1]} + for idx in self.joint_indices + ] + self.joint_limit_diffs = [ + abs(lim["upper"] - lim["lower"]) for lim in self.joint_limits + ] + self.initialized = True + except AttributeError as e: + print(f"Physics not ready yet, will retry: {e}") + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) + diff --git a/Articulated_objects/major_appliances/refrigerator/refrigerator_8/model_refrigerator_8.usd b/Articulated_objects/major_appliances/refrigerator/refrigerator_8/model_refrigerator_8.usd index 6db52fbfc1ec32aaf6d59d381f652d41274dc2d8..5a4e4e741010e8a3d09aaac111b8f9a3ea19249f 100644 --- a/Articulated_objects/major_appliances/refrigerator/refrigerator_8/model_refrigerator_8.usd +++ b/Articulated_objects/major_appliances/refrigerator/refrigerator_8/model_refrigerator_8.usd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b468b55907e2bd7ac3849b59dbb49b5ca6b8a82bee23f2b6ef7c48143cc6f4af -size 5126822 +oid sha256:71459da466ff34f521ec00ed7a41e7ecb84860f1a5f09208bd8d975c867db716 +size 5131083 diff --git a/Articulated_objects/major_appliances/refrigerator/refrigerator_8/resource/cupboard_control.py b/Articulated_objects/major_appliances/refrigerator/refrigerator_8/resource/cupboard_control.py deleted file mode 100644 index 85a1dc25e72b7ef36ebdd8a86ccf6097ec61ca1e..0000000000000000000000000000000000000000 --- a/Articulated_objects/major_appliances/refrigerator/refrigerator_8/resource/cupboard_control.py +++ /dev/null @@ -1,241 +0,0 @@ -import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils -from pxr import PhysxSchema, UsdGeom, UsdPhysics -import math - - -def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: - """Recursively find the full path by Prim name""" - stage = omni.usd.get_context().get_stage() - prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): - result = _find_prim(child) - if result: - return result - return None - - found_path = _find_prim(prim) - if not found_path: - raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") - return found_path - - - -# 1. prim init -# joint_prim = XFormPrim(find_prim_path_by_name("fridge_E_body_61")) -# right_revolutejoint_path = find_prim_path_by_name("RevoluteJoint_fridge_right") -# left_revolutejoint_path = find_prim_path_by_name("RevoluteJoint_fridge_left") - -# 2. articulation Root prim -root_articulation_prim = find_prim_path_by_name("E_body_13") -stage = omni.usd.get_context().get_stage() -# 3. joint name -joint_names = ["RevoluteJoint_refrigerator_8_right","RevoluteJoint_refrigerator_8_left"] -joint_threshold = 0.3 -# 4. Joint information -joints_info = {} -for joint_name in joint_names: - joint_prim_path = find_prim_path_by_name(joint_name) - joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) - joint = UsdPhysics.RevoluteJoint(joint_prim_obj) - - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() - } - -# 5. Joint limits and limit differences -joint_limits = {} -joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): - joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] - } - joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] - ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] -# 5. light prim -light_scopes=[ - XFormPrim(find_prim_path_by_name("refrigerator_8_light")) -] - -class Fridge7Control(BehaviorScript): - def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - light_scopes[0].set_visibility(False) - # light_scopes[1].set_visibility(False) - # init_pose - # self.local_pose_button, self.local_ort_button_down = joint_prim.get_local_pose() - # self.local_pose_door, self.local_ort_drawer_up = door_prim.get_local_pose() - - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - - def on_destroy(self): - pass - - def on_play(self): - # - self.simulation_context = SimulationContext( - stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 - ) - - def on_pause(self): - pass - - def on_stop(self): - self.init_start=True - # for light in light_scopes: - # light.set_visibility(False) - light_scopes[0].set_visibility(False) - # light_scopes[1].set_visibility(False) - # back to initial pose - # joint_prim.set_local_pose(translation=self.local_pose_button) - pass - - def on_update(self, current_time: float, delta_time: float): - if delta_time <= 0: - return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - - def apply_behavior(self): - self.light_control() - self.damping_stiffness_change() - self.target_pose_control() - - - def light_control(self): - self.left_joint_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - self.right_joint_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - # print("self.Joint1_state",self.Joint1_state) - # 联合判断双门状态 - doors_open = [ - self.left_joint_state > math.radians(30), - self.right_joint_state > math.radians(30) - ] - - # 灯光控制逻辑 - current_visibility = light_scopes[0].get_visibility() - if any(doors_open): - if not current_visibility: - for light in light_scopes: - light.set_visibility(True) - else: - if current_visibility: - for light in light_scopes: - light.set_visibility(False) - - # if self.right_joint_state > math.radians(30) : - # if light_scopes[0].get_visibility() == False: - # for light in light_scopes: - # light.set_visibility(True) - # # self.dc.set_dof_position_target(self.joint_handles[1], 140) - - # elif self.right_joint_state < math.radians(30): - # if light_scopes[0].get_visibility() == True: - # for light in light_scopes: - # light.set_visibility(False) - # self.dc.set_dof_position_target(self.joint_handles[1], 0) - - - def damping_stiffness_change(self): - - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API - joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) - joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "angular") - # Get joint limit difference and set stiffness - - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - def calculate_stiffness(self,joint_state): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 20 # 最大刚度 - # max_stiffness = 50 # 最大刚度 - min_stiffness = 2 # 最小刚度 - decay_rate = 3 # 衰减率 - # 使用指数衰减函数计算刚度 - if abs(joint_state) >= abs(math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit']))): - return min_stiffness - - # 计算刚度值:stiffness = max_stiffness * e^(-decay_rate * angle) - stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) - - # 确保刚度值在最小值和最大值之间 - return max(min_stiffness, min(stiffness, max_stiffness)) - - def target_pose_control(self): - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - - # print("joint_state", joint_state) - # print("joints_info[joint_names[i]]['upper_limit']", joints_info[joint_names[i]]['upper_limit']) - # Get joint limit difference - # Set target position based on joint state - if abs(joints_info[joint_names[i]]['lower_limit']) <= math.radians(abs(joints_info[joint_names[i]]['upper_limit'])): - if joint_state > math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit'])): - - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['upper_limit'])) - else: - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['lower_limit'])) - else: - if joint_state < math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit'])): - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['lower_limit'])) - else: - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['upper_limit'])) - # print("self.dc.get_dof_position_target=",self.dc.get_dof_position_target(joint_handle)) diff --git a/Articulated_objects/major_appliances/refrigerator/refrigerator_8/resource/refrigherator_control.py b/Articulated_objects/major_appliances/refrigerator/refrigerator_8/resource/refrigherator_control.py new file mode 100644 index 0000000000000000000000000000000000000000..e1b634f78595b96b180130486badf0a11d5170c3 --- /dev/null +++ b/Articulated_objects/major_appliances/refrigerator/refrigerator_8/resource/refrigherator_control.py @@ -0,0 +1,207 @@ +import carb +import math +import torch +import omni.usd +from omni.kit.scripting import BehaviorScript +from isaacsim.core.prims import Articulation +from omni.isaac.core.prims import XFormPrim +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics + + +def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: + """Recursively find the full path by Prim name""" + stage = omni.usd.get_context().get_stage() + prim = stage.GetPrimAtPath(root_path) + + def _find_prim(current): + if current.GetName() == prim_name: + return current.GetPath().pathString + for child in current.GetChildren(): + result = _find_prim(child) + if result: + return result + return None + + found_path = _find_prim(prim) + if not found_path: + raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") + return found_path + + +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_13"] +JOINT_NAMES = ["RevoluteJoint_refrigerator_8_right", "RevoluteJoint_refrigerator_8_left"] +JOINT_THRESHOLD = 0.3 +LIGHT_PRIM_NAME = "refrigerator_8_light" + + +class Fridge7Control(BehaviorScript): + def on_init(self): + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.joint_limits = None + self.joint_limit_diffs = None + self.use_torch = None + self.joint_threshold = JOINT_THRESHOLD + + self.light_scopes = [XFormPrim(find_prim_path_by_name(LIGHT_PRIM_NAME))] + self.light_scopes[0].set_visibility(False) + + stage = omni.usd.get_context().get_stage() + self.joints_info = {} + for joint_name in self.joint_names: + joint_prim_path = find_prim_path_by_name(joint_name) + joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) + joint = UsdPhysics.RevoluteJoint(joint_prim_obj) + self.joints_info[joint_name] = { + "prim": joint, + "lower_limit": joint.GetLowerLimitAttr().Get(), + "upper_limit": joint.GetUpperLimitAttr().Get(), + } + + def on_play(self): + self._initialize_articulation() + + def on_stop(self): + self.light_scopes[0].set_visibility(False) + + def on_update(self, current_time: float, delta_time: float): + if delta_time <= 0: + return + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + + def apply_behavior(self): + if not self.initialized or self.art is None: + return + self.light_control() + self.damping_stiffness_change() + self.target_pose_control() + + def light_control(self): + positions = self.art.get_joint_positions().squeeze() + left_state = self._get_scalar_value(positions[self.joint_indices[0]]) + right_state = self._get_scalar_value(positions[self.joint_indices[1]]) + + doors_open = [ + left_state > math.radians(30), + right_state > math.radians(30), + ] + current_visibility = self.light_scopes[0].get_visibility() + if any(doors_open) and not current_visibility: + for light in self.light_scopes: + light.set_visibility(True) + elif not any(doors_open) and current_visibility: + for light in self.light_scopes: + light.set_visibility(False) + + def damping_stiffness_change(self): + positions = self.art.get_joint_positions().squeeze() + stage = omni.usd.get_context().get_stage() + for i, idx in enumerate(self.joint_indices): + joint_name = self.joint_names[i] + joint_state = positions[idx] + joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) + joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "angular") + joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state, i)) + + def calculate_stiffness(self, joint_state, joint_idx): + max_stiffness = 20 + min_stiffness = 2 + decay_rate = 3 + joint_state_scalar = self._get_scalar_value(joint_state) + joint_name = self.joint_names[joint_idx] + threshold = self.joint_threshold * ( + self.joints_info[joint_name]["upper_limit"] + self.joints_info[joint_name]["lower_limit"] + ) + + if abs(joint_state_scalar) >= abs(math.radians(threshold)): + return min_stiffness + + if self.use_torch and isinstance(joint_state, torch.Tensor): + stiffness = max_stiffness * torch.exp(torch.tensor(-decay_rate * abs(joint_state_scalar), device=joint_state.device)) + return float(max(min_stiffness, min(stiffness.item(), max_stiffness))) + stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state_scalar)) + return max(min_stiffness, min(stiffness, max_stiffness)) + + def target_pose_control(self): + positions = self.art.get_joint_positions().squeeze() + targets = [] + indices = [] + for i, idx in enumerate(self.joint_indices): + joint_state = self._get_scalar_value(positions[idx]) + joint_name = self.joint_names[i] + lower_limit = self.joints_info[joint_name]["lower_limit"] + upper_limit = self.joints_info[joint_name]["upper_limit"] + threshold = self.joint_threshold * (upper_limit + lower_limit) + + if abs(lower_limit) <= math.radians(abs(upper_limit)): + if joint_state > math.radians(threshold): + targets.append(math.radians(upper_limit)) + else: + targets.append(math.radians(lower_limit)) + else: + if joint_state < math.radians(threshold): + targets.append(math.radians(lower_limit)) + else: + targets.append(math.radians(upper_limit)) + indices.append(idx) + + if not targets: + return + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + self.art.apply_action(action) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + dof_limits = self.art.get_dof_limits().squeeze() + self.joint_limits = [ + {"lower": dof_limits[idx, 0], "upper": dof_limits[idx, 1]} + for idx in self.joint_indices + ] + self.joint_limit_diffs = [ + abs(lim["upper"] - lim["lower"]) for lim in self.joint_limits + ] + self.initialized = True + except AttributeError as e: + print(f"Physics not ready yet, will retry: {e}") + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) + diff --git a/Articulated_objects/small_appliances/microwave/microwave_1/model_microwave_1.usd b/Articulated_objects/small_appliances/microwave/microwave_1/model_microwave_1.usd index 40e81466d80a5a9ef8fc86f8af8564cbf58da7af..349ec1a6f0a5cf88f335bc03f0c8d5f951a57e8f 100644 --- a/Articulated_objects/small_appliances/microwave/microwave_1/model_microwave_1.usd +++ b/Articulated_objects/small_appliances/microwave/microwave_1/model_microwave_1.usd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fcae691f3a83c457ade0d7b63909739c1f9e9ca19c0f3b37a86d9b94582c8c76 -size 24540 +oid sha256:ebf25865c2f3130f9869913ccc5c577355895dac4e7ab526e5b1c2d9fdf991b9 +size 28263 diff --git a/Articulated_objects/small_appliances/microwave/microwave_1/resource/oven_control.py b/Articulated_objects/small_appliances/microwave/microwave_1/resource/oven_control.py index d5506a0789e00d4b028d87710591ab254d3d1c6b..aa4864b299ee26783919907eca7b832d0cc523c3 100644 --- a/Articulated_objects/small_appliances/microwave/microwave_1/resource/oven_control.py +++ b/Articulated_objects/small_appliances/microwave/microwave_1/resource/oven_control.py @@ -1,195 +1,200 @@ import carb +import math +import torch +import omni.usd from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands +from omni.isaac.core import SimulationContext from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import PhysxSchema, UsdGeom, UsdPhysics -import math -from omni.isaac.core import SimulationContext, World -# from isaacsim.core.prims import XFormPrim -# stiffness :0.8 Damping: 0.05 +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): + + def _find_prim(current): + if current.GetName() == prim_name: + return current.GetPath().pathString + for child in current.GetChildren(): result = _find_prim(child) if result: return result return None - + found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path -# # 1. prim init -# button_prim = XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Xform") -# door_prim = XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/oven/oven_door") -# # 2. articulation Root prim -# root_articulation_prim = "/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/oven/oven_base" -# # 3. joint name -# joint_names = ["PrismaticJoint", "RevoluteJoint"] -# # 4. joint num -# num_arm_dof = 2 - -# light_scopes=[XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Lights_on"), -# XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Lights_on_1"), -# ] -# for i in range(0, light_scopes.__len__()): -# light_scopes[i].set_visibility(False) -# index = random.randint(0, len(light_scopes)-1) -# light_scopes[index].set_visibility(True) + button_prim = XFormPrim(find_prim_path_by_name("E_switch_11")) print("button_prim", button_prim.prim_path) -# door_prim = XFormPrim(find_prim_path_by_name("oven_E_door_4")) -# print("door_prim", door_prim.prim_path) root_articulation_prim = find_prim_path_by_name("E_body_12") print("root_articulation_prim", root_articulation_prim) -joint_names = ["PrismaticJoint_microwave_1_down", "RevoluteJoint_microwave_1_left"] -light_scopes=[XFormPrim(find_prim_path_by_name("light")) - ] +light_scopes = [XFormPrim(find_prim_path_by_name("light"))] revolutejoint_path = find_prim_path_by_name("RevoluteJoint_microwave_1_left") +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_12"] +JOINT_NAMES = [ + "PrismaticJoint_microwave_1_down", + "RevoluteJoint_microwave_1_left", +] +BUTTON_PRESS_THRESHOLD = 0.003 +BUTTON_PRESS_MODE = "greater" class MicrowaveOverControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - light_scopes[0].set_visibility(False) - self.Stiffness_max = 0.8 - self.Stiffness_min = 0.08 - - # 初始化门的锁定状态 + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.joint_limits = None + self.use_torch = None + + self.light_scopes = light_scopes + self.light_scopes[0].set_visibility(False) + self.Stiffness_max = 10 + self.Stiffness_min = 1 self.door_locked = True - - # init_pose + self.button_target = None + self.door_target = None + self.button_press_threshold = BUTTON_PRESS_THRESHOLD + self.button_press_mode = BUTTON_PRESS_MODE + self.local_pose_button, self.local_ort_drawer_down = button_prim.get_local_pose() - # self.local_pose_door, self.local_ort_drawer_up = door_prim.get_local_pose() - - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') + stage = omni.usd.get_context().get_stage() self.revoluteJoint_drive_path = stage.GetPrimAtPath(revolutejoint_path) self.revoluteJoint_drive = UsdPhysics.DriveAPI.Get(self.revoluteJoint_drive_path, "angular") - - - def on_destroy(self): - pass def on_play(self): self.simulation_context = SimulationContext( stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 + physics_dt=1.0 / 120, + rendering_dt=1.0 / 120, ) - - def on_pause(self): - pass - def on_stop(self): - self.init_start=True - light_scopes[0].set_visibility(False) - # back to initial pose - # button_prim.set_local_pose(translation=self.local_pose_button) - # door_prim.set_local_pose(translation=self.local_pose_door) + self.light_scopes[0].set_visibility(False) self.door_locked = True + self.button_target = None + self.door_target = None carb.log_info(f"{type(self).__name__}.on_stop()->{self.prim_path}") - pass + if self.revoluteJoint_drive: + self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_max) def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.dc = _dynamic_control.acquire_dynamic_control_interface() - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - # print("self.joint_handles",self.joint_handles) + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): - self.oven_control() - - # def oven_control(self): - # self.Joint0_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - # self.Joint1_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - # # print("self.Joint0_state", self.Joint0_state) - # # print("self.Joint1_state", self.Joint1_state) - # # 按钮被按下且门处于锁定状态 - # if self.Joint0_state < -0.001 and self.door_locked: - # self.dc.set_dof_position_target(self.joint_handles[1], math.radians(-90)) - # # if self.Joint1_state > math.radians(100): - # # self.door_locked = False # 解除锁定 - - # # 门开到30度后开灯,按钮归位s - # if self.Joint1_state < math.radians(-30) : - # self.door_locked = False # 解除锁定 - # light_scopes[0].set_visibility(True) - # self.dc.set_dof_position_target(self.joint_handles[0], 0) - - # # 检测手动关门 - # if self.Joint1_state > math.radians(-20) and not self.door_locked: # 当门接近关闭位置时 - - # self.dc.set_dof_position_target(self.joint_handles[1], 0) # 设置目标位置为0 - # self.door_locked = True - # if self.Joint1_state < math.radians(5): # 当门完全关闭时 - # # 锁定门 - # self.door_locked = True - # light_scopes[0].set_visibility(False) # 关闭灯 - def oven_control(self): - - self.Joint0_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - self.Joint1_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - # print("self.Joint0_state", self.Joint0_state) - # print("self.Joint1_state", self.Joint1_state) - # 按钮被按下且门处于锁定状态 - if self.Joint0_state > 0.003 and self.door_locked: - self.dc.set_dof_position_target(self.joint_handles[1], math.radians(-50)) - # if self.Joint1_state > math.radians(100): - # self.door_locked = False # 解除锁定 - - # 门开到30度后开灯,按钮归位s - if self.Joint1_state < math.radians(-30) : - self.door_locked = False # 解除锁定 - light_scopes[0].set_visibility(True) - self.dc.set_dof_position_target(self.joint_handles[0], 0) - - if abs(self.Joint1_state - math.radians(-50)) < math.radians(0.5) : - self.dc.set_dof_position_target(self.joint_handles[1], math.radians(-78)) - self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_min) - - - # 检测手动关门 - if self.Joint1_state > math.radians(-20) and not self.door_locked: # 当门接近关闭位置时 - - self.dc.set_dof_position_target(self.joint_handles[1], 0) # 设置目标位置为0 - self.door_locked = True - if self.Joint1_state < math.radians(5): # 当门完全关闭时 - # 锁定门 + if not self.initialized or self.art is None: + return + self._control_door() + + def _control_door(self): + positions = self.art.get_joint_positions().squeeze() + button_state = self._get_scalar_value(positions[self.joint_indices[0]]) + door_state = self._get_scalar_value(positions[self.joint_indices[1]]) + + if self.button_target is None: + self.button_target = button_state + if self.door_target is None: + self.door_target = door_state + + if self._button_pressed(button_state) and self.door_locked: + print("button_pressed And open door") + self.door_target = math.radians(-50) + if door_state < math.radians(-30): + self.door_locked = False + self.light_scopes[0].set_visibility(True) + self.button_target = 0.0 + + if abs(door_state - math.radians(-50)) < math.radians(0.5): + self.door_target = math.radians(-78) + if self.revoluteJoint_drive: + self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_min) + + if door_state > math.radians(-20) and not self.door_locked: + print("locked door") + self.door_target = 0.0 + if door_state < math.radians(5): self.door_locked = True - light_scopes[0].set_visibility(False) # 关闭灯 - self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_max) + self.button_target = 0.0 + self.light_scopes[0].set_visibility(False) + if self.revoluteJoint_drive: + self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_max) + + targets = [] + indices = [] + if self.button_target is not None: + targets.append(self.button_target) + indices.append(self.joint_indices[0]) + if self.door_target is not None: + targets.append(self.door_target) + indices.append(self.joint_indices[1]) + + if not targets: + return + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + + self.art.apply_action(action) + + def _button_pressed(self, value: float) -> bool: + if self.button_press_mode == "greater": + return value > self.button_press_threshold + return value < self.button_press_threshold + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + dof_limits = self.art.get_dof_limits().squeeze() + self.joint_limits = [ + {"lower": dof_limits[idx, 0], "upper": dof_limits[idx, 1]} + for idx in self.joint_indices + ] + self.initialized = True + except AttributeError as exc: + print(f"Physics not ready yet, will retry: {exc}") + return diff --git a/Articulated_objects/small_appliances/microwave/microwave_2/model_microwave_2.usda b/Articulated_objects/small_appliances/microwave/microwave_2/model_microwave_2.usda index f187362ec0c6722752daea3f5da0a189badb1af5..7c7c54b2a98da610f80b4958558fde324072e8ca 100644 --- a/Articulated_objects/small_appliances/microwave/microwave_2/model_microwave_2.usda +++ b/Articulated_objects/small_appliances/microwave/microwave_2/model_microwave_2.usda @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2bf3d192add9d0cd7884abcf988b9557764f30543223d5861629a572bf787792 -size 421434 +oid sha256:8c0a91d0f23659540175b4b0c835776c9ac272a8a18b6786447fc50ed907028f +size 424809 diff --git a/Articulated_objects/small_appliances/microwave/microwave_2/resource/oven_control.py b/Articulated_objects/small_appliances/microwave/microwave_2/resource/oven_control.py index cec2ae6e5c6c9dd3f6d616d05be654412e31ae7e..f65c40f2d8f87d468f7692f189de02b36b8b2b2a 100644 --- a/Articulated_objects/small_appliances/microwave/microwave_2/resource/oven_control.py +++ b/Articulated_objects/small_appliances/microwave/microwave_2/resource/oven_control.py @@ -1,195 +1,198 @@ import carb +import math +import torch +import omni.usd from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands +from omni.isaac.core import SimulationContext from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import PhysxSchema, UsdGeom, UsdPhysics -import math -from omni.isaac.core import SimulationContext, World -# from isaacsim.core.prims import XFormPrim -# stiffness :0.8 Damping: 0.05 +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): + + def _find_prim(current): + if current.GetName() == prim_name: + return current.GetPath().pathString + for child in current.GetChildren(): result = _find_prim(child) if result: return result return None - + found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path -# # 1. prim init -# button_prim = XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Xform") -# door_prim = XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/oven/oven_door") -# # 2. articulation Root prim -# root_articulation_prim = "/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/oven/oven_base" -# # 3. joint name -# joint_names = ["PrismaticJoint", "RevoluteJoint"] -# # 4. joint num -# num_arm_dof = 2 - -# light_scopes=[XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Lights_on"), -# XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Lights_on_1"), -# ] -# for i in range(0, light_scopes.__len__()): -# light_scopes[i].set_visibility(False) -# index = random.randint(0, len(light_scopes)-1) -# light_scopes[index].set_visibility(True) + button_prim = XFormPrim(find_prim_path_by_name("E_switch_10")) print("button_prim", button_prim.prim_path) -# door_prim = XFormPrim(find_prim_path_by_name("oven_E_door_4")) -# print("door_prim", door_prim.prim_path) root_articulation_prim = find_prim_path_by_name("E_body_3") print("root_articulation_prim", root_articulation_prim) -joint_names = ["PrismaticJoint_microwave_2_left", "RevoluteJoint_microwave_2_left"] -light_scopes=[XFormPrim(find_prim_path_by_name("light")) - ] +light_scopes = [XFormPrim(find_prim_path_by_name("light"))] revolutejoint_path = find_prim_path_by_name("RevoluteJoint_microwave_2_left") +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_3"] +JOINT_NAMES = [ + "PrismaticJoint_microwave_2_left", + "RevoluteJoint_microwave_2_left", +] +BUTTON_PRESS_THRESHOLD = 0.001 +BUTTON_PRESS_MODE = "greater" class MicrowaveOverControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - light_scopes[0].set_visibility(False) - self.Stiffness_max = 0.8 - self.Stiffness_min = 0.08 - - # 初始化门的锁定状态 + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.joint_limits = None + self.use_torch = None + + self.light_scopes = light_scopes + self.light_scopes[0].set_visibility(False) + self.Stiffness_max = 8 + self.Stiffness_min = 0.8 self.door_locked = True - - # init_pose + self.button_target = None + self.door_target = None + self.button_press_threshold = BUTTON_PRESS_THRESHOLD + self.button_press_mode = BUTTON_PRESS_MODE + self.local_pose_button, self.local_ort_drawer_down = button_prim.get_local_pose() - # self.local_pose_door, self.local_ort_drawer_up = door_prim.get_local_pose() - - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') + stage = omni.usd.get_context().get_stage() self.revoluteJoint_drive_path = stage.GetPrimAtPath(revolutejoint_path) self.revoluteJoint_drive = UsdPhysics.DriveAPI.Get(self.revoluteJoint_drive_path, "angular") - - - def on_destroy(self): - pass def on_play(self): self.simulation_context = SimulationContext( stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 + physics_dt=1.0 / 120, + rendering_dt=1.0 / 120, ) - - def on_pause(self): - pass - def on_stop(self): - self.init_start=True - light_scopes[0].set_visibility(False) - # back to initial pose - # button_prim.set_local_pose(translation=self.local_pose_button) - # door_prim.set_local_pose(translation=self.local_pose_door) + self.light_scopes[0].set_visibility(False) self.door_locked = True + self.button_target = None + self.door_target = None + if self.revoluteJoint_drive: + self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_max) carb.log_info(f"{type(self).__name__}.on_stop()->{self.prim_path}") - pass def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.dc = _dynamic_control.acquire_dynamic_control_interface() - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - # print("self.joint_handles",self.joint_handles) + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): - self.oven_control() - - # def oven_control(self): - # self.Joint0_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - # self.Joint1_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - # # print("self.Joint0_state", self.Joint0_state) - # # print("self.Joint1_state", self.Joint1_state) - # # 按钮被按下且门处于锁定状态 - # if self.Joint0_state < -0.001 and self.door_locked: - # self.dc.set_dof_position_target(self.joint_handles[1], math.radians(-90)) - # # if self.Joint1_state > math.radians(100): - # # self.door_locked = False # 解除锁定 - - # # 门开到30度后开灯,按钮归位s - # if self.Joint1_state < math.radians(-30) : - # self.door_locked = False # 解除锁定 - # light_scopes[0].set_visibility(True) - # self.dc.set_dof_position_target(self.joint_handles[0], 0) - - # # 检测手动关门 - # if self.Joint1_state > math.radians(-20) and not self.door_locked: # 当门接近关闭位置时 - - # self.dc.set_dof_position_target(self.joint_handles[1], 0) # 设置目标位置为0 - # self.door_locked = True - # if self.Joint1_state < math.radians(5): # 当门完全关闭时 - # # 锁定门 - # self.door_locked = True - # light_scopes[0].set_visibility(False) # 关闭灯 - def oven_control(self): - - self.Joint0_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - self.Joint1_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - # print("self.Joint0_state", self.Joint0_state) - # print("self.Joint1_state", self.Joint1_state) - # 按钮被按下且门处于锁定状态 - if self.Joint0_state > 0.001 and self.door_locked: - self.dc.set_dof_position_target(self.joint_handles[1], math.radians(-50)) - # if self.Joint1_state > math.radians(100): - # self.door_locked = False # 解除锁定 - - # 门开到30度后开灯,按钮归位s - if self.Joint1_state < math.radians(-30) : - self.door_locked = False # 解除锁定 - light_scopes[0].set_visibility(True) - self.dc.set_dof_position_target(self.joint_handles[0], 0) - - if abs(self.Joint1_state - math.radians(-50)) < math.radians(0.5) : - self.dc.set_dof_position_target(self.joint_handles[1], math.radians(-78)) - self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_min) - - - # 检测手动关门 - if self.Joint1_state > math.radians(-20) and not self.door_locked: # 当门接近关闭位置时 - - self.dc.set_dof_position_target(self.joint_handles[1], 0) # 设置目标位置为0 - self.door_locked = True - if self.Joint1_state < math.radians(5): # 当门完全关闭时 - # 锁定门 + if not self.initialized or self.art is None: + return + self._control_door() + + def _control_door(self): + positions = self.art.get_joint_positions().squeeze() + button_state = self._get_scalar_value(positions[self.joint_indices[0]]) + door_state = self._get_scalar_value(positions[self.joint_indices[1]]) + + if self.button_target is None: + self.button_target = button_state + if self.door_target is None: + self.door_target = door_state + + if self._button_pressed(button_state) and self.door_locked: + self.door_target = math.radians(-50) + if door_state < math.radians(-30): + self.door_locked = False + self.light_scopes[0].set_visibility(True) + self.button_target = 0.0 + + if abs(door_state - math.radians(-50)) < math.radians(0.5): + self.door_target = math.radians(-78) + if self.revoluteJoint_drive: + self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_min) + + if door_state > math.radians(-20) and not self.door_locked: + self.door_target = 0.0 + if door_state < math.radians(5): self.door_locked = True - light_scopes[0].set_visibility(False) # 关闭灯 - self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_max) + self.button_target = 0.0 + self.light_scopes[0].set_visibility(False) + if self.revoluteJoint_drive: + self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_max) + + targets = [] + indices = [] + if self.button_target is not None: + targets.append(self.button_target) + indices.append(self.joint_indices[0]) + if self.door_target is not None: + targets.append(self.door_target) + indices.append(self.joint_indices[1]) + + if not targets: + return + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + + self.art.apply_action(action) + + def _button_pressed(self, value: float) -> bool: + if self.button_press_mode == "greater": + return value > self.button_press_threshold + return value < self.button_press_threshold + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + dof_limits = self.art.get_dof_limits().squeeze() + self.joint_limits = [ + {"lower": dof_limits[idx, 0], "upper": dof_limits[idx, 1]} + for idx in self.joint_indices + ] + self.initialized = True + except AttributeError as exc: + print(f"Physics not ready yet, will retry: {exc}") + return diff --git a/Articulated_objects/small_appliances/microwave/microwave_3/model_microwave_3.usd b/Articulated_objects/small_appliances/microwave/microwave_3/model_microwave_3.usd index c4713fe715a31187bc19c7344035d008861049bb..48defeb520f796d6e8e5e35c59418c1342a97ee6 100644 --- a/Articulated_objects/small_appliances/microwave/microwave_3/model_microwave_3.usd +++ b/Articulated_objects/small_appliances/microwave/microwave_3/model_microwave_3.usd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cfdc8f13f3be686e512db524155986916a326553a18b1fecafff65b97b2726a2 -size 582534 +oid sha256:0d520e55f61005f655c98813fa627b7e459c03dee6cb87913e3d4694147ea2b0 +size 586256 diff --git a/Articulated_objects/small_appliances/microwave/microwave_3/resource/oven_control.py b/Articulated_objects/small_appliances/microwave/microwave_3/resource/oven_control.py index 8bc60b5c6a295068928b103682a4b6da9dc777a7..3c6ec033b0651c9ae75946c92e3d882879124543 100644 --- a/Articulated_objects/small_appliances/microwave/microwave_3/resource/oven_control.py +++ b/Articulated_objects/small_appliances/microwave/microwave_3/resource/oven_control.py @@ -1,195 +1,198 @@ import carb +import math +import torch +import omni.usd from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands +from omni.isaac.core import SimulationContext from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import PhysxSchema, UsdGeom, UsdPhysics -import math -from omni.isaac.core import SimulationContext, World -# from isaacsim.core.prims import XFormPrim -# stiffness :0.8 Damping: 0.05 +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): + + def _find_prim(current): + if current.GetName() == prim_name: + return current.GetPath().pathString + for child in current.GetChildren(): result = _find_prim(child) if result: return result return None - + found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path -# # 1. prim init -# button_prim = XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Xform") -# door_prim = XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/oven/oven_door") -# # 2. articulation Root prim -# root_articulation_prim = "/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/oven/oven_base" -# # 3. joint name -# joint_names = ["PrismaticJoint", "RevoluteJoint"] -# # 4. joint num -# num_arm_dof = 2 - -# light_scopes=[XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Lights_on"), -# XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Lights_on_1"), -# ] -# for i in range(0, light_scopes.__len__()): -# light_scopes[i].set_visibility(False) -# index = random.randint(0, len(light_scopes)-1) -# light_scopes[index].set_visibility(True) + button_prim = XFormPrim(find_prim_path_by_name("E_switch_1_8")) -print("button_prim", button_prim.prim_path) -# door_prim = XFormPrim(find_prim_path_by_name("oven_E_door_4")) -# print("door_prim", door_prim.prim_path) +# print("button_prim", button_prim.prim_path) root_articulation_prim = find_prim_path_by_name("E_body_3") print("root_articulation_prim", root_articulation_prim) -joint_names = ["PrismaticJoint_microwave_3_left", "RevoluteJoint_microwave_3_left"] -light_scopes=[XFormPrim(find_prim_path_by_name("light")) - ] +light_scopes = [XFormPrim(find_prim_path_by_name("light"))] revolutejoint_path = find_prim_path_by_name("RevoluteJoint_microwave_3_left") +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_3"] +JOINT_NAMES = [ + "PrismaticJoint_microwave_3_left", + "RevoluteJoint_microwave_3_left", +] +BUTTON_PRESS_THRESHOLD = 0.001 +BUTTON_PRESS_MODE = "greater" class MicrowaveOverControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - light_scopes[0].set_visibility(False) - self.Stiffness_max = 0.8 - self.Stiffness_min = 0.08 - - # 初始化门的锁定状态 + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.joint_limits = None + self.use_torch = None + + self.light_scopes = light_scopes + self.light_scopes[0].set_visibility(False) + self.Stiffness_max = 10 + self.Stiffness_min = 1 self.door_locked = True - - # init_pose + self.button_target = None + self.door_target = None + self.button_press_threshold = BUTTON_PRESS_THRESHOLD + self.button_press_mode = BUTTON_PRESS_MODE + self.local_pose_button, self.local_ort_drawer_down = button_prim.get_local_pose() - # self.local_pose_door, self.local_ort_drawer_up = door_prim.get_local_pose() - - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') + stage = omni.usd.get_context().get_stage() self.revoluteJoint_drive_path = stage.GetPrimAtPath(revolutejoint_path) self.revoluteJoint_drive = UsdPhysics.DriveAPI.Get(self.revoluteJoint_drive_path, "angular") - - - def on_destroy(self): - pass def on_play(self): self.simulation_context = SimulationContext( stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 + physics_dt=1.0 / 120, + rendering_dt=1.0 / 120, ) - - def on_pause(self): - pass - def on_stop(self): - self.init_start=True - light_scopes[0].set_visibility(False) - # back to initial pose - # button_prim.set_local_pose(translation=self.local_pose_button) - # door_prim.set_local_pose(translation=self.local_pose_door) + self.light_scopes[0].set_visibility(False) self.door_locked = True + self.button_target = None + self.door_target = None carb.log_info(f"{type(self).__name__}.on_stop()->{self.prim_path}") - pass + if self.revoluteJoint_drive: + self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_max) def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.dc = _dynamic_control.acquire_dynamic_control_interface() - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - # print("self.joint_handles",self.joint_handles) + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): - self.oven_control() - - # def oven_control(self): - # self.Joint0_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - # self.Joint1_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - # # print("self.Joint0_state", self.Joint0_state) - # # print("self.Joint1_state", self.Joint1_state) - # # 按钮被按下且门处于锁定状态 - # if self.Joint0_state < -0.001 and self.door_locked: - # self.dc.set_dof_position_target(self.joint_handles[1], math.radians(-90)) - # # if self.Joint1_state > math.radians(100): - # # self.door_locked = False # 解除锁定 - - # # 门开到30度后开灯,按钮归位s - # if self.Joint1_state < math.radians(-30) : - # self.door_locked = False # 解除锁定 - # light_scopes[0].set_visibility(True) - # self.dc.set_dof_position_target(self.joint_handles[0], 0) - - # # 检测手动关门 - # if self.Joint1_state > math.radians(-20) and not self.door_locked: # 当门接近关闭位置时 - - # self.dc.set_dof_position_target(self.joint_handles[1], 0) # 设置目标位置为0 - # self.door_locked = True - # if self.Joint1_state < math.radians(5): # 当门完全关闭时 - # # 锁定门 - # self.door_locked = True - # light_scopes[0].set_visibility(False) # 关闭灯 - def oven_control(self): - - self.Joint0_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - self.Joint1_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - # print("self.Joint0_state", self.Joint0_state) - # print("self.Joint1_state", self.Joint1_state) - # 按钮被按下且门处于锁定状态 - if self.Joint0_state > 0.001 and self.door_locked: - self.dc.set_dof_position_target(self.joint_handles[1], math.radians(-50)) - # if self.Joint1_state > math.radians(100): - # self.door_locked = False # 解除锁定 - - # 门开到30度后开灯,按钮归位s - if self.Joint1_state < math.radians(-30) : - self.door_locked = False # 解除锁定 - light_scopes[0].set_visibility(True) - self.dc.set_dof_position_target(self.joint_handles[0], 0) - - if abs(self.Joint1_state - math.radians(-50)) < math.radians(0.5) : - self.dc.set_dof_position_target(self.joint_handles[1], math.radians(-78)) - self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_min) - - - # 检测手动关门 - if self.Joint1_state > math.radians(-20) and not self.door_locked: # 当门接近关闭位置时 - - self.dc.set_dof_position_target(self.joint_handles[1], 0) # 设置目标位置为0 - self.door_locked = True - if self.Joint1_state < math.radians(5): # 当门完全关闭时 - # 锁定门 + if not self.initialized or self.art is None: + return + self._control_door() + + def _control_door(self): + positions = self.art.get_joint_positions().squeeze() + button_state = self._get_scalar_value(positions[self.joint_indices[0]]) + door_state = self._get_scalar_value(positions[self.joint_indices[1]]) + + if self.button_target is None: + self.button_target = button_state + if self.door_target is None: + self.door_target = door_state + + if self._button_pressed(button_state) and self.door_locked: + self.door_target = math.radians(-50) + if door_state < math.radians(-30): + self.door_locked = False + self.light_scopes[0].set_visibility(True) + self.button_target = 0.0 + + if abs(door_state - math.radians(-50)) < math.radians(0.5): + self.door_target = math.radians(-78) + if self.revoluteJoint_drive: + self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_min) + + if door_state > math.radians(-20) and not self.door_locked: + self.door_target = 0.0 + if door_state < math.radians(5): self.door_locked = True - light_scopes[0].set_visibility(False) # 关闭灯 - self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_max) + self.button_target = 0.0 + self.light_scopes[0].set_visibility(False) + if self.revoluteJoint_drive: + self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_max) + + targets = [] + indices = [] + if self.button_target is not None: + targets.append(self.button_target) + indices.append(self.joint_indices[0]) + if self.door_target is not None: + targets.append(self.door_target) + indices.append(self.joint_indices[1]) + + if not targets: + return + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + + self.art.apply_action(action) + + def _button_pressed(self, value: float) -> bool: + if self.button_press_mode == "greater": + return value > self.button_press_threshold + return value < self.button_press_threshold + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + dof_limits = self.art.get_dof_limits().squeeze() + self.joint_limits = [ + {"lower": dof_limits[idx, 0], "upper": dof_limits[idx, 1]} + for idx in self.joint_indices + ] + self.initialized = True + except AttributeError as exc: + print(f"Physics not ready yet, will retry: {exc}") + return diff --git a/Articulated_objects/small_appliances/oven/oven_2/resource/oven_control.py b/Articulated_objects/small_appliances/oven/oven_2/resource/oven_control.py index b3c70d51d06484cc5038a9d2ab878594a22e8420..0ad2bc358adf9c5c3dc774ba26dd759c3a882617 100644 --- a/Articulated_objects/small_appliances/oven/oven_2/resource/oven_control.py +++ b/Articulated_objects/small_appliances/oven/oven_2/resource/oven_control.py @@ -1,195 +1,196 @@ import carb +import math +import torch +import omni.usd from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands +from omni.isaac.core import SimulationContext from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import PhysxSchema, UsdGeom, UsdPhysics -import math -from omni.isaac.core import SimulationContext, World -# from isaacsim.core.prims import XFormPrim -# stiffness :0.8 Damping: 0.05 +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): + + def _find_prim(current): + if current.GetName() == prim_name: + return current.GetPath().pathString + for child in current.GetChildren(): result = _find_prim(child) if result: return result return None - + found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path -# # 1. prim init -# button_prim = XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Xform") -# door_prim = XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/oven/oven_door") -# # 2. articulation Root prim -# root_articulation_prim = "/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/oven/oven_base" -# # 3. joint name -# joint_names = ["PrismaticJoint", "RevoluteJoint"] -# # 4. joint num -# num_arm_dof = 2 - -# light_scopes=[XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Lights_on"), -# XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Lights_on_1"), -# ] -# for i in range(0, light_scopes.__len__()): -# light_scopes[i].set_visibility(False) -# index = random.randint(0, len(light_scopes)-1) -# light_scopes[index].set_visibility(True) + button_prim = XFormPrim(find_prim_path_by_name("oven_E_button_5")) print("button_prim", button_prim.prim_path) -# door_prim = XFormPrim(find_prim_path_by_name("oven_E_door_4")) -# print("door_prim", door_prim.prim_path) root_articulation_prim = find_prim_path_by_name("oven_E_body_7") print("root_articulation_prim", root_articulation_prim) -joint_names = ["PrismaticJoint_oven_down", "RevoluteJoint_oven_up"] -light_scopes=[XFormPrim(find_prim_path_by_name("oven_light")) - ] +light_scopes = [XFormPrim(find_prim_path_by_name("oven_light"))] revolutejoint_path = find_prim_path_by_name("RevoluteJoint_oven_up") +POSSIBLE_ASSET_ROOT_NAMES = ["oven_E_body_7"] +JOINT_NAMES = [ + "PrismaticJoint_oven_down", + "RevoluteJoint_oven_up", +] +BUTTON_PRESS_THRESHOLD = -0.001 +BUTTON_PRESS_MODE = "less" class MicrowaveOverControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - light_scopes[0].set_visibility(False) + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.joint_limits = None + self.use_torch = None + + self.light_scopes = light_scopes + self.light_scopes[0].set_visibility(False) self.Stiffness_max = 0.8 self.Stiffness_min = 0.08 - - # 初始化门的锁定状态 self.door_locked = True - - # init_pose + self.button_target = None + self.door_target = None + self.button_press_threshold = BUTTON_PRESS_THRESHOLD + self.button_press_mode = BUTTON_PRESS_MODE + self.local_pose_button, self.local_ort_drawer_down = button_prim.get_local_pose() - # self.local_pose_door, self.local_ort_drawer_up = door_prim.get_local_pose() - - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') + stage = omni.usd.get_context().get_stage() self.revoluteJoint_drive_path = stage.GetPrimAtPath(revolutejoint_path) self.revoluteJoint_drive = UsdPhysics.DriveAPI.Get(self.revoluteJoint_drive_path, "angular") - - - def on_destroy(self): - pass def on_play(self): self.simulation_context = SimulationContext( stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 + physics_dt=1.0 / 120, + rendering_dt=1.0 / 120, ) - - def on_pause(self): - pass - def on_stop(self): - self.init_start=True - light_scopes[0].set_visibility(False) - # back to initial pose - # button_prim.set_local_pose(translation=self.local_pose_button) - # door_prim.set_local_pose(translation=self.local_pose_door) + self.light_scopes[0].set_visibility(False) self.door_locked = True + self.button_target = None + self.door_target = None carb.log_info(f"{type(self).__name__}.on_stop()->{self.prim_path}") - pass def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.dc = _dynamic_control.acquire_dynamic_control_interface() - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - # print("self.joint_handles",self.joint_handles) + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): - self.oven_control() - - # def oven_control(self): - # self.Joint0_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - # self.Joint1_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - # # print("self.Joint0_state", self.Joint0_state) - # # print("self.Joint1_state", self.Joint1_state) - # # 按钮被按下且门处于锁定状态 - # if self.Joint0_state < -0.001 and self.door_locked: - # self.dc.set_dof_position_target(self.joint_handles[1], math.radians(-90)) - # # if self.Joint1_state > math.radians(100): - # # self.door_locked = False # 解除锁定 - - # # 门开到30度后开灯,按钮归位s - # if self.Joint1_state < math.radians(-30) : - # self.door_locked = False # 解除锁定 - # light_scopes[0].set_visibility(True) - # self.dc.set_dof_position_target(self.joint_handles[0], 0) - - # # 检测手动关门 - # if self.Joint1_state > math.radians(-20) and not self.door_locked: # 当门接近关闭位置时 - - # self.dc.set_dof_position_target(self.joint_handles[1], 0) # 设置目标位置为0 - # self.door_locked = True - # if self.Joint1_state < math.radians(5): # 当门完全关闭时 - # # 锁定门 - # self.door_locked = True - # light_scopes[0].set_visibility(False) # 关闭灯 - def oven_control(self): - - self.Joint0_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - self.Joint1_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - # print("self.Joint0_state", self.Joint0_state) - # print("self.Joint1_state", self.Joint1_state) - # 按钮被按下且门处于锁定状态 - if self.Joint0_state < -0.001 and self.door_locked: - self.dc.set_dof_position_target(self.joint_handles[1], math.radians(-50)) - # if self.Joint1_state > math.radians(100): - # self.door_locked = False # 解除锁定 - - # 门开到30度后开灯,按钮归位s - if self.Joint1_state < math.radians(-30) : - self.door_locked = False # 解除锁定 - light_scopes[0].set_visibility(True) - self.dc.set_dof_position_target(self.joint_handles[0], 0) - - if abs(self.Joint1_state - math.radians(-50)) < math.radians(0.5) : - self.dc.set_dof_position_target(self.joint_handles[1], math.radians(-78)) - self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_min) - - - # 检测手动关门 - if self.Joint1_state > math.radians(-20) and not self.door_locked: # 当门接近关闭位置时 - - self.dc.set_dof_position_target(self.joint_handles[1], 0) # 设置目标位置为0 - self.door_locked = True - if self.Joint1_state < math.radians(5): # 当门完全关闭时 - # 锁定门 + if not self.initialized or self.art is None: + return + self._control_door() + + def _control_door(self): + positions = self.art.get_joint_positions().squeeze() + button_state = self._get_scalar_value(positions[self.joint_indices[0]]) + door_state = self._get_scalar_value(positions[self.joint_indices[1]]) + + if self.button_target is None: + self.button_target = button_state + if self.door_target is None: + self.door_target = door_state + + if self._button_pressed(button_state) and self.door_locked: + self.door_target = math.radians(-50) + if door_state < math.radians(-30): + self.door_locked = False + self.light_scopes[0].set_visibility(True) + self.button_target = 0.0 + + if abs(door_state - math.radians(-50)) < math.radians(0.5): + self.door_target = math.radians(-78) + if self.revoluteJoint_drive: + self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_min) + + if door_state > math.radians(-20) and not self.door_locked: + self.door_target = 0.0 + if door_state < math.radians(5): self.door_locked = True - light_scopes[0].set_visibility(False) # 关闭灯 - self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_max) \ No newline at end of file + self.button_target = 0.0 + self.light_scopes[0].set_visibility(False) + if self.revoluteJoint_drive: + self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_max) + + targets = [] + indices = [] + if self.button_target is not None: + targets.append(self.button_target) + indices.append(self.joint_indices[0]) + if self.door_target is not None: + targets.append(self.door_target) + indices.append(self.joint_indices[1]) + + if not targets: + return + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + + self.art.apply_action(action) + + def _button_pressed(self, value: float) -> bool: + if self.button_press_mode == "greater": + return value > self.button_press_threshold + return value < self.button_press_threshold + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + dof_limits = self.art.get_dof_limits().squeeze() + self.joint_limits = [ + {"lower": dof_limits[idx, 0], "upper": dof_limits[idx, 1]} + for idx in self.joint_indices + ] + self.initialized = True + except AttributeError as exc: + print(f"Physics not ready yet, will retry: {exc}") + return \ No newline at end of file diff --git a/Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/.vscode/extensions.json b/Articulated_objects/small_furniture/cabinet/cabinet_1/resource/.vscode/extensions.json old mode 100644 new mode 100755 similarity index 100% rename from Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/.vscode/extensions.json rename to Articulated_objects/small_furniture/cabinet/cabinet_1/resource/.vscode/extensions.json diff --git a/Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/.vscode/launch.json b/Articulated_objects/small_furniture/cabinet/cabinet_1/resource/.vscode/launch.json old mode 100644 new mode 100755 similarity index 100% rename from Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/.vscode/launch.json rename to Articulated_objects/small_furniture/cabinet/cabinet_1/resource/.vscode/launch.json diff --git a/Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/.vscode/settings.json b/Articulated_objects/small_furniture/cabinet/cabinet_1/resource/.vscode/settings.json old mode 100644 new mode 100755 similarity index 100% rename from Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/.vscode/settings.json rename to Articulated_objects/small_furniture/cabinet/cabinet_1/resource/.vscode/settings.json diff --git a/Articulated_objects/small_furniture/cabinet/cabinet_1/resource/cabinet_control.py b/Articulated_objects/small_furniture/cabinet/cabinet_1/resource/cabinet_control.py index d71252cd420925954dd4d0049a7e6fd5fd9bbd9f..7583a3f888c6922f172f93a5def3d2cfc99d5aca 100644 --- a/Articulated_objects/small_furniture/cabinet/cabinet_1/resource/cabinet_control.py +++ b/Articulated_objects/small_furniture/cabinet/cabinet_1/resource/cabinet_control.py @@ -1,21 +1,12 @@ import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils -from pxr import PhysxSchema, UsdGeom, UsdPhysics import math -# import nvidia.srl.usd.prim_helper as prim_helper - +import torch +import omni.usd +from omni.kit.scripting import BehaviorScript +from omni.isaac.core import SimulationContext +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: @@ -91,7 +82,7 @@ for joint_name in joint_names: joint_limits = {} joint_limit_diffs = {} -for i, joint_name in enumerate(joint_names): +for joint_name in joint_names: joint_limits[joint_name] = { 'lower': joints_info[joint_name]['lower_limit'], 'upper': joints_info[joint_name]['upper_limit'] @@ -99,87 +90,91 @@ for i, joint_name in enumerate(joint_names): joint_limit_diffs[joint_name] = ( joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] class DampingCabinetControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - def on_destroy(self): - pass + self.articulation_root_path = root_articulation_prim + self.joint_names = joint_names + self.joint_limits = joint_limits + self.joint_limit_diffs = joint_limit_diffs + self.joint_threshold = -0.15 + self.art = None + self.initialized = False + self.joint_indices = None + self.use_torch = None def on_play(self): - # Initialize simulation context self.simulation_context = SimulationContext( stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 + physics_dt=1.0 / 120, + rendering_dt=1.0 / 120, ) - - def on_pause(self): - pass - - def on_stop(self): - self.init_start=True - pass def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.art is None: + return self.target_pose_control() self.damping_stiffness_change() - + def damping_stiffness_change(self): - stage = omni.usd.get_context().get_stage() - # Process all joints - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API - joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) - joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "linear") - # Get joint limit difference and set stiffness - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(calculate_stiffness(joint_state, joint_limit_diff)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - + positions = self.art.get_joint_positions().squeeze() + for idx, joint_name in enumerate(self.joint_names): + joint_state = self._get_scalar_value(positions[self.joint_indices[idx]]) + joint = joints_info[joint_name]['prim'] + joint_drive = UsdPhysics.DriveAPI.Get(joint.GetPrim(), "linear") + joint_drive.GetStiffnessAttr().Set( + calculate_stiffness(joint_state, self.joint_limit_diffs[joint_name]) + ) + def target_pose_control(self): - # Process all joints - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - # Get joint limit difference - joint_limit_diff = joint_limit_diffs[joint_names[i]] - # Set target position based on joint state - if joint_state > -0.15: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['upper_limit']) + positions = self.art.get_joint_positions().squeeze() + targets = [] + indices = [] + for idx, joint_name in enumerate(self.joint_names): + joint_state = self._get_scalar_value(positions[self.joint_indices[idx]]) + limits = self.joint_limits[joint_name] + if joint_state > self.joint_threshold: + targets.append(limits['upper']) else: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['lower_limit']) - - + targets.append(limits['lower']) + indices.append(self.joint_indices[idx]) + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + + self.art.apply_action(action) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + self.initialized = True + except AttributeError as exc: + print(f"Physics not ready yet, will retry: {exc}") + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) diff --git a/Articulated_objects/small_furniture/cabinet/cabinet_10/resource/cabinet_control.py b/Articulated_objects/small_furniture/cabinet/cabinet_10/resource/cabinet_control.py index 6124d1a51d075589d60710aa45ac143aa4a381fb..38b2f0e8716d0f4bfda672ab6e39e2b582861c53 100644 --- a/Articulated_objects/small_furniture/cabinet/cabinet_10/resource/cabinet_control.py +++ b/Articulated_objects/small_furniture/cabinet/cabinet_10/resource/cabinet_control.py @@ -1,185 +1,154 @@ import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils -from pxr import PhysxSchema, UsdGeom, UsdPhysics import math -# import nvidia.srl.usd.prim_helper as prim_helper - +import torch +import omni.usd +from omni.kit.scripting import BehaviorScript +from omni.isaac.core import SimulationContext +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: - """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): + + def _find_prim(current): + if current.GetName() == prim_name: + return current.GetPath().pathString + for child in current.GetChildren(): result = _find_prim(child) if result: return result return None - + found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path + def calculate_stiffness(joint_state, joint_limit): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 50 - min_stiffness = 2 - decay_rate = 4 - # threshold = math.radians(20) - # threshold = 0.3 * joint_limit - threshold = -0.01 + max_stiffness = 50 + min_stiffness = 2 + decay_rate = 4 + threshold = -0.01 if joint_state < threshold: return min_stiffness stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) return max(min_stiffness, min(stiffness, max_stiffness)) - -# 1. Articulation Root prim + root_articulation_prim = find_prim_path_by_name("E_body_3") +joint_threshold = -0.1 +joint_names = ["PrismaticJoint_cabinet_10_2"] -# 2. Joint names -joint_names = ["PrismaticJoint_cabinet_10_2" ] -#joint1_prim = find_prim_path_by_name(joint_names[0]) -#joint2_prim = find_prim_path_by_name(joint_names[1]) stage = omni.usd.get_context().get_stage() joints_info = {} - -# 3. Joint information for joint_name in joint_names: joint_prim_path = find_prim_path_by_name(joint_name) joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) joint = UsdPhysics.PrismaticJoint(joint_prim_obj) - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() + "prim": joint, + "lower_limit": joint.GetLowerLimitAttr().Get(), + "upper_limit": joint.GetUpperLimitAttr().Get(), } - -# joint1_lower_limit = joints_info[joint_names[0]]['lower_limit'] -# joint1_upper_limit = joints_info[joint_names[0]]['upper_limit'] -# joint2_lower_limit = joints_info[joint_names[1]]['lower_limit'] -# joint2_upper_limit = joints_info[joint_names[1]]['upper_limit'] - -# 4. Joint limits and limit differences joint_limits = {} joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): +for joint_name in joint_names: joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] + "lower": joints_info[joint_name]["lower_limit"], + "upper": joints_info[joint_name]["upper_limit"], } joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] + joints_info[joint_name]["upper_limit"] - joints_info[joint_name]["lower_limit"] ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] class DampingCabinet10Control(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - def on_destroy(self): - pass + self.articulation_root_path = root_articulation_prim + self.joint_names = joint_names + self.joint_limits = joint_limits + self.joint_limit_diffs = joint_limit_diffs + self.joint_threshold = joint_threshold + self.art = None + self.initialized = False + self.joint_indices = None + self.use_torch = None def on_play(self): - # Initialize simulation context self.simulation_context = SimulationContext( stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 + physics_dt=1.0 / 120, + rendering_dt=1.0 / 120, ) - - def on_pause(self): - pass def on_stop(self): - self.init_start=True - pass + carb.log_info(f"{type(self).__name__}.on_stop()->{self.prim_path}") def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.art is None: + return self.target_pose_control() self.damping_stiffness_change() - + def damping_stiffness_change(self): - stage = omni.usd.get_context().get_stage() - # Process all joints - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API - joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) - joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "linear") - # Get joint limit difference and set stiffness - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(calculate_stiffness(joint_state, joint_limit_diff)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - + positions = self.art.get_joint_positions().squeeze() + joint_state = self._get_scalar_value(positions[self.joint_indices[0]]) + joint = joints_info[self.joint_names[0]]["prim"] + joint_drive = UsdPhysics.DriveAPI.Get(joint.GetPrim(), "linear") + joint_drive.GetStiffnessAttr().Set( + calculate_stiffness(joint_state, self.joint_limit_diffs[self.joint_names[0]]) + ) + def target_pose_control(self): - # Process all joints - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - # Get joint limit difference - joint_limit_diff = joint_limit_diffs[joint_names[i]] - # Set target position based on joint state - if joint_state > -0.1: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['upper_limit']) - else: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['lower_limit']) - - + positions = self.art.get_joint_positions().squeeze() + joint_state = self._get_scalar_value(positions[self.joint_indices[0]]) + limits = self.joint_limits[self.joint_names[0]] + if joint_state > self.joint_threshold: + target = limits["upper"] + else: + target = limits["lower"] + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor([target], device=device) + indices_tensor = torch.tensor(self.joint_indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions([target], joint_indices=self.joint_indices) + + self.art.apply_action(action) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + self.initialized = True + except AttributeError as exc: + print(f"Physics not ready yet, will retry: {exc}") + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) + diff --git a/Articulated_objects/small_furniture/cabinet/cabinet_2/resource/.vscode/extensions.json b/Articulated_objects/small_furniture/cabinet/cabinet_2/resource/.vscode/extensions.json new file mode 100755 index 0000000000000000000000000000000000000000..ea614ed629affdd0d97abcc881b511d3de69a25c --- /dev/null +++ b/Articulated_objects/small_furniture/cabinet/cabinet_2/resource/.vscode/extensions.json @@ -0,0 +1,8 @@ +{ + // See http://go.microsoft.com/fwlink/?LinkId=827846 + // for the documentation about the extensions.json format + "recommendations": [ + "ms-python.python", + "ms-python.vscode-pylance" + ], +} \ No newline at end of file diff --git a/Articulated_objects/small_furniture/cabinet/cabinet_2/resource/.vscode/launch.json b/Articulated_objects/small_furniture/cabinet/cabinet_2/resource/.vscode/launch.json new file mode 100755 index 0000000000000000000000000000000000000000..8a22f73af48687152cef11e4098995885fcaff48 --- /dev/null +++ b/Articulated_objects/small_furniture/cabinet/cabinet_2/resource/.vscode/launch.json @@ -0,0 +1,25 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Python: Attach (windows-x86_64/linux-x86_64)", + "type": "python", + "request": "attach", + "pathMappings": [ + { + "localRoot": "${workspaceFolder}", + "remoteRoot": "${workspaceFolder}" + }], + "port": 3000, + "host": "127.0.0.1", + "subProcess": true, + "runtimeArgs": [ + "--preserve-symlinks", + "--preserve-symlinks-main" + ] + } + ] +} diff --git a/Articulated_objects/small_furniture/cabinet/cabinet_2/resource/.vscode/settings.json b/Articulated_objects/small_furniture/cabinet/cabinet_2/resource/.vscode/settings.json new file mode 100755 index 0000000000000000000000000000000000000000..63a0b3e70ae6047c1977e3c9e8e368ed5c157fbc --- /dev/null +++ b/Articulated_objects/small_furniture/cabinet/cabinet_2/resource/.vscode/settings.json @@ -0,0 +1,10 @@ +{ + "editor.rulers": [120], + "python.languageServer": "Pylance", + "python.formatting.provider": "black", + "python.formatting.blackArgs": ["--line-length", "120"], + "python.linting.enabled": true, + "python.linting.pylintEnabled": false, + "python.linting.flake8Enabled": true, + "python.linting.flake8Args": ["--max-line-length=120"] +} diff --git a/Articulated_objects/small_furniture/cabinet/cabinet_2/resource/cabinet_control.py b/Articulated_objects/small_furniture/cabinet/cabinet_2/resource/cabinet_control.py index 61ce7e1d098611b3b2f137f1bf6b41c0d8156cff..b02b2bc5d2cb43fc8d8b7cea5dd571aef27b9f10 100644 --- a/Articulated_objects/small_furniture/cabinet/cabinet_2/resource/cabinet_control.py +++ b/Articulated_objects/small_furniture/cabinet/cabinet_2/resource/cabinet_control.py @@ -1,21 +1,12 @@ import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils -from pxr import PhysxSchema, UsdGeom, UsdPhysics import math -# import nvidia.srl.usd.prim_helper as prim_helper - +import torch +import omni.usd +from omni.kit.scripting import BehaviorScript +from omni.isaac.core import SimulationContext +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: @@ -81,17 +72,10 @@ for joint_name in joint_names: 'upper_limit': joint.GetUpperLimitAttr().Get() } -# joint1_lower_limit = joints_info[joint_names[0]]['lower_limit'] -# joint1_upper_limit = joints_info[joint_names[0]]['upper_limit'] -# joint2_lower_limit = joints_info[joint_names[1]]['lower_limit'] -# joint2_upper_limit = joints_info[joint_names[1]]['upper_limit'] - - -# 4. Joint limits and limit differences joint_limits = {} joint_limit_diffs = {} -for i, joint_name in enumerate(joint_names): +for joint_name in joint_names: joint_limits[joint_name] = { 'lower': joints_info[joint_name]['lower_limit'], 'upper': joints_info[joint_name]['upper_limit'] @@ -99,87 +83,92 @@ for i, joint_name in enumerate(joint_names): joint_limit_diffs[joint_name] = ( joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] class DampingCabinetControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - def on_destroy(self): - pass + self.articulation_root_path = root_articulation_prim + self.joint_names = joint_names + self.joint_limits = joint_limits + self.joint_limit_diffs = joint_limit_diffs + self.joint_threshold = -0.1 + self.art = None + self.initialized = False + self.joint_indices = None + self.use_torch = None def on_play(self): - # Initialize simulation context + self._initialize_articulation() self.simulation_context = SimulationContext( stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 + physics_dt=1.0 / 120, + rendering_dt=1.0 / 120, ) - - def on_pause(self): - pass - - def on_stop(self): - self.init_start=True - pass def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.art is None: + return self.target_pose_control() self.damping_stiffness_change() - + def damping_stiffness_change(self): - stage = omni.usd.get_context().get_stage() - # Process all joints - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API - joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) - joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "linear") - # Get joint limit difference and set stiffness - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(calculate_stiffness(joint_state, joint_limit_diff)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - + positions = self.art.get_joint_positions().squeeze() + for idx, joint_name in enumerate(self.joint_names): + joint_state = self._get_scalar_value(positions[self.joint_indices[idx]]) + joint = joints_info[joint_name]['prim'] + joint_drive = UsdPhysics.DriveAPI.Get(joint.GetPrim(), "linear") + joint_drive.GetStiffnessAttr().Set( + calculate_stiffness(joint_state, self.joint_limit_diffs[joint_name]) + ) + def target_pose_control(self): - # Process all joints - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - # Get joint limit difference - joint_limit_diff = joint_limit_diffs[joint_names[i]] - # Set target position based on joint state - if joint_state > -0.1: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['upper_limit']) + positions = self.art.get_joint_positions().squeeze() + targets = [] + indices = [] + for idx, joint_name in enumerate(self.joint_names): + joint_state = self._get_scalar_value(positions[self.joint_indices[idx]]) + limits = self.joint_limits[joint_name] + if joint_state > self.joint_threshold: + targets.append(limits['upper']) else: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['lower_limit']) - - + targets.append(limits['lower']) + indices.append(self.joint_indices[idx]) + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + + self.art.apply_action(action) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + self.initialized = True + except AttributeError as exc: + print(f"Physics not ready yet, will retry: {exc}") + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) diff --git a/Articulated_objects/small_furniture/cabinet/cabinet_3/resource/cabinet_control.py b/Articulated_objects/small_furniture/cabinet/cabinet_3/resource/cabinet_control.py index f9599668ad43f96b336fd739a279a8309af26381..71f9a80119b481bcd3b9809df1c1ae35db128943 100644 --- a/Articulated_objects/small_furniture/cabinet/cabinet_3/resource/cabinet_control.py +++ b/Articulated_objects/small_furniture/cabinet/cabinet_3/resource/cabinet_control.py @@ -1,185 +1,161 @@ import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils -from pxr import PhysxSchema, UsdGeom, UsdPhysics import math -# import nvidia.srl.usd.prim_helper as prim_helper - +import torch +import omni.usd +from omni.kit.scripting import BehaviorScript +from omni.isaac.core import SimulationContext +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): + + def _find_prim(current): + if current.GetName() == prim_name: + return current.GetPath().pathString + for child in current.GetChildren(): result = _find_prim(child) if result: return result return None - + found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path + def calculate_stiffness(joint_state, joint_limit): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 20 - min_stiffness = 2 - decay_rate = 3 - # threshold = math.radians(20) - # threshold = 0.3 * joint_limit - threshold = -0.05 + """Calculate stiffness value based on joint angle""" + max_stiffness = 20 + min_stiffness = 2 + decay_rate = 3 + threshold = -0.05 if joint_state < threshold: return min_stiffness stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) return max(min_stiffness, min(stiffness, max_stiffness)) - -# 1. Articulation Root prim -root_articulation_prim = find_prim_path_by_name("E_body_2") -# 2. Joint names +root_articulation_prim = find_prim_path_by_name("E_body_2") +joint_threshold = -0.05 joint_names = ["PrismaticJoint_cabinet_3"] -joint1_prim = find_prim_path_by_name(joint_names[0]) -# joint2_prim = find_prim_path_by_name(joint_names[1]) + stage = omni.usd.get_context().get_stage() joints_info = {} - -# 3. Joint information for joint_name in joint_names: joint_prim_path = find_prim_path_by_name(joint_name) joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) joint = UsdPhysics.PrismaticJoint(joint_prim_obj) - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() + "prim": joint, + "lower_limit": joint.GetLowerLimitAttr().Get(), + "upper_limit": joint.GetUpperLimitAttr().Get(), } - -# joint1_lower_limit = joints_info[joint_names[0]]['lower_limit'] -# joint1_upper_limit = joints_info[joint_names[0]]['upper_limit'] -# joint2_lower_limit = joints_info[joint_names[1]]['lower_limit'] -# joint2_upper_limit = joints_info[joint_names[1]]['upper_limit'] - -# 4. Joint limits and limit differences joint_limits = {} joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): +for joint_name in joint_names: joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] + "lower": joints_info[joint_name]["lower_limit"], + "upper": joints_info[joint_name]["upper_limit"], } joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] + joints_info[joint_name]["upper_limit"] - joints_info[joint_name]["lower_limit"] ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] class DampingCabinetControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - def on_destroy(self): - pass + self.articulation_root_path = root_articulation_prim + self.joint_names = joint_names + self.joint_limits = joint_limits + self.joint_limit_diffs = joint_limit_diffs + self.joint_threshold = joint_threshold + self.art = None + self.initialized = False + self.joint_indices = None + self.use_torch = None def on_play(self): - # Initialize simulation context self.simulation_context = SimulationContext( stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 + physics_dt=1.0 / 120, + rendering_dt=1.0 / 120, ) - - def on_pause(self): - pass def on_stop(self): - self.init_start=True - pass + carb.log_info(f"{type(self).__name__}.on_stop()->{self.prim_path}") def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.art is None: + return self.target_pose_control() self.damping_stiffness_change() - + def damping_stiffness_change(self): - stage = omni.usd.get_context().get_stage() - # Process all joints - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API - joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) - joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "linear") - # Get joint limit difference and set stiffness - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(calculate_stiffness(joint_state, joint_limit_diff)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - + positions = self.art.get_joint_positions().squeeze() + for idx, joint_name in enumerate(self.joint_names): + joint_state = self._get_scalar_value(positions[self.joint_indices[idx]]) + joint = joints_info[joint_name]["prim"] + joint_drive = UsdPhysics.DriveAPI.Get(joint.GetPrim(), "linear") + joint_drive.GetStiffnessAttr().Set( + calculate_stiffness(joint_state, self.joint_limit_diffs[joint_name]) + ) + def target_pose_control(self): - # Process all joints - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - # Get joint limit difference - joint_limit_diff = joint_limit_diffs[joint_names[i]] - # Set target position based on joint state - if joint_state > -0.05: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['upper_limit']) + positions = self.art.get_joint_positions().squeeze() + targets = [] + indices = [] + for idx, joint_name in enumerate(self.joint_names): + joint_state = self._get_scalar_value(positions[self.joint_indices[idx]]) + limits = self.joint_limits[joint_name] + if joint_state > self.joint_threshold: + targets.append(limits["upper"]) else: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['lower_limit']) - - + targets.append(limits["lower"]) + indices.append(self.joint_indices[idx]) + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + + self.art.apply_action(action) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + self.initialized = True + except AttributeError as exc: + print(f"Physics not ready yet, will retry: {exc}") + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) + diff --git a/Articulated_objects/small_furniture/cabinet/cabinet_4/resource/cabinet_control.py b/Articulated_objects/small_furniture/cabinet/cabinet_4/resource/cabinet_control.py index 122065f13ab1731d43d1e0d435c6b8e42f84dc73..289c4b871ab25009d85ad60e4c288d20f7e2c534 100644 --- a/Articulated_objects/small_furniture/cabinet/cabinet_4/resource/cabinet_control.py +++ b/Articulated_objects/small_furniture/cabinet/cabinet_4/resource/cabinet_control.py @@ -1,185 +1,164 @@ import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils -from pxr import PhysxSchema, UsdGeom, UsdPhysics import math -# import nvidia.srl.usd.prim_helper as prim_helper - +import torch +import omni.usd +from omni.kit.scripting import BehaviorScript +from omni.isaac.core import SimulationContext +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: - """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): + + def _find_prim(current): + if current.GetName() == prim_name: + return current.GetPath().pathString + for child in current.GetChildren(): result = _find_prim(child) if result: return result return None - + found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path + def calculate_stiffness(joint_state, joint_limit): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 20 - min_stiffness = 2 - decay_rate = 3 - # threshold = math.radians(20) - # threshold = 0.3 * joint_limit - threshold = 0.2 + max_stiffness = 20 + min_stiffness = 2 + decay_rate = 3 + threshold = 0.2 if joint_state > threshold: return min_stiffness stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) return max(min_stiffness, min(stiffness, max_stiffness)) - -# 1. Articulation Root prim + root_articulation_prim = find_prim_path_by_name("E_body_5") +joint_threshold = 0.2 +joint_names = [ + "PrismaticJoint_cabinet_4_up1", + "PrismaticJoint_cabinet_4_up2", + "PrismaticJoint_cabinet_4_down1", + "PrismaticJoint_cabinet_4_down_2", +] -# 2. Joint names -joint_names = ["PrismaticJoint_cabinet_4_up1","PrismaticJoint_cabinet_4_up2","PrismaticJoint_cabinet_4_down1","PrismaticJoint_cabinet_4_down_2" ] -joint1_prim = find_prim_path_by_name(joint_names[0]) -joint2_prim = find_prim_path_by_name(joint_names[1]) stage = omni.usd.get_context().get_stage() joints_info = {} - -# 3. Joint information for joint_name in joint_names: joint_prim_path = find_prim_path_by_name(joint_name) joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) joint = UsdPhysics.PrismaticJoint(joint_prim_obj) - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() + "prim": joint, + "lower_limit": joint.GetLowerLimitAttr().Get(), + "upper_limit": joint.GetUpperLimitAttr().Get(), } - -# joint1_lower_limit = joints_info[joint_names[0]]['lower_limit'] -# joint1_upper_limit = joints_info[joint_names[0]]['upper_limit'] -# joint2_lower_limit = joints_info[joint_names[1]]['lower_limit'] -# joint2_upper_limit = joints_info[joint_names[1]]['upper_limit'] - -# 4. Joint limits and limit differences joint_limits = {} joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): +for joint_name in joint_names: joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] + "lower": joints_info[joint_name]["lower_limit"], + "upper": joints_info[joint_name]["upper_limit"], } joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] + joints_info[joint_name]["upper_limit"] - joints_info[joint_name]["lower_limit"] ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] class DampingCabinet4Control(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - def on_destroy(self): - pass + self.articulation_root_path = root_articulation_prim + self.joint_names = joint_names + self.joint_limits = joint_limits + self.joint_limit_diffs = joint_limit_diffs + self.joint_threshold = joint_threshold + self.art = None + self.initialized = False + self.joint_indices = None + self.use_torch = None def on_play(self): - # Initialize simulation context self.simulation_context = SimulationContext( stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 + physics_dt=1.0 / 120, + rendering_dt=1.0 / 120, ) - - def on_pause(self): - pass def on_stop(self): - self.init_start=True - pass + carb.log_info(f"{type(self).__name__}.on_stop()->{self.prim_path}") def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.art is None: + return self.target_pose_control() self.damping_stiffness_change() - + def damping_stiffness_change(self): - stage = omni.usd.get_context().get_stage() - # Process all joints - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API - joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) - joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "linear") - # Get joint limit difference and set stiffness - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(calculate_stiffness(joint_state, joint_limit_diff)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - + positions = self.art.get_joint_positions().squeeze() + for idx, joint_name in enumerate(self.joint_names): + joint_state = self._get_scalar_value(positions[self.joint_indices[idx]]) + joint = joints_info[joint_name]["prim"] + joint_drive = UsdPhysics.DriveAPI.Get(joint.GetPrim(), "linear") + joint_drive.GetStiffnessAttr().Set( + calculate_stiffness(joint_state, self.joint_limit_diffs[joint_name]) + ) + def target_pose_control(self): - # Process all joints - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - # Get joint limit difference - joint_limit_diff = joint_limit_diffs[joint_names[i]] - # Set target position based on joint state - if joint_state > 0.2: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['upper_limit']) + positions = self.art.get_joint_positions().squeeze() + targets = [] + indices = [] + for idx, joint_name in enumerate(self.joint_names): + joint_state = self._get_scalar_value(positions[self.joint_indices[idx]]) + limits = self.joint_limits[joint_name] + if joint_state > self.joint_threshold: + targets.append(limits["upper"]) else: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['lower_limit']) - - + targets.append(limits["lower"]) + indices.append(self.joint_indices[idx]) + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + + self.art.apply_action(action) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + self.initialized = True + except AttributeError as exc: + print(f"Physics not ready yet, will retry: {exc}") + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) + diff --git a/Articulated_objects/small_furniture/cabinet/cabinet_5/resource/cabinet_control.py b/Articulated_objects/small_furniture/cabinet/cabinet_5/resource/cabinet_control.py index bb6df94cf1a1d4f95b7afa4fdb019322652ee785..3a3d02c5f3b6c14c572f8efc418356a6b4a2604c 100644 --- a/Articulated_objects/small_furniture/cabinet/cabinet_5/resource/cabinet_control.py +++ b/Articulated_objects/small_furniture/cabinet/cabinet_5/resource/cabinet_control.py @@ -1,185 +1,162 @@ import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils -from pxr import PhysxSchema, UsdGeom, UsdPhysics import math -# import nvidia.srl.usd.prim_helper as prim_helper - +import torch +import omni.usd +from omni.kit.scripting import BehaviorScript +from omni.isaac.core import SimulationContext +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: - """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): + + def _find_prim(current): + if current.GetName() == prim_name: + return current.GetPath().pathString + for child in current.GetChildren(): result = _find_prim(child) if result: return result return None - + found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path + def calculate_stiffness(joint_state, joint_limit): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 50 - min_stiffness = 2 - decay_rate = 3 - # threshold = math.radians(20) - # threshold = 0.3 * joint_limit - threshold = -0.1 + max_stiffness = 50 + min_stiffness = 2 + decay_rate = 3 + threshold = -0.1 if joint_state < threshold: return min_stiffness stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) return max(min_stiffness, min(stiffness, max_stiffness)) - -# 1. Articulation Root prim + root_articulation_prim = find_prim_path_by_name("E_body_11") +joint_threshold = -0.1 +joint_names = [ + "PrismaticJoint_cabinet_5_up", + "PrismaticJoint_cabinet_5_down", +] -# 2. Joint names -joint_names = ["PrismaticJoint_cabinet_5_up","PrismaticJoint_cabinet_5_down"] -#joint1_prim = find_prim_path_by_name(joint_names[0]) -#joint2_prim = find_prim_path_by_name(joint_names[1]) stage = omni.usd.get_context().get_stage() joints_info = {} - -# 3. Joint information for joint_name in joint_names: joint_prim_path = find_prim_path_by_name(joint_name) joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) joint = UsdPhysics.PrismaticJoint(joint_prim_obj) - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() + "prim": joint, + "lower_limit": joint.GetLowerLimitAttr().Get(), + "upper_limit": joint.GetUpperLimitAttr().Get(), } - -# joint1_lower_limit = joints_info[joint_names[0]]['lower_limit'] -# joint1_upper_limit = joints_info[joint_names[0]]['upper_limit'] -# joint2_lower_limit = joints_info[joint_names[1]]['lower_limit'] -# joint2_upper_limit = joints_info[joint_names[1]]['upper_limit'] - -# 4. Joint limits and limit differences joint_limits = {} joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): +for joint_name in joint_names: joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] + "lower": joints_info[joint_name]["lower_limit"], + "upper": joints_info[joint_name]["upper_limit"], } joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] + joints_info[joint_name]["upper_limit"] - joints_info[joint_name]["lower_limit"] ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] -class DampingCabinet5Control(BehaviorScript): +class DampingCabinetControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - def on_destroy(self): - pass + self.articulation_root_path = root_articulation_prim + self.joint_names = joint_names + self.joint_limits = joint_limits + self.joint_limit_diffs = joint_limit_diffs + self.joint_threshold = joint_threshold + self.art = None + self.initialized = False + self.joint_indices = None + self.use_torch = None def on_play(self): - # Initialize simulation context self.simulation_context = SimulationContext( stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 + physics_dt=1.0 / 120, + rendering_dt=1.0 / 120, ) - - def on_pause(self): - pass def on_stop(self): - self.init_start=True - pass + carb.log_info(f"{type(self).__name__}.on_stop()->{self.prim_path}") def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.art is None: + return self.target_pose_control() self.damping_stiffness_change() - + def damping_stiffness_change(self): - stage = omni.usd.get_context().get_stage() - # Process all joints - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API - joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) - joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "linear") - # Get joint limit difference and set stiffness - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(calculate_stiffness(joint_state, joint_limit_diff)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - + positions = self.art.get_joint_positions().squeeze() + for idx, joint_name in enumerate(self.joint_names): + joint_state = self._get_scalar_value(positions[self.joint_indices[idx]]) + joint = joints_info[joint_name]["prim"] + joint_drive = UsdPhysics.DriveAPI.Get(joint.GetPrim(), "linear") + joint_drive.GetStiffnessAttr().Set( + calculate_stiffness(joint_state, self.joint_limit_diffs[joint_name]) + ) + def target_pose_control(self): - # Process all joints - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - # Get joint limit difference - joint_limit_diff = joint_limit_diffs[joint_names[i]] - # Set target position based on joint state - if joint_state > -0.1: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['upper_limit']) + positions = self.art.get_joint_positions().squeeze() + targets = [] + indices = [] + for idx, joint_name in enumerate(self.joint_names): + joint_state = self._get_scalar_value(positions[self.joint_indices[idx]]) + limits = self.joint_limits[joint_name] + if joint_state > self.joint_threshold: + targets.append(limits["upper"]) else: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['lower_limit']) - - + targets.append(limits["lower"]) + indices.append(self.joint_indices[idx]) + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + + self.art.apply_action(action) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + self.initialized = True + except AttributeError as exc: + print(f"Physics not ready yet, will retry: {exc}") + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) + diff --git a/Articulated_objects/small_furniture/cabinet/cabinet_6/resource/cabinet_control.py b/Articulated_objects/small_furniture/cabinet/cabinet_6/resource/cabinet_control.py index f4550c24e783e227338ce68ff2cc90417489b805..4d8f3aa1d2690938fc7c00aabec58105aea8b639 100644 --- a/Articulated_objects/small_furniture/cabinet/cabinet_6/resource/cabinet_control.py +++ b/Articulated_objects/small_furniture/cabinet/cabinet_6/resource/cabinet_control.py @@ -1,185 +1,159 @@ import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils -from pxr import PhysxSchema, UsdGeom, UsdPhysics import math -# import nvidia.srl.usd.prim_helper as prim_helper - +import torch +import omni.usd +from omni.kit.scripting import BehaviorScript +from omni.isaac.core import SimulationContext +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: - """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): + + def _find_prim(current): + if current.GetName() == prim_name: + return current.GetPath().pathString + for child in current.GetChildren(): result = _find_prim(child) if result: return result return None - + found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path + def calculate_stiffness(joint_state, joint_limit): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 30 - min_stiffness = 2 - decay_rate = 3 - # threshold = math.radians(20) - # threshold = 0.3 * joint_limit - threshold = -0.1 + max_stiffness = 30 + min_stiffness = 2 + decay_rate = 3 + threshold = -0.1 if joint_state < threshold: return min_stiffness stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) return max(min_stiffness, min(stiffness, max_stiffness)) - -# 1. Articulation Root prim + root_articulation_prim = find_prim_path_by_name("E_body_3") +joint_threshold = -0.1 +joint_names = ["PrismaticJoint_cabinet_6_down"] -# 2. Joint names -joint_names = ["PrismaticJoint_cabinet_6_down" ] -#joint1_prim = find_prim_path_by_name(joint_names[0]) -#joint2_prim = find_prim_path_by_name(joint_names[1]) stage = omni.usd.get_context().get_stage() joints_info = {} - -# 3. Joint information for joint_name in joint_names: joint_prim_path = find_prim_path_by_name(joint_name) joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) joint = UsdPhysics.PrismaticJoint(joint_prim_obj) - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() + "prim": joint, + "lower_limit": joint.GetLowerLimitAttr().Get(), + "upper_limit": joint.GetUpperLimitAttr().Get(), } - -# joint1_lower_limit = joints_info[joint_names[0]]['lower_limit'] -# joint1_upper_limit = joints_info[joint_names[0]]['upper_limit'] -# joint2_lower_limit = joints_info[joint_names[1]]['lower_limit'] -# joint2_upper_limit = joints_info[joint_names[1]]['upper_limit'] - -# 4. Joint limits and limit differences joint_limits = {} joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): +for joint_name in joint_names: joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] + "lower": joints_info[joint_name]["lower_limit"], + "upper": joints_info[joint_name]["upper_limit"], } joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] + joints_info[joint_name]["upper_limit"] - joints_info[joint_name]["lower_limit"] ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] class DampingCabinet6Control(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - def on_destroy(self): - pass + self.articulation_root_path = root_articulation_prim + self.joint_names = joint_names + self.joint_limits = joint_limits + self.joint_limit_diffs = joint_limit_diffs + self.joint_threshold = joint_threshold + self.art = None + self.initialized = False + self.joint_indices = None + self.use_torch = None def on_play(self): - # Initialize simulation context self.simulation_context = SimulationContext( stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 + physics_dt=1.0 / 120, + rendering_dt=1.0 / 120, ) - - def on_pause(self): - pass def on_stop(self): - self.init_start=True - pass + carb.log_info(f"{type(self).__name__}.on_stop()->{self.prim_path}") def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.art is None: + return self.target_pose_control() self.damping_stiffness_change() - + def damping_stiffness_change(self): - stage = omni.usd.get_context().get_stage() - # Process all joints - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API - joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) - joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "linear") - # Get joint limit difference and set stiffness - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(calculate_stiffness(joint_state, joint_limit_diff)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - + positions = self.art.get_joint_positions().squeeze() + for idx, joint_name in enumerate(self.joint_names): + joint_state = self._get_scalar_value(positions[self.joint_indices[idx]]) + joint = joints_info[joint_name]["prim"] + joint_drive = UsdPhysics.DriveAPI.Get(joint.GetPrim(), "linear") + joint_drive.GetStiffnessAttr().Set( + calculate_stiffness(joint_state, self.joint_limit_diffs[joint_name]) + ) + def target_pose_control(self): - # Process all joints - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - # Get joint limit difference - joint_limit_diff = joint_limit_diffs[joint_names[i]] - # Set target position based on joint state - if joint_state > -0.1: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['upper_limit']) + positions = self.art.get_joint_positions().squeeze() + targets = [] + indices = [] + for idx, joint_name in enumerate(self.joint_names): + joint_state = self._get_scalar_value(positions[self.joint_indices[idx]]) + limits = self.joint_limits[joint_name] + if joint_state > self.joint_threshold: + targets.append(limits["upper"]) else: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['lower_limit']) - - + targets.append(limits["lower"]) + indices.append(self.joint_indices[idx]) + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + + self.art.apply_action(action) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + self.initialized = True + except AttributeError as exc: + print(f"Physics not ready yet, will retry: {exc}") + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) + diff --git a/Articulated_objects/small_furniture/cabinet/cabinet_7/resource/cabinet_control.py b/Articulated_objects/small_furniture/cabinet/cabinet_7/resource/cabinet_control.py index d5df238de934f9384fb0aa70445b202da0c975c6..e25d0c163b8d46c86f6939558a220860e6d1a53b 100644 --- a/Articulated_objects/small_furniture/cabinet/cabinet_7/resource/cabinet_control.py +++ b/Articulated_objects/small_furniture/cabinet/cabinet_7/resource/cabinet_control.py @@ -1,185 +1,154 @@ import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils -from pxr import PhysxSchema, UsdGeom, UsdPhysics import math -# import nvidia.srl.usd.prim_helper as prim_helper - +import torch +import omni.usd +from omni.kit.scripting import BehaviorScript +from omni.isaac.core import SimulationContext +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: - """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): + + def _find_prim(current): + if current.GetName() == prim_name: + return current.GetPath().pathString + for child in current.GetChildren(): result = _find_prim(child) if result: return result return None - + found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path + def calculate_stiffness(joint_state, joint_limit): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 30 - min_stiffness = 2 - decay_rate = 3 - # threshold = math.radians(20) - # threshold = 0.3 * joint_limit - threshold = -0.1 + max_stiffness = 30 + min_stiffness = 2 + decay_rate = 3 + threshold = -0.1 if joint_state < threshold: return min_stiffness stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) return max(min_stiffness, min(stiffness, max_stiffness)) - -# 1. Articulation Root prim + root_articulation_prim = find_prim_path_by_name("E_body_2") +joint_threshold = -0.1 +joint_names = ["PrismaticJoint_7_down"] -# 2. Joint names -joint_names = ["PrismaticJoint_7_down" ] -#joint1_prim = find_prim_path_by_name(joint_names[0]) -#joint2_prim = find_prim_path_by_name(joint_names[1]) stage = omni.usd.get_context().get_stage() joints_info = {} - -# 3. Joint information for joint_name in joint_names: joint_prim_path = find_prim_path_by_name(joint_name) joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) joint = UsdPhysics.PrismaticJoint(joint_prim_obj) - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() + "prim": joint, + "lower_limit": joint.GetLowerLimitAttr().Get(), + "upper_limit": joint.GetUpperLimitAttr().Get(), } - -# joint1_lower_limit = joints_info[joint_names[0]]['lower_limit'] -# joint1_upper_limit = joints_info[joint_names[0]]['upper_limit'] -# joint2_lower_limit = joints_info[joint_names[1]]['lower_limit'] -# joint2_upper_limit = joints_info[joint_names[1]]['upper_limit'] - -# 4. Joint limits and limit differences joint_limits = {} joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): +for joint_name in joint_names: joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] + "lower": joints_info[joint_name]["lower_limit"], + "upper": joints_info[joint_name]["upper_limit"], } joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] + joints_info[joint_name]["upper_limit"] - joints_info[joint_name]["lower_limit"] ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] class DampingCabinet7Control(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - def on_destroy(self): - pass + self.articulation_root_path = root_articulation_prim + self.joint_names = joint_names + self.joint_limits = joint_limits + self.joint_limit_diffs = joint_limit_diffs + self.joint_threshold = joint_threshold + self.art = None + self.initialized = False + self.joint_indices = None + self.use_torch = None def on_play(self): - # Initialize simulation context self.simulation_context = SimulationContext( stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 + physics_dt=1.0 / 120, + rendering_dt=1.0 / 120, ) - - def on_pause(self): - pass def on_stop(self): - self.init_start=True - pass + carb.log_info(f"{type(self).__name__}.on_stop()->{self.prim_path}") def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.art is None: + return self.target_pose_control() self.damping_stiffness_change() - + def damping_stiffness_change(self): - stage = omni.usd.get_context().get_stage() - # Process all joints - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API - joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) - joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "linear") - # Get joint limit difference and set stiffness - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(calculate_stiffness(joint_state, joint_limit_diff)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - + positions = self.art.get_joint_positions().squeeze() + joint_state = self._get_scalar_value(positions[self.joint_indices[0]]) + joint = joints_info[self.joint_names[0]]["prim"] + joint_drive = UsdPhysics.DriveAPI.Get(joint.GetPrim(), "linear") + joint_drive.GetStiffnessAttr().Set( + calculate_stiffness(joint_state, self.joint_limit_diffs[self.joint_names[0]]) + ) + def target_pose_control(self): - # Process all joints - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - # Get joint limit difference - joint_limit_diff = joint_limit_diffs[joint_names[i]] - # Set target position based on joint state - if joint_state > -0.1: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['upper_limit']) - else: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['lower_limit']) - - + positions = self.art.get_joint_positions().squeeze() + joint_state = self._get_scalar_value(positions[self.joint_indices[0]]) + limits = self.joint_limits[self.joint_names[0]] + if joint_state > self.joint_threshold: + target = limits["upper"] + else: + target = limits["lower"] + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor([target], device=device) + indices_tensor = torch.tensor(self.joint_indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions([target], joint_indices=self.joint_indices) + + self.art.apply_action(action) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + self.initialized = True + except AttributeError as exc: + print(f"Physics not ready yet, will retry: {exc}") + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) + diff --git a/Articulated_objects/small_furniture/cabinet/cabinet_8/resource/cabinet_control.py b/Articulated_objects/small_furniture/cabinet/cabinet_8/resource/cabinet_control.py index 1e12c3776bb9360260d1fc7f438767d51d9d1514..ac1f5c7431605456cf11ea84051a4fbf196fb9c9 100644 --- a/Articulated_objects/small_furniture/cabinet/cabinet_8/resource/cabinet_control.py +++ b/Articulated_objects/small_furniture/cabinet/cabinet_8/resource/cabinet_control.py @@ -1,185 +1,154 @@ import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils -from pxr import PhysxSchema, UsdGeom, UsdPhysics import math -# import nvidia.srl.usd.prim_helper as prim_helper - +import torch +import omni.usd +from omni.kit.scripting import BehaviorScript +from omni.isaac.core import SimulationContext +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: - """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): + + def _find_prim(current): + if current.GetName() == prim_name: + return current.GetPath().pathString + for child in current.GetChildren(): result = _find_prim(child) if result: return result return None - + found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path + def calculate_stiffness(joint_state, joint_limit): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 30 - min_stiffness = 2 - decay_rate = 3 - # threshold = math.radians(20) - # threshold = 0.3 * joint_limit - threshold = -0.05 + max_stiffness = 30 + min_stiffness = 2 + decay_rate = 3 + threshold = -0.05 if joint_state < threshold: return min_stiffness stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) return max(min_stiffness, min(stiffness, max_stiffness)) - -# 1. Articulation Root prim + root_articulation_prim = find_prim_path_by_name("E_body_2") +joint_threshold = -0.05 +joint_names = ["PrismaticJoint_cabinet_8_up"] -# 2. Joint names -joint_names = ["PrismaticJoint_cabinet_8_up" ] -#joint1_prim = find_prim_path_by_name(joint_names[0]) -#joint2_prim = find_prim_path_by_name(joint_names[1]) stage = omni.usd.get_context().get_stage() joints_info = {} - -# 3. Joint information for joint_name in joint_names: joint_prim_path = find_prim_path_by_name(joint_name) joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) joint = UsdPhysics.PrismaticJoint(joint_prim_obj) - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() + "prim": joint, + "lower_limit": joint.GetLowerLimitAttr().Get(), + "upper_limit": joint.GetUpperLimitAttr().Get(), } - -# joint1_lower_limit = joints_info[joint_names[0]]['lower_limit'] -# joint1_upper_limit = joints_info[joint_names[0]]['upper_limit'] -# joint2_lower_limit = joints_info[joint_names[1]]['lower_limit'] -# joint2_upper_limit = joints_info[joint_names[1]]['upper_limit'] - -# 4. Joint limits and limit differences joint_limits = {} joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): +for joint_name in joint_names: joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] + "lower": joints_info[joint_name]["lower_limit"], + "upper": joints_info[joint_name]["upper_limit"], } joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] + joints_info[joint_name]["upper_limit"] - joints_info[joint_name]["lower_limit"] ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] class DampingCabinet8Control(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - def on_destroy(self): - pass + self.articulation_root_path = root_articulation_prim + self.joint_names = joint_names + self.joint_limits = joint_limits + self.joint_limit_diffs = joint_limit_diffs + self.joint_threshold = joint_threshold + self.art = None + self.initialized = False + self.joint_indices = None + self.use_torch = None def on_play(self): - # Initialize simulation context self.simulation_context = SimulationContext( stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 + physics_dt=1.0 / 120, + rendering_dt=1.0 / 120, ) - - def on_pause(self): - pass def on_stop(self): - self.init_start=True - pass + carb.log_info(f"{type(self).__name__}.on_stop()->{self.prim_path}") def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.art is None: + return self.target_pose_control() self.damping_stiffness_change() - + def damping_stiffness_change(self): - stage = omni.usd.get_context().get_stage() - # Process all joints - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API - joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) - joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "linear") - # Get joint limit difference and set stiffness - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(calculate_stiffness(joint_state, joint_limit_diff)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - + positions = self.art.get_joint_positions().squeeze() + joint_state = self._get_scalar_value(positions[self.joint_indices[0]]) + joint = joints_info[self.joint_names[0]]["prim"] + joint_drive = UsdPhysics.DriveAPI.Get(joint.GetPrim(), "linear") + joint_drive.GetStiffnessAttr().Set( + calculate_stiffness(joint_state, self.joint_limit_diffs[self.joint_names[0]]) + ) + def target_pose_control(self): - # Process all joints - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - # Get joint limit difference - joint_limit_diff = joint_limit_diffs[joint_names[i]] - # Set target position based on joint state - if joint_state > -0.05: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['upper_limit']) - else: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['lower_limit']) - - + positions = self.art.get_joint_positions().squeeze() + joint_state = self._get_scalar_value(positions[self.joint_indices[0]]) + limits = self.joint_limits[self.joint_names[0]] + if joint_state > self.joint_threshold: + target = limits["upper"] + else: + target = limits["lower"] + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor([target], device=device) + indices_tensor = torch.tensor(self.joint_indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions([target], joint_indices=self.joint_indices) + + self.art.apply_action(action) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + self.initialized = True + except AttributeError as exc: + print(f"Physics not ready yet, will retry: {exc}") + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) + diff --git a/Articulated_objects/small_furniture/cabinet/cabinet_9/resource/cabinet_control.py b/Articulated_objects/small_furniture/cabinet/cabinet_9/resource/cabinet_control.py index 9f2944aeac8a2d938b2a12ca701db561a10603a0..0be7831adc43b05591e3aed9676fefcd84adcca3 100644 --- a/Articulated_objects/small_furniture/cabinet/cabinet_9/resource/cabinet_control.py +++ b/Articulated_objects/small_furniture/cabinet/cabinet_9/resource/cabinet_control.py @@ -1,185 +1,154 @@ import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils -from pxr import PhysxSchema, UsdGeom, UsdPhysics import math -# import nvidia.srl.usd.prim_helper as prim_helper - +import torch +import omni.usd +from omni.kit.scripting import BehaviorScript +from omni.isaac.core import SimulationContext +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: - """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): + + def _find_prim(current): + if current.GetName() == prim_name: + return current.GetPath().pathString + for child in current.GetChildren(): result = _find_prim(child) if result: return result return None - + found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path + def calculate_stiffness(joint_state, joint_limit): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 50 - min_stiffness = 2 - decay_rate = 3 - # threshold = math.radians(20) - # threshold = 0.3 * joint_limit - threshold = -0.075 + max_stiffness = 50 + min_stiffness = 2 + decay_rate = 3 + threshold = -0.075 if joint_state < threshold: return min_stiffness stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) return max(min_stiffness, min(stiffness, max_stiffness)) - -# 1. Articulation Root prim + root_articulation_prim = find_prim_path_by_name("E_body1_4") +joint_threshold = -0.075 +joint_names = ["PrismaticJoint_cabinet_9_down"] -# 2. Joint names -joint_names = ["PrismaticJoint_cabinet_9_down" ] -#joint1_prim = find_prim_path_by_name(joint_names[0]) -#joint2_prim = find_prim_path_by_name(joint_names[1]) stage = omni.usd.get_context().get_stage() joints_info = {} - -# 3. Joint information for joint_name in joint_names: joint_prim_path = find_prim_path_by_name(joint_name) joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) joint = UsdPhysics.PrismaticJoint(joint_prim_obj) - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() + "prim": joint, + "lower_limit": joint.GetLowerLimitAttr().Get(), + "upper_limit": joint.GetUpperLimitAttr().Get(), } - -# joint1_lower_limit = joints_info[joint_names[0]]['lower_limit'] -# joint1_upper_limit = joints_info[joint_names[0]]['upper_limit'] -# joint2_lower_limit = joints_info[joint_names[1]]['lower_limit'] -# joint2_upper_limit = joints_info[joint_names[1]]['upper_limit'] - -# 4. Joint limits and limit differences joint_limits = {} joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): +for joint_name in joint_names: joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] + "lower": joints_info[joint_name]["lower_limit"], + "upper": joints_info[joint_name]["upper_limit"], } joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] + joints_info[joint_name]["upper_limit"] - joints_info[joint_name]["lower_limit"] ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] class DampingCabinet9Control(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - def on_destroy(self): - pass + self.articulation_root_path = root_articulation_prim + self.joint_names = joint_names + self.joint_limits = joint_limits + self.joint_limit_diffs = joint_limit_diffs + self.joint_threshold = joint_threshold + self.art = None + self.initialized = False + self.joint_indices = None + self.use_torch = None def on_play(self): - # Initialize simulation context self.simulation_context = SimulationContext( stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 + physics_dt=1.0 / 120, + rendering_dt=1.0 / 120, ) - - def on_pause(self): - pass def on_stop(self): - self.init_start=True - pass + carb.log_info(f"{type(self).__name__}.on_stop()->{self.prim_path}") def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.art is None: + return self.target_pose_control() self.damping_stiffness_change() - + def damping_stiffness_change(self): - stage = omni.usd.get_context().get_stage() - # Process all joints - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API - joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) - joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "linear") - # Get joint limit difference and set stiffness - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(calculate_stiffness(joint_state, joint_limit_diff)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - + positions = self.art.get_joint_positions().squeeze() + joint_state = self._get_scalar_value(positions[self.joint_indices[0]]) + joint = joints_info[self.joint_names[0]]["prim"] + joint_drive = UsdPhysics.DriveAPI.Get(joint.GetPrim(), "linear") + joint_drive.GetStiffnessAttr().Set( + calculate_stiffness(joint_state, self.joint_limit_diffs[self.joint_names[0]]) + ) + def target_pose_control(self): - # Process all joints - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - # Get joint limit difference - joint_limit_diff = joint_limit_diffs[joint_names[i]] - # Set target position based on joint state - if joint_state > -0.075: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['upper_limit']) - else: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['lower_limit']) - - + positions = self.art.get_joint_positions().squeeze() + joint_state = self._get_scalar_value(positions[self.joint_indices[0]]) + limits = self.joint_limits[self.joint_names[0]] + if joint_state > self.joint_threshold: + target = limits["upper"] + else: + target = limits["lower"] + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor([target], device=device) + indices_tensor = torch.tensor(self.joint_indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions([target], joint_indices=self.joint_indices) + + self.art.apply_action(action) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + self.initialized = True + except AttributeError as exc: + print(f"Physics not ready yet, will retry: {exc}") + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) + diff --git a/Articulated_objects/small_furniture/filing_cabinet/double_door/double_door_3/resource/cabinet_control.py b/Articulated_objects/small_furniture/filing_cabinet/double_door/double_door_3/resource/cabinet_control.py index 862f4865cf46ce19202d494c9d118d4437ab5e8b..e6dc1f5b16e9bffc042c5cb4ae2f70f08a7ce6a8 100644 --- a/Articulated_objects/small_furniture/filing_cabinet/double_door/double_door_3/resource/cabinet_control.py +++ b/Articulated_objects/small_furniture/filing_cabinet/double_door/double_door_3/resource/cabinet_control.py @@ -1,21 +1,12 @@ import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils -from pxr import PhysxSchema, UsdGeom, UsdPhysics import math -# import nvidia.srl.usd.prim_helper as prim_helper - +import torch +import omni.usd +from omni.kit.scripting import BehaviorScript +from omni.isaac.core import SimulationContext +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: @@ -65,8 +56,6 @@ joint_threshold = -0.2 # 2. Joint names joint_names = ["PrismaticJoint_double_door_3_left","PrismaticJoint_double_door_3_right"] -joint1_prim = find_prim_path_by_name(joint_names[0]) -# joint2_prim = find_prim_path_by_name(joint_names[1]) stage = omni.usd.get_context().get_stage() joints_info = {} @@ -82,11 +71,6 @@ for joint_name in joint_names: 'upper_limit': joint.GetUpperLimitAttr().Get() } -# joint1_lower_limit = joints_info[joint_names[0]]['lower_limit'] -# joint1_upper_limit = joints_info[joint_names[0]]['upper_limit'] -# joint2_lower_limit = joints_info[joint_names[1]]['lower_limit'] -# joint2_upper_limit = joints_info[joint_names[1]]['upper_limit'] - # 4. Joint limits and limit differences joint_limits = {} @@ -100,87 +84,91 @@ for i, joint_name in enumerate(joint_names): joint_limit_diffs[joint_name] = ( joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] class Filing1Control(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - def on_destroy(self): - pass + self.articulation_root_path = root_articulation_prim + self.joint_names = joint_names + self.joint_limits = joint_limits + self.joint_limit_diffs = joint_limit_diffs + self.joint_threshold = joint_threshold + self.art = None + self.initialized = False + self.joint_indices = None + self.use_torch = None def on_play(self): - # Initialize simulation context self.simulation_context = SimulationContext( stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 + physics_dt=1.0 / 120, + rendering_dt=1.0 / 120, ) - - def on_pause(self): - pass - - def on_stop(self): - self.init_start=True - pass def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.art is None: + return self.target_pose_control() self.damping_stiffness_change() - + def damping_stiffness_change(self): - stage = omni.usd.get_context().get_stage() - # Process all joints - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API - joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) - joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "linear") - # Get joint limit difference and set stiffness - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(calculate_stiffness(joint_state, joint_limit_diff)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - + positions = self.art.get_joint_positions().squeeze() + for idx, joint_name in enumerate(self.joint_names): + joint_state = self._get_scalar_value(positions[self.joint_indices[idx]]) + joint = joints_info[joint_name]['prim'] + joint_drive = UsdPhysics.DriveAPI.Get(joint.GetPrim(), "linear") + joint_drive.GetStiffnessAttr().Set( + calculate_stiffness(joint_state, self.joint_limit_diffs[joint_name]) + ) + def target_pose_control(self): - # Process all joints - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - # Get joint limit difference - joint_limit_diff = joint_limit_diffs[joint_names[i]] - # Set target position based on joint state - if joint_state > 0.5 * joint_threshold: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['upper_limit']) + positions = self.art.get_joint_positions().squeeze() + targets = [] + indices = [] + for idx, joint_name in enumerate(self.joint_names): + joint_state = self._get_scalar_value(positions[self.joint_indices[idx]]) + limits = self.joint_limits[joint_name] + if joint_state > 0.5 * self.joint_threshold: + targets.append(limits['upper']) else: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['lower_limit']) - - + targets.append(limits['lower']) + indices.append(self.joint_indices[idx]) + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + + self.art.apply_action(action) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + self.initialized = True + except AttributeError as exc: + print(f"Physics not ready yet, will retry: {exc}") + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) diff --git a/Articulated_objects/small_furniture/filing_cabinet/double_door/double_door_4/resource/cabinet_control.py b/Articulated_objects/small_furniture/filing_cabinet/double_door/double_door_4/resource/cabinet_control.py index 4bbdd790b5d1acb6c3e9b3d0e96327ce3659f222..d7b89fce655363fc14a9d6102f169b36e8061f57 100644 --- a/Articulated_objects/small_furniture/filing_cabinet/double_door/double_door_4/resource/cabinet_control.py +++ b/Articulated_objects/small_furniture/filing_cabinet/double_door/double_door_4/resource/cabinet_control.py @@ -1,21 +1,12 @@ import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils -from pxr import PhysxSchema, UsdGeom, UsdPhysics import math -# import nvidia.srl.usd.prim_helper as prim_helper - +import torch +import omni.usd +from omni.kit.scripting import BehaviorScript +from omni.isaac.core import SimulationContext +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: @@ -65,8 +56,6 @@ joint_threshold = -0.2 # 2. Joint names joint_names = ["PrismaticJoint_double_door_4_left","PrismaticJoint_double_door_4_right"] -joint1_prim = find_prim_path_by_name(joint_names[0]) -# joint2_prim = find_prim_path_by_name(joint_names[1]) stage = omni.usd.get_context().get_stage() joints_info = {} @@ -82,11 +71,6 @@ for joint_name in joint_names: 'upper_limit': joint.GetUpperLimitAttr().Get() } -# joint1_lower_limit = joints_info[joint_names[0]]['lower_limit'] -# joint1_upper_limit = joints_info[joint_names[0]]['upper_limit'] -# joint2_lower_limit = joints_info[joint_names[1]]['lower_limit'] -# joint2_upper_limit = joints_info[joint_names[1]]['upper_limit'] - # 4. Joint limits and limit differences joint_limits = {} @@ -100,87 +84,91 @@ for i, joint_name in enumerate(joint_names): joint_limit_diffs[joint_name] = ( joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] class Filing4Control(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - def on_destroy(self): - pass + self.articulation_root_path = root_articulation_prim + self.joint_names = joint_names + self.joint_limits = joint_limits + self.joint_limit_diffs = joint_limit_diffs + self.joint_threshold = joint_threshold + self.art = None + self.initialized = False + self.joint_indices = None + self.use_torch = None def on_play(self): - # Initialize simulation context self.simulation_context = SimulationContext( stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 + physics_dt=1.0 / 120, + rendering_dt=1.0 / 120, ) - - def on_pause(self): - pass - - def on_stop(self): - self.init_start=True - pass def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.art is None: + return self.target_pose_control() self.damping_stiffness_change() - + def damping_stiffness_change(self): - stage = omni.usd.get_context().get_stage() - # Process all joints - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API - joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) - joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "linear") - # Get joint limit difference and set stiffness - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(calculate_stiffness(joint_state, joint_limit_diff)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - + positions = self.art.get_joint_positions().squeeze() + for idx, joint_name in enumerate(self.joint_names): + joint_state = self._get_scalar_value(positions[self.joint_indices[idx]]) + joint = joints_info[joint_name]['prim'] + joint_drive = UsdPhysics.DriveAPI.Get(joint.GetPrim(), "linear") + joint_drive.GetStiffnessAttr().Set( + calculate_stiffness(joint_state, self.joint_limit_diffs[joint_name]) + ) + def target_pose_control(self): - # Process all joints - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - # Get joint limit difference - joint_limit_diff = joint_limit_diffs[joint_names[i]] - # Set target position based on joint state - if joint_state > 0.5 * joint_threshold: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['upper_limit']) + positions = self.art.get_joint_positions().squeeze() + targets = [] + indices = [] + for idx, joint_name in enumerate(self.joint_names): + joint_state = self._get_scalar_value(positions[self.joint_indices[idx]]) + limits = self.joint_limits[joint_name] + if joint_state > 0.5 * self.joint_threshold: + targets.append(limits['upper']) else: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['lower_limit']) - - + targets.append(limits['lower']) + indices.append(self.joint_indices[idx]) + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + + self.art.apply_action(action) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + self.initialized = True + except AttributeError as exc: + print(f"Physics not ready yet, will retry: {exc}") + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) diff --git a/Articulated_objects/small_furniture/filing_cabinet/drawers/chest_of_drawers_1/resource/cabinet_control.py b/Articulated_objects/small_furniture/filing_cabinet/drawers/chest_of_drawers_1/resource/cabinet_control.py index b1cfbb9a31f3aabbac79dc5f695f9bf2ef67b1a7..dc6e9a5ca3c6a923f5f3e19fa613fb9580e61745 100644 --- a/Articulated_objects/small_furniture/filing_cabinet/drawers/chest_of_drawers_1/resource/cabinet_control.py +++ b/Articulated_objects/small_furniture/filing_cabinet/drawers/chest_of_drawers_1/resource/cabinet_control.py @@ -1,28 +1,16 @@ -import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils +import torch +from omni.kit.scripting import BehaviorScript +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +import omni.usd from pxr import PhysxSchema, UsdGeom, UsdPhysics import math -# import nvidia.srl.usd.prim_helper as prim_helper - - def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - def _find_prim(prim): if prim.GetName() == prim_name: return prim.GetPath().pathString @@ -31,156 +19,155 @@ def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: if result: return result return None - found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path -def calculate_stiffness(joint_state, joint_limit): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 50 - min_stiffness = 2 - decay_rate = 3 - # threshold = math.radians(20) - # threshold = 0.3 * joint_limit - threshold = 0.5 * joint_threshold - if joint_state > threshold: - return min_stiffness - stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) - return max(min_stiffness, min(stiffness, max_stiffness)) - - -# 1. Articulation Root prim -root_articulation_prim = find_prim_path_by_name("E_body_25") -joint_threshold = 0.2 - -# 2. Joint names -joint_names = ["PrismaticJoint_chest_of_drawers_1_up","PrismaticJoint_chest_of_drawers_1_middle","PrismaticJoint_chest_of_drawers_1_down"] -joint1_prim = find_prim_path_by_name(joint_names[0]) -# joint2_prim = find_prim_path_by_name(joint_names[1]) -stage = omni.usd.get_context().get_stage() -joints_info = {} - -# 3. Joint information -for joint_name in joint_names: - joint_prim_path = find_prim_path_by_name(joint_name) - joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) - joint = UsdPhysics.PrismaticJoint(joint_prim_obj) - - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() - } - -# joint1_lower_limit = joints_info[joint_names[0]]['lower_limit'] -# joint1_upper_limit = joints_info[joint_names[0]]['upper_limit'] -# joint2_lower_limit = joints_info[joint_names[1]]['lower_limit'] -# joint2_upper_limit = joints_info[joint_names[1]]['upper_limit'] - - -# 4. Joint limits and limit differences -joint_limits = {} -joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): - joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] - } - joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] - ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_25"] +JOINT_NAMES = ["PrismaticJoint_chest_of_drawers_1_up", "PrismaticJoint_chest_of_drawers_1_middle", "PrismaticJoint_chest_of_drawers_1_down"] +JOINT_THRESHOLD = 0.2 class FilingDrawersControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - def on_destroy(self): - pass + # 尝试找到articulation根路径 + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.joint_limits = None + self.joint_limit_diffs = None + self.use_torch = None + self.joint_threshold = JOINT_THRESHOLD def on_play(self): - # Initialize simulation context - self.simulation_context = SimulationContext( - stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 - ) - - def on_pause(self): - pass - - def on_stop(self): - self.init_start=True - pass - - def on_update(self, current_time: float, delta_time: float): - if delta_time <= 0: - return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) + self._initialize_articulation() - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + def on_update(self, current_time, delta_time): + if delta_time <= 0: return + # 延迟初始化,确保physics准备好 + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return # 如果还没初始化成功,跳过本次更新 + + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.art is None: + return self.target_pose_control() self.damping_stiffness_change() + + def _get_scalar_value(self, value): + """将值转换为标量(支持torch tensor和普通数值)""" + if isinstance(value, torch.Tensor): + return value.item() + elif hasattr(value, 'item'): + return value.item() + else: + return float(value) + def calculate_stiffness(self, joint_state, joint_limit): + """Calculate stiffness value based on joint angle (自动适配torch tensor或普通数值)""" + max_stiffness = 50 + min_stiffness = 2 + decay_rate = 3 + threshold = 0.5 * self.joint_threshold + + # 转换为标量值进行比较 + joint_state_scalar = self._get_scalar_value(joint_state) + + if joint_state_scalar > threshold: + return min_stiffness + + # 根据平台选择计算方式 + if self.use_torch: + # Isaac Lab: 使用torch tensor计算 + device = joint_state.device if isinstance(joint_state, torch.Tensor) else torch.device('cuda' if torch.cuda.is_available() else 'cpu') + stiffness = max_stiffness * torch.exp(torch.tensor(-decay_rate * abs(joint_state_scalar), device=device)) + stiffness = max(min_stiffness, min(stiffness.item(), max_stiffness)) + else: + # Isaac Sim: 使用math计算 + stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state_scalar)) + stiffness = max(min_stiffness, min(stiffness, max_stiffness)) + + return stiffness + def damping_stiffness_change(self): + positions = self.art.get_joint_positions().squeeze() stage = omni.usd.get_context().get_stage() - # Process all joints - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API + for i, idx in enumerate(self.joint_indices): + joint_name = self.joint_names[i] joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "linear") - # Get joint limit difference and set stiffness - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(calculate_stiffness(joint_state, joint_limit_diff)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - + joint_state = positions[idx] + joint_limit_diff = self.joint_limit_diffs[i] + joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state, joint_limit_diff)) + def target_pose_control(self): - # Process all joints - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - # Get joint limit difference - joint_limit_diff = joint_limit_diffs[joint_names[i]] - # Set target position based on joint state - if joint_state > 0.5 * joint_threshold: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['upper_limit']) - else: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['lower_limit']) + positions = self.art.get_joint_positions().squeeze() + targets = [] + for i, idx in enumerate(self.joint_indices): + joint_state = positions[idx] + # 转换为标量值进行比较 + joint_state_scalar = self._get_scalar_value(joint_state) + if joint_state_scalar > 0.5 * self.joint_threshold: + targets.append(self.joint_limits[i]["upper"]) + else: + targets.append(self.joint_limits[i]["lower"]) + + # 根据平台选择不同的action创建方式 + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(self.joint_indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=self.joint_indices) + + self.art.apply_action(action) + + def _initialize_articulation(self): + """延迟初始化,在physics准备好后调用""" + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + print("self.art :", self.art) + self.art.initialize() + + # 检测返回类型:torch tensor 还是 numpy/普通数值 + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + print(f"Detected platform: {'Isaac Lab (torch)' if self.use_torch else 'Isaac Sim (numpy/math)'}") + + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + dof_limits = self.art.get_dof_limits().squeeze() + self.joint_limits = [{ + "lower": dof_limits[idx, 0], + "upper": dof_limits[idx, 1] + } for idx in self.joint_indices] + self.joint_limit_diffs = [ + abs(lim["upper"] - lim["lower"]) for lim in self.joint_limits + ] + self.initialized = True + except AttributeError as e: + # Physics还没准备好,下次再试 + print(f"Physics not ready yet, will retry: {e}") + return diff --git a/Articulated_objects/small_furniture/filing_cabinet/drawers/chest_of_drawers_2/resource/filing_control.py b/Articulated_objects/small_furniture/filing_cabinet/drawers/chest_of_drawers_2/resource/filing_control.py index d1b58c2c030205885980ec38d5d4a177274537c5..11b68c3de960e7b0d35920661ae5f47398da0592 100644 --- a/Articulated_objects/small_furniture/filing_cabinet/drawers/chest_of_drawers_2/resource/filing_control.py +++ b/Articulated_objects/small_furniture/filing_cabinet/drawers/chest_of_drawers_2/resource/filing_control.py @@ -1,28 +1,16 @@ -import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils +import torch +from omni.kit.scripting import BehaviorScript +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +import omni.usd from pxr import PhysxSchema, UsdGeom, UsdPhysics import math -# import nvidia.srl.usd.prim_helper as prim_helper - - def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - def _find_prim(prim): if prim.GetName() == prim_name: return prim.GetPath().pathString @@ -31,156 +19,155 @@ def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: if result: return result return None - found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path -def calculate_stiffness(joint_state, joint_limit): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 50 - min_stiffness = 2 - decay_rate = 3 - # threshold = math.radians(20) - # threshold = 0.3 * joint_limit - threshold = 0.5 * joint_threshold - if joint_state < threshold: - return min_stiffness - stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) - return max(min_stiffness, min(stiffness, max_stiffness)) - - -# 1. Articulation Root prim -root_articulation_prim = find_prim_path_by_name("E_body_1") -joint_threshold = -0.2 - -# 2. Joint names -joint_names = ["PrismaticJoint_chest_of_drawers_2_down","PrismaticJoint_chest_of_drawers_2_up"] -joint1_prim = find_prim_path_by_name(joint_names[0]) -# joint2_prim = find_prim_path_by_name(joint_names[1]) -stage = omni.usd.get_context().get_stage() -joints_info = {} - -# 3. Joint information -for joint_name in joint_names: - joint_prim_path = find_prim_path_by_name(joint_name) - joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) - joint = UsdPhysics.PrismaticJoint(joint_prim_obj) - - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() - } - -# joint1_lower_limit = joints_info[joint_names[0]]['lower_limit'] -# joint1_upper_limit = joints_info[joint_names[0]]['upper_limit'] -# joint2_lower_limit = joints_info[joint_names[1]]['lower_limit'] -# joint2_upper_limit = joints_info[joint_names[1]]['upper_limit'] - - -# 4. Joint limits and limit differences -joint_limits = {} -joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): - joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] - } - joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] - ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_1"] +JOINT_NAMES = ["PrismaticJoint_chest_of_drawers_2_down", "PrismaticJoint_chest_of_drawers_2_up"] +JOINT_THRESHOLD = -0.2 class FilingDrawersControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - def on_destroy(self): - pass - + # 尝试找到articulation根路径 + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.joint_limits = None + self.joint_limit_diffs = None + self.use_torch = None + self.joint_threshold = JOINT_THRESHOLD + def on_play(self): - # Initialize simulation context - self.simulation_context = SimulationContext( - stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 - ) - - def on_pause(self): - pass - - def on_stop(self): - self.init_start=True - pass - - def on_update(self, current_time: float, delta_time: float): - if delta_time <= 0: - return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) + self._initialize_articulation() - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + def on_update(self, current_time, delta_time): + if delta_time <= 0: return + # 延迟初始化,确保physics准备好 + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return # 如果还没初始化成功,跳过本次更新 + + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.art is None: + return self.target_pose_control() self.damping_stiffness_change() + + def _get_scalar_value(self, value): + """将值转换为标量(支持torch tensor和普通数值)""" + if isinstance(value, torch.Tensor): + return value.item() + elif hasattr(value, 'item'): + return value.item() + else: + return float(value) + def calculate_stiffness(self, joint_state, joint_limit): + """Calculate stiffness value based on joint angle (自动适配torch tensor或普通数值)""" + max_stiffness = 50 + min_stiffness = 2 + decay_rate = 3 + threshold = 0.5 * self.joint_threshold + + # 转换为标量值进行比较 + joint_state_scalar = self._get_scalar_value(joint_state) + + if joint_state_scalar < threshold: + return min_stiffness + + # 根据平台选择计算方式 + if self.use_torch: + # Isaac Lab: 使用torch tensor计算 + device = joint_state.device if isinstance(joint_state, torch.Tensor) else torch.device('cuda' if torch.cuda.is_available() else 'cpu') + stiffness = max_stiffness * torch.exp(torch.tensor(-decay_rate * abs(joint_state_scalar), device=device)) + stiffness = max(min_stiffness, min(stiffness.item(), max_stiffness)) + else: + # Isaac Sim: 使用math计算 + stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state_scalar)) + stiffness = max(min_stiffness, min(stiffness, max_stiffness)) + + return stiffness + def damping_stiffness_change(self): + positions = self.art.get_joint_positions().squeeze() stage = omni.usd.get_context().get_stage() - # Process all joints - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API + for i, idx in enumerate(self.joint_indices): + joint_name = self.joint_names[i] joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "linear") - # Get joint limit difference and set stiffness - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(calculate_stiffness(joint_state, joint_limit_diff)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - + joint_state = positions[idx] + joint_limit_diff = self.joint_limit_diffs[i] + joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state, joint_limit_diff)) + def target_pose_control(self): - # Process all joints - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - # Get joint limit difference - joint_limit_diff = joint_limit_diffs[joint_names[i]] - # Set target position based on joint state - if joint_state > 0.5 * joint_threshold: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['upper_limit']) - else: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['lower_limit']) + positions = self.art.get_joint_positions().squeeze() + targets = [] + for i, idx in enumerate(self.joint_indices): + joint_state = positions[idx] + # 转换为标量值进行比较 + joint_state_scalar = self._get_scalar_value(joint_state) + if joint_state_scalar > 0.5 * self.joint_threshold: + targets.append(self.joint_limits[i]["upper"]) + else: + targets.append(self.joint_limits[i]["lower"]) + + # 根据平台选择不同的action创建方式 + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(self.joint_indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=self.joint_indices) + self.art.apply_action(action) + + def _initialize_articulation(self): + """延迟初始化,在physics准备好后调用""" + if self.initialized: + return + + try: + self.art = Articulation(self.articulation_root_path) + print("self.art :", self.art) + self.art.initialize() + + # 检测返回类型:torch tensor 还是 numpy/普通数值 + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + print(f"Detected platform: {'Isaac Lab (torch)' if self.use_torch else 'Isaac Sim (numpy/math)'}") + + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + dof_limits = self.art.get_dof_limits().squeeze() + self.joint_limits = [{ + "lower": dof_limits[idx, 0], + "upper": dof_limits[idx, 1] + } for idx in self.joint_indices] + self.joint_limit_diffs = [ + abs(lim["upper"] - lim["lower"]) for lim in self.joint_limits + ] + self.initialized = True + except AttributeError as e: + # Physics还没准备好,下次再试 + print(f"Physics not ready yet, will retry: {e}") + return diff --git a/Articulated_objects/small_furniture/filing_cabinet/drawers/chest_of_drawers_3/resource/filing_control.py b/Articulated_objects/small_furniture/filing_cabinet/drawers/chest_of_drawers_3/resource/filing_control.py index b53785176048ec95d2fd4ebfd2025115806865e3..dc5df4dcedcfdc9fb67a064aeb12ebf1050f7399 100644 --- a/Articulated_objects/small_furniture/filing_cabinet/drawers/chest_of_drawers_3/resource/filing_control.py +++ b/Articulated_objects/small_furniture/filing_cabinet/drawers/chest_of_drawers_3/resource/filing_control.py @@ -1,28 +1,16 @@ -import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils +import torch +from omni.kit.scripting import BehaviorScript +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +import omni.usd from pxr import PhysxSchema, UsdGeom, UsdPhysics import math -# import nvidia.srl.usd.prim_helper as prim_helper - - def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - def _find_prim(prim): if prim.GetName() == prim_name: return prim.GetPath().pathString @@ -31,156 +19,155 @@ def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: if result: return result return None - found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path -def calculate_stiffness(joint_state, joint_limit): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 50 - min_stiffness = 2 - decay_rate = 3 - # threshold = math.radians(20) - # threshold = 0.3 * joint_limit - threshold = 0.5 * joint_threshold - if joint_state < threshold: - return min_stiffness - stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) - return max(min_stiffness, min(stiffness, max_stiffness)) - - -# 1. Articulation Root prim -root_articulation_prim = find_prim_path_by_name("E_body_1") -joint_threshold = -0.2 - -# 2. Joint names -joint_names = ["PrismaticJoint_chest_of_drawers_3_1","PrismaticJoint_chest_of_drawers_3_2","PrismaticJoint_chest_of_drawers_3_3"] -joint1_prim = find_prim_path_by_name(joint_names[0]) -# joint2_prim = find_prim_path_by_name(joint_names[1]) -stage = omni.usd.get_context().get_stage() -joints_info = {} - -# 3. Joint information -for joint_name in joint_names: - joint_prim_path = find_prim_path_by_name(joint_name) - joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) - joint = UsdPhysics.PrismaticJoint(joint_prim_obj) - - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() - } - -# joint1_lower_limit = joints_info[joint_names[0]]['lower_limit'] -# joint1_upper_limit = joints_info[joint_names[0]]['upper_limit'] -# joint2_lower_limit = joints_info[joint_names[1]]['lower_limit'] -# joint2_upper_limit = joints_info[joint_names[1]]['upper_limit'] - - -# 4. Joint limits and limit differences -joint_limits = {} -joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): - joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] - } - joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] - ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_1"] +JOINT_NAMES = ["PrismaticJoint_chest_of_drawers_3_1", "PrismaticJoint_chest_of_drawers_3_2", "PrismaticJoint_chest_of_drawers_3_3"] +JOINT_THRESHOLD = -0.2 class FilingDrawersControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - def on_destroy(self): - pass - + # 尝试找到articulation根路径 + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.joint_limits = None + self.joint_limit_diffs = None + self.use_torch = None + self.joint_threshold = JOINT_THRESHOLD + def on_play(self): - # Initialize simulation context - self.simulation_context = SimulationContext( - stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 - ) - - def on_pause(self): - pass - - def on_stop(self): - self.init_start=True - pass - - def on_update(self, current_time: float, delta_time: float): - if delta_time <= 0: - return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) + self._initialize_articulation() + + def on_update(self, current_time, delta_time): + if delta_time <= 0: return + # 延迟初始化,确保physics准备好 + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return # 如果还没初始化成功,跳过本次更新 - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.art is None: + return self.target_pose_control() self.damping_stiffness_change() + + def _get_scalar_value(self, value): + """将值转换为标量(支持torch tensor和普通数值)""" + if isinstance(value, torch.Tensor): + return value.item() + elif hasattr(value, 'item'): + return value.item() + else: + return float(value) + def calculate_stiffness(self, joint_state, joint_limit): + """Calculate stiffness value based on joint angle (自动适配torch tensor或普通数值)""" + max_stiffness = 50 + min_stiffness = 2 + decay_rate = 3 + threshold = 0.5 * self.joint_threshold + + # 转换为标量值进行比较 + joint_state_scalar = self._get_scalar_value(joint_state) + + if joint_state_scalar < threshold: + return min_stiffness + + # 根据平台选择计算方式 + if self.use_torch: + # Isaac Lab: 使用torch tensor计算 + device = joint_state.device if isinstance(joint_state, torch.Tensor) else torch.device('cuda' if torch.cuda.is_available() else 'cpu') + stiffness = max_stiffness * torch.exp(torch.tensor(-decay_rate * abs(joint_state_scalar), device=device)) + stiffness = max(min_stiffness, min(stiffness.item(), max_stiffness)) + else: + # Isaac Sim: 使用math计算 + stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state_scalar)) + stiffness = max(min_stiffness, min(stiffness, max_stiffness)) + + return stiffness + def damping_stiffness_change(self): + positions = self.art.get_joint_positions().squeeze() stage = omni.usd.get_context().get_stage() - # Process all joints - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API + for i, idx in enumerate(self.joint_indices): + joint_name = self.joint_names[i] joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "linear") - # Get joint limit difference and set stiffness - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(calculate_stiffness(joint_state, joint_limit_diff)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - + joint_state = positions[idx] + joint_limit_diff = self.joint_limit_diffs[i] + joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state, joint_limit_diff)) + def target_pose_control(self): - # Process all joints - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - # Get joint limit difference - joint_limit_diff = joint_limit_diffs[joint_names[i]] - # Set target position based on joint state - if joint_state > 0.5 * joint_threshold: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['upper_limit']) - else: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['lower_limit']) + positions = self.art.get_joint_positions().squeeze() + targets = [] + for i, idx in enumerate(self.joint_indices): + joint_state = positions[idx] + # 转换为标量值进行比较 + joint_state_scalar = self._get_scalar_value(joint_state) + if joint_state_scalar > 0.5 * self.joint_threshold: + targets.append(self.joint_limits[i]["upper"]) + else: + targets.append(self.joint_limits[i]["lower"]) + + # 根据平台选择不同的action创建方式 + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(self.joint_indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=self.joint_indices) + self.art.apply_action(action) + + def _initialize_articulation(self): + """延迟初始化,在physics准备好后调用""" + if self.initialized: + return + + try: + self.art = Articulation(self.articulation_root_path) + print("self.art :", self.art) + self.art.initialize() + + # 检测返回类型:torch tensor 还是 numpy/普通数值 + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + print(f"Detected platform: {'Isaac Lab (torch)' if self.use_torch else 'Isaac Sim (numpy/math)'}") + + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + dof_limits = self.art.get_dof_limits().squeeze() + self.joint_limits = [{ + "lower": dof_limits[idx, 0], + "upper": dof_limits[idx, 1] + } for idx in self.joint_indices] + self.joint_limit_diffs = [ + abs(lim["upper"] - lim["lower"]) for lim in self.joint_limits + ] + self.initialized = True + except AttributeError as e: + # Physics还没准备好,下次再试 + print(f"Physics not ready yet, will retry: {e}") + return diff --git a/Articulated_objects/small_furniture/filing_cabinet/drawers/chest_of_drawers_4/resource/filing_control.py b/Articulated_objects/small_furniture/filing_cabinet/drawers/chest_of_drawers_4/resource/filing_control.py index f4ce89ab6d77a5b1c12df202cfef68bef7de4bf5..aaf83f49d289a0a8372bffc911f6d0d6d9d922e7 100644 --- a/Articulated_objects/small_furniture/filing_cabinet/drawers/chest_of_drawers_4/resource/filing_control.py +++ b/Articulated_objects/small_furniture/filing_cabinet/drawers/chest_of_drawers_4/resource/filing_control.py @@ -1,28 +1,16 @@ -import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils +import torch +from omni.kit.scripting import BehaviorScript +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +import omni.usd from pxr import PhysxSchema, UsdGeom, UsdPhysics import math -# import nvidia.srl.usd.prim_helper as prim_helper - - def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - def _find_prim(prim): if prim.GetName() == prim_name: return prim.GetPath().pathString @@ -31,156 +19,156 @@ def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: if result: return result return None - found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path -def calculate_stiffness(joint_state, joint_limit): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 50 - min_stiffness = 2 - decay_rate = 3 - # threshold = math.radians(20) - # threshold = 0.3 * joint_limit - threshold = 0.5 * joint_threshold - if joint_state < threshold: - return min_stiffness - stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) - return max(min_stiffness, min(stiffness, max_stiffness)) - - -# 1. Articulation Root prim -root_articulation_prim = find_prim_path_by_name("E_body_1") -joint_threshold = -0.2 - -# 2. Joint names -joint_names = ["PrismaticJoint_chest_of_drawers_4_up"] -joint1_prim = find_prim_path_by_name(joint_names[0]) -# joint2_prim = find_prim_path_by_name(joint_names[1]) -stage = omni.usd.get_context().get_stage() -joints_info = {} - -# 3. Joint information -for joint_name in joint_names: - joint_prim_path = find_prim_path_by_name(joint_name) - joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) - joint = UsdPhysics.PrismaticJoint(joint_prim_obj) - - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() - } - -# joint1_lower_limit = joints_info[joint_names[0]]['lower_limit'] -# joint1_upper_limit = joints_info[joint_names[0]]['upper_limit'] -# joint2_lower_limit = joints_info[joint_names[1]]['lower_limit'] -# joint2_upper_limit = joints_info[joint_names[1]]['upper_limit'] - - -# 4. Joint limits and limit differences -joint_limits = {} -joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): - joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] - } - joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] - ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_1"] +JOINT_NAMES = ["PrismaticJoint_chest_of_drawers_4_up"] +JOINT_THRESHOLD = -0.2 class Filing4DrawersControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - def on_destroy(self): - pass - + # 尝试找到articulation根路径 + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.joint_limits = None + self.joint_limit_diffs = None + self.use_torch = None + self.joint_threshold = JOINT_THRESHOLD + + def on_play(self): - # Initialize simulation context - self.simulation_context = SimulationContext( - stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 - ) - - def on_pause(self): - pass - - def on_stop(self): - self.init_start=True - pass - - def on_update(self, current_time: float, delta_time: float): - if delta_time <= 0: - return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) + self._initialize_articulation() + + def on_update(self, current_time, delta_time): + if delta_time <= 0: return + # 延迟初始化,确保physics准备好 + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return # 如果还没初始化成功,跳过本次更新 - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.art is None: + return self.target_pose_control() self.damping_stiffness_change() + + def _get_scalar_value(self, value): + """将值转换为标量(支持torch tensor和普通数值)""" + if isinstance(value, torch.Tensor): + return value.item() + elif hasattr(value, 'item'): + return value.item() + else: + return float(value) + def calculate_stiffness(self, joint_state, joint_limit): + """Calculate stiffness value based on joint angle (自动适配torch tensor或普通数值)""" + max_stiffness = 50 + min_stiffness = 2 + decay_rate = 3 + threshold = 0.5 * self.joint_threshold + + # 转换为标量值进行比较 + joint_state_scalar = self._get_scalar_value(joint_state) + + if joint_state_scalar < threshold: + return min_stiffness + + # 根据平台选择计算方式 + if self.use_torch: + # Isaac Lab: 使用torch tensor计算 + device = joint_state.device if isinstance(joint_state, torch.Tensor) else torch.device('cuda' if torch.cuda.is_available() else 'cpu') + stiffness = max_stiffness * torch.exp(torch.tensor(-decay_rate * abs(joint_state_scalar), device=device)) + stiffness = max(min_stiffness, min(stiffness.item(), max_stiffness)) + else: + # Isaac Sim: 使用math计算 + stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state_scalar)) + stiffness = max(min_stiffness, min(stiffness, max_stiffness)) + + return stiffness + def damping_stiffness_change(self): + positions = self.art.get_joint_positions().squeeze() stage = omni.usd.get_context().get_stage() - # Process all joints - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API + for i, idx in enumerate(self.joint_indices): + joint_name = self.joint_names[i] joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "linear") - # Get joint limit difference and set stiffness - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(calculate_stiffness(joint_state, joint_limit_diff)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - + joint_state = positions[idx] + joint_limit_diff = self.joint_limit_diffs[i] + joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state, joint_limit_diff)) + def target_pose_control(self): - # Process all joints - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - # Get joint limit difference - joint_limit_diff = joint_limit_diffs[joint_names[i]] - # Set target position based on joint state - if joint_state > 0.5 * joint_threshold: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['upper_limit']) - else: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['lower_limit']) + positions = self.art.get_joint_positions().squeeze() + targets = [] + for i, idx in enumerate(self.joint_indices): + joint_state = positions[idx] + # 转换为标量值进行比较 + joint_state_scalar = self._get_scalar_value(joint_state) + if joint_state_scalar > 0.5 * self.joint_threshold: + targets.append(self.joint_limits[i]["upper"]) + else: + targets.append(self.joint_limits[i]["lower"]) + + # 根据平台选择不同的action创建方式 + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(self.joint_indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=self.joint_indices) + self.art.apply_action(action) + + def _initialize_articulation(self): + """延迟初始化,在physics准备好后调用""" + if self.initialized: + return + + try: + self.art = Articulation(self.articulation_root_path) + print("self.art :", self.art) + self.art.initialize() + + # 检测返回类型:torch tensor 还是 numpy/普通数值 + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + print(f"Detected platform: {'Isaac Lab (torch)' if self.use_torch else 'Isaac Sim (numpy/math)'}") + + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + dof_limits = self.art.get_dof_limits().squeeze() + self.joint_limits = [{ + "lower": dof_limits[idx, 0], + "upper": dof_limits[idx, 1] + } for idx in self.joint_indices] + self.joint_limit_diffs = [ + abs(lim["upper"] - lim["lower"]) for lim in self.joint_limits + ] + self.initialized = True + except AttributeError as e: + # Physics还没准备好,下次再试 + print(f"Physics not ready yet, will retry: {e}") + return diff --git a/Articulated_objects/small_furniture/filing_cabinet/drawers/chest_of_drawers_5/resource/filing_control.py b/Articulated_objects/small_furniture/filing_cabinet/drawers/chest_of_drawers_5/resource/filing_control.py index 171388d61e18194c62d220d7d6c0a5e4c752ce52..8cc430265910df751308ebad74eb34db0e0d0d22 100644 --- a/Articulated_objects/small_furniture/filing_cabinet/drawers/chest_of_drawers_5/resource/filing_control.py +++ b/Articulated_objects/small_furniture/filing_cabinet/drawers/chest_of_drawers_5/resource/filing_control.py @@ -1,28 +1,16 @@ -import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils +import torch +from omni.kit.scripting import BehaviorScript +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +import omni.usd from pxr import PhysxSchema, UsdGeom, UsdPhysics import math -# import nvidia.srl.usd.prim_helper as prim_helper - - def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - def _find_prim(prim): if prim.GetName() == prim_name: return prim.GetPath().pathString @@ -31,156 +19,154 @@ def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: if result: return result return None - found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path -def calculate_stiffness(joint_state, joint_limit): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 50 - min_stiffness = 2 - decay_rate = 3 - # threshold = math.radians(20) - # threshold = 0.3 * joint_limit - threshold = 0.5 * joint_threshold - if joint_state < threshold: - return min_stiffness - stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) - return max(min_stiffness, min(stiffness, max_stiffness)) - - -# 1. Articulation Root prim -root_articulation_prim = find_prim_path_by_name("body") -joint_threshold = -0.2 - -# 2. Joint names -joint_names = ["PrismaticJoint_chest_of_drawers_5_up_1","PrismaticJoint_chest_of_drawers_5_middle","PrismaticJoint_chest_of_drawers_5_down_1","PrismaticJoint_chest_of_drawers_5_down_2"] -joint1_prim = find_prim_path_by_name(joint_names[0]) -# joint2_prim = find_prim_path_by_name(joint_names[1]) -stage = omni.usd.get_context().get_stage() -joints_info = {} - -# 3. Joint information -for joint_name in joint_names: - joint_prim_path = find_prim_path_by_name(joint_name) - joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) - joint = UsdPhysics.PrismaticJoint(joint_prim_obj) - - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() - } - -# joint1_lower_limit = joints_info[joint_names[0]]['lower_limit'] -# joint1_upper_limit = joints_info[joint_names[0]]['upper_limit'] -# joint2_lower_limit = joints_info[joint_names[1]]['lower_limit'] -# joint2_upper_limit = joints_info[joint_names[1]]['upper_limit'] - - -# 4. Joint limits and limit differences -joint_limits = {} -joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): - joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] - } - joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] - ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] +POSSIBLE_ASSET_ROOT_NAMES = ["body"] +JOINT_NAMES = ["PrismaticJoint_chest_of_drawers_5_up_1", "PrismaticJoint_chest_of_drawers_5_middle", "PrismaticJoint_chest_of_drawers_5_down_1", "PrismaticJoint_chest_of_drawers_5_down_2"] +JOINT_THRESHOLD = -0.2 class Filing5DrawersControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - def on_destroy(self): - pass + # 尝试找到articulation根路径 + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.joint_limits = None + self.joint_limit_diffs = None + self.use_torch = None + self.joint_threshold = JOINT_THRESHOLD + + def on_update(self, current_time, delta_time): + if delta_time <= 0: return + # 延迟初始化,确保physics准备好 + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return # 如果还没初始化成功,跳过本次更新 + + self.apply_behavior() def on_play(self): - # Initialize simulation context - self.simulation_context = SimulationContext( - stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 - ) - - def on_pause(self): - pass - - def on_stop(self): - self.init_start=True - pass - - def on_update(self, current_time: float, delta_time: float): - if delta_time <= 0: - return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + self._initialize_articulation() def apply_behavior(self): + if not self.initialized or self.art is None: + return self.target_pose_control() self.damping_stiffness_change() + + def _get_scalar_value(self, value): + """将值转换为标量(支持torch tensor和普通数值)""" + if isinstance(value, torch.Tensor): + return value.item() + elif hasattr(value, 'item'): + return value.item() + else: + return float(value) + def calculate_stiffness(self, joint_state, joint_limit): + """Calculate stiffness value based on joint angle (自动适配torch tensor或普通数值)""" + max_stiffness = 50 + min_stiffness = 2 + decay_rate = 3 + threshold = 0.5 * self.joint_threshold + + # 转换为标量值进行比较 + joint_state_scalar = self._get_scalar_value(joint_state) + + if joint_state_scalar < threshold: + return min_stiffness + + # 根据平台选择计算方式 + if self.use_torch: + # Isaac Lab: 使用torch tensor计算 + device = joint_state.device if isinstance(joint_state, torch.Tensor) else torch.device('cuda' if torch.cuda.is_available() else 'cpu') + stiffness = max_stiffness * torch.exp(torch.tensor(-decay_rate * abs(joint_state_scalar), device=device)) + stiffness = max(min_stiffness, min(stiffness.item(), max_stiffness)) + else: + # Isaac Sim: 使用math计算 + stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state_scalar)) + stiffness = max(min_stiffness, min(stiffness, max_stiffness)) + + return stiffness + def damping_stiffness_change(self): + positions = self.art.get_joint_positions().squeeze() stage = omni.usd.get_context().get_stage() - # Process all joints - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API + for i, idx in enumerate(self.joint_indices): + joint_name = self.joint_names[i] joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "linear") - # Get joint limit difference and set stiffness - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(calculate_stiffness(joint_state, joint_limit_diff)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - + joint_state = positions[idx] + joint_limit_diff = self.joint_limit_diffs[i] + joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state, joint_limit_diff)) + def target_pose_control(self): - # Process all joints - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - # Get joint limit difference - joint_limit_diff = joint_limit_diffs[joint_names[i]] - # Set target position based on joint state - if joint_state > 0.5 * joint_threshold: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['upper_limit']) - else: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['lower_limit']) + positions = self.art.get_joint_positions().squeeze() + targets = [] + for i, idx in enumerate(self.joint_indices): + joint_state = positions[idx] + # 转换为标量值进行比较 + joint_state_scalar = self._get_scalar_value(joint_state) + if joint_state_scalar > 0.5 * self.joint_threshold: + targets.append(self.joint_limits[i]["upper"]) + else: + targets.append(self.joint_limits[i]["lower"]) + + # 根据平台选择不同的action创建方式 + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(self.joint_indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=self.joint_indices) + + self.art.apply_action(action) + + def _initialize_articulation(self): + """延迟初始化,在physics准备好后调用""" + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + print("self.art :", self.art) + self.art.initialize() + + # 检测返回类型:torch tensor 还是 numpy/普通数值 + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + print(f"Detected platform: {'Isaac Lab (torch)' if self.use_torch else 'Isaac Sim (numpy/math)'}") + + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + dof_limits = self.art.get_dof_limits().squeeze() + self.joint_limits = [{ + "lower": dof_limits[idx, 0], + "upper": dof_limits[idx, 1] + } for idx in self.joint_indices] + self.joint_limit_diffs = [ + abs(lim["upper"] - lim["lower"]) for lim in self.joint_limits + ] + self.initialized = True + except AttributeError as e: + # Physics还没准备好,下次再试 + print(f"Physics not ready yet, will retry: {e}") + return diff --git a/Articulated_objects/small_furniture/table/table_1/.thumbs/256x256/model_table_1.usd.png b/Articulated_objects/small_furniture/table/table_1/.thumbs/256x256/model_table_1.usd.png index 243a54aba446421dff84f7da692ed834f9da3f24..0c576bb3a94442ee6d95b7b16659b903646ae00f 100644 --- a/Articulated_objects/small_furniture/table/table_1/.thumbs/256x256/model_table_1.usd.png +++ b/Articulated_objects/small_furniture/table/table_1/.thumbs/256x256/model_table_1.usd.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f0a507c9d940ce4b451230ad5c5dae733f815884c4e3e109950edaf5a0099281 -size 39179 +oid sha256:a6c35615d4402675ee0054ffb04a824673d4696cbb200c4a9b7c359f0c7c324e +size 30073 diff --git a/Articulated_objects/small_furniture/table/table_1/model_table_1.usd b/Articulated_objects/small_furniture/table/table_1/model_table_1.usd index feaa87defeb43ce42b83b365ccaff7b45a2e48ab..e3a58763bb6f34653dececefe8cf6c88afce57a9 100644 --- a/Articulated_objects/small_furniture/table/table_1/model_table_1.usd +++ b/Articulated_objects/small_furniture/table/table_1/model_table_1.usd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ec9b3ab15cc89307075dabb168671f53a68777e5253b227440d9689348c1f0c1 -size 1111541 +oid sha256:338f6ed18a56897d9ece69e66fb67303826af236baf9cb65a45b54ef8fca0d44 +size 1115244 diff --git a/Articulated_objects/small_furniture/table/table_1/resource/cabinet_control.py b/Articulated_objects/small_furniture/table/table_1/resource/cabinet_control.py deleted file mode 100644 index 5682c9f4d393707c8c194ad2fe0a7fdb0a33c31f..0000000000000000000000000000000000000000 --- a/Articulated_objects/small_furniture/table/table_1/resource/cabinet_control.py +++ /dev/null @@ -1,185 +0,0 @@ -import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils -from pxr import PhysxSchema, UsdGeom, UsdPhysics -import math -# import nvidia.srl.usd.prim_helper as prim_helper - - -def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: - """Recursively find the full path by Prim name""" - stage = omni.usd.get_context().get_stage() - prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): - result = _find_prim(child) - if result: - return result - return None - - found_path = _find_prim(prim) - if not found_path: - raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") - return found_path - -def calculate_stiffness(joint_state, joint_limit): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 50 - min_stiffness = 2 - decay_rate = 3 - # threshold = math.radians(20) - # threshold = 0.3 * joint_limit - threshold = 0.5 * joint_threshold - if joint_state > threshold: - return min_stiffness - stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) - return max(min_stiffness, min(stiffness, max_stiffness)) - - -# 1. Articulation Root prim -root_articulation_prim = find_prim_path_by_name("E_body_1") -joint_threshold = -0.2 - -# 2. Joint names -joint_names = ["PrismaticJoint_table_1_down","PrismaticJoint_table_1_up"] -joint1_prim = find_prim_path_by_name(joint_names[0]) -# joint2_prim = find_prim_path_by_name(joint_names[1]) -stage = omni.usd.get_context().get_stage() -joints_info = {} - -# 3. Joint information -for joint_name in joint_names: - joint_prim_path = find_prim_path_by_name(joint_name) - joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) - joint = UsdPhysics.PrismaticJoint(joint_prim_obj) - - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() - } - -# joint1_lower_limit = joints_info[joint_names[0]]['lower_limit'] -# joint1_upper_limit = joints_info[joint_names[0]]['upper_limit'] -# joint2_lower_limit = joints_info[joint_names[1]]['lower_limit'] -# joint2_upper_limit = joints_info[joint_names[1]]['upper_limit'] - - -# 4. Joint limits and limit differences -joint_limits = {} -joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): - joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] - } - joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] - ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] - - -class FilingDrawersControl(BehaviorScript): - def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - def on_destroy(self): - pass - - def on_play(self): - # Initialize simulation context - self.simulation_context = SimulationContext( - stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 - ) - - def on_pause(self): - pass - - def on_stop(self): - self.init_start=True - pass - - def on_update(self, current_time: float, delta_time: float): - if delta_time <= 0: - return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - - def apply_behavior(self): - self.target_pose_control() - self.damping_stiffness_change() - - def damping_stiffness_change(self): - stage = omni.usd.get_context().get_stage() - # Process all joints - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API - joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) - joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "linear") - # Get joint limit difference and set stiffness - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(calculate_stiffness(joint_state, joint_limit_diff)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - - def target_pose_control(self): - # Process all joints - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - # Get joint limit difference - joint_limit_diff = joint_limit_diffs[joint_names[i]] - # Set target position based on joint state - if joint_state > 0.5 * joint_threshold: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['upper_limit']) - else: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['lower_limit']) - - diff --git a/Articulated_objects/small_furniture/table/table_1/resource/table_control.py b/Articulated_objects/small_furniture/table/table_1/resource/table_control.py new file mode 100644 index 0000000000000000000000000000000000000000..ad9b550422c0d95b61f461165cf1360d522c6c31 --- /dev/null +++ b/Articulated_objects/small_furniture/table/table_1/resource/table_control.py @@ -0,0 +1,174 @@ +import carb +import math +import torch +import omni.usd +from omni.kit.scripting import BehaviorScript +from omni.isaac.core import SimulationContext +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics + + +def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: + """Recursively find the full path by Prim name""" + stage = omni.usd.get_context().get_stage() + prim = stage.GetPrimAtPath(root_path) + + def _find_prim(prim): + if prim.GetName() == prim_name: + return prim.GetPath().pathString + for child in prim.GetChildren(): + result = _find_prim(child) + if result: + return result + return None + + found_path = _find_prim(prim) + if not found_path: + raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") + return found_path + +def calculate_stiffness(joint_state, joint_limit): + """Calculate stiffness value based on joint angle + + Args: + joint_state (float): Joint angle (radians) + joint_limit (float): Joint limit value + + Returns: + float: Stiffness value + """ + max_stiffness = 50 + min_stiffness = 2 + decay_rate = 3 + # threshold = math.radians(20) + # threshold = 0.3 * joint_limit + threshold = 0.5 * joint_threshold + if joint_state > threshold: + return min_stiffness + stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) + return max(min_stiffness, min(stiffness, max_stiffness)) + + +# 1. Articulation Root prim +root_articulation_prim = find_prim_path_by_name("E_body_1") +joint_threshold = -0.2 + +# 2. Joint names +joint_names = ["PrismaticJoint_table_1_down","PrismaticJoint_table_1_up"] +stage = omni.usd.get_context().get_stage() +joints_info = {} + +# 3. Joint information +for joint_name in joint_names: + joint_prim_path = find_prim_path_by_name(joint_name) + joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) + joint = UsdPhysics.PrismaticJoint(joint_prim_obj) + + joints_info[joint_name] = { + 'prim': joint, + 'lower_limit': joint.GetLowerLimitAttr().Get(), + 'upper_limit': joint.GetUpperLimitAttr().Get() + } + +# 4. Joint limits and limit differences +joint_limits = {} +joint_limit_diffs = {} + +for joint_name in joint_names: + joint_limits[joint_name] = { + 'lower': joints_info[joint_name]['lower_limit'], + 'upper': joints_info[joint_name]['upper_limit'] + } + joint_limit_diffs[joint_name] = ( + joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] + ) + + +class FilingDrawersControl(BehaviorScript): + def on_init(self): + self.articulation_root_path = root_articulation_prim + self.joint_names = joint_names + self.joint_limits = joint_limits + self.joint_limit_diffs = joint_limit_diffs + self.use_torch = None + self.joint_indices = None + self.art = None + self.initialized = False + + def on_play(self): + self._initialize_articulation() + self.simulation_context = SimulationContext( + stage_units_in_meters=1.0, + physics_dt=1.0 / 120, + rendering_dt=1.0 / 120, + ) + + def on_update(self, current_time: float, delta_time: float): + if delta_time <= 0: + return + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + + def apply_behavior(self): + if not self.initialized or self.art is None: + return + self.target_pose_control() + self.damping_stiffness_change() + + def damping_stiffness_change(self): + positions = self.art.get_joint_positions().squeeze() + for idx, joint_name in enumerate(self.joint_names): + joint_state = self._get_scalar_value(positions[self.joint_indices[idx]]) + joint = joints_info[joint_name]['prim'] + joint_drive = UsdPhysics.DriveAPI.Get(joint.GetPrim(), "linear") + joint_drive.GetStiffnessAttr().Set( + calculate_stiffness(joint_state, self.joint_limit_diffs[joint_name]) + ) + + def target_pose_control(self): + positions = self.art.get_joint_positions().squeeze() + targets = [] + indices = [] + threshold_value = 0.5 * joint_threshold + for idx, joint_name in enumerate(self.joint_names): + joint_state = self._get_scalar_value(positions[self.joint_indices[idx]]) + limits = self.joint_limits[joint_name] + if joint_state > threshold_value: + targets.append(limits['upper']) + else: + targets.append(limits['lower']) + indices.append(self.joint_indices[idx]) + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + + self.art.apply_action(action) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + self.initialized = True + except AttributeError as exc: + print(f"Physics not ready yet, will retry: {exc}") + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) diff --git a/Articulated_objects/small_furniture/table/table_3/.thumbs/256x256/model_table_3.usd.png b/Articulated_objects/small_furniture/table/table_3/.thumbs/256x256/model_table_3.usd.png index 743301774bdedd5c411bafec8772b90f1b67f2f5..e1f8ee1903d4ee0e916e75d667a6d1b7b1f6e79c 100644 --- a/Articulated_objects/small_furniture/table/table_3/.thumbs/256x256/model_table_3.usd.png +++ b/Articulated_objects/small_furniture/table/table_3/.thumbs/256x256/model_table_3.usd.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:93fdde31fd15a3a3ea7b10eb3dbc30bc82802f4a5f12229ffbf02334558851e6 -size 27929 +oid sha256:6ab51973742a73dbb445404a4f1fa75f5c28c347f744bc23d34c9debda8b8d27 +size 45671 diff --git a/Articulated_objects/small_furniture/table/table_3/model_table_3.usd b/Articulated_objects/small_furniture/table/table_3/model_table_3.usd index cc4d4c629a28f6828e447fbef519f486baa5ec25..c17f2f2ff93ff6b1c400f93b2fb5d4729473b753 100644 --- a/Articulated_objects/small_furniture/table/table_3/model_table_3.usd +++ b/Articulated_objects/small_furniture/table/table_3/model_table_3.usd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:27a8760ab1a8bbc976af090fca24a4a2d98f7d5ef146e3227f27282d1f9397a2 -size 1573844 +oid sha256:1abf467134dc1b9cd0ad9c1183774c0d843bf33e827f2c9d3a0035c78df7ba1d +size 1576421 diff --git a/Articulated_objects/small_furniture/table/table_3/resource/table_control.py b/Articulated_objects/small_furniture/table/table_3/resource/table_control.py index ac02fbd8ff8ac2b2611f7eb5d28cd252cdda7367..055e2ebdfc72708c5d541aeea6030e324fac2641 100644 --- a/Articulated_objects/small_furniture/table/table_3/resource/table_control.py +++ b/Articulated_objects/small_furniture/table/table_3/resource/table_control.py @@ -1,21 +1,12 @@ import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils -from pxr import PhysxSchema, UsdGeom, UsdPhysics import math -# import nvidia.srl.usd.prim_helper as prim_helper - +import torch +import omni.usd +from omni.kit.scripting import BehaviorScript +from omni.isaac.core import SimulationContext +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: @@ -65,8 +56,6 @@ joint_threshold = 0.4 # 2. Joint names joint_names = ["PrismaticJoint_table_3_left3","PrismaticJoint_table_3_left2","PrismaticJoint_table_3_left1","PrismaticJoint_table_3_left4","PrismaticJoint_table_3_right1","PrismaticJoint_table_3_right2","PrismaticJoint_table_3_right3","PrismaticJoint_table_3_right4"] -joint1_prim = find_prim_path_by_name(joint_names[0]) -# joint2_prim = find_prim_path_by_name(joint_names[1]) stage = omni.usd.get_context().get_stage() joints_info = {} @@ -92,7 +81,7 @@ for joint_name in joint_names: joint_limits = {} joint_limit_diffs = {} -for i, joint_name in enumerate(joint_names): +for joint_name in joint_names: joint_limits[joint_name] = { 'lower': joints_info[joint_name]['lower_limit'], 'upper': joints_info[joint_name]['upper_limit'] @@ -100,88 +89,91 @@ for i, joint_name in enumerate(joint_names): joint_limit_diffs[joint_name] = ( joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] class TableControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - def on_destroy(self): - pass + self.articulation_root_path = root_articulation_prim + self.joint_names = joint_names + self.joint_limits = joint_limits + self.joint_limit_diffs = joint_limit_diffs + self.use_torch = None + self.joint_indices = None + self.art = None + self.initialized = False def on_play(self): - # Initialize simulation context self.simulation_context = SimulationContext( stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 + physics_dt=1.0 / 120, + rendering_dt=1.0 / 120, ) - - def on_pause(self): - pass - - def on_stop(self): - self.init_start=True - pass def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.art is None: + return self.target_pose_control() self.damping_stiffness_change() - + def damping_stiffness_change(self): - stage = omni.usd.get_context().get_stage() - # Process all joints - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API - joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) - joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "linear") - # Get joint limit difference and set stiffness - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(calculate_stiffness(joint_state, joint_limit_diff)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - + positions = self.art.get_joint_positions().squeeze() + for idx, joint_name in enumerate(self.joint_names): + joint_state = self._get_scalar_value(positions[self.joint_indices[idx]]) + joint = joints_info[joint_name]['prim'] + joint_drive = UsdPhysics.DriveAPI.Get(joint.GetPrim(), "linear") + joint_drive.GetStiffnessAttr().Set( + calculate_stiffness(joint_state, self.joint_limit_diffs[joint_name]) + ) + def target_pose_control(self): - # Process all joints - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - # Get joint limit difference - joint_limit_diff = joint_limit_diffs[joint_names[i]] - # Set target position based on joint state - if joint_state > 0.5 * joint_threshold: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['upper_limit']) - # print("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++") + positions = self.art.get_joint_positions().squeeze() + targets = [] + indices = [] + threshold_value = 0.5 * joint_threshold + for idx, joint_name in enumerate(self.joint_names): + joint_state = self._get_scalar_value(positions[self.joint_indices[idx]]) + limits = self.joint_limits[joint_name] + if joint_state > threshold_value: + targets.append(limits['upper']) else: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['lower_limit']) - # print("------------------------------------------------------------") - + targets.append(limits['lower']) + indices.append(self.joint_indices[idx]) + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + + self.art.apply_action(action) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + self.initialized = True + except AttributeError as exc: + print(f"Physics not ready yet, will retry: {exc}") + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) diff --git a/Articulated_objects/small_furniture/table/table_4/resource/table_control.py b/Articulated_objects/small_furniture/table/table_4/resource/table_control.py index 38bd1a309f3d26317432a241f6127cc8af8e63d5..d2fea9e488840236a1685abe0992f0b71e73cac9 100644 --- a/Articulated_objects/small_furniture/table/table_4/resource/table_control.py +++ b/Articulated_objects/small_furniture/table/table_4/resource/table_control.py @@ -1,21 +1,12 @@ import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils -from pxr import PhysxSchema, UsdGeom, UsdPhysics import math -# import nvidia.srl.usd.prim_helper as prim_helper - +import torch +import omni.usd +from omni.kit.scripting import BehaviorScript +from omni.isaac.core import SimulationContext +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: @@ -65,8 +56,6 @@ joint_threshold = -0.3 # 2. Joint names joint_names = ["PrismaticJoint_1","PrismaticJoint_2","PrismaticJoint_3","PrismaticJoint_4","PrismaticJoint_5"] -joint1_prim = find_prim_path_by_name(joint_names[0]) -# joint2_prim = find_prim_path_by_name(joint_names[1]) stage = omni.usd.get_context().get_stage() joints_info = {} @@ -92,7 +81,7 @@ for joint_name in joint_names: joint_limits = {} joint_limit_diffs = {} -for i, joint_name in enumerate(joint_names): +for joint_name in joint_names: joint_limits[joint_name] = { 'lower': joints_info[joint_name]['lower_limit'], 'upper': joints_info[joint_name]['upper_limit'] @@ -100,88 +89,91 @@ for i, joint_name in enumerate(joint_names): joint_limit_diffs[joint_name] = ( joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] class TableControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - def on_destroy(self): - pass + self.articulation_root_path = root_articulation_prim + self.joint_names = joint_names + self.joint_limits = joint_limits + self.joint_limit_diffs = joint_limit_diffs + self.use_torch = None + self.joint_indices = None + self.art = None + self.initialized = False def on_play(self): - # Initialize simulation context self.simulation_context = SimulationContext( stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 + physics_dt=1.0 / 120, + rendering_dt=1.0 / 120, ) - - def on_pause(self): - pass - - def on_stop(self): - self.init_start=True - pass def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.art is None: + return self.target_pose_control() self.damping_stiffness_change() - + def damping_stiffness_change(self): - stage = omni.usd.get_context().get_stage() - # Process all joints - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API - joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) - joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "linear") - # Get joint limit difference and set stiffness - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(calculate_stiffness(joint_state, joint_limit_diff)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - + positions = self.art.get_joint_positions().squeeze() + for idx, joint_name in enumerate(self.joint_names): + joint_state = self._get_scalar_value(positions[self.joint_indices[idx]]) + joint = joints_info[joint_name]['prim'] + joint_drive = UsdPhysics.DriveAPI.Get(joint.GetPrim(), "linear") + joint_drive.GetStiffnessAttr().Set( + calculate_stiffness(joint_state, self.joint_limit_diffs[joint_name]) + ) + def target_pose_control(self): - # Process all joints - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - # Get joint limit difference - joint_limit_diff = joint_limit_diffs[joint_names[i]] - # Set target position based on joint state - if joint_state > 0.5 * joint_threshold: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['upper_limit']) - # print("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++") + positions = self.art.get_joint_positions().squeeze() + targets = [] + indices = [] + threshold_value = 0.5 * joint_threshold + for idx, joint_name in enumerate(self.joint_names): + joint_state = self._get_scalar_value(positions[self.joint_indices[idx]]) + limits = self.joint_limits[joint_name] + if joint_state > threshold_value: + targets.append(limits['upper']) else: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['lower_limit']) - # print("------------------------------------------------------------") - + targets.append(limits['lower']) + indices.append(self.joint_indices[idx]) + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + + self.art.apply_action(action) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + self.initialized = True + except AttributeError as exc: + print(f"Physics not ready yet, will retry: {exc}") + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) diff --git a/Articulated_objects/small_furniture/table/table_5/resource/table_control.py b/Articulated_objects/small_furniture/table/table_5/resource/table_control.py index 662d85a517a3811468060819dab01dcfb93c6b2d..a8b9d7712c147e0333178f450cee1b9bb7a1e1b2 100644 --- a/Articulated_objects/small_furniture/table/table_5/resource/table_control.py +++ b/Articulated_objects/small_furniture/table/table_5/resource/table_control.py @@ -1,20 +1,12 @@ import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils -from pxr import PhysxSchema, UsdGeom, UsdPhysics import math -# import nvidia.srl.usd.prim_helper as prim_helper +import torch +import omni.usd +from omni.kit.scripting import BehaviorScript +from omni.isaac.core import SimulationContext +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics @@ -65,8 +57,6 @@ joint_threshold = 0.3 # 2. Joint names joint_names = ["PrismaticJoint_1","PrismaticJoint_2","PrismaticJoint_3","PrismaticJoint_4"] -joint1_prim = find_prim_path_by_name(joint_names[0]) -# joint2_prim = find_prim_path_by_name(joint_names[1]) stage = omni.usd.get_context().get_stage() joints_info = {} @@ -81,18 +71,11 @@ for joint_name in joint_names: 'lower_limit': joint.GetLowerLimitAttr().Get(), 'upper_limit': joint.GetUpperLimitAttr().Get() } - -# joint1_lower_limit = joints_info[joint_names[0]]['lower_limit'] -# joint1_upper_limit = joints_info[joint_names[0]]['upper_limit'] -# joint2_lower_limit = joints_info[joint_names[1]]['lower_limit'] -# joint2_upper_limit = joints_info[joint_names[1]]['upper_limit'] - -# 4. Joint limits and limit differences joint_limits = {} joint_limit_diffs = {} -for i, joint_name in enumerate(joint_names): +for joint_name in joint_names: joint_limits[joint_name] = { 'lower': joints_info[joint_name]['lower_limit'], 'upper': joints_info[joint_name]['upper_limit'] @@ -100,88 +83,91 @@ for i, joint_name in enumerate(joint_names): joint_limit_diffs[joint_name] = ( joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] class TableControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - def on_destroy(self): - pass + self.articulation_root_path = root_articulation_prim + self.joint_names = joint_names + self.joint_limits = joint_limits + self.joint_limit_diffs = joint_limit_diffs + self.use_torch = None + self.joint_indices = None + self.art = None + self.initialized = False def on_play(self): - # Initialize simulation context self.simulation_context = SimulationContext( stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 + physics_dt=1.0 / 120, + rendering_dt=1.0 / 120, ) - - def on_pause(self): - pass - - def on_stop(self): - self.init_start=True - pass def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.art is None: + return self.target_pose_control() self.damping_stiffness_change() - + def damping_stiffness_change(self): - stage = omni.usd.get_context().get_stage() - # Process all joints - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API - joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) - joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "linear") - # Get joint limit difference and set stiffness - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(calculate_stiffness(joint_state, joint_limit_diff)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - + positions = self.art.get_joint_positions().squeeze() + for idx, joint_name in enumerate(self.joint_names): + joint_state = self._get_scalar_value(positions[self.joint_indices[idx]]) + joint = joints_info[joint_name]['prim'] + joint_drive = UsdPhysics.DriveAPI.Get(joint.GetPrim(), "linear") + joint_drive.GetStiffnessAttr().Set( + calculate_stiffness(joint_state, self.joint_limit_diffs[joint_name]) + ) + def target_pose_control(self): - # Process all joints - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - # Get joint limit difference - joint_limit_diff = joint_limit_diffs[joint_names[i]] - # Set target position based on joint state - if joint_state > 0.5 * joint_threshold: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['upper_limit']) - # print("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++") + positions = self.art.get_joint_positions().squeeze() + targets = [] + indices = [] + threshold_value = 0.5 * joint_threshold + for idx, joint_name in enumerate(self.joint_names): + joint_state = self._get_scalar_value(positions[self.joint_indices[idx]]) + limits = self.joint_limits[joint_name] + if joint_state > threshold_value: + targets.append(limits['upper']) else: - self.dc.set_dof_position_target(joint_handle, joints_info[joint_names[i]]['lower_limit']) - # print("------------------------------------------------------------") - + targets.append(limits['lower']) + indices.append(self.joint_indices[idx]) + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + + self.art.apply_action(action) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + self.initialized = True + except AttributeError as exc: + print(f"Physics not ready yet, will retry: {exc}") + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) diff --git a/Articulated_objects/small_furniture/table/table_6/.thumbs/256x256/model_table_6.usd.png b/Articulated_objects/small_furniture/table/table_6/.thumbs/256x256/model_table_6.usd.png index e09dd597e90e600fdbb5ea0f59d04fb100ad124e..64f89c39f58e2017459b117bd7180a2c4f1a7204 100644 --- a/Articulated_objects/small_furniture/table/table_6/.thumbs/256x256/model_table_6.usd.png +++ b/Articulated_objects/small_furniture/table/table_6/.thumbs/256x256/model_table_6.usd.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d90e88e553742a027a695118015249b40d369cf93715f1d569279a8511aac371 -size 31387 +oid sha256:9cb5a4b5a5a081bbae43711b17dd53b85044cc4fa4ebf7696af29bd0b49b1d44 +size 9778 diff --git a/Articulated_objects/small_furniture/table/table_6/model_table_6.usd b/Articulated_objects/small_furniture/table/table_6/model_table_6.usd index bc7e68a40269eb88b184e260e0c0ff195c66e029..c08a86e0e61ac6a749290ab943b51f586f2c6f6a 100644 --- a/Articulated_objects/small_furniture/table/table_6/model_table_6.usd +++ b/Articulated_objects/small_furniture/table/table_6/model_table_6.usd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:19e69b480824536b28c1ecbc642ce9079e2a264729d688844ce30d251e3202fc -size 91853 +oid sha256:0b86af5484cf063e072b4e707d0fea8657ded662c7becf581478817a7312ca3b +size 95899 diff --git a/Articulated_objects/small_furniture/table/table_6/resource/table_control.py b/Articulated_objects/small_furniture/table/table_6/resource/table_control.py new file mode 100644 index 0000000000000000000000000000000000000000..49c0c8e8bd3378924bd88572f327af5f783c6413 --- /dev/null +++ b/Articulated_objects/small_furniture/table/table_6/resource/table_control.py @@ -0,0 +1,137 @@ +import carb +import math +import torch +import omni.usd +from omni.kit.scripting import BehaviorScript +from omni.isaac.core import SimulationContext +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions + + +def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: + """Recursively find the full path by Prim name""" + stage = omni.usd.get_context().get_stage() + prim = stage.GetPrimAtPath(root_path) + + def _find_prim(prim): + if prim.GetName() == prim_name: + return prim.GetPath().pathString + for child in prim.GetChildren(): + result = _find_prim(child) + if result: + return result + return None + + found_path = _find_prim(prim) + if not found_path: + raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") + return found_path + +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_8"] +JOINT_NAMES = [ + "PrismaticJoint_table_6_up", + "PrismaticJoint_table_6_up1", + "PrismaticJoint_table_6_up2", + "PrismaticJoint_table_6_up3", + "PrismaticJoint_table_6_up4", + "PrismaticJoint_table_6_up5", + "PrismaticJoint_table_6_down", + +] +BUTTON_THRESHOLD = -0.002 + + +class TableControl(BehaviorScript): + def on_init(self): + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + self.articulation_root_path = articulation_root_path + self.joint_names = JOINT_NAMES + self.art = None + self.initialized = False + self.joint_indices = None + self.use_torch = None + + def on_play(self): + self._initialize_articulation() + + + def on_stop(self): + carb.log_info(f"{type(self).__name__}.on_stop()->{self.prim_path}") + + def on_update(self, current_time: float, delta_time: float): + if delta_time <= 0: + return + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + + def apply_behavior(self): + if not self.initialized or self.art is None: + return + self.table_control() + + def table_control(self): + positions = self.art.get_joint_positions().squeeze() + button_indices = self.joint_indices[:6] + slider_indices = self.joint_indices[6:] + + button_states = [self._get_scalar_value(positions[idx]) for idx in button_indices] + targets = None + if button_states[0] < BUTTON_THRESHOLD: + # print("button 1 pressed") + targets = [0.0] + elif button_states[1] < BUTTON_THRESHOLD: + # print("button 2 pressed") + targets = [0.2] + elif button_states[2] < BUTTON_THRESHOLD: + # print("button 3 pressed") + targets = [0.1,] + elif button_states[3] < BUTTON_THRESHOLD: + # print("button 4 pressed") + targets = [0.07] + else: + return + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(slider_indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=slider_indices) + + self.art.apply_action(action) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + # print("self.joint_names", self.joint_names) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + self.initialized = True + except AttributeError as exc: + print(f"Physics not ready yet, will retry: {exc}") + return + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) diff --git a/Articulated_objects/small_furniture/table/table_7/.thumbs/256x256/model_table_7.usd.png b/Articulated_objects/small_furniture/table/table_7/.thumbs/256x256/model_table_7.usd.png index be6525868d0bd6096c9c0df2531b242ed75534d0..2273b0231002d3bca4969677f84c73d954f940a6 100644 --- a/Articulated_objects/small_furniture/table/table_7/.thumbs/256x256/model_table_7.usd.png +++ b/Articulated_objects/small_furniture/table/table_7/.thumbs/256x256/model_table_7.usd.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:231632f0dd6479b1c78dff8086ab58d354c0b9bd7a0566cc3caf6cd8715acc9f -size 16094 +oid sha256:4727bec825dadad462902f1bdd8a3519222083a72963377d69930a82d0d29bf7 +size 27480 diff --git a/Articulated_objects/small_furniture/table/table_7/model_table_7.usd b/Articulated_objects/small_furniture/table/table_7/model_table_7.usd index 043537d45cf14ee44320aa0d51a0579b6f983150..d6b546987e012f8260dbc540454f1a45288334c0 100644 --- a/Articulated_objects/small_furniture/table/table_7/model_table_7.usd +++ b/Articulated_objects/small_furniture/table/table_7/model_table_7.usd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:46c007d1aa52f34e1a71fd2ff4d0aa1d75bf0e644319a20805fe85dd77c10d9e -size 27022 +oid sha256:5afb803761c60dfeef9914f7ce5ec881686b0ec57d2b4b10c51725ee335d4121 +size 33726 diff --git a/Articulated_objects/small_furniture/table/table_7/resource/.vscode/extensions.json b/Articulated_objects/small_furniture/table/table_7/resource/.vscode/extensions.json new file mode 100644 index 0000000000000000000000000000000000000000..ea614ed629affdd0d97abcc881b511d3de69a25c --- /dev/null +++ b/Articulated_objects/small_furniture/table/table_7/resource/.vscode/extensions.json @@ -0,0 +1,8 @@ +{ + // See http://go.microsoft.com/fwlink/?LinkId=827846 + // for the documentation about the extensions.json format + "recommendations": [ + "ms-python.python", + "ms-python.vscode-pylance" + ], +} \ No newline at end of file diff --git a/Articulated_objects/small_furniture/table/table_7/resource/.vscode/launch.json b/Articulated_objects/small_furniture/table/table_7/resource/.vscode/launch.json new file mode 100644 index 0000000000000000000000000000000000000000..8a22f73af48687152cef11e4098995885fcaff48 --- /dev/null +++ b/Articulated_objects/small_furniture/table/table_7/resource/.vscode/launch.json @@ -0,0 +1,25 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Python: Attach (windows-x86_64/linux-x86_64)", + "type": "python", + "request": "attach", + "pathMappings": [ + { + "localRoot": "${workspaceFolder}", + "remoteRoot": "${workspaceFolder}" + }], + "port": 3000, + "host": "127.0.0.1", + "subProcess": true, + "runtimeArgs": [ + "--preserve-symlinks", + "--preserve-symlinks-main" + ] + } + ] +} diff --git a/Articulated_objects/small_furniture/table/table_7/resource/.vscode/settings.json b/Articulated_objects/small_furniture/table/table_7/resource/.vscode/settings.json new file mode 100644 index 0000000000000000000000000000000000000000..63a0b3e70ae6047c1977e3c9e8e368ed5c157fbc --- /dev/null +++ b/Articulated_objects/small_furniture/table/table_7/resource/.vscode/settings.json @@ -0,0 +1,10 @@ +{ + "editor.rulers": [120], + "python.languageServer": "Pylance", + "python.formatting.provider": "black", + "python.formatting.blackArgs": ["--line-length", "120"], + "python.linting.enabled": true, + "python.linting.pylintEnabled": false, + "python.linting.flake8Enabled": true, + "python.linting.flake8Args": ["--max-line-length=120"] +} diff --git a/Articulated_objects/small_furniture/table/table_7/resource/table_control.py b/Articulated_objects/small_furniture/table/table_7/resource/table_control.py new file mode 100644 index 0000000000000000000000000000000000000000..36d006e0dba212632a55d17eac14acc1bab7cca3 --- /dev/null +++ b/Articulated_objects/small_furniture/table/table_7/resource/table_control.py @@ -0,0 +1,135 @@ +import carb +import math +import torch +import omni.usd +from omni.kit.scripting import BehaviorScript +from omni.isaac.core import SimulationContext +from isaacsim.core.prims import Articulation +from isaacsim.core.utils.types import ArticulationActions + + +def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: + """Recursively find the full path by Prim name""" + stage = omni.usd.get_context().get_stage() + prim = stage.GetPrimAtPath(root_path) + + def _find_prim(prim): + if prim.GetName() == prim_name: + return prim.GetPath().pathString + for child in prim.GetChildren(): + result = _find_prim(child) + if result: + return result + return None + + found_path = _find_prim(prim) + if not found_path: + raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") + return found_path + +POSSIBLE_ASSET_ROOT_NAMES = ["E_body_2"] +JOINT_NAMES = [ + "PrismaticJoint_table_7_down_up2", + "PrismaticJoint_table_7_down_up", + "PrismaticJoint_table_7_down_up3", + "PrismaticJoint_table_7_down_up1", + "PrismaticJoint_table_7_down", + "PrismaticJoint_table_7_middle", +] +BUTTON_THRESHOLD = -0.002 + + +class TableControl(BehaviorScript): + def on_init(self): + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + self.articulation_root_path = articulation_root_path + self.joint_names = JOINT_NAMES + self.art = None + self.initialized = False + self.joint_indices = None + self.use_torch = None + + def on_play(self): + self._initialize_articulation() + + + def on_stop(self): + carb.log_info(f"{type(self).__name__}.on_stop()->{self.prim_path}") + + def on_update(self, current_time: float, delta_time: float): + if delta_time <= 0: + return + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + + def apply_behavior(self): + if not self.initialized or self.art is None: + return + self.table_control() + + def table_control(self): + positions = self.art.get_joint_positions().squeeze() + button_indices = self.joint_indices[:4] + slider_indices = self.joint_indices[4:] + + button_states = [self._get_scalar_value(positions[idx]) for idx in button_indices] + targets = None + if button_states[0] < BUTTON_THRESHOLD: + # print("button 1 pressed") + targets = [0.0, 0.0] + elif button_states[1] < BUTTON_THRESHOLD: + # print("button 2 pressed") + targets = [0.2, 0.2] + elif button_states[2] < BUTTON_THRESHOLD: + # print("button 3 pressed") + targets = [0.1, 0.0] + elif button_states[3] < BUTTON_THRESHOLD: + # print("button 4 pressed") + targets = [0.07, 0.0] + else: + return + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(slider_indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=slider_indices) + + self.art.apply_action(action) + + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + # print("self.joint_names", self.joint_names) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + self.initialized = True + except AttributeError as exc: + print(f"Physics not ready yet, will retry: {exc}") + return + + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) diff --git a/Articulated_objects/small_furniture/table/table_7/resource/trashcan_control.py b/Articulated_objects/small_furniture/table/table_7/resource/trashcan_control.py deleted file mode 100644 index 998b285af2e50be61141866ee1dd0b1379041aa5..0000000000000000000000000000000000000000 --- a/Articulated_objects/small_furniture/table/table_7/resource/trashcan_control.py +++ /dev/null @@ -1,162 +0,0 @@ -import carb -from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands -from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import PhysxSchema, UsdGeom, UsdPhysics -import math -from omni.isaac.core import SimulationContext, World -# from isaacsim.core.prims import XFormPrim -# stiffness :0.8 Damping: 0.05 - - -def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: - """Recursively find the full path by Prim name""" - stage = omni.usd.get_context().get_stage() - prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): - result = _find_prim(child) - if result: - return result - return None - - found_path = _find_prim(prim) - if not found_path: - raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") - return found_path - -# # 1. prim init -# button_prim = XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Xform") -# door_prim = XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/oven/oven_door") -# # 2. articulation Root prim -# root_articulation_prim = "/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/oven/oven_base" -# # 3. joint name -# joint_names = ["PrismaticJoint", "RevoluteJoint"] -# # 4. joint num -# num_arm_dof = 2 - -# light_scopes=[XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Lights_on"), -# XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Lights_on_1"), -# ] -# for i in range(0, light_scopes.__len__()): -# light_scopes[i].set_visibility(False) -# index = random.randint(0, len(light_scopes)-1) -# light_scopes[index].set_visibility(True) -# button_prim = XFormPrim(find_prim_path_by_name("E_pedal_17")) -# print("button_prim", button_prim.prim_path) -# door_prim = XFormPrim(find_prim_path_by_name("oven_E_door_4")) -# print("door_prim", door_prim.prim_path) -root_articulation_prim = find_prim_path_by_name("E_body_2") -print("root_articulation_prim", root_articulation_prim) -joint_names = ["PrismaticJoint_table_7_down_up2", "PrismaticJoint_table_7_down_up","PrismaticJoint_table_7_down_up3", -"PrismaticJoint_table_7_down_up1","PrismaticJoint_table_7_down","PrismaticJoint_table_7_middle"] -# light_scopes=[XFormPrim(find_prim_path_by_name("oven_light")) - # ] -PrismaticJoint_path = find_prim_path_by_name("PrismaticJoint_table_7_down") - - -class MicrowaveOverControl(BehaviorScript): - def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - # light_scopes[0].set_visibility(False) - self.Stiffness_max = 0.8 - self.Stiffness_min = 0.08 - - # 初始化门的锁定状态 - self.door_locked = True - - # init_pose - # self.local_pose_button, self.local_ort_drawer_down = button_prim.get_local_pose() - # self.local_pose_door, self.local_ort_drawer_up = door_prim.get_local_pose() - - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - stage = omni.usd.get_context().get_stage() - self.revoluteJoint_drive_path = stage.GetPrimAtPath(PrismaticJoint_path) - self.revoluteJoint_drive = UsdPhysics.DriveAPI.Get(self.revoluteJoint_drive_path, "linear") - - - def on_destroy(self): - pass - - def on_play(self): - self.simulation_context = SimulationContext( - stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 - ) - - - def on_pause(self): - pass - - def on_stop(self): - self.init_start=True - - self.door_locked = True - carb.log_info(f"{type(self).__name__}.on_stop()->{self.prim_path}") - pass - - def on_update(self, current_time: float, delta_time: float): - if delta_time <= 0: - return - self.dc = _dynamic_control.acquire_dynamic_control_interface() - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - # print("self.joint_handles",self.joint_handles) - def apply_behavior(self): - self.trashcan_control() - def trashcan_control(self): - - self.Joint0_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - self.Joint1_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - self.Joint2_state = self.dc.get_dof_state(self.joint_handles[2], _dynamic_control.STATE_ALL).pos - self.Joint3_state = self.dc.get_dof_state(self.joint_handles[3], _dynamic_control.STATE_ALL).pos - self.Joint4_state = self.dc.get_dof_state(self.joint_handles[4], _dynamic_control.STATE_ALL).pos - self.Joint5_state = self.dc.get_dof_state(self.joint_handles[5], _dynamic_control.STATE_ALL).pos - # print("self.Joint0_state", self.Joint0_state) - # print("self.Joint1_state", self.Joint1_state) - # 按钮被按下且门处于锁定状态 - if self.Joint0_state < -0.002: - self.dc.set_dof_position_target(self.joint_handles[4],0) - self.dc.set_dof_position_target(self.joint_handles[5],0) - # print("-----------------------按钮1---------------------") - elif self.Joint1_state < -0.002: - self.dc.set_dof_position_target(self.joint_handles[4],0.2) - self.dc.set_dof_position_target(self.joint_handles[5],0.2) - # print("-----------------------按钮2---------------------") - elif self.Joint2_state < -0.002: - self.dc.set_dof_position_target(self.joint_handles[4],0.1) - self.dc.set_dof_position_target(self.joint_handles[5],0) - # print("-----------------------按钮3---------------------") - elif self.Joint3_state < -0.002: - self.dc.set_dof_position_target(self.joint_handles[4],0.07) - self.dc.set_dof_position_target(self.joint_handles[5],0) - # print("-----------------------按钮4---------------------") - - diff --git a/Interactive_scene/kitchen/Interactive_kitchen.usd b/Interactive_scene/kitchen/Interactive_kitchen.usd index d0f5bd9106a553695715012c3fb66deecbe2795e..b4f19a2e7bb02bdf65fefdc5f45ad78240f24d6f 100644 --- a/Interactive_scene/kitchen/Interactive_kitchen.usd +++ b/Interactive_scene/kitchen/Interactive_kitchen.usd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5871db1e127039da9eb21234f0e11b29a74b3768e90b3c005205ca2b21a3fb21 -size 21177897 +oid sha256:80e9d2f667b18457c1286c27df489d3cc4bbd2cd9afe89632cc6bc4a7f6eca34 +size 21213136 diff --git a/Interactive_scene/kitchen/fridge/materials/textures/77bb7e13f95488b9bba205f61774cfac.png b/Interactive_scene/kitchen/fridge/materials/textures/77bb7e13f95488b9bba205f61774cfac.png new file mode 100644 index 0000000000000000000000000000000000000000..6ec446758d90977a3105f07e8dae329985b95ae1 --- /dev/null +++ b/Interactive_scene/kitchen/fridge/materials/textures/77bb7e13f95488b9bba205f61774cfac.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5ffd20ccaccf4be6fc5a67ad17da285152107852dff1a3c92e1ad44ceb54d30d +size 317769 diff --git a/Interactive_scene/kitchen/fridge/materials/textures/85e802b65576ab52c15d2ad699874710.png b/Interactive_scene/kitchen/fridge/materials/textures/85e802b65576ab52c15d2ad699874710.png new file mode 100644 index 0000000000000000000000000000000000000000..0e85584815c018a034b4e23831745c1f0b027f3b --- /dev/null +++ b/Interactive_scene/kitchen/fridge/materials/textures/85e802b65576ab52c15d2ad699874710.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:90f3a900835f50001809b0dd910f9d82ba8b69fbd7e5a49c261932cd7b586c30 +size 442669 diff --git a/Interactive_scene/kitchen/fridge/materials/textures/ba71f64c7269bdc410f2b92f325c6388.png b/Interactive_scene/kitchen/fridge/materials/textures/ba71f64c7269bdc410f2b92f325c6388.png new file mode 100644 index 0000000000000000000000000000000000000000..8b5c5fa3553d340d55950f17e8fcdba185f3e8f5 --- /dev/null +++ b/Interactive_scene/kitchen/fridge/materials/textures/ba71f64c7269bdc410f2b92f325c6388.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c0a1750ad3d039f94bd785258382a8ac731e892f20668a6af6dfec3d76f563ff +size 287881 diff --git a/Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/.thumbs/256x256/model_oven03.usd.png b/Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/.thumbs/256x256/model_oven03.usd.png deleted file mode 100644 index 1e13e8f0731b7e4b4a553caff382bf2e8e882939..0000000000000000000000000000000000000000 --- a/Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/.thumbs/256x256/model_oven03.usd.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3201bc526a2ee5bacd91a40a1a01951dd0a091b342172030de789a5b7ff1f8fc -size 43128 diff --git a/Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/Button.usdc b/Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/Button.usdc new file mode 100644 index 0000000000000000000000000000000000000000..27413ace322f6bc2a81b65a1bad038637539a30f Binary files /dev/null and b/Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/Button.usdc differ diff --git a/Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/model_oven03.usd b/Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/model_oven03.usd index 12bb6f053208c46fce5707411adc34a5c4f311ec..0b65f43ccfe775e7ef49019e37f21b384e5c2c27 100644 --- a/Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/model_oven03.usd +++ b/Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/model_oven03.usd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4627bcf305b269b4f5888626a71a5e6c885c0ec98de0bceede394c3b1ecec361 -size 14961015 +oid sha256:6fcb0ef568629d829b8d390c0e32c474b1466412426b09648c7dfeb9c7e5f885 +size 8088322 diff --git a/Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/oven_control.py b/Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/oven_control.py index 3572424e0883a855a1b28674ae74854d56b67578..f1a7232653c79da13ced44041dbb03de1816ddff 100644 --- a/Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/oven_control.py +++ b/Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/oven_control.py @@ -1,168 +1,163 @@ -import carb +import numpy as np +import torch from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands +from isaacsim.core.prims import Articulation from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import PhysxSchema, UsdGeom, UsdPhysics +from isaacsim.core.utils.types import ArticulationActions +import omni.usd +from pxr import UsdPhysics import math -from omni.isaac.core import SimulationContext, World -# from isaacsim.core.prims import XFormPrim - def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: - """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): + def _find_prim(current): + if current.GetName() == prim_name: + return current.GetPath().pathString + for child in current.GetChildren(): result = _find_prim(child) if result: return result return None - found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path - -# # 1. prim init -# button_prim = XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Xform") -# door_prim = XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/oven/oven_door") -# # 2. articulation Root prim -# root_articulation_prim = "/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/oven/oven_base" -# # 3. joint name -# joint_names = ["PrismaticJoint", "RevoluteJoint"] -# # 4. joint num -# num_arm_dof = 2 - -# light_scopes=[XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Lights_on"), -# XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Lights_on_1"), -# ] -# for i in range(0, light_scopes.__len__()): -# light_scopes[i].set_visibility(False) -# index = random.randint(0, len(light_scopes)-1) -# light_scopes[index].set_visibility(True) -button_prim = XFormPrim(find_prim_path_by_name("oven_E_button_5")) -print("button_prim", button_prim.prim_path) -# door_prim = XFormPrim(find_prim_path_by_name("oven_E_door_4")) -# print("door_prim", door_prim.prim_path) -root_articulation_prim = find_prim_path_by_name("oven_E_body_7") -print("root_articulation_prim", root_articulation_prim) -joint_names = ["PrismaticJoint_oven_button", "RevoluteJoint_oven_door"] -light_scopes=[XFormPrim(find_prim_path_by_name("oven_light")) - ] -revolutejoint_path = find_prim_path_by_name("RevoluteJoint_oven_door") - +POSSIBLE_ASSET_ROOT_NAMES = ["oven_E_body_7"] +JOINT_NAMES = ["PrismaticJoint_oven_button", + "RevoluteJoint_oven_door", + "oven_button"] +BUTTON_PRESS_THRESHOLD = -0.003 # 原逻辑:数值更小视为按下 +BUTTON_PRESS_MODE = "less" # 可用 "less"/"greater" 两种模式 +DOOR_TARGET_PRIMARY = math.radians(-50) +DOOR_TARGET_SECONDARY = math.radians(-78) class MicrowaveOverControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - light_scopes[0].set_visibility(False) - self.Stiffness_max = 0.8 - self.Stiffness_min = 0.08 - - - # 初始化门的锁定状态 + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.use_torch = None + self.button_target = None + self.door_target = None self.door_locked = True - - # init_pose - self.local_pose_button, self.local_ort_drawer_down = button_prim.get_local_pose() - # self.local_pose_door, self.local_ort_drawer_up = door_prim.get_local_pose() - - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') + self.button_press_threshold = BUTTON_PRESS_THRESHOLD + self.button_press_mode = BUTTON_PRESS_MODE + self.button_prim = XFormPrim(find_prim_path_by_name("oven_E_button_5")) + self.local_pose_button, self.local_rot_button = self.button_prim.get_local_pose() + light_path = find_prim_path_by_name("oven_light") + heating_light = find_prim_path_by_name("Heating_light") + self.light_scopes = [XFormPrim(light_path),XFormPrim(heating_light)] + self.light_scopes[0].set_visibility(False) + self.light_scopes[1].set_visibility(False) + revolute_path = find_prim_path_by_name("RevoluteJoint_oven_door") stage = omni.usd.get_context().get_stage() - self.revoluteJoint_drive_path = stage.GetPrimAtPath(revolutejoint_path) - self.revoluteJoint_drive = UsdPhysics.DriveAPI.Get(self.revoluteJoint_drive_path, "angular") - - - def on_destroy(self): - pass - + revolute_prim = stage.GetPrimAtPath(revolute_path) + self.revoluteJoint_drive = UsdPhysics.DriveAPI.Get(revolute_prim, "angular") + self.Stiffness_max = 0.8 + self.Stiffness_min = 0.08 def on_play(self): - self.simulation_context = SimulationContext( - stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 - ) - - - def on_pause(self): - pass + self._initialize_articulation() def on_stop(self): - self.init_start=True - light_scopes[0].set_visibility(False) - # back to initial pose - # button_prim.set_local_pose(translation=self.local_pose_button) - # door_prim.set_local_pose(translation=self.local_pose_door) + self.button_target = 0.0 + self.door_target = 0.0 + self.heating_button_state = 0.0 self.door_locked = True - self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_max) - carb.log_info(f"{type(self).__name__}.on_stop()->{self.prim_path}") - pass + self.light_scopes[0].set_visibility(False) + self.light_scopes[1].set_visibility(False) + if self.revoluteJoint_drive: + self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_max) + # carb.log_info(f"{type(self).__name__}.on_stop()->{self.prim_path}") def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.dc = _dynamic_control.acquire_dynamic_control_interface() - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - # print("self.joint_handles",self.joint_handles) - def apply_behavior(self): - self.oven_control() - - def oven_control(self): + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self._control_door() + def _control_door(self): + positions = self.art.get_joint_positions().squeeze() + button_state = self._get_scalar_value(positions[self.joint_indices[0]]) + door_state = self._get_scalar_value(positions[self.joint_indices[1]]) + heating_button_state = self._get_scalar_value(positions[self.joint_indices[2]]) + if self.button_target is None: + self.button_target = button_state + if self.door_target is None: + self.door_target = door_state - self.Joint0_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - self.Joint1_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - # print("self.Joint0_state", self.Joint0_state) - # print("self.Joint1_state", self.Joint1_state) - # 按钮被按下且门处于锁定状态 - if self.Joint0_state < -0.001 and self.door_locked: - self.dc.set_dof_position_target(self.joint_handles[1], math.radians(-50)) - # if self.Joint1_state > math.radians(100): - # self.door_locked = False # 解除锁定 - - # 门开到30度后开灯,按钮归位s - if self.Joint1_state < math.radians(-30) : - self.door_locked = False # 解除锁定 - light_scopes[0].set_visibility(True) - self.dc.set_dof_position_target(self.joint_handles[0], 0) - - if abs(self.Joint1_state - math.radians(-50)) < math.radians(0.5) : - self.dc.set_dof_position_target(self.joint_handles[1], math.radians(-78)) - self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_min) - - - # 检测手动关门 - if self.Joint1_state > math.radians(-20) and not self.door_locked: # 当门接近关闭位置时 + if heating_button_state > math.radians(20): + self.light_scopes[1].set_visibility(True) + else: + self.light_scopes[1].set_visibility(False) - self.dc.set_dof_position_target(self.joint_handles[1], 0) # 设置目标位置为0 - self.door_locked = True - if self.Joint1_state < math.radians(5): # 当门完全关闭时 - # 锁定门 + if self._button_pressed(button_state) and self.door_locked: + self.door_target = DOOR_TARGET_PRIMARY + if door_state < math.radians(-30): + self.door_locked = False + self.light_scopes[0].set_visibility(True) + self.button_target = 0.0 + if abs(door_state - DOOR_TARGET_PRIMARY) < math.radians(0.5): + self.door_target = DOOR_TARGET_SECONDARY + if self.revoluteJoint_drive: + self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_min) + if door_state > math.radians(-20) and not self.door_locked: + self.door_target = 0.0 + if door_state < math.radians(5): self.door_locked = True - light_scopes[0].set_visibility(False) # 关闭灯 - self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_max) + self.button_target = 0.0 + self.light_scopes[0].set_visibility(False) + if self.revoluteJoint_drive: + self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_max) + targets = [] + indices = [] + if self.button_target is not None: + targets.append(self.button_target) + indices.append(self.joint_indices[0]) + if self.door_target is not None: + targets.append(self.door_target) + indices.append(self.joint_indices[1]) + if not targets: + return + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + self.art.apply_action(action) + def _button_pressed(self, value: float) -> bool: + if self.button_press_mode == "greater": + return value > self.button_press_threshold + return value < self.button_press_threshold + def _initialize_articulation(self): + if self.initialized: + return + try: + self.art = Articulation(self.articulation_root_path) + self.art.initialize() + positions = self.art.get_joint_positions().squeeze() + self.use_torch = isinstance(positions, torch.Tensor) + self.joint_indices = [self.art.get_dof_index(name) for name in self.joint_names] + self.initialized = True + except AttributeError as e: + print(f"Physics not ready yet, will retry: {e}") + def _get_scalar_value(self, value): + if isinstance(value, torch.Tensor): + return value.item() + if hasattr(value, "item"): + return value.item() + return float(value) \ No newline at end of file diff --git a/Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/resource/material.usd b/Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/resource/material.usd index a610b235c59fe3f0b8f5ed6e11bad85bf3d0c7b9..4dc4c32a13dad9c7ea82245ffe4bd1c857b5cdf0 100644 --- a/Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/resource/material.usd +++ b/Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/resource/material.usd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:71fe418d6f510748a5c129ee91dd86dc7cbfaf0d087385224f976e83d179baa0 +oid sha256:a038bd39feee218425d9a150926e28638bf8cfcd48a3a855d2a434bed66ead2f size 3799 diff --git a/Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/resource/v_69323/link_0_0.usd b/Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/resource/v_69323/link_0_0.usd index 3083076823c4549a2fd4bd897328895462d40dad..8875e4f1ed0ebe101e3b0ba444bbb6aaede6ccdb 100644 --- a/Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/resource/v_69323/link_0_0.usd +++ b/Interactive_scene/kitchen/interactive_objects/Collected_model_oven_4.30/resource/v_69323/link_0_0.usd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0bcc661530df5b669e84b57131be3eff74088f4d77c503ef068e421dc441925b +oid sha256:6e02f363ca173516d590d288e64145a8218fcb9026cedd7b2ea811fccddd133f size 8086558 diff --git a/Interactive_scene/kitchen/interactive_objects/script/fridge_control.py b/Interactive_scene/kitchen/interactive_objects/script/fridge_control.py index ad9484e6aa1914ed4d51c4ab5c912ceaad54c9eb..191a544994cd33710e87ea10fa9d8c57f5e59073 100644 --- a/Interactive_scene/kitchen/interactive_objects/script/fridge_control.py +++ b/Interactive_scene/kitchen/interactive_objects/script/fridge_control.py @@ -1,241 +1,228 @@ import carb +import math +import torch +import numpy as np +import omni.usd from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands +from isaacsim.core.prims import Articulation from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils -from pxr import PhysxSchema, UsdGeom, UsdPhysics -import math +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): + + def _find_prim(current): + if current.GetName() == prim_name: + return current.GetPath().pathString + for child in current.GetChildren(): result = _find_prim(child) if result: return result return None - + found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path - -# 1. prim init -# joint_prim = XFormPrim(find_prim_path_by_name("fridge_E_body_61")) -# right_revolutejoint_path = find_prim_path_by_name("RevoluteJoint_fridge_right") -# left_revolutejoint_path = find_prim_path_by_name("RevoluteJoint_fridge_left") - -# 2. articulation Root prim -root_articulation_prim = find_prim_path_by_name("fridge_E_body_61") -stage = omni.usd.get_context().get_stage() -# 3. joint name -joint_names = ["RevoluteJoint_fridge_left","RevoluteJoint_fridge_right"] -joint_threshold = 0.4 -# 4. Joint information -joints_info = {} -for joint_name in joint_names: - joint_prim_path = find_prim_path_by_name(joint_name) - joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) - joint = UsdPhysics.RevoluteJoint(joint_prim_obj) - - joints_info[joint_name] = { - 'prim': joint, - 'lower_limit': joint.GetLowerLimitAttr().Get(), - 'upper_limit': joint.GetUpperLimitAttr().Get() - } - -# 5. Joint limits and limit differences -joint_limits = {} -joint_limit_diffs = {} - -for i, joint_name in enumerate(joint_names): - joint_limits[joint_name] = { - 'lower': joints_info[joint_name]['lower_limit'], - 'upper': joints_info[joint_name]['upper_limit'] - } - joint_limit_diffs[joint_name] = ( - joints_info[joint_name]['upper_limit'] - joints_info[joint_name]['lower_limit'] - ) -# joint_limit_diff1 = joint_limit_diffs[joint_names[0]] -# joint_limit_diff2 = joint_limit_diffs[joint_names[1]] -# 5. light prim -light_scopes=[ - XFormPrim(find_prim_path_by_name("fridge_light")) -] +POSSIBLE_ASSET_ROOT_NAMES = ["fridge_E_body_61"] +JOINT_NAMES = ["RevoluteJoint_fridge_left", "RevoluteJoint_fridge_right"] +JOINT_THRESHOLD = 0.4 +LIGHT_PRIM_NAME = "fridge_light" + class CupboardControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - light_scopes[0].set_visibility(False) - # light_scopes[1].set_visibility(False) - # init_pose - # self.local_pose_button, self.local_ort_button_down = joint_prim.get_local_pose() - # self.local_pose_door, self.local_ort_drawer_up = door_prim.get_local_pose() - - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - - - def on_destroy(self): - pass + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.use_torch = None + self.joint_threshold = JOINT_THRESHOLD + + self.light_scopes = [XFormPrim(find_prim_path_by_name(LIGHT_PRIM_NAME))] + self.light_scopes[0].set_visibility(False) + + stage = omni.usd.get_context().get_stage() + self.joints_info = {} + for joint_name in self.joint_names: + joint_prim_path = find_prim_path_by_name(joint_name) + joint_prim_obj = stage.GetPrimAtPath(joint_prim_path) + joint = UsdPhysics.RevoluteJoint(joint_prim_obj) + self.joints_info[joint_name] = { + "prim": joint, + "lower_limit": joint.GetLowerLimitAttr().Get(), + "upper_limit": joint.GetUpperLimitAttr().Get(), + } def on_play(self): - # - self.simulation_context = SimulationContext( - stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 - ) - - def on_pause(self): - pass + self._initialize_articulation() def on_stop(self): - self.init_start=True - # for light in light_scopes: - # light.set_visibility(False) - light_scopes[0].set_visibility(False) - # light_scopes[1].set_visibility(False) - # back to initial pose - # joint_prim.set_local_pose(translation=self.local_pose_button) - pass + self.light_scopes[0].set_visibility(False) def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.art is None: + return self.light_control() self.damping_stiffness_change() self.target_pose_control() - - + + def _initialize_articulation(self): + """Initialize the articulation object and get joint information""" + if self.initialized: + return + + try: + self.art = Articulation(self.articulation_root_path) + if self.art is None: + return + + # Get joint indices + self.joint_indices = [] + for joint_name in self.joint_names: + idx = self.art.get_dof_index(joint_name) + if idx is not None: + self.joint_indices.append(idx) + else: + print(f"Warning: Could not find joint index for {joint_name}") + + if not self.joint_indices: + print("Warning: No valid joint indices found") + return + + # Detect if using torch + positions = self.art.get_joint_positions() + self.use_torch = isinstance(positions, torch.Tensor) + print(f"Detected platform: {'Isaac Lab (torch)' if self.use_torch else 'Isaac Sim (numpy/math)'}") + + self.initialized = True + except Exception as e: + print(f"Error initializing articulation: {e}") + self.initialized = False + + def _get_scalar_value(self, value): + """Convert a value (potentially a torch.Tensor) to a scalar float""" + if isinstance(value, torch.Tensor): + return value.item() + elif isinstance(value, (list, tuple, np.ndarray)): + return float(value[0] if len(value) > 0 else 0.0) + else: + return float(value) + def light_control(self): - self.left_joint_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - self.right_joint_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - # print("self.Joint1_state",self.Joint1_state) - # 联合判断双门状态 + positions = self.art.get_joint_positions().squeeze() + left_joint_state = self._get_scalar_value(positions[self.joint_indices[0]]) + right_joint_state = self._get_scalar_value(positions[self.joint_indices[1]]) + doors_open = [ - self.left_joint_state > math.radians(30), - self.right_joint_state > math.radians(30) + left_joint_state > math.radians(30), + right_joint_state > math.radians(30) ] - # 灯光控制逻辑 - current_visibility = light_scopes[0].get_visibility() + current_visibility = self.light_scopes[0].get_visibility() if any(doors_open): if not current_visibility: - for light in light_scopes: + for light in self.light_scopes: light.set_visibility(True) else: if current_visibility: - for light in light_scopes: + for light in self.light_scopes: light.set_visibility(False) - - # if self.right_joint_state > math.radians(30) : - # if light_scopes[0].get_visibility() == False: - # for light in light_scopes: - # light.set_visibility(True) - # # self.dc.set_dof_position_target(self.joint_handles[1], 140) - - # elif self.right_joint_state < math.radians(30): - # if light_scopes[0].get_visibility() == True: - # for light in light_scopes: - # light.set_visibility(False) - # self.dc.set_dof_position_target(self.joint_handles[1], 0) - - + def damping_stiffness_change(self): - - for i, joint_name in enumerate(joint_names): - # Get joint state - joint_state = self.dc.get_dof_state(self.joint_handles[i], _dynamic_control.STATE_ALL).pos - # Get joint drive API + positions = self.art.get_joint_positions().squeeze() + stage = omni.usd.get_context().get_stage() + + for i, joint_name in enumerate(self.joint_names): + if i >= len(self.joint_indices): + continue + joint_idx = self.joint_indices[i] + joint_state = self._get_scalar_value(positions[joint_idx]) + joint_drive_path = stage.GetPrimAtPath(find_prim_path_by_name(joint_name)) joint_drive = UsdPhysics.DriveAPI.Get(joint_drive_path, "angular") - # Get joint limit difference and set stiffness - - joint_limit_diff = joint_limit_diffs[joint_names[i]] - joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state)) - # stiffness = joint_drive.GetStiffnessAttr().Get() - # damping = joint_drive.GetDampingAttr().Get() - # print(f"{joint_name} - Stiffness: {stiffness}, Damping: {damping}") - def calculate_stiffness(self,joint_state): - """Calculate stiffness value based on joint angle - - Args: - joint_state (float): Joint angle (radians) - joint_limit (float): Joint limit value - - Returns: - float: Stiffness value - """ - max_stiffness = 20 # 最大刚度 - # max_stiffness = 50 # 最大刚度 - min_stiffness = 2 # 最小刚度 - decay_rate = 3 # 衰减率 - # 使用指数衰减函数计算刚度 - if abs(joint_state) >= abs(math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit']))): + joint_drive.GetStiffnessAttr().Set(self.calculate_stiffness(joint_state, i)) + + def calculate_stiffness(self, joint_state, joint_idx): + """Calculate stiffness value based on joint angle""" + max_stiffness = 110 + min_stiffness = 2 + decay_rate = 8 + + joint_name = self.joint_names[joint_idx] + threshold_value = abs(math.radians(self.joint_threshold * (self.joints_info[joint_name]['upper_limit'] + self.joints_info[joint_name]['lower_limit']))) + if abs(joint_state) >= threshold_value: return min_stiffness - - # 计算刚度值:stiffness = max_stiffness * e^(-decay_rate * angle) + stiffness = max_stiffness * math.exp(-decay_rate * abs(joint_state)) - - # 确保刚度值在最小值和最大值之间 - return max(min_stiffness, min(stiffness, max_stiffness)) - + return max(min_stiffness, min(stiffness, max_stiffness)) + def target_pose_control(self): - for i, joint_handle in enumerate(self.joint_handles): - # Get joint state - joint_state = self.dc.get_dof_state(joint_handle, _dynamic_control.STATE_ALL).pos - - # print("joint_state", joint_state) - # print("joints_info[joint_names[i]]['upper_limit']", joints_info[joint_names[i]]['upper_limit']) - # Get joint limit difference - # Set target position based on joint state - if abs(joints_info[joint_names[i]]['lower_limit']) <= math.radians(abs(joints_info[joint_names[i]]['upper_limit'])): - if joint_state > math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit'])): - - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['upper_limit'])) + positions = self.art.get_joint_positions().squeeze() + targets = [] + indices = [] + + for i, joint_name in enumerate(self.joint_names): + if i >= len(self.joint_indices): + continue + joint_idx = self.joint_indices[i] + joint_state = self._get_scalar_value(positions[joint_idx]) + + lower_limit = self.joints_info[joint_name]['lower_limit'] + upper_limit = self.joints_info[joint_name]['upper_limit'] + threshold_value = math.radians(self.joint_threshold * (upper_limit + lower_limit)) + + if abs(lower_limit) <= math.radians(abs(upper_limit)): + if joint_state > threshold_value: + target = math.radians(upper_limit) else: - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['lower_limit'])) + target = math.radians(lower_limit) else: - if joint_state < math.radians(joint_threshold * (joints_info[joint_names[i]]['upper_limit']+joints_info[joint_names[i]]['lower_limit'])): - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['lower_limit'])) + if joint_state < threshold_value: + target = math.radians(lower_limit) else: - self.dc.set_dof_position_target(joint_handle, math.radians(joints_info[joint_names[i]]['upper_limit'])) - # print("self.dc.get_dof_position_target=",self.dc.get_dof_position_target(joint_handle)) + target = math.radians(upper_limit) + + targets.append(target) + indices.append(joint_idx) + + if not targets: + return + + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + + self.art.apply_action(action) diff --git a/Interactive_scene/kitchen/interactive_objects/script/light_control.py b/Interactive_scene/kitchen/interactive_objects/script/light_control.py index 66057fd940e52b859da71f515409bad10f8f1a77..d1bc09c9e077057537fb9a9e8e7d34f1c86ded58 100644 --- a/Interactive_scene/kitchen/interactive_objects/script/light_control.py +++ b/Interactive_scene/kitchen/interactive_objects/script/light_control.py @@ -1,152 +1,198 @@ import carb +import math +import torch +import numpy as np +import omni.usd from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands +from isaacsim.core.prims import Articulation from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils +from isaacsim.core.utils.types import ArticulationActions + def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): + + def _find_prim(current): + if current.GetName() == prim_name: + return current.GetPath().pathString + for child in current.GetChildren(): result = _find_prim(child) if result: return result return None - + found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path -# 1. prim init -joint_prim = XFormPrim(find_prim_path_by_name("switch_E_button_09")) -print("joint_prim",joint_prim.prim_path) -# 2. articulation Root prim -root_articulation_prim = find_prim_path_by_name("switch_E_body_28") -print("root_articulation_prim:",root_articulation_prim) -# 3. joint name -joint_names = ["RevoluteJoint_switch"] +POSSIBLE_ASSET_ROOT_NAMES = ["switch_E_body_28"] +JOINT_NAMES = ["RevoluteJoint_switch"] +LIGHT_PRIM_NAME = "kitchen_all_light" +BUTTON_PRIM_NAME = "switch_E_button_09" -# 5. light prim -light_scopes=[ - XFormPrim(find_prim_path_by_name("kitchen_all_light")) -] -print("light_scopes", light_scopes) +SWITCH_ON_THRESHOLD = math.radians(11) +SWITCH_ON_POSITION = math.radians(13) +SWITCH_OFF_POSITION = math.radians(0) class RoomLightControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - light_scopes[0].set_visibility(False) - # init_pose - self.local_pose_button, self.local_ort_button_down = joint_prim.get_local_pose() - # self.local_pose_door, self.local_ort_drawer_up = door_prim.get_local_pose() - - # Find Root - # self.art = self.dc.get_articulation(root_articulation_prim) - # if self.art == _dynamic_control.INVALID_HANDLE: - # print('the prim is not an articulation') - - - def on_destroy(self): - pass + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.use_torch = None + + self.light_scopes = [XFormPrim(find_prim_path_by_name(LIGHT_PRIM_NAME))] + self.light_scopes[0].set_visibility(False) + + self.joint_prim = XFormPrim(find_prim_path_by_name(BUTTON_PRIM_NAME)) + print("joint_prim", self.joint_prim.prim_path) + self.local_pose_button, self.local_ort_button_down = self.joint_prim.get_local_pose() def on_play(self): - # - self.simulation_context = SimulationContext( - stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 - ) - # 配置物理引擎参数 - # print(self.simulation_context.get_physics_context().get_gravity()) - # self.simulation_context.get_physics_context().set_broadphase_type("MBP") - # self.simulation_context.get_physics_context().set_solver_type("PGS") - # self.simulation_context.get_physics_context().enable_gpu_dynamics(False) - - def on_pause(self): - pass + self._initialize_articulation() def on_stop(self): - self.init_start=True - for light in light_scopes: + for light in self.light_scopes: light.set_visibility(False) - # light_scopes[0].set_visibility(False) - # light_scopes[1].set_visibility(False) - # back to initial pose - joint_prim.set_local_pose(translation=self.local_pose_button) - pass + self.joint_prim.set_local_pose(translation=self.local_pose_button) def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.art is None: + return self.light_control() - - + + def _initialize_articulation(self): + """Initialize the articulation object and get joint information""" + if self.initialized: + return + + try: + self.art = Articulation(self.articulation_root_path) + if self.art is None: + return + + # Get joint indices + self.joint_indices = [] + for joint_name in self.joint_names: + idx = self.art.get_dof_index(joint_name) + if idx is not None: + self.joint_indices.append(idx) + else: + print(f"Warning: Could not find joint index for {joint_name}") + + if not self.joint_indices: + print("Warning: No valid joint indices found") + return + + # Detect if using torch + positions = self.art.get_joint_positions() + self.use_torch = isinstance(positions, torch.Tensor) + print(f"Detected platform: {'Isaac Lab (torch)' if self.use_torch else 'Isaac Sim (numpy/math)'}") + + self.initialized = True + except Exception as e: + print(f"Error initializing articulation: {e}") + self.initialized = False + + def _get_scalar_value(self, value): + """Convert a value (potentially a torch.Tensor) to a scalar float""" + if isinstance(value, torch.Tensor): + return value.item() + elif isinstance(value, (list, tuple, np.ndarray)): + return float(value[0] if len(value) > 0 else 0.0) + else: + return float(value) + def light_control(self): try: - # 获取当前开关状态 - self.Joint1_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - current_visibility = light_scopes[0].get_visibility() - - # 定义开关阈值和状态 - SWITCH_ON_THRESHOLD = math.radians(11) - SWITCH_ON_POSITION = math.radians(13) - SWITCH_OFF_POSITION = math.radians(0) - - # 判断开关状态并控制灯光 - if self.Joint1_state < SWITCH_ON_THRESHOLD: + positions = self.art.get_joint_positions() + # Handle both single joint and multiple joints cases + # If positions is a scalar (0-d), use it directly; otherwise index it + if isinstance(positions, torch.Tensor): + if positions.ndim == 0: + # Scalar tensor + joint_state = self._get_scalar_value(positions) + else: + # Array tensor, use index + joint_state = self._get_scalar_value(positions[self.joint_indices[0]]) + elif isinstance(positions, np.ndarray): + if positions.ndim == 0: + # Scalar array + joint_state = self._get_scalar_value(positions) + else: + # Array, use index + joint_state = self._get_scalar_value(positions[self.joint_indices[0]]) + else: + # List or other iterable, use index + joint_state = self._get_scalar_value(positions[self.joint_indices[0]]) + current_visibility = self.light_scopes[0].get_visibility() + + if joint_state < SWITCH_ON_THRESHOLD: # 开关打开状态 if not current_visibility: # 如果灯是关闭的,则打开所有灯 - for light in light_scopes: + for light in self.light_scopes: light.set_visibility(True) # 设置开关到打开位置 - self.dc.set_dof_position_target(self.joint_handles[0], SWITCH_OFF_POSITION) + target = SWITCH_OFF_POSITION + else: + target = None else: # 开关关闭状态 if current_visibility: # 如果灯是打开的,则关闭所有灯 - for light in light_scopes: + for light in self.light_scopes: light.set_visibility(False) # 设置开关到关闭位置 - self.dc.set_dof_position_target(self.joint_handles[0], SWITCH_ON_POSITION) - + target = SWITCH_ON_POSITION + else: + target = None + + if target is not None: + if self.use_torch: + # Get device from positions, handling both tensor and scalar cases + if isinstance(positions, torch.Tensor): + device = positions.device + else: + # Fallback: use default device + device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') + targets_tensor = torch.tensor([target], device=device) + indices_tensor = torch.tensor([self.joint_indices[0]], device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions([target], joint_indices=[self.joint_indices[0]]) + self.art.apply_action(action) + except Exception as e: carb.log_error(f"Error in light control: {str(e)}") # 发生错误时确保灯光关闭 - for light in light_scopes: + for light in self.light_scopes: light.set_visibility(False) diff --git a/Interactive_scene/kitchen/interactive_objects/script/open_door_for_0.py b/Interactive_scene/kitchen/interactive_objects/script/open_door_for_0.py index 5d16293a3d7802655118ea2300fa9342a40e03d9..1f4ded78c78c459212f77a7b59a9e8025b37bf4b 100644 --- a/Interactive_scene/kitchen/interactive_objects/script/open_door_for_0.py +++ b/Interactive_scene/kitchen/interactive_objects/script/open_door_for_0.py @@ -1,127 +1,229 @@ import carb +import math +import torch +import numpy as np +import omni.usd from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands +from isaacsim.core.prims import Articulation from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import Gf, Sdf, Usd, UsdGeom -from omni.isaac.core import SimulationContext, World -import math -from omni.replicator.core import utils +from isaacsim.core.utils.types import ArticulationActions + def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): + + def _find_prim(current): + if current.GetName() == prim_name: + return current.GetPath().pathString + for child in current.GetChildren(): result = _find_prim(child) if result: return result return None - + found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path -# 1. prim init -joint_prim = XFormPrim(find_prim_path_by_name("Access_control_E_button_09")) -print("joint_prim",joint_prim.prim_path) -# 2. articulation Root prim -onoff_root_articulation_prim = find_prim_path_by_name("Access_control_E_body_28") -door_root_articulation_prim = find_prim_path_by_name("door_E_body_13") -print("onoff_root_articulation_prim:",onoff_root_articulation_prim) -# 3. joint name -onoff_joint_names = ["RevoluteJoint_access_control"] -door_joint_name = ["PrismaticJoint_door_left","PrismaticJoint_door_right"] +ONOFF_POSSIBLE_ASSET_ROOT_NAMES = ["Access_control_E_body_28"] +DOOR_POSSIBLE_ASSET_ROOT_NAMES = ["door_E_body_13"] +ONOFF_JOINT_NAMES = ["RevoluteJoint_access_control"] +DOOR_JOINT_NAMES = ["PrismaticJoint_door_left", "PrismaticJoint_door_right"] +BUTTON_PRIM_NAME = "Access_control_E_button_09" + +SWITCH_ON_THRESHOLD = math.radians(1) +SWITCH_ON_POSITION = math.radians(13) +SWITCH_OFF_POSITION = math.radians(0) +DOOR_OPEN_LEFT = 0.65 +DOOR_OPEN_RIGHT = -0.65 +DOOR_CLOSED = 0.0 class OpenDoorControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.onoff_joint_handles = [] - self.door_joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - - # init_pose - self.local_pose_button, self.local_ort_button_down = joint_prim.get_local_pose() - # self.local_pose_door, self.local_ort_drawer_up = door_prim.get_local_pose() - - - def on_destroy(self): - pass + # Find onoff articulation root + onoff_articulation_root_path = None + for root_name in ONOFF_POSSIBLE_ASSET_ROOT_NAMES: + try: + onoff_articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found onoff articulation root: {onoff_articulation_root_path}") + break + except RuntimeError: + continue + + if onoff_articulation_root_path is None: + raise RuntimeError(f"Could not find onoff articulation root with names: {ONOFF_POSSIBLE_ASSET_ROOT_NAMES}") + + # Find door articulation root + door_articulation_root_path = None + for root_name in DOOR_POSSIBLE_ASSET_ROOT_NAMES: + try: + door_articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found door articulation root: {door_articulation_root_path}") + break + except RuntimeError: + continue + + if door_articulation_root_path is None: + raise RuntimeError(f"Could not find door articulation root with names: {DOOR_POSSIBLE_ASSET_ROOT_NAMES}") + + self.onoff_articulation_root_path = onoff_articulation_root_path + self.door_articulation_root_path = door_articulation_root_path + self.onoff_art = None + self.door_art = None + self.initialized = False + self.onoff_joint_names = ONOFF_JOINT_NAMES + self.door_joint_names = DOOR_JOINT_NAMES + self.onoff_joint_indices = None + self.door_joint_indices = None + self.use_torch = None + + self.joint_prim = XFormPrim(find_prim_path_by_name(BUTTON_PRIM_NAME)) + print("joint_prim", self.joint_prim.prim_path) + self.local_pose_button, self.local_ort_button_down = self.joint_prim.get_local_pose() def on_play(self): - # - self.simulation_context = SimulationContext( - stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 - ) - - def on_pause(self): - pass + self._initialize_articulations() def on_stop(self): - self.init_start=True - joint_prim.set_local_pose(translation=self.local_pose_button) - pass + self.joint_prim.set_local_pose(translation=self.local_pose_button) def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.onoff_art = self.dc.get_articulation(onoff_root_articulation_prim) - self.door_art = self.dc.get_articulation(door_root_articulation_prim) - if self.onoff_art == _dynamic_control.INVALID_HANDLE: - print('the onoff_art prim is not an articulation') - self.dc.wake_up_articulation(self.onoff_art) - self.dc.wake_up_articulation(self.door_art) - # Find joint - self.onoff_joint_handles = [] - self.door_joint_handles = [] - for joint_name in onoff_joint_names: - self.onoff_joint_handles.append( self.dc.find_articulation_dof(self.onoff_art, joint_name)) - for joint_name in door_joint_name: - self.door_joint_handles.append( self.dc.find_articulation_dof(self.door_art, joint_name)) - # print("self.door_joint_handles = []",self.door_joint_handles) + if not self.initialized: + self._initialize_articulations() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.onoff_art is None or self.door_art is None: + return self.door_control() - - + + def _initialize_articulations(self): + """Initialize both articulation objects and get joint information""" + if self.initialized: + return + + try: + # Initialize onoff articulation + self.onoff_art = Articulation(self.onoff_articulation_root_path) + if self.onoff_art is None: + return + + self.onoff_joint_indices = [] + for joint_name in self.onoff_joint_names: + idx = self.onoff_art.get_dof_index(joint_name) + if idx is not None: + self.onoff_joint_indices.append(idx) + else: + print(f"Warning: Could not find onoff joint index for {joint_name}") + + if not self.onoff_joint_indices: + print("Warning: No valid onoff joint indices found") + return + + # Initialize door articulation + self.door_art = Articulation(self.door_articulation_root_path) + if self.door_art is None: + return + + self.door_joint_indices = [] + for joint_name in self.door_joint_names: + idx = self.door_art.get_dof_index(joint_name) + if idx is not None: + self.door_joint_indices.append(idx) + else: + print(f"Warning: Could not find door joint index for {joint_name}") + + if not self.door_joint_indices: + print("Warning: No valid door joint indices found") + return + + # Detect if using torch (check both articulations) + onoff_positions = self.onoff_art.get_joint_positions() + self.use_torch = isinstance(onoff_positions, torch.Tensor) + print(f"Detected platform: {'Isaac Lab (torch)' if self.use_torch else 'Isaac Sim (numpy/math)'}") + + self.initialized = True + except Exception as e: + print(f"Error initializing articulations: {e}") + self.initialized = False + + def _get_scalar_value(self, value): + """Convert a value (potentially a torch.Tensor) to a scalar float""" + if isinstance(value, torch.Tensor): + return value.item() + elif isinstance(value, (list, tuple, np.ndarray)): + return float(value[0] if len(value) > 0 else 0.0) + else: + return float(value) + def door_control(self): try: - # 获取当前开关状态 - self.Joint1_state = self.dc.get_dof_state(self.onoff_joint_handles[0], _dynamic_control.STATE_ALL).pos - - # 定义开关阈值和状态 - SWITCH_ON_THRESHOLD = math.radians(1) - SWITCH_ON_POSITION = math.radians(13) - SWITCH_OFF_POSITION = math.radians(0) - # print("self.Joint1_state", self.Joint1_state) - # 判断开关状态并控制灯光 - if self.Joint1_state > SWITCH_ON_THRESHOLD: - # print("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++") - self.dc.set_dof_position_target(self.onoff_joint_handles[0], SWITCH_ON_POSITION) - self.dc.set_dof_position_target(self.door_joint_handles[0], 0.65) - self.dc.set_dof_position_target(self.door_joint_handles[1], -0.65) + onoff_positions = self.onoff_art.get_joint_positions() + # Handle both single joint and multiple joints cases + if isinstance(onoff_positions, torch.Tensor): + if onoff_positions.ndim == 0: + # Scalar tensor + joint_state = self._get_scalar_value(onoff_positions) + else: + # Array tensor, use index + joint_state = self._get_scalar_value(onoff_positions[self.onoff_joint_indices[0]]) + elif isinstance(onoff_positions, np.ndarray): + if onoff_positions.ndim == 0: + # Scalar array + joint_state = self._get_scalar_value(onoff_positions) + else: + # Array, use index + joint_state = self._get_scalar_value(onoff_positions[self.onoff_joint_indices[0]]) else: - self.dc.set_dof_position_target(self.onoff_joint_handles[0], SWITCH_OFF_POSITION) - self.dc.set_dof_position_target(self.door_joint_handles[0], 0) - self.dc.set_dof_position_target(self.door_joint_handles[1], 0) - + # List or other iterable, use index + joint_state = self._get_scalar_value(onoff_positions[self.onoff_joint_indices[0]]) + + if joint_state > SWITCH_ON_THRESHOLD: + # Switch on - open doors + onoff_target = SWITCH_ON_POSITION + door_targets = [DOOR_OPEN_LEFT, DOOR_OPEN_RIGHT] + else: + # Switch off - close doors + onoff_target = SWITCH_OFF_POSITION + door_targets = [DOOR_CLOSED, DOOR_CLOSED] + + # Apply onoff action + if self.use_torch: + # Get device from positions, handling both tensor and scalar cases + if isinstance(onoff_positions, torch.Tensor): + device = onoff_positions.device + else: + device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') + onoff_targets_tensor = torch.tensor([onoff_target], device=device) + onoff_indices_tensor = torch.tensor([self.onoff_joint_indices[0]], device=device, dtype=torch.long) + onoff_action = ArticulationActions(joint_positions=onoff_targets_tensor, joint_indices=onoff_indices_tensor) + else: + onoff_action = ArticulationActions([onoff_target], joint_indices=[self.onoff_joint_indices[0]]) + self.onoff_art.apply_action(onoff_action) + + # Apply door action + door_positions = self.door_art.get_joint_positions() + if self.use_torch: + # Get device from positions, handling both tensor and scalar cases + if isinstance(door_positions, torch.Tensor): + device = door_positions.device + else: + device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') + door_targets_tensor = torch.tensor(door_targets, device=device) + door_indices_tensor = torch.tensor(self.door_joint_indices, device=device, dtype=torch.long) + door_action = ArticulationActions(joint_positions=door_targets_tensor, joint_indices=door_indices_tensor) + else: + door_action = ArticulationActions(door_targets, joint_indices=self.door_joint_indices) + self.door_art.apply_action(door_action) + except Exception as e: carb.log_error(f"Error in opendoor control: {str(e)}") diff --git a/Interactive_scene/kitchen/interactive_objects/script/oven_control.py b/Interactive_scene/kitchen/interactive_objects/script/oven_control.py index b3c70d51d06484cc5038a9d2ab878594a22e8420..85c33b017f26596ca22027e5638b95452f1cb73e 100644 --- a/Interactive_scene/kitchen/interactive_objects/script/oven_control.py +++ b/Interactive_scene/kitchen/interactive_objects/script/oven_control.py @@ -1,195 +1,206 @@ import carb +import math +import torch +import numpy as np +import omni.usd from omni.kit.scripting import BehaviorScript -from omni.isaac.dynamic_control import _dynamic_control -from enum import Enum -from pxr import Gf -from threading import Thread -import marshal,json -import omni.kit.commands +from isaacsim.core.prims import Articulation from omni.isaac.core.prims import XFormPrim -import numpy as np -from pxr import PhysxSchema, UsdGeom, UsdPhysics -import math -from omni.isaac.core import SimulationContext, World -# from isaacsim.core.prims import XFormPrim -# stiffness :0.8 Damping: 0.05 +from isaacsim.core.utils.types import ArticulationActions +from pxr import UsdPhysics def find_prim_path_by_name(prim_name: str, root_path: str = "/") -> str: """Recursively find the full path by Prim name""" stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath(root_path) - - def _find_prim(prim): - if prim.GetName() == prim_name: - return prim.GetPath().pathString - for child in prim.GetChildren(): + + def _find_prim(current): + if current.GetName() == prim_name: + return current.GetPath().pathString + for child in current.GetChildren(): result = _find_prim(child) if result: return result return None - + found_path = _find_prim(prim) if not found_path: raise RuntimeError(f"Prim '{prim_name}' not found under {root_path}") return found_path -# # 1. prim init -# button_prim = XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Xform") -# door_prim = XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/oven/oven_door") -# # 2. articulation Root prim -# root_articulation_prim = "/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/oven/oven_base" -# # 3. joint name -# joint_names = ["PrismaticJoint", "RevoluteJoint"] -# # 4. joint num -# num_arm_dof = 2 - -# light_scopes=[XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Lights_on"), -# XFormPrim("/sm_warehouse_a01_h10m_cornerout_01/micro_wave_oven_2/Lights_on_1"), -# ] -# for i in range(0, light_scopes.__len__()): -# light_scopes[i].set_visibility(False) -# index = random.randint(0, len(light_scopes)-1) -# light_scopes[index].set_visibility(True) -button_prim = XFormPrim(find_prim_path_by_name("oven_E_button_5")) -print("button_prim", button_prim.prim_path) -# door_prim = XFormPrim(find_prim_path_by_name("oven_E_door_4")) -# print("door_prim", door_prim.prim_path) -root_articulation_prim = find_prim_path_by_name("oven_E_body_7") -print("root_articulation_prim", root_articulation_prim) -joint_names = ["PrismaticJoint_oven_down", "RevoluteJoint_oven_up"] -light_scopes=[XFormPrim(find_prim_path_by_name("oven_light")) - ] -revolutejoint_path = find_prim_path_by_name("RevoluteJoint_oven_up") + +POSSIBLE_ASSET_ROOT_NAMES = ["oven_E_body_7"] +JOINT_NAMES = ["PrismaticJoint_oven_down", "RevoluteJoint_oven_up"] +LIGHT_PRIM_NAME = "oven_light" +BUTTON_PRIM_NAME = "oven_E_button_5" +REVOLUTE_JOINT_NAME = "RevoluteJoint_oven_up" + +STIFFNESS_MAX = 0.8 +STIFFNESS_MIN = 0.08 + +BUTTON_PRESS_THRESHOLD = -0.001 +DOOR_OPEN_ANGLE_1 = math.radians(-50) +DOOR_OPEN_ANGLE_2 = math.radians(-78) +DOOR_OPEN_THRESHOLD = math.radians(-30) +DOOR_CLOSE_THRESHOLD = math.radians(-20) +DOOR_CLOSED_THRESHOLD = math.radians(5) +DOOR_ANGLE_TOLERANCE = math.radians(0.5) class MicrowaveOverControl(BehaviorScript): def on_init(self): - self.phsx_freq = 120 - self.joint_handles = [] - self.dc = _dynamic_control.acquire_dynamic_control_interface() - light_scopes[0].set_visibility(False) - self.Stiffness_max = 0.8 - self.Stiffness_min = 0.08 - - # 初始化门的锁定状态 + articulation_root_path = None + for root_name in POSSIBLE_ASSET_ROOT_NAMES: + try: + articulation_root_path = find_prim_path_by_name(root_name) + print(f"Found articulation root: {articulation_root_path}") + break + except RuntimeError: + continue + + if articulation_root_path is None: + raise RuntimeError(f"Could not find articulation root with names: {POSSIBLE_ASSET_ROOT_NAMES}") + + self.articulation_root_path = articulation_root_path + self.art = None + self.initialized = False + self.joint_names = JOINT_NAMES + self.joint_indices = None + self.use_torch = None + + self.light_scopes = [XFormPrim(find_prim_path_by_name(LIGHT_PRIM_NAME))] + self.light_scopes[0].set_visibility(False) + + self.Stiffness_max = STIFFNESS_MAX + self.Stiffness_min = STIFFNESS_MIN self.door_locked = True - - # init_pose - self.local_pose_button, self.local_ort_drawer_down = button_prim.get_local_pose() - # self.local_pose_door, self.local_ort_drawer_up = door_prim.get_local_pose() - - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') + + self.button_prim = XFormPrim(find_prim_path_by_name(BUTTON_PRIM_NAME)) + print("button_prim", self.button_prim.prim_path) + self.local_pose_button, self.local_ort_drawer_down = self.button_prim.get_local_pose() + stage = omni.usd.get_context().get_stage() + revolutejoint_path = find_prim_path_by_name(REVOLUTE_JOINT_NAME) self.revoluteJoint_drive_path = stage.GetPrimAtPath(revolutejoint_path) self.revoluteJoint_drive = UsdPhysics.DriveAPI.Get(self.revoluteJoint_drive_path, "angular") - - - def on_destroy(self): - pass def on_play(self): - self.simulation_context = SimulationContext( - stage_units_in_meters=1.0, - physics_dt=1.0/120, - rendering_dt=1.0/120 - ) - - - def on_pause(self): - pass + self._initialize_articulation() def on_stop(self): - self.init_start=True - light_scopes[0].set_visibility(False) - # back to initial pose - # button_prim.set_local_pose(translation=self.local_pose_button) - # door_prim.set_local_pose(translation=self.local_pose_door) + self.light_scopes[0].set_visibility(False) self.door_locked = True + if self.revoluteJoint_drive: + self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_max) carb.log_info(f"{type(self).__name__}.on_stop()->{self.prim_path}") - pass def on_update(self, current_time: float, delta_time: float): if delta_time <= 0: return - self.dc = _dynamic_control.acquire_dynamic_control_interface() - self.active_art() - self.apply_behavior() - - def active_art(self): - # Find Root - self.art = self.dc.get_articulation(root_articulation_prim) - if self.art == _dynamic_control.INVALID_HANDLE: - print('the prim is not an articulation') - self.dc.wake_up_articulation(self.art) - - # Find joint - self.joint_handles = [] - for joint_name in joint_names: - self.joint_handles.append( self.dc.find_articulation_dof(self.art, joint_name)) - # print("self.joint_handles",self.joint_handles) + if not self.initialized: + self._initialize_articulation() + if not self.initialized: + return + self.apply_behavior() + def apply_behavior(self): + if not self.initialized or self.art is None: + return self.oven_control() - - # def oven_control(self): - # self.Joint0_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - # self.Joint1_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - # # print("self.Joint0_state", self.Joint0_state) - # # print("self.Joint1_state", self.Joint1_state) - # # 按钮被按下且门处于锁定状态 - # if self.Joint0_state < -0.001 and self.door_locked: - # self.dc.set_dof_position_target(self.joint_handles[1], math.radians(-90)) - # # if self.Joint1_state > math.radians(100): - # # self.door_locked = False # 解除锁定 - - # # 门开到30度后开灯,按钮归位s - # if self.Joint1_state < math.radians(-30) : - # self.door_locked = False # 解除锁定 - # light_scopes[0].set_visibility(True) - # self.dc.set_dof_position_target(self.joint_handles[0], 0) - - # # 检测手动关门 - # if self.Joint1_state > math.radians(-20) and not self.door_locked: # 当门接近关闭位置时 - - # self.dc.set_dof_position_target(self.joint_handles[1], 0) # 设置目标位置为0 - # self.door_locked = True - # if self.Joint1_state < math.radians(5): # 当门完全关闭时 - # # 锁定门 - # self.door_locked = True - # light_scopes[0].set_visibility(False) # 关闭灯 + + def _initialize_articulation(self): + """Initialize the articulation object and get joint information""" + if self.initialized: + return + + try: + self.art = Articulation(self.articulation_root_path) + if self.art is None: + return + + # Get joint indices + self.joint_indices = [] + for joint_name in self.joint_names: + idx = self.art.get_dof_index(joint_name) + if idx is not None: + self.joint_indices.append(idx) + else: + print(f"Warning: Could not find joint index for {joint_name}") + + if not self.joint_indices or len(self.joint_indices) < 2: + print("Warning: No valid joint indices found") + return + + # Detect if using torch + positions = self.art.get_joint_positions() + self.use_torch = isinstance(positions, torch.Tensor) + print(f"Detected platform: {'Isaac Lab (torch)' if self.use_torch else 'Isaac Sim (numpy/math)'}") + + self.initialized = True + except Exception as e: + print(f"Error initializing articulation: {e}") + self.initialized = False + + def _get_scalar_value(self, value): + """Convert a value (potentially a torch.Tensor) to a scalar float""" + if isinstance(value, torch.Tensor): + return value.item() + elif isinstance(value, (list, tuple, np.ndarray)): + return float(value[0] if len(value) > 0 else 0.0) + else: + return float(value) + def oven_control(self): + positions = self.art.get_joint_positions().squeeze() + button_state = self._get_scalar_value(positions[self.joint_indices[0]]) + door_state = self._get_scalar_value(positions[self.joint_indices[1]]) + + targets = [] + indices = [] - self.Joint0_state = self.dc.get_dof_state(self.joint_handles[0], _dynamic_control.STATE_ALL).pos - self.Joint1_state = self.dc.get_dof_state(self.joint_handles[1], _dynamic_control.STATE_ALL).pos - # print("self.Joint0_state", self.Joint0_state) - # print("self.Joint1_state", self.Joint1_state) # 按钮被按下且门处于锁定状态 - if self.Joint0_state < -0.001 and self.door_locked: - self.dc.set_dof_position_target(self.joint_handles[1], math.radians(-50)) - # if self.Joint1_state > math.radians(100): - # self.door_locked = False # 解除锁定 - - # 门开到30度后开灯,按钮归位s - if self.Joint1_state < math.radians(-30) : - self.door_locked = False # 解除锁定 - light_scopes[0].set_visibility(True) - self.dc.set_dof_position_target(self.joint_handles[0], 0) - - if abs(self.Joint1_state - math.radians(-50)) < math.radians(0.5) : - self.dc.set_dof_position_target(self.joint_handles[1], math.radians(-78)) - self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_min) - - + if button_state < BUTTON_PRESS_THRESHOLD and self.door_locked: + targets.append(DOOR_OPEN_ANGLE_1) + indices.append(self.joint_indices[1]) + + # 门开到30度后开灯,按钮归位 + if door_state < DOOR_OPEN_THRESHOLD: + self.door_locked = False + self.light_scopes[0].set_visibility(True) + targets.append(0.0) + indices.append(self.joint_indices[0]) + else: + # Keep button target + targets.append(button_state) + indices.append(self.joint_indices[0]) + + # 门到达第一个目标角度后,继续开到第二个角度 + if abs(door_state - DOOR_OPEN_ANGLE_1) < DOOR_ANGLE_TOLERANCE: + targets.append(DOOR_OPEN_ANGLE_2) + indices.append(self.joint_indices[1]) + if self.revoluteJoint_drive: + self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_min) + # 检测手动关门 - if self.Joint1_state > math.radians(-20) and not self.door_locked: # 当门接近关闭位置时 - - self.dc.set_dof_position_target(self.joint_handles[1], 0) # 设置目标位置为0 + if door_state > DOOR_CLOSE_THRESHOLD and not self.door_locked: + targets.append(0.0) + indices.append(self.joint_indices[1]) self.door_locked = True - if self.Joint1_state < math.radians(5): # 当门完全关闭时 + + if door_state < DOOR_CLOSED_THRESHOLD: # 锁定门 self.door_locked = True - light_scopes[0].set_visibility(False) # 关闭灯 - self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_max) \ No newline at end of file + self.light_scopes[0].set_visibility(False) + if self.revoluteJoint_drive: + self.revoluteJoint_drive.GetStiffnessAttr().Set(self.Stiffness_max) + + if targets: + if self.use_torch: + device = positions.device + targets_tensor = torch.tensor(targets, device=device) + indices_tensor = torch.tensor(indices, device=device, dtype=torch.long) + action = ArticulationActions(joint_positions=targets_tensor, joint_indices=indices_tensor) + else: + action = ArticulationActions(targets, joint_indices=indices) + self.art.apply_action(action) diff --git a/README.md b/README.md index 33418eae970c020b1f8d67aeb3c6010ac1179497..d4b261e9bc7f7fcfe21448d2c57c28cf388eb3a4 100755 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ Formats: [![Paper](https://img.shields.io/badge/Hugging_Face-Paper-yellow.svg)](https://huggingface.co/papers/2506.04941) +## 🎉🎉🎉 ArtVIP is accepted by ICLR 2026 ## Key Features @@ -67,7 +68,7 @@ Formats:

- +**** --- ## [Version History](./assets/Release_history.md) @@ -76,8 +77,9 @@ Formats: | Version | Release Date | Description | Highlights | |---------|--------------|-----------------------------------------------------------------------------|------------| -| v1.1 | 2024-08 | Optimized the details of interactive scenes. | ✅ Modify interactive scene joint drive configuration
✅Optimize collision volume decomposition within interactive scenes
✅Including 48 modular interactive objects | -| v1.0 | 2024-06 | Initial release of ArtVIP dataset | ✅ 206 articulated objects
✅ 6 interactive scenes
✅ 6 digital twin scenes
| +| v1.2 | 2026-03 | Added new asset categories and simplified USD joint control code. | ✅ Added 37 IKEA furniture assets (`Ikea_furniture`)
✅ Added 15 medical equipment assets (`Medical_equipment`)
✅ Simplified USD joint control code | +| v1.1 | 2025-08 | Optimized the details of interactive scenes. | ✅ Modify interactive scene joint drive configuration
✅Optimize collision volume decomposition within interactive scenes
✅Including 48 modular interactive objects | +| v1.0 | 2025-06 | Initial release of ArtVIP dataset | ✅ 206 articulated objects
✅ 6 interactive scenes
✅ 6 digital twin scenes
| ### Dataset Information diff --git a/Scenes/kitchen/kitchen.usd b/Scenes/kitchen/kitchen.usd index 9298214b4e6909d5374d78a930488133bd672c96..1fc6d0c5852e04319141f9f9d909b60f262f397a 100644 --- a/Scenes/kitchen/kitchen.usd +++ b/Scenes/kitchen/kitchen.usd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:345fc9f45504a504121f38cd91515a168dd7f341e57b0c8cdb18611bb6f27d0e -size 76863303 +oid sha256:f9fdcf34ef9385657582b40b2949d7df947898b9ec7d2526d3d735bf8522a64b +size 76874028