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
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
// Portions of this file are translated from MuJoCo 3.16.0 (https://github.com/google-deepmind/mujoco), Copyright 2021
|
|
3
|
+
// DeepMind Technologies Limited, licensed under the Apache License, Version 2.0. Changed by this project: transcribed to
|
|
4
|
+
// templated C++ (double, Dual, float), restructured for the G1 soft law and the GPU path. See core/soft/NOTICE.md.
|
|
5
|
+
// D16 L2 v2 (2026-11-02): the soft law's collision and constraint rows on the GPU, the second half of k_pre
|
|
6
|
+
// (NablaEngine's split: k_pre = P + L2 -> hand -> k_post = N). It reads L1's state (p_world's SharedP, or for the standalone
|
|
7
|
+
// gate the same fields from global memory: body frames xpos / xquat, each dof's world axis; a dof's anchor is its body's xpos)
|
|
8
|
+
// and writes the hand's contact and row blocks (core/soft/hand.h), plus the world's nefc to a dense array (k_post's row-count
|
|
9
|
+
// dispatch). One world per 32-thread block, deterministic (ballots, prefix sums, fixed-order butterflies; no atomics), the
|
|
10
|
+
// CPU law's order (pairs in broadphase order, each collider's slots; rows: limits by joint (lower, upper), then contacts in
|
|
11
|
+
// contact order, 1 or 4 rows each).
|
|
12
|
+
// Lanes: geoms (poses), pairs (broadphase), candidates (narrowphase), joints (limits), then two contacts per pass with
|
|
13
|
+
// lane = support slot (16 per contact: the contact-frame Jacobian on the support dofs, J2 - J1 = +lin on b2's chain, -lin on
|
|
14
|
+
// b1's, the shared ancestors left out since their terms cancel exactly), the row scalars on the first lanes of each half.
|
|
15
|
+
// Shared memory: L2Geo is dead once the hand is written (in k_pre a union with p_world's scratch), L2Keep is the contact table.
|
|
16
|
+
// v2.1 (2026-11-02, after k_pre's first timing: L2 60k of 185k lane-0 cycles per world, contact rows 34k, broadphase 14k):
|
|
17
|
+
// every model parameter comes from host-built tables in T (L2Tab), so the f32 path runs no FP64 instruction (the law's
|
|
18
|
+
// headers take a parameter type P); the broadphase reads one 8-byte record per pair and prefetches the next pass; a contact
|
|
19
|
+
// row reads its pair's precomputed K, B, impedance parameters, tran and support masks in one dependent step.
|
|
20
|
+
#include <cuda_runtime.h>
|
|
21
|
+
|
|
22
|
+
#include "../collide.h"
|
|
23
|
+
#include "../hand.h"
|
|
24
|
+
#include "../impedance.h"
|
|
25
|
+
#include "../kin.h"
|
|
26
|
+
#include "../rows.h"
|
|
27
|
+
#include "model_view.cuh"
|
|
28
|
+
|
|
29
|
+
namespace js::soft::gpu {
|
|
30
|
+
|
|
31
|
+
// the model as L2 reads it: host-built tables in T (float in production, double for the f64 gate), structure as ints
|
|
32
|
+
template <class T> struct L2Tab {
|
|
33
|
+
int ng, np, nj, nv, nb;
|
|
34
|
+
// geoms: body, type, pos [3] and quat [4] in the body frame, size [3]
|
|
35
|
+
const int* geom_body; const int* geom_type; const T* geom_pq; const T* geom_size;
|
|
36
|
+
// pairs, struct of arrays: geo = g1 | g2 << 8 | condim << 16 | foot << 18; thr: the broadphase bound (plane: on the signed
|
|
37
|
+
// distance, else on the squared distance); reach = margin + gap (the colliders' margin); margin: a contact is kept iff
|
|
38
|
+
// dist < margin; mu0 = friction[0] (before the foot override); K, B, imp [5]: sol_param / stiffness_damping at the
|
|
39
|
+
// timestep; tran: the two bodies' translational invweight0; plus / minus: the support dofs on b2's / b1's chain only
|
|
40
|
+
const unsigned* pr_geo; const T* pr_thr; const T* pr_reach; const T* pr_margin; const T* pr_mu0;
|
|
41
|
+
const T* pr_K; const T* pr_B; const T* pr_imp; const T* pr_tran;
|
|
42
|
+
const unsigned long long* pr_plus; const unsigned long long* pr_minus;
|
|
43
|
+
// joints: dof, qadr, limited; range [2], margin, K, B, imp [5], the dof's invweight0
|
|
44
|
+
const int* jt_dof; const int* jt_qadr; const unsigned char* jt_limited;
|
|
45
|
+
const T* jt_range; const T* jt_margin; const T* jt_K; const T* jt_B; const T* jt_imp; const T* jt_invw;
|
|
46
|
+
// dofs: 1 for a free joint's translation (lin = axis); the dof's body (its anchor is that body's xpos)
|
|
47
|
+
const unsigned char* dof_trans; const unsigned char* dof_body;
|
|
48
|
+
T impratio;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
// L1's state for one world (in k_pre: pointers into p_world's SharedP)
|
|
52
|
+
template <class T> struct L2In { const T* xpos; const T* xquat; const T* dofax; const T* qpos; const T* qvel; };
|
|
53
|
+
|
|
54
|
+
// a geom's world position and local z axis: all the G1 law's colliders read of its pose (collide.h)
|
|
55
|
+
template <class T> struct GeomAx { V3<T> p, z; };
|
|
56
|
+
|
|
57
|
+
// Shared memory per world, sized for 16 worlds per SM with k_pre (the residency step, 2026-11-02: 7,456 -> 5,184 B): the z axis
|
|
58
|
+
// instead of the whole rotation, the broadphase's candidates as one bit per pair, the contact's table in the hand's own conmeta
|
|
59
|
+
// word, the friction recomputed where it is used (section 7), not kept per contact.
|
|
60
|
+
template <class T, int NG, int NP, int NC> struct L2Geo { // dead once the hand is written
|
|
61
|
+
GeomAx<T> ga[NG];
|
|
62
|
+
T con_dist[NC], con_pos[NC][3], con_frame[NC][6]; // frame: normal, tangent 1 (tangent 2 = n x t1, make_frame's)
|
|
63
|
+
uint32_t cmask[(NP + 31) / 32]; // broadphase pass w's ballot: bit l = pair 32 w + l is a candidate
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
template <int NC> struct L2Keep { // the contact table and counts
|
|
67
|
+
int ncon, nlim, nefc, overflow;
|
|
68
|
+
uint32_t con_meta[NC]; // hand_conmeta(pair, slot, condim, row0, nd), filled by sections 3 (pair, slot, condim), 5 (row0), 6 (nd)
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
namespace l2v2d {
|
|
72
|
+
__device__ __forceinline__ unsigned below(int lane) { return (1u << lane) - 1u; }
|
|
73
|
+
__device__ __forceinline__ int scan_incl(int v, int lane) {
|
|
74
|
+
for (int o = 1; o < 32; o <<= 1) {
|
|
75
|
+
const int t = __shfl_up_sync(0xffffffffu, v, o);
|
|
76
|
+
if (lane >= o) v += t;
|
|
77
|
+
}
|
|
78
|
+
return v;
|
|
79
|
+
}
|
|
80
|
+
template <class T> __device__ __forceinline__ T half_sum(T v) { // a butterfly inside each 16-lane half, a fixed order
|
|
81
|
+
for (int o = 8; o > 0; o >>= 1) v += __shfl_xor_sync(0xffffffffu, v, o);
|
|
82
|
+
return v;
|
|
83
|
+
}
|
|
84
|
+
// the n-th (0-based) set bit of a 64-bit mask, -1 past its count
|
|
85
|
+
__device__ __forceinline__ int nth_bit(unsigned long long m, int n) {
|
|
86
|
+
const unsigned lo = static_cast<unsigned>(m), hi = static_cast<unsigned>(m >> 32);
|
|
87
|
+
const int clo = __popc(lo);
|
|
88
|
+
if (n < clo) return __fns(lo, 0, n + 1);
|
|
89
|
+
if (n < clo + __popc(hi)) return 32 + __fns(hi, 0, n - clo + 1);
|
|
90
|
+
return -1;
|
|
91
|
+
}
|
|
92
|
+
} // namespace l2v2d
|
|
93
|
+
|
|
94
|
+
// One world: writes the hand's counts, contact and row blocks into rec (layout h) and nefc into *nefc_out. NG, NP, NC, NR:
|
|
95
|
+
// the model's geoms and pairs, the contact and row capacities (h.nc == NC, h.nr == NR); overflow is flagged in the counts,
|
|
96
|
+
// never silent. Every lane calls it.
|
|
97
|
+
template <class T, int NG, int NP, int NC, int NR, class MV = ModelView<MVShared>>
|
|
98
|
+
__device__ void l2v2_world(const L2Tab<T>& m, L2Geo<T, NG, NP, NC>& g, L2Keep<NC>& k, const L2In<T>& in, T foot_friction,
|
|
99
|
+
const HandLayout& h, T* rec, int* nefc_out, int lane, long long* tmr = nullptr,
|
|
100
|
+
int world = 0) {
|
|
101
|
+
using namespace l2v2d;
|
|
102
|
+
using V = V3<T>;
|
|
103
|
+
const int KD = h.kdof;
|
|
104
|
+
const MV mv(world); // extension hook 2: every model value below is read through mv (the default ignores the world)
|
|
105
|
+
// section marks (lane 0's clock64; null: none): 0 start, 1 poses, 2 broadphase, 3 narrowphase, 4 limits, 5 row offsets,
|
|
106
|
+
// 6 contact rows, 7 end
|
|
107
|
+
#define L2MARK(i) do { if (lane == 0 && tmr) tmr[i] = clock64(); } while (0)
|
|
108
|
+
L2MARK(0);
|
|
109
|
+
// 1. geom world poses, one lane per geom (rows.h geom_pose's arithmetic on the body frame)
|
|
110
|
+
for (int gi = lane; gi < m.ng; gi += 32) {
|
|
111
|
+
const int body = __ldg(m.geom_body + gi);
|
|
112
|
+
const T* pq = m.geom_pq + 7 * gi;
|
|
113
|
+
const T gpos[3] = {mv.at(kFieldGeomPose, pq), mv.at(kFieldGeomPose, pq + 1), mv.at(kFieldGeomPose, pq + 2)};
|
|
114
|
+
const T gq[4] = {mv.at(kFieldGeomPose, pq + 3), mv.at(kFieldGeomPose, pq + 4), mv.at(kFieldGeomPose, pq + 5),
|
|
115
|
+
mv.at(kFieldGeomPose, pq + 6)};
|
|
116
|
+
const T* bx = in.xpos + 3 * body;
|
|
117
|
+
const T bq[4] = {in.xquat[4 * body], in.xquat[4 * body + 1], in.xquat[4 * body + 2], in.xquat[4 * body + 3]};
|
|
118
|
+
T R[9], t[3], q[4], Rg[9];
|
|
119
|
+
quat_to_mat(bq, R);
|
|
120
|
+
mat_vec(R, gpos, t);
|
|
121
|
+
g.ga[gi].p = V{bx[0] + t[0], bx[1] + t[1], bx[2] + t[2]};
|
|
122
|
+
quat_mul(bq, gq, q);
|
|
123
|
+
quat_to_mat(q, Rg);
|
|
124
|
+
g.ga[gi].z = zaxis(Rg);
|
|
125
|
+
}
|
|
126
|
+
__syncwarp();
|
|
127
|
+
L2MARK(1);
|
|
128
|
+
// 2. broadphase (v1's test), compacted by ballot in pair order
|
|
129
|
+
int ncand = 0;
|
|
130
|
+
unsigned geo_n = lane < m.np ? __ldg(m.pr_geo + lane) : 0u; // the next pass's records, loaded one pass ahead
|
|
131
|
+
T thr_n = lane < m.np ? mv.at(kFieldPairThr, m.pr_thr + lane) : T(0);
|
|
132
|
+
for (int c0 = 0; c0 < m.np; c0 += 32) {
|
|
133
|
+
const int pr = c0 + lane;
|
|
134
|
+
const unsigned geo = geo_n;
|
|
135
|
+
const T thr = thr_n;
|
|
136
|
+
if (pr + 32 < m.np) { geo_n = __ldg(m.pr_geo + pr + 32); thr_n = mv.at(kFieldPairThr, m.pr_thr + pr + 32); }
|
|
137
|
+
bool keep = false;
|
|
138
|
+
if (pr < m.np) {
|
|
139
|
+
const int g1 = geo & 255u, g2 = (geo >> 8) & 255u;
|
|
140
|
+
const GeomAx<T>& a = g.ga[g1];
|
|
141
|
+
const GeomAx<T>& b = g.ga[g2];
|
|
142
|
+
if (__ldg(m.geom_type + g1) == 0) {
|
|
143
|
+
keep = so3::dot(so3::sub(b.p, a.p), a.z) <= thr;
|
|
144
|
+
} else {
|
|
145
|
+
const V d = so3::sub(b.p, a.p);
|
|
146
|
+
keep = so3::dot(d, d) <= thr;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
const unsigned bal = __ballot_sync(0xffffffffu, keep);
|
|
150
|
+
if (lane == 0) g.cmask[c0 >> 5] = bal;
|
|
151
|
+
ncand += __popc(bal);
|
|
152
|
+
}
|
|
153
|
+
__syncwarp();
|
|
154
|
+
L2MARK(2);
|
|
155
|
+
// 3. narrowphase: one candidate per lane, up to 2 kept contacts each (dist < margin), slots by two ballots + popc
|
|
156
|
+
// The ci-th candidate in pair order (the old compacted list's order): lane w holds mask word w and the candidates before it;
|
|
157
|
+
// a binary search over the words by shuffles on every lane (never behind ci < ncand), then the bit inside the word.
|
|
158
|
+
constexpr int NW = (NP + 31) / 32;
|
|
159
|
+
static_assert(NW <= 32, "one mask word per lane");
|
|
160
|
+
constexpr int kTop = NW > 16 ? 16 : NW > 8 ? 8 : NW > 4 ? 4 : NW > 2 ? 2 : 1; // 2 kTop >= NW
|
|
161
|
+
const unsigned cw = lane < ((m.np + 31) >> 5) ? g.cmask[lane] : 0u; // words past the model's pairs were not written
|
|
162
|
+
const int cw_excl = scan_incl(__popc(cw), lane) - __popc(cw);
|
|
163
|
+
int ncon = 0, ovf = 0;
|
|
164
|
+
for (int c0 = 0; c0 < ncand; c0 += 32) {
|
|
165
|
+
const int ci = c0 + lane;
|
|
166
|
+
int w = 0;
|
|
167
|
+
for (int st = kTop; st > 0; st >>= 1) // the last word whose candidates-before count is <= ci (word 0's is 0)
|
|
168
|
+
if (__shfl_sync(0xffffffffu, cw_excl, w + st) <= ci) w += st;
|
|
169
|
+
const unsigned word = __shfl_sync(0xffffffffu, cw, w);
|
|
170
|
+
const int rank = ci - __shfl_sync(0xffffffffu, cw_excl, w);
|
|
171
|
+
PreContact<T> pc[4];
|
|
172
|
+
int n = 0, keepmask = 0;
|
|
173
|
+
int pr = 0;
|
|
174
|
+
unsigned geo = 0;
|
|
175
|
+
if (ci < ncand) {
|
|
176
|
+
pr = 32 * w + static_cast<int>(__fns(word, 0, rank + 1));
|
|
177
|
+
geo = __ldg(m.pr_geo + pr);
|
|
178
|
+
const int g1 = geo & 255u, g2 = (geo >> 8) & 255u;
|
|
179
|
+
const T sz1[3] = {mv.at(kFieldGeomSize, m.geom_size + 3 * g1), mv.at(kFieldGeomSize, m.geom_size + 3 * g1 + 1),
|
|
180
|
+
mv.at(kFieldGeomSize, m.geom_size + 3 * g1 + 2)};
|
|
181
|
+
const T sz2[3] = {mv.at(kFieldGeomSize, m.geom_size + 3 * g2), mv.at(kFieldGeomSize, m.geom_size + 3 * g2 + 1),
|
|
182
|
+
mv.at(kFieldGeomSize, m.geom_size + 3 * g2 + 2)};
|
|
183
|
+
n = collide(pc, mv.at(kFieldPairReach, m.pr_reach + pr), __ldg(m.geom_type + g1), g.ga[g1].p, g.ga[g1].z, sz1,
|
|
184
|
+
__ldg(m.geom_type + g2), g.ga[g2].p, g.ga[g2].z, sz2);
|
|
185
|
+
const T margin = mv.at(kFieldPairMargin, m.pr_margin + pr);
|
|
186
|
+
for (int kk = 0; kk < n; ++kk)
|
|
187
|
+
if (pc[kk].dist < margin) keepmask |= 1 << kk;
|
|
188
|
+
}
|
|
189
|
+
const int cnt = __popc(keepmask);
|
|
190
|
+
const unsigned b1 = __ballot_sync(0xffffffffu, cnt >= 1), b2 = __ballot_sync(0xffffffffu, cnt >= 2);
|
|
191
|
+
const int off = ncon + __popc(b1 & below(lane)) + __popc(b2 & below(lane));
|
|
192
|
+
if (cnt) {
|
|
193
|
+
int j = 0;
|
|
194
|
+
for (int kk = 0; kk < n; ++kk) {
|
|
195
|
+
if (!((keepmask >> kk) & 1)) continue;
|
|
196
|
+
const int c = off + j++;
|
|
197
|
+
if (c >= NC) { ovf = 1; continue; }
|
|
198
|
+
k.con_meta[c] = hand_conmeta(pr, pc[kk].slot, static_cast<int>((geo >> 16) & 3u), 0, 0);
|
|
199
|
+
g.con_dist[c] = pc[kk].dist;
|
|
200
|
+
g.con_pos[c][0] = pc[kk].pos.x; g.con_pos[c][1] = pc[kk].pos.y; g.con_pos[c][2] = pc[kk].pos.z;
|
|
201
|
+
V fr[3];
|
|
202
|
+
make_frame(pc[kk].normal, pc[kk].tangent, fr);
|
|
203
|
+
for (int d = 0; d < 2; ++d) { g.con_frame[c][3 * d] = fr[d].x; g.con_frame[c][3 * d + 1] = fr[d].y;
|
|
204
|
+
g.con_frame[c][3 * d + 2] = fr[d].z; }
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
ncon += __popc(b1) + __popc(b2);
|
|
208
|
+
}
|
|
209
|
+
ovf = __any_sync(0xffffffffu, ovf) || ncon > NC;
|
|
210
|
+
ncon = ncon < NC ? ncon : NC;
|
|
211
|
+
L2MARK(3);
|
|
212
|
+
// 4. limit rows: one lane per joint, lower then upper in joint order; the hand implies their J (+-e_dof)
|
|
213
|
+
int nlim = 0;
|
|
214
|
+
for (int j0 = 0; j0 < m.nj; j0 += 32) {
|
|
215
|
+
const int j = j0 + lane;
|
|
216
|
+
bool lo = false, hi = false;
|
|
217
|
+
T dlo = 0, dhi = 0;
|
|
218
|
+
if (j < m.nj && __ldg(m.jt_limited + j)) {
|
|
219
|
+
const T q = in.qpos[__ldg(m.jt_qadr + j)];
|
|
220
|
+
const T jm = mv.at(kFieldJointMargin, m.jt_margin + j);
|
|
221
|
+
dlo = q - mv.at(kFieldJointRange, m.jt_range + 2 * j);
|
|
222
|
+
dhi = mv.at(kFieldJointRange, m.jt_range + 2 * j + 1) - q;
|
|
223
|
+
lo = dlo < jm;
|
|
224
|
+
hi = dhi < jm;
|
|
225
|
+
}
|
|
226
|
+
const unsigned blo = __ballot_sync(0xffffffffu, lo), bhi = __ballot_sync(0xffffffffu, hi);
|
|
227
|
+
int r = nlim + __popc(blo & below(lane)) + __popc(bhi & below(lane));
|
|
228
|
+
for (int side = 0; side < 2; ++side) {
|
|
229
|
+
if (!(side == 0 ? lo : hi)) continue;
|
|
230
|
+
if (r >= NR) { ovf = 1; ++r; continue; }
|
|
231
|
+
const int dof = __ldg(m.jt_dof + j);
|
|
232
|
+
const T jm = mv.at(kFieldJointMargin, m.jt_margin + j);
|
|
233
|
+
const T pos = side == 0 ? dlo : dhi;
|
|
234
|
+
const KBT<T> kb{mv.at(kFieldJointK, m.jt_K + j), mv.at(kFieldJointB, m.jt_B + j)};
|
|
235
|
+
const T imp = impedance(mv.row(kFieldJointImp, m.jt_imp + 5 * j), pos, jm);
|
|
236
|
+
const T R = regularizer(imp, mv.at(kFieldJointInvw, m.jt_invw + j));
|
|
237
|
+
const T vel = (side == 0 ? T(1) : -T(1)) * in.qvel[dof];
|
|
238
|
+
rec[h.aref + r] = reference_accel(kb, imp, vel, pos, jm);
|
|
239
|
+
rec[h.efcD + r] = T(1) / R;
|
|
240
|
+
tape_put_u(rec, h.rowmeta + r, hand_rowmeta(kHandRowLimit, dof, 0, side == 1));
|
|
241
|
+
++r;
|
|
242
|
+
}
|
|
243
|
+
nlim += __popc(blo) + __popc(bhi);
|
|
244
|
+
}
|
|
245
|
+
ovf = __any_sync(0xffffffffu, ovf);
|
|
246
|
+
const int nlim_w = nlim < NR ? nlim : NR;
|
|
247
|
+
L2MARK(4);
|
|
248
|
+
// 5. the contacts' first rows, a warp scan in contact order
|
|
249
|
+
int base = nlim_w;
|
|
250
|
+
for (int c0 = 0; c0 < ncon; c0 += 32) {
|
|
251
|
+
const int c = c0 + lane;
|
|
252
|
+
const int nr = c < ncon ? (hand_con_condim(k.con_meta[c]) == 1 ? 1 : 4) : 0;
|
|
253
|
+
const int incl = scan_incl(nr, lane);
|
|
254
|
+
if (c < ncon) k.con_meta[c] |= static_cast<uint32_t>(base + incl - nr < 255 ? base + incl - nr : 255) << 16;
|
|
255
|
+
base += __shfl_sync(0xffffffffu, incl, 31);
|
|
256
|
+
}
|
|
257
|
+
__syncwarp();
|
|
258
|
+
if (base > NR) ovf = 1;
|
|
259
|
+
L2MARK(5);
|
|
260
|
+
// 6. two contacts per pass, lane = support slot in each 16-lane half: the contact-frame Jacobian and the frame rows' J qvel
|
|
261
|
+
// (v2.2: the support masks loaded one pass ahead; the row scalars moved to the lane-per-contact pass 7)
|
|
262
|
+
const int half = lane >> 4, s = lane & 15;
|
|
263
|
+
unsigned long long plus_n = 0ULL, minus_n = 0ULL;
|
|
264
|
+
if (half < ncon) { const int pr0 = hand_con_pair(k.con_meta[half]); plus_n = __ldg(m.pr_plus + pr0); minus_n = __ldg(m.pr_minus + pr0); }
|
|
265
|
+
for (int c0 = 0; c0 < ncon; c0 += 2) {
|
|
266
|
+
const int c = c0 + half;
|
|
267
|
+
const bool live = c < ncon;
|
|
268
|
+
const unsigned long long plus = plus_n, minus = minus_n;
|
|
269
|
+
if (c + 2 < ncon) { const int pn = hand_con_pair(k.con_meta[c + 2]); plus_n = __ldg(m.pr_plus + pn); minus_n = __ldg(m.pr_minus + pn); }
|
|
270
|
+
int dof = -1;
|
|
271
|
+
if (live) {
|
|
272
|
+
const unsigned long long sup = plus | minus;
|
|
273
|
+
dof = s < KD ? nth_bit(sup, s) : -1;
|
|
274
|
+
if (s == 0 && nth_bit(sup, KD) >= 0) ovf = 1; // the support exceeds the hand's slots
|
|
275
|
+
}
|
|
276
|
+
T jn = T(0), j1 = T(0), j2 = T(0);
|
|
277
|
+
if (dof >= 0) {
|
|
278
|
+
const T* ax = in.dofax + 3 * dof;
|
|
279
|
+
const T* P = g.con_pos[c];
|
|
280
|
+
T lx, ly, lz;
|
|
281
|
+
if (__ldg(m.dof_trans + dof)) { lx = ax[0]; ly = ax[1]; lz = ax[2]; }
|
|
282
|
+
else {
|
|
283
|
+
const T* an = in.xpos + 3 * __ldg(m.dof_body + dof);
|
|
284
|
+
const T rx = P[0] - an[0], ry = P[1] - an[1], rz = P[2] - an[2];
|
|
285
|
+
lx = ax[1] * rz - ax[2] * ry; ly = ax[2] * rx - ax[0] * rz; lz = ax[0] * ry - ax[1] * rx;
|
|
286
|
+
}
|
|
287
|
+
if (!((plus >> dof) & 1ULL)) { lx = -lx; ly = -ly; lz = -lz; }
|
|
288
|
+
const T* F = g.con_frame[c];
|
|
289
|
+
const V t2 = so3::cross(V{F[0], F[1], F[2]}, V{F[3], F[4], F[5]}); // make_frame's frame[2], the same bits
|
|
290
|
+
jn = F[0] * lx + F[1] * ly + F[2] * lz;
|
|
291
|
+
j1 = F[3] * lx + F[4] * ly + F[5] * lz;
|
|
292
|
+
j2 = t2.x * lx + t2.y * ly + t2.z * lz;
|
|
293
|
+
}
|
|
294
|
+
if (live && s < KD) {
|
|
295
|
+
rec[h.conJ + (c * 3 + 0) * KD + s] = jn;
|
|
296
|
+
rec[h.conJ + (c * 3 + 1) * KD + s] = j1;
|
|
297
|
+
rec[h.conJ + (c * 3 + 2) * KD + s] = j2;
|
|
298
|
+
}
|
|
299
|
+
const T qv = dof >= 0 ? in.qvel[dof] : T(0);
|
|
300
|
+
const T vn = half_sum(jn * qv), vt1 = half_sum(j1 * qv), vt2 = half_sum(j2 * qv);
|
|
301
|
+
// the dofs of the support slots, 4 per word: lane w (w < KD / 4) of the half gathers slots 4w .. 4w + 3
|
|
302
|
+
unsigned dw = 0;
|
|
303
|
+
for (int b = 0; b < 4; ++b) {
|
|
304
|
+
const int d = __shfl_sync(0xffffffffu, dof, (half << 4) + ((4 * s + b) & 15));
|
|
305
|
+
dw |= static_cast<unsigned>(d >= 0 ? d : 255) << (8 * b);
|
|
306
|
+
}
|
|
307
|
+
if (live && s < KD / 4) tape_put_u(rec, h.condof + (c * KD) / 4 + s, dw);
|
|
308
|
+
// the ballot on every lane (a full-mask ballot behind `live` deadlocked the warp when the last pass had one contact)
|
|
309
|
+
const unsigned dbal = __ballot_sync(0xffffffffu, dof >= 0);
|
|
310
|
+
__syncwarp(); // every lane has read con_pos[c]: lane 0 of the half overwrites it with the frame rows' J qvel
|
|
311
|
+
if (live && s == 0) {
|
|
312
|
+
g.con_pos[c][0] = vn; g.con_pos[c][1] = vt1; g.con_pos[c][2] = vt2;
|
|
313
|
+
k.con_meta[c] |= static_cast<uint32_t>(__popc((dbal >> (half << 4)) & 0xFFFFu)) << 24;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
__syncwarp();
|
|
317
|
+
// 7. the row scalars, one lane per contact (v1's arithmetic): the impedance, the regularizer and the pyramid's R once per
|
|
318
|
+
// contact, then its 1 or 4 rows; the contact's meta and mu; and min_nu, the smallest core distance (dist + both radii)
|
|
319
|
+
// over the contacts of two non-plane geoms (the hand's word at counts + 4, +inf without one)
|
|
320
|
+
T mn = T(INFINITY);
|
|
321
|
+
for (int c = lane; c < ncon; c += 32) {
|
|
322
|
+
const uint32_t meta = k.con_meta[c];
|
|
323
|
+
const int pr = hand_con_pair(meta), nr = hand_con_condim(meta) == 1 ? 1 : 4, r0 = hand_con_row0(meta);
|
|
324
|
+
const unsigned geo = __ldg(m.pr_geo + pr);
|
|
325
|
+
const T tran = mv.at(kFieldPairTran, m.pr_tran + pr), margin = mv.at(kFieldPairMargin, m.pr_margin + pr);
|
|
326
|
+
const KBT<T> kb{mv.at(kFieldPairK, m.pr_K + pr), mv.at(kFieldPairB, m.pr_B + pr)};
|
|
327
|
+
const T f0 = (((geo >> 18) & 1u) && foot_friction >= T(0)) ? foot_friction : mv.at(kFieldPairMu0, m.pr_mu0 + pr);
|
|
328
|
+
const T dist = g.con_dist[c], mu = smax(T(1e-5), f0); // mjMINMU
|
|
329
|
+
const T vn = g.con_pos[c][0], vt1 = g.con_pos[c][1], vt2 = g.con_pos[c][2];
|
|
330
|
+
const T imp = impedance(mv.row(kFieldPairImp, m.pr_imp + 5 * pr), dist, margin);
|
|
331
|
+
const T dA = nr == 1 ? tran : tran + mu * mu * tran;
|
|
332
|
+
T R = regularizer(imp, dA);
|
|
333
|
+
if (nr == 4) R = pyramid_regularizer(R, mu, m.impratio);
|
|
334
|
+
const T D = T(1) / R;
|
|
335
|
+
for (int q = 0; q < nr; ++q) {
|
|
336
|
+
const int r = r0 + q;
|
|
337
|
+
if (r >= NR) break; // overflow (flagged above)
|
|
338
|
+
const T vel = nr == 1 ? vn : vn + (T(hand_pyr_s(q)) * mu) * (hand_pyr_t(q) == 1 ? vt1 : vt2);
|
|
339
|
+
rec[h.aref + r] = reference_accel(kb, imp, vel, dist, margin);
|
|
340
|
+
rec[h.efcD + r] = D;
|
|
341
|
+
tape_put_u(rec, h.rowmeta + r, hand_rowmeta(nr == 1 ? kHandRowFrictionless : kHandRowPyramidal, c, q, false));
|
|
342
|
+
}
|
|
343
|
+
tape_put_u(rec, h.conmeta + c, meta);
|
|
344
|
+
rec[h.conmu + c] = mu;
|
|
345
|
+
const int g1 = geo & 255u, g2 = (geo >> 8) & 255u;
|
|
346
|
+
if (__ldg(m.geom_type + g1) != 0 && __ldg(m.geom_type + g2) != 0) {
|
|
347
|
+
const T nu = dist + mv.at(kFieldGeomSize, m.geom_size + 3 * g1) + mv.at(kFieldGeomSize, m.geom_size + 3 * g2);
|
|
348
|
+
mn = nu < mn ? nu : mn;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
for (int o = 16; o > 0; o >>= 1) { const T y = __shfl_xor_sync(0xffffffffu, mn, o); mn = y < mn ? y : mn; } // exact in any order
|
|
352
|
+
if (lane == 0) rec[h.min_nu] = mn;
|
|
353
|
+
ovf = __any_sync(0xffffffffu, ovf);
|
|
354
|
+
L2MARK(6);
|
|
355
|
+
if (lane == 0) {
|
|
356
|
+
const int nefc = base < NR ? base : NR;
|
|
357
|
+
k.ncon = ncon; k.nlim = nlim_w; k.nefc = nefc; k.overflow = ovf;
|
|
358
|
+
tape_put_u(rec, h.counts, static_cast<uint32_t>(ncon)); tape_put_u(rec, h.counts + 1, static_cast<uint32_t>(nefc));
|
|
359
|
+
tape_put_u(rec, h.counts + 2, static_cast<uint32_t>(nlim_w)); tape_put_u(rec, h.counts + 3, ovf ? 1u : 0u);
|
|
360
|
+
*nefc_out = nefc;
|
|
361
|
+
}
|
|
362
|
+
__syncwarp();
|
|
363
|
+
L2MARK(7);
|
|
364
|
+
#undef L2MARK
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
} // namespace js::soft::gpu
|