diffneusim 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- diffneusim/__init__.py +1 -0
- diffneusim/_cache.py +42 -0
- diffneusim/_paths.py +5 -0
- diffneusim/bindings/rew14_ext.cu +115 -0
- diffneusim/bindings/soft14_capi.cpp +443 -0
- diffneusim/bindings/soft14_engine_ext.cu +596 -0
- diffneusim/bindings/soft_capi.cpp +782 -0
- diffneusim/bindings/soft_engine_ext.cu +495 -0
- diffneusim/core/cpu_engine/build.sh +40 -0
- diffneusim/core/cpu_engine/fiber/cuda_runtime.h +445 -0
- diffneusim/core/cpu_engine/x14_cpu.cpp +283 -0
- diffneusim/core/diff/dual.h +126 -0
- diffneusim/core/include/diffneusim/macros.h +35 -0
- diffneusim/core/kin/kinematic_tree.h +273 -0
- diffneusim/core/math/so3.h +182 -0
- diffneusim/core/soft/adj/out_adj.h +102 -0
- diffneusim/core/soft/adj/rnea_adj.h +425 -0
- diffneusim/core/soft/adj/rows_adj.h +439 -0
- diffneusim/core/soft/adj/rows_functor.h +89 -0
- diffneusim/core/soft/adj/rows_lanes.h +443 -0
- diffneusim/core/soft/adj/shell_adj.h +243 -0
- diffneusim/core/soft/adj/tree_adj.h +356 -0
- diffneusim/core/soft/collide.h +183 -0
- diffneusim/core/soft/gpu/adj14.cuh +233 -0
- diffneusim/core/soft/gpu/adj14_mus.cuh +98 -0
- diffneusim/core/soft/gpu/adj_shell.cuh +50 -0
- diffneusim/core/soft/gpu/adj_tab.cuh +49 -0
- diffneusim/core/soft/gpu/body14.cuh +47 -0
- diffneusim/core/soft/gpu/chol_rn.cuh +458 -0
- diffneusim/core/soft/gpu/chol_small.cuh +123 -0
- diffneusim/core/soft/gpu/chol_split.cuh +193 -0
- diffneusim/core/soft/gpu/engine_launch.cuh +263 -0
- diffneusim/core/soft/gpu/fk_rn.cuh +109 -0
- diffneusim/core/soft/gpu/generated/body_019e20820f86_mmfloor.cuh +28 -0
- diffneusim/core/soft/gpu/generated/body_62f77a4bb16b_mmfloor.cuh +52 -0
- diffneusim/core/soft/gpu/generated/body_77dbb7213f26_mmfloor_rampsb3l_n6t12.cuh +28 -0
- diffneusim/core/soft/gpu/generated/body_8989b60e4486_mmfloor_rampsb3l_n6t12.cuh +28 -0
- diffneusim/core/soft/gpu/generated/body_8989b60e4486_mmfloor_rhlsd05_n6t12.cuh +28 -0
- diffneusim/core/soft/gpu/generated/body_8989b60e4486_mmfloor_rhlsdef_n6t12.cuh +28 -0
- diffneusim/core/soft/gpu/generated/body_8989b60e4486_mmfloor_rhlsmjd_n6t12.cuh +28 -0
- diffneusim/core/soft/gpu/generated/body_a1e8b196b2cd_mmfloor_rampsb3l_n6t12.cuh +52 -0
- diffneusim/core/soft/gpu/generated/body_a944653edd64_mmfloor.cuh +25 -0
- diffneusim/core/soft/gpu/generated/body_a944653edd64_mmfloor_rampsb3l_n6t12.cuh +25 -0
- diffneusim/core/soft/gpu/generated/g1_soft_5db44fd45286.cuh +74 -0
- diffneusim/core/soft/gpu/generated/split_62f77a4bb16b_mmfloor.cuh +18 -0
- diffneusim/core/soft/gpu/generated/split_a1e8b196b2cd_mmfloor_rampsb3l_n6t12.cuh +18 -0
- diffneusim/core/soft/gpu/generated/x14_soft_019e20820f86_mmfloor.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_62f77a4bb16b_mmfloor.cuh +129 -0
- diffneusim/core/soft/gpu/generated/x14_soft_77dbb7213f26_mmfloor_rampsb3l_n6t12.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_8989b60e4486_mmfloor_rampsb3l_n6t12.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_8989b60e4486_mmfloor_rhlsd05_n6t12.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_8989b60e4486_mmfloor_rhlsdef_n6t12.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_8989b60e4486_mmfloor_rhlsmjd_n6t12.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_a1e8b196b2cd_mmfloor_rampsb3l_n6t12.cuh +129 -0
- diffneusim/core/soft/gpu/generated/x14_soft_a944653edd64_mmfloor.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_a944653edd64_mmfloor_rampsb3l_n6t12.cuh +123 -0
- diffneusim/core/soft/gpu/k_mus.cuh +1038 -0
- diffneusim/core/soft/gpu/k_mus_host.cuh +377 -0
- diffneusim/core/soft/gpu/k_pre.cuh +52 -0
- diffneusim/core/soft/gpu/kernel_p.cuh +490 -0
- diffneusim/core/soft/gpu/kp14.cuh +465 -0
- diffneusim/core/soft/gpu/l2v2.cuh +367 -0
- diffneusim/core/soft/gpu/l2x14.cuh +319 -0
- diffneusim/core/soft/gpu/l3.cuh +1483 -0
- diffneusim/core/soft/gpu/model_view.cuh +48 -0
- diffneusim/core/soft/gpu/mus_case_fits.h +15 -0
- diffneusim/core/soft/gpu/mus_classes.h +182 -0
- diffneusim/core/soft/gpu/mus_row_cf.h +44 -0
- diffneusim/core/soft/gpu/rew14.cuh +177 -0
- diffneusim/core/soft/gpu/rows_ctab.cuh +44 -0
- diffneusim/core/soft/gpu/tree_m.cuh +247 -0
- diffneusim/core/soft/gpu/x14_engine_kernels.cuh +260 -0
- diffneusim/core/soft/gpu/x14_rowcf.h +14 -0
- diffneusim/core/soft/hand.h +124 -0
- diffneusim/core/soft/impedance.h +115 -0
- diffneusim/core/soft/jvp.h +202 -0
- diffneusim/core/soft/kin.h +250 -0
- diffneusim/core/soft/muscle.h +1208 -0
- diffneusim/core/soft/newton.h +371 -0
- diffneusim/core/soft/rows.h +176 -0
- diffneusim/core/soft/step.h +188 -0
- diffneusim/core/soft/tape.h +313 -0
- diffneusim/core/soft/x14/collide14.h +69 -0
- diffneusim/core/soft/x14/jvp14.h +182 -0
- diffneusim/core/soft/x14/law14.h +453 -0
- diffneusim/core/soft/x14adj/collide14_adj.h +134 -0
- diffneusim/core/soft/x14adj/passive14_adj.h +162 -0
- diffneusim/core/soft/x14adj/reward14.h +484 -0
- diffneusim/core/soft/x14adj/rows14_adj.h +400 -0
- diffneusim/core/soft/x14adj/scan14.h +349 -0
- diffneusim/core/soft/x14adj/shell14_adj.h +122 -0
- diffneusim/core/soft/x14adj/sweep14.h +255 -0
- diffneusim/core/soft/x14adj/tree14_adj.h +500 -0
- diffneusim/core/soft/x14adj/x14adj_common.h +96 -0
- diffneusim/data/mirror/H1622v2k_geyer_hfdeq.npz +0 -0
- diffneusim/data/mirror/H1622v2k_hfd.npz +0 -0
- diffneusim/data/mirror/H1622v2k_millard_hfdeq.npz +0 -0
- diffneusim/data/mirror/fullbody_contact.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_millard.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_p2str.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_p2str_rigid.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_rigid.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_calf2_pe.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_axfix.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_axfixlegs01.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_jd01.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_jd01legs.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_jd01lumbar.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_lumbfix.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_lumbfixlegs01.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1a.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n2.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_rom23.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_hinge.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1a.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n2.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_rom23.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_lspine_girdle_osimeq.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_lspine_girdle_millard.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_lspine_girdle_osimeq.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_compound_g14eq.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq_trunkpose.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq_trunkpose_spin.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq_trunkpose_spin_ank30.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq_trunkpose_spin_ank30_hip30.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq_trunkpose_spin_ank30_hip30_luispe.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq_trunkpose_spin_ank30_hip30_trunk0701.npz +0 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_axfix.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_axfixlegs01.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_jd01.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_jd01legs.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_jd01lumbar.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_lumbfix.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_lumbfixlegs01.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_n1.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_n1a.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_n2.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_rom23.json +91 -0
- diffneusim/data/reference/musclemimic/myofullbody_mimic_sites.json +261 -0
- diffneusim/data/reference/pose3/pose3_scone.json +305 -0
- diffneusim/data/reference/pose3/pose3_scone.txt +3 -0
- diffneusim/data/reference/pose3/pose3_scone_gait.npz +0 -0
- diffneusim/data/reference/pose3/pose3_scone_mirror.npz +0 -0
- diffneusim/data/reference/pose3/pose3_scone_stand.npz +0 -0
- diffneusim/data/reference/x016run/MD5SUMS +241 -0
- diffneusim/data/reference/x016run/x016run_states.txt +240 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_r3.npz +0 -0
- diffneusim/data/state_prior/lumbar_poly_fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc.npz +0 -0
- diffneusim/engine/__init__.py +0 -0
- diffneusim/engine/build_tag.py +52 -0
- diffneusim/engine/case_tables.py +46 -0
- diffneusim/engine/d16_body.py +80 -0
- diffneusim/engine/engine14.py +367 -0
- diffneusim/engine/gen_split.py +159 -0
- diffneusim/engine/hand_format.py +69 -0
- diffneusim/engine/live14.py +149 -0
- diffneusim/engine/phase_b_tree.py +137 -0
- diffneusim/engine/soft14.py +130 -0
- diffneusim/engine/soft_capi.py +373 -0
- diffneusim/engine/soft_engine.py +165 -0
- diffneusim/engine/step14.py +132 -0
- diffneusim/engine/tape_format.py +89 -0
- diffneusim/engine/x14cpu.py +163 -0
- diffneusim/env/__init__.py +0 -0
- diffneusim/env/absent.py +20 -0
- diffneusim/env/cpu14.py +105 -0
- diffneusim/env/e0loop14.py +224 -0
- diffneusim/env/env14.py +568 -0
- diffneusim/env/kin_contact14.py +193 -0
- diffneusim/env/mimic_sites_x14.json +366 -0
- diffneusim/env/old_count.py +78 -0
- diffneusim/env/rew14.py +114 -0
- diffneusim/env/rew14_hook.py +105 -0
- diffneusim/g1/__init__.py +1 -0
- diffneusim/g1/arm_a2.py +165 -0
- diffneusim/g1/arm_a3.py +576 -0
- diffneusim/g1/read_a3.py +79 -0
- diffneusim/g1/rg1_read.py +89 -0
- diffneusim/model/__init__.py +66 -0
- diffneusim/model/case.py +17 -0
- diffneusim/model/dnmodel.py +79 -0
- diffneusim/model/fuse_fixed.py +281 -0
- diffneusim/model/monitor.py +834 -0
- diffneusim/models/BODIES.toml +48 -0
- diffneusim/models/MANIFEST.toml +979 -0
- diffneusim/models/cases/G290/case.bin +0 -0
- diffneusim/models/cases/G290/case.json +1 -0
- diffneusim/models/cases/G356-SRC/case.bin +0 -0
- diffneusim/models/cases/G356-SRC/case.json +1 -0
- diffneusim/models/cases/G416/case.bin +0 -0
- diffneusim/models/cases/G416/case.json +1 -0
- diffneusim/models/cases/M290C-SRC/case.bin +0 -0
- diffneusim/models/cases/M290C-SRC/case.json +1 -0
- diffneusim/models/cases/M290R-SRC/case.bin +0 -0
- diffneusim/models/cases/M290R-SRC/case.json +1 -0
- diffneusim/models/cases/M356C-SRC/case.bin +0 -0
- diffneusim/models/cases/M356C-SRC/case.json +1 -0
- diffneusim/models/cases/M356R-SRC/case.bin +0 -0
- diffneusim/models/cases/M356R-SRC/case.json +1 -0
- diffneusim/models/cases/M416C-SRC/case.bin +0 -0
- diffneusim/models/cases/M416C-SRC/case.json +1 -0
- diffneusim/models/derived/d16_expanded_62f77a4bb16b1e67_mmfloor.xml +673 -0
- diffneusim/models/derived/d16_expanded_a1e8b196b2cd7b3c_mmfloor.xml +673 -0
- diffneusim/models/derived/d16_soft_law_019e20820f8633b9_mmfloor.json +7844 -0
- diffneusim/models/derived/d16_soft_law_62f77a4bb16b1e67_mmfloor.json +16855 -0
- diffneusim/models/derived/d16_soft_law_77dbb7213f26e821_mmfloor_rampsb3l_n6t12.json +7883 -0
- diffneusim/models/derived/d16_soft_law_8989b60e44860c5b_mmfloor_rampsb3l_n6t12.json +7883 -0
- diffneusim/models/derived/d16_soft_law_8989b60e44860c5b_mmfloor_rhlsd05_n6t12.json +7868 -0
- diffneusim/models/derived/d16_soft_law_8989b60e44860c5b_mmfloor_rhlsdef_n6t12.json +7868 -0
- diffneusim/models/derived/d16_soft_law_8989b60e44860c5b_mmfloor_rhlsmjd_n6t12.json +7868 -0
- diffneusim/models/derived/d16_soft_law_a1e8b196b2cd7b3c_mmfloor_rampsb3l_n6t12.json +16894 -0
- diffneusim/models/derived/d16_soft_law_a944653edd642082_mmfloor.json +12655 -0
- diffneusim/models/derived/d16_soft_law_a944653edd642082_mmfloor_rampsb3l_n6t12.json +12700 -0
- diffneusim/models/derived/unitree_g1_soft_law.json +15580 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src.dnmodel +28913 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_rigid.dnmodel +29202 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_rigid_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_axfixlegs01.dnmodel +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1.dnmodel +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src.dnmodel +46970 -0
- diffneusim/models/fullbody_contact_spinecoupled_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1.dnmodel +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src.dnmodel +38570 -0
- diffneusim/models/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_rigid.dnmodel +38923 -0
- diffneusim/models/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_rigid_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1.dnmodel +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1_qk.txt +1 -0
- diffneusim/models/fullbody_meshes/1mc.stl +0 -0
- diffneusim/models/fullbody_meshes/2distph.stl +0 -0
- diffneusim/models/fullbody_meshes/2mc.stl +0 -0
- diffneusim/models/fullbody_meshes/2midph.stl +0 -0
- diffneusim/models/fullbody_meshes/2proxph.stl +0 -0
- diffneusim/models/fullbody_meshes/3distph.stl +0 -0
- diffneusim/models/fullbody_meshes/3mc.stl +0 -0
- diffneusim/models/fullbody_meshes/3midph.stl +0 -0
- diffneusim/models/fullbody_meshes/3proxph.stl +0 -0
- diffneusim/models/fullbody_meshes/4distph.stl +0 -0
- diffneusim/models/fullbody_meshes/4mc.stl +0 -0
- diffneusim/models/fullbody_meshes/4midph.stl +0 -0
- diffneusim/models/fullbody_meshes/4proxph.stl +0 -0
- diffneusim/models/fullbody_meshes/5distph.stl +0 -0
- diffneusim/models/fullbody_meshes/5mc.stl +0 -0
- diffneusim/models/fullbody_meshes/5midph.stl +0 -0
- diffneusim/models/fullbody_meshes/5proxph.stl +0 -0
- diffneusim/models/fullbody_meshes/NOTICE +2 -0
- diffneusim/models/fullbody_meshes/capitate.stl +0 -0
- diffneusim/models/fullbody_meshes/clavicle.stl +0 -0
- diffneusim/models/fullbody_meshes/hamate.stl +0 -0
- diffneusim/models/fullbody_meshes/hat_cervical.stl +0 -0
- diffneusim/models/fullbody_meshes/hat_jaw.stl +0 -0
- diffneusim/models/fullbody_meshes/hat_skull.stl +0 -0
- diffneusim/models/fullbody_meshes/humerus.stl +0 -0
- diffneusim/models/fullbody_meshes/l_bofoot.stl +0 -0
- diffneusim/models/fullbody_meshes/l_femur.stl +0 -0
- diffneusim/models/fullbody_meshes/l_fibula.stl +0 -0
- diffneusim/models/fullbody_meshes/l_foot.stl +0 -0
- diffneusim/models/fullbody_meshes/l_patella.stl +0 -0
- diffneusim/models/fullbody_meshes/l_pelvis.stl +0 -0
- diffneusim/models/fullbody_meshes/l_talus.stl +0 -0
- diffneusim/models/fullbody_meshes/l_tibia.stl +0 -0
- diffneusim/models/fullbody_meshes/lumbar1.stl +0 -0
- diffneusim/models/fullbody_meshes/lumbar2.stl +0 -0
- diffneusim/models/fullbody_meshes/lumbar3.stl +0 -0
- diffneusim/models/fullbody_meshes/lumbar4.stl +0 -0
- diffneusim/models/fullbody_meshes/lumbar5.stl +0 -0
- diffneusim/models/fullbody_meshes/lunate.stl +0 -0
- diffneusim/models/fullbody_meshes/pisiform.stl +0 -0
- diffneusim/models/fullbody_meshes/r_bofoot.stl +0 -0
- diffneusim/models/fullbody_meshes/r_femur.stl +0 -0
- diffneusim/models/fullbody_meshes/r_fibula.stl +0 -0
- diffneusim/models/fullbody_meshes/r_foot.stl +0 -0
- diffneusim/models/fullbody_meshes/r_patella.stl +0 -0
- diffneusim/models/fullbody_meshes/r_pelvis.stl +0 -0
- diffneusim/models/fullbody_meshes/r_talus.stl +0 -0
- diffneusim/models/fullbody_meshes/r_tibia.stl +0 -0
- diffneusim/models/fullbody_meshes/radius.stl +0 -0
- diffneusim/models/fullbody_meshes/sacrum.stl +0 -0
- diffneusim/models/fullbody_meshes/scaphoid.stl +0 -0
- diffneusim/models/fullbody_meshes/scapula.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic10_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic11_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic12_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic1_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic2_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic3_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic4_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic5_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic6_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic7_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic8_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic9_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thorax.stl +0 -0
- diffneusim/models/fullbody_meshes/thumbdist.stl +0 -0
- diffneusim/models/fullbody_meshes/thumbprox.stl +0 -0
- diffneusim/models/fullbody_meshes/trapezium.stl +0 -0
- diffneusim/models/fullbody_meshes/trapezoid.stl +0 -0
- diffneusim/models/fullbody_meshes/triquetrum.stl +0 -0
- diffneusim/models/fullbody_meshes/ulna.stl +0 -0
- diffneusim/models/source/myo_fullbody/UPSTREAM.md +91 -0
- diffneusim/models/source/myoleg/UPSTREAM.md +52 -0
- diffneusim/models/source/unitree_g1/LICENSE.mjlab +202 -0
- diffneusim/models/source/unitree_g1/UPSTREAM.md +38 -0
- diffneusim/models/source/unitree_g1/assets/head_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_ankle_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_ankle_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_elbow_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_hip_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_hip_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_hip_yaw_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_knee_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_rubber_hand.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_shoulder_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_shoulder_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_shoulder_yaw_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_wrist_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_wrist_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_wrist_yaw_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/logo_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/pelvis.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/pelvis_contour_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_ankle_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_ankle_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_elbow_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_hip_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_hip_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_hip_yaw_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_knee_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_rubber_hand.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_shoulder_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_shoulder_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_shoulder_yaw_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_wrist_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_wrist_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_wrist_yaw_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/torso_link_rev_1_0.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/waist_roll_link_rev_1_0.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/waist_yaw_link_rev_1_0.STL +0 -0
- diffneusim/models/source/unitree_g1/dump_mjlab_reference.py +30 -0
- diffneusim/models/source/unitree_g1/g1.xml +308 -0
- diffneusim/models/source/unitree_g1/g1_constants.py +298 -0
- diffneusim/models/source/unitree_g1/mjlab_compiled_reference.json +857 -0
- diffneusim/models/unitree_g1.dnmodel +4393 -0
- diffneusim/models/unitree_g1_selfcol.dnmodel +20824 -0
- diffneusim/rl/__init__.py +2 -0
- diffneusim/rl/dynsyn_layer.py +146 -0
- diffneusim/rl/footstep_plan.py +337 -0
- diffneusim/rl/g1_bm_env.py +572 -0
- diffneusim/rl/g1_bm_eval.py +168 -0
- diffneusim/rl/g1_bm_fused.py +275 -0
- diffneusim/rl/g1_bm_ppo.py +622 -0
- diffneusim/rl/g1_bm_sapo.py +551 -0
- diffneusim/rl/g1_ppo.py +395 -0
- diffneusim/rl/g1_sapo_soft.py +240 -0
- diffneusim/rl/g1_soft_env.py +452 -0
- diffneusim/rl/g1_soft_grad.py +145 -0
- diffneusim/rl/geyer_curves_torch.py +108 -0
- diffneusim/rl/gpu_fullbody_vec_env.py +1241 -0
- diffneusim/rl/imitation.py +2027 -0
- diffneusim/rl/imitation_reward_v2.py +248 -0
- diffneusim/rl/imitation_reward_v3.py +349 -0
- diffneusim/rl/latent_task.py +175 -0
- diffneusim/rl/llc_reward.py +316 -0
- diffneusim/rl/millard_curves_torch.py +154 -0
- diffneusim/rl/mirror_symmetry.py +212 -0
- diffneusim/rl/model_path.py +35 -0
- diffneusim/rl/mvae_recon.py +123 -0
- diffneusim/rl/nets_shac.py +599 -0
- diffneusim/rl/reset_pool.py +154 -0
- diffneusim/rl/sapo_capture.py +873 -0
- diffneusim/rl/sapo_vec.py +1051 -0
- diffneusim/rl/shac_vec.py +346 -0
- diffneusim/rl/state_prior.py +151 -0
- diffneusim/rl/step_library.py +105 -0
- diffneusim/rl/task_walk_env.py +1793 -0
- diffneusim/rl/task_walk_reward.py +3300 -0
- diffneusim/run.py +23 -0
- diffneusim/run_env.py +46 -0
- diffneusim/tasks/__init__.py +147 -0
- diffneusim/tasks/legacy_names.py +63 -0
- diffneusim/tasks/paths.py +79 -0
- diffneusim/tasks/settings.py +202 -0
- diffneusim/third_party/instantmimic_947430ee/LICENSE +202 -0
- diffneusim/third_party/instantmimic_947430ee/NOTICE +19 -0
- diffneusim/third_party/instantmimic_947430ee/README.md +31 -0
- diffneusim/third_party/instantmimic_947430ee/instantmimic/envs/unitree_g1/tasks/beyondmimic_tracking/benchmark_protocol.py +106 -0
- diffneusim/third_party/instantmimic_947430ee/instantmimic/envs/unitree_g1/tasks/beyondmimic_tracking/metrics.py +214 -0
- diffneusim/third_party/instantmimic_947430ee/instantmimic/envs/unitree_g1/tasks/beyondmimic_tracking/reference.py +513 -0
- diffneusim/third_party/instantmimic_947430ee/instantmimic/motion/quaternion.py +193 -0
- diffneusim/train/__init__.py +0 -0
- diffneusim/train/eval_ckpt.py +239 -0
- diffneusim/train/eval_mimic.py +133 -0
- diffneusim/train/gait_report.py +203 -0
- diffneusim/train/gcot_chain.py +51 -0
- diffneusim/train/levers.py +135 -0
- diffneusim/train/masked_reset.py +314 -0
- diffneusim/train/rl_algorithm_suite.py +917 -0
- diffneusim/train/train14.py +240 -0
- diffneusim/train/train_tw14.py +674 -0
- diffneusim/viz/__init__.py +5 -0
- diffneusim/viz/__main__.py +41 -0
- diffneusim/viz/camera.py +115 -0
- diffneusim/viz/dnrec.py +118 -0
- diffneusim/viz/dnrec_io.py +686 -0
- diffneusim/viz/hud.py +565 -0
- diffneusim/viz/meshes.py +458 -0
- diffneusim/viz/play.py +237 -0
- diffneusim/viz/record.py +74 -0
- diffneusim/viz/render.py +1402 -0
- diffneusim/viz/renderer.py +268 -0
- diffneusim/viz/rl_env_render.py +635 -0
- diffneusim/viz/snapshot.py +54 -0
- diffneusim/viz/strobe.py +124 -0
- diffneusim/viz/to_mp4.py +58 -0
- diffneusim/viz/ui.py +481 -0
- diffneusim/viz/viewer.py +2086 -0
- diffneusim-1.0.0.dist-info/METADATA +226 -0
- diffneusim-1.0.0.dist-info/RECORD +682 -0
- diffneusim-1.0.0.dist-info/WHEEL +5 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSE +201 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/BSD-3-Clause-NC-ARMS-hand-wrist-4.3.txt +20 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/BSD-3-Clause-NC-MoBL-ARMS.txt +25 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/CC-BY-3.0-OpenSim-geometry.txt +25 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/MIT-Christophy2012-lumbarspine.txt +10 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/MIT-Lai2017-model-high-flex.txt +10 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/MIT-Lee2015-hand_muscle.txt +11 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/MIT-Rajagopal2016-full_body.txt +11 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/MIT-Uhlrich2022-fbmodpassivecal.txt +10 -0
- diffneusim-1.0.0.dist-info/licenses/NOTICE +274 -0
- diffneusim-1.0.0.dist-info/top_level.txt +1 -0
diffneusim/env/rew14.py
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"""The fused env side's torch node (2026-11-03; DESIGN.md): Fwd14r / Bwd14r (bindings/rew14_ext.cu) as one autograd Function, for
|
|
2
|
+
env14's E0_ENV14_REW14 path (the hook). Graph-capturable: the node's buffers (outputs and cotangents) are preallocated per window
|
|
3
|
+
slot, the extension only launches on the current stream, and init() runs the one-time setup before any capture.
|
|
4
|
+
node = Rew14Node.from_task(task, n, H) # task: the env's ImitationTask (its _mimic_build tables), on CUDA
|
|
5
|
+
r, obs, term = node(slot, q1, v1, lce1, phase, start, clipT, loop)
|
|
6
|
+
q1 [n, 40], v1 [n, 37] (the law chart, Step14's outputs), lce1 [n, 356]; phase [n]; per env its clip (start, T, loop)
|
|
7
|
+
r [n]; obs [n, 708] (the old chart; finite-masking is the caller's); term [n, 8] = height, upright, max |qd| (old chart),
|
|
8
|
+
finite (q, v, lce), mimic's three deviation measures, 0 (no gradient)
|
|
9
|
+
backward: q1's cotangent RAW [n, 40] (Step14.backward projects it), v1's, lce1's.
|
|
10
|
+
"""
|
|
11
|
+
import hashlib
|
|
12
|
+
import json
|
|
13
|
+
import math
|
|
14
|
+
import os
|
|
15
|
+
import pathlib
|
|
16
|
+
|
|
17
|
+
import torch
|
|
18
|
+
|
|
19
|
+
HERE = pathlib.Path(__file__).resolve().parent
|
|
20
|
+
from diffneusim._paths import ROOT as ROOT # (3a) the repo root
|
|
21
|
+
# (3a) was: sys.path.insert(0, str(ROOT / "tools" / "d16_bodies"))
|
|
22
|
+
from diffneusim.engine import d16_body as BODY # noqa: E402 # the process's body: D16_BODY=<tag> (a 14x-layout body), unset the 14x
|
|
23
|
+
NQ, NV, NM, NOBS, NTERM = 40, 37, 356, 708, 8
|
|
24
|
+
_EXT = {}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def load_ext():
|
|
28
|
+
if "e" in _EXT:
|
|
29
|
+
return _EXT["e"]
|
|
30
|
+
from torch.utils.cpp_extension import load
|
|
31
|
+
flags = ["-O3", "-std=c++17", "-lineinfo", "-DNDEBUG"]
|
|
32
|
+
# E0_REW14_RV_ANG (KT-width, tools/e0speed/KT_REWARD_PROPOSAL.md; 62e0bd288 ported, 11-16): root_vel's angular coefficient per
|
|
33
|
+
# (rad/s)^2, compiled in as REW14_RV_ANG (reward14.h). Unset: the flags, and so the build, are today's.
|
|
34
|
+
rv_ang = os.environ.get("E0_REW14_RV_ANG")
|
|
35
|
+
if rv_ang is not None:
|
|
36
|
+
v = float(rv_ang)
|
|
37
|
+
assert math.isfinite(v) and v > 0.0, f"E0_REW14_RV_ANG must be a positive finite number, got {rv_ang!r}"
|
|
38
|
+
flags.append(f"-DREW14_RV_ANG={v!r}")
|
|
39
|
+
print(f"[rew14] KT-width: root_vel's angular coefficient {v!r} per (rad/s)^2 (E0_REW14_RV_ANG; MuscleMimic's is 10 / 6)", flush=True)
|
|
40
|
+
else:
|
|
41
|
+
print("[rew14] root_vel: MuscleMimic's (E0_REW14_RV_ANG unset)", flush=True)
|
|
42
|
+
srcs = [ROOT / "bindings" / "rew14_ext.cu", ROOT / "core" / "soft" / "gpu" / "rew14.cuh"] + sorted((ROOT / "core" / "soft" / "x14adj").glob("*.h"))
|
|
43
|
+
if BODY.TAG: # the reward's tables are the 14x layout's: a body must have its sizes (a phase B body has none of rew14's ports)
|
|
44
|
+
assert not BODY.PHASE_B and (BODY.NQ, BODY.NV, BODY.NM) == (NQ, NV, NM), (BODY.TAG, BODY.NQ, BODY.NV, BODY.NM, "rew14 runs 14x-layout bodies only")
|
|
45
|
+
h = ROOT / "core" / "soft" / "gpu" / "generated" / f"body_{BODY.TAG}.cuh"
|
|
46
|
+
flags += [f"""'-DD16_BODY_HEADER="soft/gpu/generated/{h.name}"'"""] # single quotes: torch's build runs the flags through a shell
|
|
47
|
+
srcs += [h, BODY.X14]
|
|
48
|
+
else:
|
|
49
|
+
srcs += [ROOT / "core" / "soft" / "gpu" / "generated" / "x14_soft_f1c2243ae6be_mmfloor.cuh"]
|
|
50
|
+
tag = hashlib.sha1((" ".join(flags) + "".join(p.read_text() for p in srcs)).encode()).hexdigest()[:10]
|
|
51
|
+
_EXT["e"] = load(name=f"rew14_{tag}", sources=[str(srcs[0])], extra_include_paths=[str(ROOT / "core"), str(ROOT / "core" / "include")],
|
|
52
|
+
extra_cuda_cflags=flags, extra_cflags=["-O2", "-std=c++17"], verbose=False)
|
|
53
|
+
return _EXT["e"]
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class Rew14Node:
|
|
57
|
+
def __init__(self, site_b, site_pq, wk, root_b, tabs, n, H, dtype=torch.float32, device="cuda"):
|
|
58
|
+
self.e = load_ext()
|
|
59
|
+
self.n, self.H, self.dtype, self.device = n, H, dtype, torch.device(device)
|
|
60
|
+
self.tabs = [torch.as_tensor(t).to(self.device, dtype).contiguous() for t in tabs]
|
|
61
|
+
self.e.init(torch.as_tensor(site_b, dtype=torch.int32), torch.as_tensor(site_pq, dtype=torch.float64),
|
|
62
|
+
torch.as_tensor(wk, dtype=torch.float64), int(root_b), self.tabs)
|
|
63
|
+
z = lambda *s: torch.zeros(*s, dtype=dtype, device=self.device) # noqa: E731
|
|
64
|
+
# obs and its cotangent copy are ONE slot (0.35 GB each at 4,096 x 32 per slot set): the forward's obs is consumed in its
|
|
65
|
+
# own control step (the caller's finite mask copies it out), the cotangent copy inside its own backward call, and the
|
|
66
|
+
# node saves neither, so no step reads a slot after the next step's write, eager or under P3's graphs (stream order)
|
|
67
|
+
self.r, self.term, self.obs = z(H, n), z(H, n, NTERM), z(1, n, NOBS)
|
|
68
|
+
self.qg, self.vg, self.lg = z(H, n, NQ), z(H, n, NV), z(H, n, NM)
|
|
69
|
+
self.zr, self.zo = z(n), z(n, NOBS) # the cotangents a backward receives as None
|
|
70
|
+
self.gr, self.go = z(H, n), z(1, n, NOBS) # contiguous copies of the incoming cotangents
|
|
71
|
+
# the backward's inputs, owned per slot (as Step14 owns its tape) rather than autograd's saved tensors: a captured
|
|
72
|
+
# step's saved tensors live in the graph pool, and their contents did not survive to a second replay's backward
|
|
73
|
+
# (compute-sanitizer: k_rew14_bwd read garbage clip indices; CAPTURE_PLAN.md P3)
|
|
74
|
+
self.sq1, self.sv1, self.sph = z(H, n, NQ), z(H, n, NV), z(H, n)
|
|
75
|
+
self.sst = torch.zeros(H, n, dtype=torch.int64, device=self.device)
|
|
76
|
+
self.sct = torch.zeros(H, n, dtype=torch.int64, device=self.device)
|
|
77
|
+
self.slp = torch.zeros(H, n, dtype=torch.uint8, device=self.device)
|
|
78
|
+
|
|
79
|
+
@classmethod
|
|
80
|
+
def from_task(cls, task, n, H, dtype=torch.float32, device="cuda"):
|
|
81
|
+
"""the env's ImitationTask after _mimic_build: its reference tables, MM_TERMS, and the 14x site map"""
|
|
82
|
+
S = json.loads((HERE / "mimic_sites_x14.json").read_text())
|
|
83
|
+
site_b = [x["b14"] for x in S["sites"]]
|
|
84
|
+
site_pq = [x["pos"] + x["quat"] for x in S["sites"]]
|
|
85
|
+
wk = [w for _, w, _ in task.MM_TERMS] + [k for _, _, k in task.MM_TERMS]
|
|
86
|
+
names = [nm for nm, _, _ in task.MM_TERMS]
|
|
87
|
+
assert names == ["qpos", "qvel", "root_pos", "root_vel", "rpos", "rquat", "rvel_rot", "rvel_lin"], names
|
|
88
|
+
R, Tt = task._mm_ref, task.ref_T_total
|
|
89
|
+
tabs = [R["rpos"].reshape(-1, Tt), R["rrot"].reshape(-1, Tt), R["ang"].reshape(-1, Tt), R["lin"].reshape(-1, Tt), R["root_p"], R["root_q"],
|
|
90
|
+
R["root_vw"], task.ref_q, task.ref_qd, task._mm_goal_rpos, task._mm_goal_root_p, task._mm_goal_root_qvel]
|
|
91
|
+
return cls(site_b, site_pq, wk, S["root"]["b14"], tabs, n, H, dtype, device)
|
|
92
|
+
|
|
93
|
+
def __call__(self, slot, q1, v1, lce1, phase, start, clipT, loop):
|
|
94
|
+
return Rew14Fn.apply(q1, v1, lce1, phase, start, clipT, loop, self, slot)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
class Rew14Fn(torch.autograd.Function):
|
|
98
|
+
@staticmethod
|
|
99
|
+
def forward(ctx, q1, v1, lce1, phase, start, clipT, loop, node, slot):
|
|
100
|
+
node.e.fwd(start, clipT, loop, phase, q1, v1, lce1, node.r[slot], node.term[slot], node.obs[0])
|
|
101
|
+
for dst, src in ((node.sq1, q1), (node.sv1, v1), (node.sph, phase), (node.sst, start), (node.sct, clipT), (node.slp, loop)):
|
|
102
|
+
dst[slot].copy_(src)
|
|
103
|
+
ctx.node, ctx.slot = node, slot
|
|
104
|
+
ctx.mark_non_differentiable(node.term[slot])
|
|
105
|
+
return node.r[slot], node.obs[0], node.term[slot]
|
|
106
|
+
|
|
107
|
+
@staticmethod
|
|
108
|
+
def backward(ctx, gr, gobs, gterm):
|
|
109
|
+
N, k = ctx.node, ctx.slot
|
|
110
|
+
q1, v1, phase, start, clipT, loop = N.sq1[k], N.sv1[k], N.sph[k], N.sst[k], N.sct[k], N.slp[k]
|
|
111
|
+
rb = N.zr if gr is None else N.gr[k].copy_(gr)
|
|
112
|
+
ob = N.zo if gobs is None else N.go[0].copy_(gobs)
|
|
113
|
+
N.e.bwd(start, clipT, loop, phase, q1, v1, rb, ob, N.qg[k], N.vg[k], N.lg[k])
|
|
114
|
+
return N.qg[k], N.vg[k], N.lg[k], None, None, None, None, None, None
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"""REW14 (2026-11-03; DESIGN.md): the E0 env's post-physics block on the fused reward + observation node (rew14.py:
|
|
2
|
+
Fwd14r / Bwd14r) instead of the torch reward, FK, twists and goal gathers.
|
|
3
|
+
|
|
4
|
+
env14.install_from_env installs it by default whenever E0_ENV14_GLUE=1 (env14.rew14_default; E0_ENV14_REW14=0 / 1
|
|
5
|
+
overrides); rew14_hook.install(env, e14, H, restorable=True) installs it by hand (the gates). It needs the glue and E0_M4C unset.
|
|
6
|
+
|
|
7
|
+
What it changes in env._post_physics (the E0 mimic configuration only, asserted):
|
|
8
|
+
- the reward, the three deviation measures behind mimic_failed (task._mm_last), obs_before_reset, and the fall gates'
|
|
9
|
+
inputs (height, upright, max |qd|, finite over q, qd, lce) come from the node, which reads Step14's RAW outputs
|
|
10
|
+
(q1, v1, lce1) that env14's post() hands to glue_post (stashed here, not copied);
|
|
11
|
+
- the node's gradients go straight to q1 / v1 / lce1 (the contract Step14.backward expects);
|
|
12
|
+
- everything else (finite over a and z, timeout, clip_end, done, the extra dict) is the original block's code;
|
|
13
|
+
- the obs the env RETURNS after the reset stays env._obs() (the reset rows hold the reset state, not the engine's).
|
|
14
|
+
Not set: task._mm_last_terms (tests only).
|
|
15
|
+
"""
|
|
16
|
+
import os
|
|
17
|
+
|
|
18
|
+
import torch
|
|
19
|
+
|
|
20
|
+
from diffneusim.env.rew14 import Rew14Node
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class Undo:
|
|
24
|
+
"""install(..., restorable=True)'s handle: call it to put the original post / _post_physics back; .node is the node"""
|
|
25
|
+
def __init__(self, node, undo):
|
|
26
|
+
self.node, self.undo = node, undo
|
|
27
|
+
|
|
28
|
+
def __call__(self):
|
|
29
|
+
self.undo()
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def install(env, e14, H, restorable=False):
|
|
33
|
+
t = env.imitation_task
|
|
34
|
+
assert e14.glue, "E0_ENV14_REW14 needs E0_ENV14_GLUE=1 (the raw outputs are taken at env14's post())"
|
|
35
|
+
assert not env.M4C, "E0_ENV14_REW14 replaces _post_physics: run it with E0_M4C unset (the levers are timed apart)"
|
|
36
|
+
assert t.IM_MIMIC and env.imitation and env.mirror is None and env.taskwalk is None and env.latent_task is None
|
|
37
|
+
assert not env.LATENT and not env.OBS_AUG and not env.YAW_FREE and not env.ET_MODE and not env.REF_SWITCH
|
|
38
|
+
assert not t.PHASE_OBS and t.cond_obs(1) is None and not env.dr_snap and env.musclepd is None
|
|
39
|
+
assert getattr(env, "_tw_fs", None) is None and getattr(env, "_tw_obs_h_ground", False) is False
|
|
40
|
+
node = getattr(e14, "rew14", None) or Rew14Node.from_task(t, env.num_envs, H)
|
|
41
|
+
node.calls = getattr(node, "calls", 0)
|
|
42
|
+
e14.rew14, e14.raw = node, None
|
|
43
|
+
orig_post = e14.post
|
|
44
|
+
# step 4b (E0_REW14_SKIP_ENV_ACT=1, CAPTURE_PLAN.md): the env's 5 activation substeps per control step run the OLD engine's
|
|
45
|
+
# filter (env._activation is bound to it at the env's construction), and under env14 + REW14 nothing uses their result:
|
|
46
|
+
# Step14 integrates the activation itself from u and the step's input a, env14's hand-off replaces env.a with its a1 (the
|
|
47
|
+
# reset columns with the reset's), and this node ignores a_sum. The one reader is the finite mask, kept exact below.
|
|
48
|
+
skip_act = os.environ.get("E0_REW14_SKIP_ENV_ACT", "0") == "1"
|
|
49
|
+
orig_act = env._activation
|
|
50
|
+
if skip_act:
|
|
51
|
+
env._activation = lambda u, a, dt: a
|
|
52
|
+
|
|
53
|
+
def post(q1, v1, l1, a1):
|
|
54
|
+
e14.raw = (q1, v1, l1)
|
|
55
|
+
return orig_post(q1, v1, l1, a1)
|
|
56
|
+
e14.post = post
|
|
57
|
+
|
|
58
|
+
def post_physics(a_sum, x_prev0, q_prev0, wrapped):
|
|
59
|
+
node.calls += 1
|
|
60
|
+
raw, e14.raw = e14.raw, None
|
|
61
|
+
assert raw is not None, "REW14: no Step14 output stashed for this control step"
|
|
62
|
+
q1, v1, l1 = raw
|
|
63
|
+
cid = t.clip_id
|
|
64
|
+
slot = e14.win.t - 1 if torch.is_grad_enabled() else 0 # Step14 took the window's slot this control step
|
|
65
|
+
rew, obs, term = node(slot, q1, v1, l1, env.phase, t.clip_start[cid], t.clip_T[cid], t.clip_loop[cid].view(torch.uint8))
|
|
66
|
+
t._mm_last = (term[:, 4], term[:, 5], term[:, 6])
|
|
67
|
+
fin_a = torch.isfinite(env.a).all(dim=0)
|
|
68
|
+
if skip_act: # env.a is the step's input a. The skipped substeps' output (core/mtu/activation.h: act_clip01 passes NaN,
|
|
69
|
+
# a non-finite a gives inf - inf) is NaN exactly where that input is non-finite or u has a NaN (+-inf u clips finite)
|
|
70
|
+
fin_a = fin_a & ~torch.isnan(e14.cap["u"]).any(dim=0)
|
|
71
|
+
finite = (term[:, 3] > 0.5) & fin_a & torch.isfinite(env.z).all(dim=0)
|
|
72
|
+
rew = torch.where(finite, rew, torch.zeros_like(rew))
|
|
73
|
+
obs = torch.where(finite.unsqueeze(1), obs, torch.zeros_like(obs))
|
|
74
|
+
bad_height = (term[:, 0] < env.TERM_Z) | (term[:, 0] > env.HIGH_Z)
|
|
75
|
+
toppled = term[:, 1] < env.UPRIGHT_MIN
|
|
76
|
+
if env.E0_TERM == "mm": # gpu_fullbody_vec_env.py's switch, mirrored: this node replaces _post_physics (11-04)
|
|
77
|
+
bad_height, toppled = torch.zeros_like(bad_height), torch.zeros_like(toppled)
|
|
78
|
+
diverged = term[:, 2] > env.QD_MAX
|
|
79
|
+
timeout = env.progress >= env.episode_length
|
|
80
|
+
out_of_lane = torch.zeros_like(timeout)
|
|
81
|
+
stepfail = torch.zeros_like(timeout)
|
|
82
|
+
clip_end = torch.zeros_like(timeout)
|
|
83
|
+
if t.any_nonloop:
|
|
84
|
+
clip_end = t.clip_end(env.phase, env.SUBSTEPS * env.dt)
|
|
85
|
+
done = (~finite) | bad_height | toppled | diverged | timeout | out_of_lane | clip_end | stepfail
|
|
86
|
+
desync = torch.zeros_like(done)
|
|
87
|
+
if not env.eval_mode:
|
|
88
|
+
desync = t.mimic_failed() & ~wrapped
|
|
89
|
+
done = done | desync
|
|
90
|
+
snapped = torch.zeros_like(done)
|
|
91
|
+
extra = {"obs_before_reset": obs, "episode_end": timeout | clip_end,
|
|
92
|
+
"progress_at_done": env.progress.clone(), "term_nonfinite": ~finite,
|
|
93
|
+
"term_bad_height": bad_height, "term_lane": out_of_lane, "term_toppled": toppled, "term_diverged": diverged,
|
|
94
|
+
"term_timeout": timeout, "term_clip_end": clip_end, "term_desync": desync, "term_snapped": snapped, "term_stepfail": stepfail,
|
|
95
|
+
"cfnorm": (env.sim.contact_force(env.q.detach(), env.qd.detach(), env.z.detach())[1].norm(dim=0)
|
|
96
|
+
if env._emit_cfnorm else torch.zeros(env.q.shape[1], device=env.device))}
|
|
97
|
+
return rew, done, extra, False, None, timeout
|
|
98
|
+
env._post_physics = post_physics
|
|
99
|
+
|
|
100
|
+
def undo():
|
|
101
|
+
e14.post = orig_post
|
|
102
|
+
env._activation = orig_act
|
|
103
|
+
env.__dict__.pop("_post_physics", None)
|
|
104
|
+
e14.raw = None
|
|
105
|
+
return Undo(node, undo) if restorable else node
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""The Unitree G1 tracking benchmark: the R-G1 SAPO and the G1 seconds PPO entry points, and their read."""
|
diffneusim/g1/arm_a2.py
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"""A2's runner (tools/g1_seconds/PREREG_A2.md): InstantMimic's BeyondMimic side-kick task on our engine (g1_bm_env.BMTrack) trained by
|
|
2
|
+
side_kick_hpo's PPO (g1_bm_ppo.BMPPO), EAGER first (the review: "eager, an upper bound on our time").
|
|
3
|
+
clock CLOCK_MONOTONIC_RAW with a device sync after every iteration; EVERY iteration counts, the first included (nothing excluded
|
|
4
|
+
but the checkpoint saves and the scoring, which InstantMimic's accounting excludes too)
|
|
5
|
+
checkpoints every --ckpt-every iterations (default 100): the agent's snapshot, saved after the clock stops, with the active seconds
|
|
6
|
+
scoring after training, in the same warm process: InstantMimic's evaluate protocol (g1_bm_eval.evaluate) on every checkpoint, one
|
|
7
|
+
evaluate-mode env built once (1,024 worlds, sampling start, pushes off, observation and reset noise on, the run's DR)
|
|
8
|
+
output <out>/train.jsonl (per iteration), <out>/checkpoint_iter_<N>.pt, <out>/eval.jsonl (per checkpoint: iteration, active_s,
|
|
9
|
+
their metrics), <out>/meta.json
|
|
10
|
+
python tools/g1_seconds/arm_a2.py --npz <their side kick npz> --out DIR [--seed 42] [--n 4096] [--iters 4000] [--ship/--nodr]
|
|
11
|
+
[--cpu] [--dry] [--no-eval] [--eval-n 1024]"""
|
|
12
|
+
import argparse
|
|
13
|
+
import json
|
|
14
|
+
import pathlib
|
|
15
|
+
import sys
|
|
16
|
+
import time
|
|
17
|
+
|
|
18
|
+
import torch
|
|
19
|
+
|
|
20
|
+
# (3a) was: sys.path.insert(0, str(ROOT / "python"))
|
|
21
|
+
from diffneusim.rl import g1_bm_env as B # noqa: E402
|
|
22
|
+
from diffneusim.rl import g1_soft_env as G # noqa: E402
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def raw_now():
|
|
26
|
+
return time.clock_gettime(time.CLOCK_MONOTONIC_RAW)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def main():
|
|
30
|
+
ap = argparse.ArgumentParser()
|
|
31
|
+
ap.add_argument("--npz", required=True)
|
|
32
|
+
ap.add_argument("--out", required=True)
|
|
33
|
+
ap.add_argument("--seed", type=int, default=42)
|
|
34
|
+
ap.add_argument("--n", type=int, default=4096)
|
|
35
|
+
ap.add_argument("--iters", type=int, default=4000)
|
|
36
|
+
ap.add_argument("--ckpt-every", type=int, default=100)
|
|
37
|
+
ap.add_argument("--nodr", action="store_true", help="the nodr variant (default: ship)")
|
|
38
|
+
ap.add_argument("--com-dr", action="store_true", help="InstantMimic's torso CoM draw in the ship DR (hub 13, 11-11; needs a law "
|
|
39
|
+
"with set_anchor_ipos_offset); the scorer env draws it too")
|
|
40
|
+
ap.add_argument("--rollouts", type=int, default=None, help="steps per world per iteration (default BM_CFG's 16; R-G1: A1c's 6)")
|
|
41
|
+
ap.add_argument("--easy-every", type=int, default=0, help="PREREG_E1 / RG1: arm_a3's easy benchmark every K iterations outside the "
|
|
42
|
+
"clock, the current policy's mean action, until its first pass (0: off)")
|
|
43
|
+
ap.add_argument("--easy-dense-until", type=int, default=1000)
|
|
44
|
+
ap.add_argument("--easy-sparse-every", type=int, default=100)
|
|
45
|
+
ap.add_argument("--easy-mpkpe-bar", type=float, default=None, help="PREREG_RG1: the pass also needs MPKPE <= this (m)")
|
|
46
|
+
ap.add_argument("--eager", action="store_true", help="opt out of the compiled training env (the default since the unification, "
|
|
47
|
+
"11-11); --cpu runs eager too")
|
|
48
|
+
ap.add_argument("--residual", action="store_true", help="R-G1: residual actions (BMTrack residual); the scorer env takes it too")
|
|
49
|
+
ap.add_argument("--com-scale", type=float, default=1.0, help="gate knob: scales the CoM draw (0 must equal a --com-dr-off run)")
|
|
50
|
+
ap.add_argument("--cpu", action="store_true", help="the f64 CPU law (a smoke; no timing meaning)")
|
|
51
|
+
ap.add_argument("--dry", action="store_true", help="CHECK_ONLY: imports, the law map, the motion; no engine")
|
|
52
|
+
ap.add_argument("--no-eval", action="store_true")
|
|
53
|
+
ap.add_argument("--capture", action="store_true", help="capture the rollout and the update as CUDA graphs after iteration 1 "
|
|
54
|
+
"(the capture itself outside the clock, as A1c; iteration 1 stays on the clock)")
|
|
55
|
+
ap.add_argument("--eval-n", type=int, default=1024)
|
|
56
|
+
ap.add_argument("--eval-seed", type=int, default=None, help="default: the training seed (their evaluate.py takes the run's seed)")
|
|
57
|
+
a = ap.parse_args()
|
|
58
|
+
from diffneusim.rl import g1_bm_ppo as P
|
|
59
|
+
lm0 = G.LawMap()
|
|
60
|
+
m0 = G.Motion(a.npz, lm0)
|
|
61
|
+
if a.dry:
|
|
62
|
+
print(f"DRY ok: {m0.T} frames, {len(lm0.joints)} joints, BM_CFG {sorted(P.BM_CFG)[:6]}..., out {a.out}")
|
|
63
|
+
return
|
|
64
|
+
out = pathlib.Path(a.out)
|
|
65
|
+
out.mkdir(parents=True, exist_ok=True)
|
|
66
|
+
dev = "cpu" if a.cpu else "cuda"
|
|
67
|
+
dt = torch.float64 if a.cpu else torch.float32
|
|
68
|
+
sync = (lambda: None) if a.cpu else torch.cuda.synchronize
|
|
69
|
+
lm = G.LawMap(device=dev)
|
|
70
|
+
m = G.Motion(a.npz, lm, device=dev, dtype=dt)
|
|
71
|
+
law = (lambda k: G.CpuLaw(B.ROBOT_BODIES)) if a.cpu else (lambda k: G.GpuLaw(k, B.ROBOT_BODIES, com_dr=a.com_dr))
|
|
72
|
+
ship = not a.nodr
|
|
73
|
+
compiled = not a.eager and not a.cpu # the unification: one env, the compiled step IS BMTrack.step (session C, 11-11)
|
|
74
|
+
env = B.BMTrack(law(a.n), m, lm, a.n, ship=ship, device=dev, dtype=dt, seed=a.seed, com_dr=a.com_dr, com_scale=a.com_scale,
|
|
75
|
+
residual=a.residual, compile=compiled)
|
|
76
|
+
compile_s = None
|
|
77
|
+
if compiled:
|
|
78
|
+
from diffneusim.rl import g1_bm_fused as FU
|
|
79
|
+
compile_s = FU.warm_compile(env) # before BMPPO (which seeds the RNG) and before the clock
|
|
80
|
+
cfg = dict(P.BM_CFG) if a.rollouts is None else dict(P.BM_CFG, rollouts=a.rollouts)
|
|
81
|
+
easy_env = None
|
|
82
|
+
if a.easy_every: # built before BMPPO, which re-seeds the global RNG (arm_a3's order)
|
|
83
|
+
here = str(pathlib.Path(__file__).resolve().parent)
|
|
84
|
+
if here not in sys.path:
|
|
85
|
+
sys.path.insert(0, here)
|
|
86
|
+
from diffneusim.g1 import arm_a3 as A3
|
|
87
|
+
easy_env = A3.EasyTrack(law(A3.EASY_N), m, lm, A3.EASY_N, ship=False, device=dev, dtype=dt, seed=a.seed, sampling="start",
|
|
88
|
+
pushes=False, obs_noise=False, reset_noise=False, sigma=A3.EASY_SIGMA, noise_seed=a.seed,
|
|
89
|
+
residual=a.residual)
|
|
90
|
+
agent = P.BMPPO(env, cfg, seed=a.seed)
|
|
91
|
+
_here = str(pathlib.Path(__file__).resolve().parent)
|
|
92
|
+
if _here not in sys.path:
|
|
93
|
+
sys.path.insert(0, _here)
|
|
94
|
+
from diffneusim.g1 import arm_a3 as _A3
|
|
95
|
+
probe = _A3.ActionPathProbe(env, a.residual) # the training-path check of the action mapping
|
|
96
|
+
meta = dict(seed=a.seed, n=a.n, iters=a.iters, ship=ship, npz=a.npz, gpu="cpu" if a.cpu else torch.cuda.get_device_name(),
|
|
97
|
+
torch=torch.__version__, cfg={k: v for k, v in cfg.items()}, mode="captured" if a.capture else "eager",
|
|
98
|
+
com_dr=bool(a.com_dr), com_scale=float(a.com_scale), residual=bool(a.residual), compiled=compiled, compile_s=compile_s,
|
|
99
|
+
inductor_deterministic=bool(env.compile_deterministic) if compiled else None,
|
|
100
|
+
note=("CoM draw on (theirs, once per world); " if a.com_dr else "CoM draw absent (favours us); ")
|
|
101
|
+
+ "self-contact substitute stricter than theirs; shared nothing between actor and critic")
|
|
102
|
+
if easy_env is not None:
|
|
103
|
+
meta["easy"] = dict(every=a.easy_every, dense_until=a.easy_dense_until, sparse_every=a.easy_sparse_every, which=["current"],
|
|
104
|
+
n=A3.EASY_N, steps=A3.EASY_STEPS, pass_rate=A3.EASY_PASS, start_sigma=A3.EASY_SIGMA, noise_seed=a.seed,
|
|
105
|
+
mpkpe_bar=a.easy_mpkpe_bar)
|
|
106
|
+
(out / "meta.json").write_text(json.dumps(meta, indent=1, default=str))
|
|
107
|
+
easy = None
|
|
108
|
+
if easy_env is not None:
|
|
109
|
+
ep = out / "easy.jsonl"
|
|
110
|
+
assert not (ep.exists() and ep.stat().st_size > 0), f"{ep} exists: a fresh run never appends to another's easy rows"
|
|
111
|
+
|
|
112
|
+
def crossing(w, it_, act_s): # PREREG_RG1: the crossing policy for sim2sim, outside the clock
|
|
113
|
+
torch.save(dict(snapshot=agent.snapshot(), it=it_, active_s=act_s, which=w, seed=a.seed, ship=ship, residual=a.residual),
|
|
114
|
+
out / "crossing_current.pt")
|
|
115
|
+
easy = A3.Easy(easy_env, agent, ["current"], a.easy_every, a.easy_dense_until, a.easy_sparse_every, ep,
|
|
116
|
+
mpkpe_bar=a.easy_mpkpe_bar, acts={"current": agent.act_mean}, on_pass=crossing,
|
|
117
|
+
secondary=A3.RG1_SECONDARY if a.easy_mpkpe_bar is not None else None, secondary_every=A3.RG1_SECONDARY_EVERY)
|
|
118
|
+
log = open(out / "train.jsonl", "a")
|
|
119
|
+
active, ckpts = 0.0, []
|
|
120
|
+
for it in range(1, a.iters + 1):
|
|
121
|
+
sync(); t0 = raw_now()
|
|
122
|
+
s = agent.iteration()
|
|
123
|
+
sync()
|
|
124
|
+
active += raw_now() - t0
|
|
125
|
+
if it == 1: # outside the clock: the probe's host read
|
|
126
|
+
pr = dict(probe.read(), it=it)
|
|
127
|
+
print("TRAINING PATH action base: " + json.dumps(pr), flush=True)
|
|
128
|
+
(out / "probe_it1.json").write_text(json.dumps(pr) + "\n") # its own file: train rows stay comparable across A/Bs
|
|
129
|
+
# the launch pipeline's instrument (the review 11-11): wall time at the end of this process's first update, outside the
|
|
130
|
+
# clock; fetch.py reports commit -> runner START -> FIRST_UPDATE from it. One line per process, the same format in every trainer
|
|
131
|
+
print(f"FIRST_UPDATE {time.strftime('%Y-%m-%dT%H:%M:%S%z')} it={it}", flush=True)
|
|
132
|
+
log.write(json.dumps(dict(it=it, active_s=active, **{k: v for k, v in s.items() if isinstance(v, (int, float))})) + "\n")
|
|
133
|
+
if it == 1 and a.capture:
|
|
134
|
+
assert not a.cpu, "capture needs CUDA"
|
|
135
|
+
sync(); agent.capture(); sync() # outside the clock (setup), as InstantMimic excludes its compile and capture
|
|
136
|
+
if it % a.ckpt_every == 0:
|
|
137
|
+
p = out / f"checkpoint_iter_{it}.pt"
|
|
138
|
+
torch.save(dict(snapshot=agent.snapshot(), it=it, active_s=active, seed=a.seed, ship=ship), p)
|
|
139
|
+
ckpts.append((it, active, p))
|
|
140
|
+
log.flush()
|
|
141
|
+
if easy is not None and easy.due(it): # outside the clock, after the iteration's records and checkpoint
|
|
142
|
+
easy.run(it, active)
|
|
143
|
+
log.close()
|
|
144
|
+
print(json.dumps(dict(iterations=a.iters, active_s=active, s_per_iter=active / a.iters)))
|
|
145
|
+
if a.no_eval:
|
|
146
|
+
return
|
|
147
|
+
from diffneusim.rl import g1_bm_eval as E
|
|
148
|
+
ev_law, es = law(a.eval_n), a.eval_seed or a.seed
|
|
149
|
+
with open(out / "eval.jsonl", "w") as f:
|
|
150
|
+
for it, act_s, p in ckpts:
|
|
151
|
+
agent.restore(torch.load(p, weights_only=False)["snapshot"])
|
|
152
|
+
# as their evaluate.py: a fresh env per checkpoint with the same seed (the same DR draws), seeded right before the reset
|
|
153
|
+
ev_env = B.BMTrack(ev_law, m, lm, a.eval_n, ship=ship, device=dev, dtype=dt, seed=es, sampling="start", pushes=False,
|
|
154
|
+
com_dr=a.com_dr, com_scale=a.com_scale, residual=a.residual)
|
|
155
|
+
E.set_seed(es)
|
|
156
|
+
t0 = raw_now()
|
|
157
|
+
r = E.evaluate(ev_env, agent.act_mean)
|
|
158
|
+
f.write(json.dumps(dict(iteration=it, active_s=act_s, eval_wall_s=raw_now() - t0, **r), default=float) + "\n")
|
|
159
|
+
f.flush()
|
|
160
|
+
print(f"iter {it} active {act_s:.1f} s: {json.dumps(r, default=float)[:200]}", flush=True)
|
|
161
|
+
print("A2 DONE")
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
if __name__ == "__main__":
|
|
165
|
+
main()
|