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,319 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
// D16 14x L2 (2026-11-02; tools/d16_14x/KPRE14_PREREG.md): collision and constraint rows of one world per 32-thread
|
|
3
|
+
// block, after kp14.cuh's p14_world, into the hand (core/soft/hand.h), gated (P2) against the CPU 14x hand (s14_hand,
|
|
4
|
+
// bindings/soft14_capi.cpp). The plain build, correct first:
|
|
5
|
+
// GEOM lanes over geoms: the world position and z axis (the colliders read a geom's rotation only through it)
|
|
6
|
+
// COLLIDE lanes over pairs in rounds of 32: collide.h's colliders (the CPU law's), kept iff dist < margin; the contacts
|
|
7
|
+
// compacted in pair order, then collider slot order, by warp scans (the CPU's order)
|
|
8
|
+
// LIMITS lanes over limits in rounds: a row iff dist < margin, the lower side first; unit form (J' = sign e_m,
|
|
9
|
+
// D' = c^2 D, aref' = aref / |c|); rows compacted in limit order
|
|
10
|
+
// CONTACT lanes over contacts: the support columns (the pair's generated signed expanded-dof lists: sum of sign coef
|
|
11
|
+
// w_e x (p - x_e), or the root's e_k), the contact frame's rows of them (CONJ), J qvel, then the rows (condim 1: one;
|
|
12
|
+
// condim 3: the pyramid's four with Rpy), each with impedance, R, D and aref from the precomputed K, B, imp
|
|
13
|
+
// Integer words are written bitwise (tape_put_u); only the fields k_post reads are written.
|
|
14
|
+
#include <cstddef>
|
|
15
|
+
#include <cstdint>
|
|
16
|
+
|
|
17
|
+
#include "../collide.h"
|
|
18
|
+
#include "../hand.h"
|
|
19
|
+
#include "../impedance.h"
|
|
20
|
+
#include "../tape.h"
|
|
21
|
+
#include "../x14/collide14.h" // MuJoCo 3.16's plane-ellipsoid beside collide.h's colliders
|
|
22
|
+
#include "kp14.cuh"
|
|
23
|
+
|
|
24
|
+
namespace d16 {
|
|
25
|
+
namespace l2x14 {
|
|
26
|
+
namespace MD = D16_X14_NS;
|
|
27
|
+
using kp14::Shared14;
|
|
28
|
+
// NR: the row cap, 255 (2026-11-04, the review; was 192, which sit_stand's 214 rows and mm training's fallen worlds exceed).
|
|
29
|
+
// 255 is the record formats' ceiling: the tape hdr's nefc and the hand's conmeta row0 are u8. Above it: fail-fast (overflow).
|
|
30
|
+
#if defined(D16_NV_GT64) // phase B (PHASE_B.md section 3, items 5 and 6): 20 support slots, and the hand's M block is kernel P's split storage, copied as it is
|
|
31
|
+
constexpr int NC = 64, NR = 255, KD = 20;
|
|
32
|
+
constexpr js::soft::HandLayout HL = js::soft::hand_layout(MD::NV, NC, NR, KD, ::d16::split::WORDS);
|
|
33
|
+
static_assert(HL.ntri == ::d16::split::WORDS && KD % 4 == 0, "the hand's M block is the split storage; the support dofs pack 4 per word");
|
|
34
|
+
#else
|
|
35
|
+
constexpr int NC = 64, NR = 255, KD = 16;
|
|
36
|
+
constexpr js::soft::HandLayout HL = js::soft::hand_layout(MD::NV, NC, NR, KD);
|
|
37
|
+
#endif
|
|
38
|
+
static_assert(MD::KDOF <= KD, "the generated support fits the hand's slots");
|
|
39
|
+
static_assert(js::soft::hand_layout_ok(HL, MD::NPR) && NR <= 255, "the row cap fits the hand's and the tape's u8 row fields");
|
|
40
|
+
template <class T> using V3 = js::soft::V3<T>;
|
|
41
|
+
|
|
42
|
+
// L2's scratch overlays Shared14's regions A and U (kernel P's ci / fs, M, DOWN block, S / F and factor, all dead once L2 has
|
|
43
|
+
// copied M into the hand, its first step); it must stop before qf / qa, which the hand copies at the end. The check is the
|
|
44
|
+
// exact byte span, not a sum of member sizes. A contact keeps its normal and tangent; the frame is rebuilt from them with the
|
|
45
|
+
// same make_frame call when the rows are formed (bitwise the frame once stored).
|
|
46
|
+
template <class T> struct alignas(16) L2S {
|
|
47
|
+
T gp[MD::NG][12]; // geom position, rotation (row-major)
|
|
48
|
+
T cdist[NC], cpos[NC][3], cnt[NC][6]; // distance, position, normal and tangent
|
|
49
|
+
int cpair[NC], cslot[NC], crow0[NC];
|
|
50
|
+
int coff[NC + 1]; // each contact's first (contact, slot) item: the prefix of its support sizes
|
|
51
|
+
int nlim, ncon, nrow;
|
|
52
|
+
};
|
|
53
|
+
template <class T> constexpr bool l2s_fits() {
|
|
54
|
+
return offsetof(Shared14<T>, a) % 16 == 0 && offsetof(Shared14<T>, qf) - offsetof(Shared14<T>, a) >= sizeof(L2S<T>);
|
|
55
|
+
}
|
|
56
|
+
static_assert(l2s_fits<float>() && l2s_fits<double>(), "L2's scratch fits over kernel P's dead regions A and U");
|
|
57
|
+
|
|
58
|
+
template <class T> __device__ __forceinline__ T ldv(const T* V, int i) { return __ldg(V + i); }
|
|
59
|
+
// the model's index tables at a lane-varying index: the global copy through the read-only path (gen14.py's g<name>), not the
|
|
60
|
+
// constant cache, which serves distinct addresses one per pass
|
|
61
|
+
#define G14(name, i) __ldg(&MD::g##name[i])
|
|
62
|
+
__device__ __forceinline__ int warp_excl(int x, int lane, int* total) { // exclusive prefix sum over lanes, and the total
|
|
63
|
+
int inc = x;
|
|
64
|
+
for (int o = 1; o < 32; o <<= 1) { const int y = __shfl_up_sync(0xffffffffu, inc, o); if (lane >= o) inc += y; }
|
|
65
|
+
*total = __shfl_sync(0xffffffffu, inc, 31);
|
|
66
|
+
return inc - x;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// TM (compile time, the cost model only; off in every gated or production build): clock marks into tm[0..7] (start, the M
|
|
70
|
+
// copy, GEOM, COLLIDE, LIMITS, the contact row scan, CONTACT, the smooth block and counts), lane 0.
|
|
71
|
+
// TP (compile time, the taped forward): the active-limit mask into the tape record's clamp words at limmask (bit l of word
|
|
72
|
+
// l / 32: limit l has a row this substep; at most one side can be active, gen14 asserts range > 2 margin), so the adjoint
|
|
73
|
+
// reads the forward's limit set instead of deciding it again from q (59 / C, 2026-11-03: 3 of 4,096 worlds differed in f32)
|
|
74
|
+
template <class T, bool TM = false, bool TP = false>
|
|
75
|
+
__device__ void l2x14_world(Shared14<T>& s, const T* __restrict__ V, T* rec, int* nefc_out, int lane, long long* tm = nullptr,
|
|
76
|
+
T* limmask = nullptr) {
|
|
77
|
+
using namespace js::soft;
|
|
78
|
+
#define L2_MARK(i) do { if constexpr (TM) { __syncwarp(); if (lane == 0) tm[i] = clock64(); } } while (0)
|
|
79
|
+
L2_MARK(0);
|
|
80
|
+
// the hand's M first: L2's scratch overlays it
|
|
81
|
+
#if defined(D16_NV_GT64)
|
|
82
|
+
for (int t = lane; t < HL.ntri; t += 32) rec[HL.M + t] = s.a.M[t]; // the split words, kernel P's layout (gSplitWord)
|
|
83
|
+
#else
|
|
84
|
+
for (int t = lane; t < MD::NTRI; t += 32) rec[HL.M + t] = s.a.M[t];
|
|
85
|
+
#endif
|
|
86
|
+
__syncwarp();
|
|
87
|
+
L2_MARK(1);
|
|
88
|
+
L2S<T>& o = *reinterpret_cast<L2S<T>*>(&s.a);
|
|
89
|
+
// GEOM
|
|
90
|
+
for (int g = lane; g < MD::NG; g += 32) {
|
|
91
|
+
const int b = G14(GBody, g);
|
|
92
|
+
const T* gv = V + MD::O_GEOM + 15 * g;
|
|
93
|
+
T R[9];
|
|
94
|
+
kp14::qmat(s.xquat[b], R);
|
|
95
|
+
const T gpos[3] = {ldv(gv, 3), ldv(gv, 4), ldv(gv, 5)};
|
|
96
|
+
T t[3];
|
|
97
|
+
kp14::mv(R, gpos, t);
|
|
98
|
+
for (int k = 0; k < 3; ++k) o.gp[g][k] = s.xpos[b][k] + t[k];
|
|
99
|
+
for (int i = 0; i < 3; ++i) // the geom's world rotation R_body R_geom
|
|
100
|
+
for (int j = 0; j < 3; ++j)
|
|
101
|
+
o.gp[g][3 + 3 * i + j] = R[3 * i] * ldv(gv, 6 + j) + R[3 * i + 1] * ldv(gv, 9 + j) + R[3 * i + 2] * ldv(gv, 12 + j);
|
|
102
|
+
}
|
|
103
|
+
if (lane == 0) { o.ncon = 0; o.nlim = 0; }
|
|
104
|
+
__syncwarp();
|
|
105
|
+
L2_MARK(2);
|
|
106
|
+
// COLLIDE
|
|
107
|
+
bool ovf = false;
|
|
108
|
+
for (int r0 = 0; r0 < MD::NPR; r0 += 32) {
|
|
109
|
+
const int pr = r0 + lane;
|
|
110
|
+
PreContact<T> pc[4];
|
|
111
|
+
int nk = 0;
|
|
112
|
+
if (pr < MD::NPR) {
|
|
113
|
+
const int g1 = G14(PG1, pr), g2 = G14(PG2, pr);
|
|
114
|
+
const T* pv = V + MD::O_PAIR + 10 * pr;
|
|
115
|
+
const T margin = ldv(pv, 1), gap = ldv(pv, 2);
|
|
116
|
+
GeomPose<T> G1, G2;
|
|
117
|
+
G1.p = V3<T>{o.gp[g1][0], o.gp[g1][1], o.gp[g1][2]}; G2.p = V3<T>{o.gp[g2][0], o.gp[g2][1], o.gp[g2][2]};
|
|
118
|
+
for (int k = 0; k < 9; ++k) { G1.R[k] = o.gp[g1][3 + k]; G2.R[k] = o.gp[g2][3 + k]; }
|
|
119
|
+
const T sz1[3] = {ldv(V, MD::O_GEOM + 15 * g1), ldv(V, MD::O_GEOM + 15 * g1 + 1), ldv(V, MD::O_GEOM + 15 * g1 + 2)};
|
|
120
|
+
const T sz2[3] = {ldv(V, MD::O_GEOM + 15 * g2), ldv(V, MD::O_GEOM + 15 * g2 + 1), ldv(V, MD::O_GEOM + 15 * g2 + 2)};
|
|
121
|
+
PreContact<T> all[4];
|
|
122
|
+
const int n = js::soft::x14::collide14<T, T>(all, margin + gap, G14(GType, g1), G1, sz1, G14(GType, g2), G2, sz2);
|
|
123
|
+
for (int k = 0; k < n; ++k)
|
|
124
|
+
if (all[k].dist < margin) pc[nk++] = all[k];
|
|
125
|
+
}
|
|
126
|
+
int tot;
|
|
127
|
+
const int off = warp_excl(nk, lane, &tot);
|
|
128
|
+
const int base = o.ncon;
|
|
129
|
+
for (int k = 0; k < nk; ++k) {
|
|
130
|
+
const int c = base + off + k;
|
|
131
|
+
if (c >= NC) continue;
|
|
132
|
+
o.cdist[c] = pc[k].dist; o.cpair[c] = pr; o.cslot[c] = pc[k].slot;
|
|
133
|
+
o.cpos[c][0] = pc[k].pos.x; o.cpos[c][1] = pc[k].pos.y; o.cpos[c][2] = pc[k].pos.z;
|
|
134
|
+
o.cnt[c][0] = pc[k].normal.x; o.cnt[c][1] = pc[k].normal.y; o.cnt[c][2] = pc[k].normal.z;
|
|
135
|
+
o.cnt[c][3] = pc[k].tangent.x; o.cnt[c][4] = pc[k].tangent.y; o.cnt[c][5] = pc[k].tangent.z;
|
|
136
|
+
}
|
|
137
|
+
__syncwarp();
|
|
138
|
+
if (lane == 0) o.ncon = base + tot;
|
|
139
|
+
__syncwarp();
|
|
140
|
+
}
|
|
141
|
+
const int ncon = o.ncon, nc_w = ncon < NC ? ncon : NC;
|
|
142
|
+
ovf = ncon > NC;
|
|
143
|
+
L2_MARK(3);
|
|
144
|
+
// LIMITS (rows first, in limit order: lower then upper)
|
|
145
|
+
int nrow = 0;
|
|
146
|
+
for (int l0 = 0; l0 < MD::NLIM; l0 += 32) {
|
|
147
|
+
const int l = l0 + lane;
|
|
148
|
+
int nl = 0;
|
|
149
|
+
T dist[2];
|
|
150
|
+
int side[2];
|
|
151
|
+
if (l < MD::NLIM) {
|
|
152
|
+
const T* lv = V + MD::O_LIM + 12 * l;
|
|
153
|
+
const T c = ldv(lv, 0), q = c * s.qpos[G14(LimQadr, l)], margin = ldv(lv, 3);
|
|
154
|
+
const T dlo = q - ldv(lv, 1), dhi = ldv(lv, 2) - q;
|
|
155
|
+
if (dlo < margin) { dist[nl] = dlo; side[nl++] = -1; }
|
|
156
|
+
if (dhi < margin) { dist[nl] = dhi; side[nl++] = 1; }
|
|
157
|
+
}
|
|
158
|
+
int tot;
|
|
159
|
+
const int off = warp_excl(nl, lane, &tot);
|
|
160
|
+
if constexpr (TP) {
|
|
161
|
+
const uint32_t act = __ballot_sync(0xffffffffu, nl > 0); // the warp's 32 limits l0 .. l0 + 31
|
|
162
|
+
if (lane == 0) tape_put_u(limmask, l0 / 32, act);
|
|
163
|
+
}
|
|
164
|
+
for (int k = 0; k < nl; ++k) {
|
|
165
|
+
const int r = nrow + off + k;
|
|
166
|
+
if (r >= NR) continue;
|
|
167
|
+
const T* lv = V + MD::O_LIM + 12 * l;
|
|
168
|
+
const int dof = G14(LimDof, l);
|
|
169
|
+
const T c = ldv(lv, 0), margin = ldv(lv, 3), diagA = ldv(lv, 4);
|
|
170
|
+
const KBT<T> kb{ldv(lv, 5), ldv(lv, 6)};
|
|
171
|
+
const T imp5[5] = {ldv(lv, 7), ldv(lv, 8), ldv(lv, 9), ldv(lv, 10), ldv(lv, 11)};
|
|
172
|
+
const T Jd = side[k] < 0 ? c : -c;
|
|
173
|
+
const T imp = impedance<T, T>(imp5, dist[k], margin);
|
|
174
|
+
const T R = regularizer<T, T>(imp, diagA), D = T(1) / R;
|
|
175
|
+
const T aref = reference_accel<T, T>(kb, imp, Jd * s.qvel[dof], dist[k], margin);
|
|
176
|
+
const T ac = c < T(0) ? -c : c;
|
|
177
|
+
rec[HL.aref + r] = aref / ac;
|
|
178
|
+
rec[HL.efcD + r] = D * c * c;
|
|
179
|
+
tape_put_u(rec, HL.rowmeta + r, hand_rowmeta(kHandRowLimit, dof, 0, Jd < T(0)));
|
|
180
|
+
}
|
|
181
|
+
nrow += tot;
|
|
182
|
+
}
|
|
183
|
+
#if defined(D16_NV_LE32)
|
|
184
|
+
// the record's second clamp word: the loop above writes one mask word per 32 limits, and at most 32 limits leave this word to nobody; the tape is not cleared, and every record word is written (A3's gate 3)
|
|
185
|
+
if constexpr (TP) {
|
|
186
|
+
if (MD::NLIM <= 32 && lane == 0) tape_put_u(limmask, 1, 0u);
|
|
187
|
+
}
|
|
188
|
+
#endif
|
|
189
|
+
const int nlim = nrow;
|
|
190
|
+
L2_MARK(4);
|
|
191
|
+
// CONTACT: per contact (lanes), its rows' first index from a scan over the contacts' row counts, and its first support item
|
|
192
|
+
int rowc = 0, itc = 0;
|
|
193
|
+
for (int c0 = 0; c0 < nc_w; c0 += 32) {
|
|
194
|
+
const int c = c0 + lane;
|
|
195
|
+
const int pr = c < nc_w ? o.cpair[c] : 0;
|
|
196
|
+
const int nr = c < nc_w ? (G14(PCondim, pr) == 1 ? 1 : 4) : 0;
|
|
197
|
+
const int nd = c < nc_w ? G14(SupOff, pr + 1) - G14(SupOff, pr) : 0;
|
|
198
|
+
int tot, toti;
|
|
199
|
+
const int off = warp_excl(nr, lane, &tot), offi = warp_excl(nd, lane, &toti);
|
|
200
|
+
if (c < nc_w) { o.crow0[c] = nlim + rowc + off; o.coff[c] = itc + offi; }
|
|
201
|
+
rowc += tot; itc += toti;
|
|
202
|
+
}
|
|
203
|
+
if (lane == 0) o.coff[nc_w] = itc;
|
|
204
|
+
__syncwarp();
|
|
205
|
+
L2_MARK(5);
|
|
206
|
+
const int nall = nlim + rowc;
|
|
207
|
+
ovf = ovf || nall > NR;
|
|
208
|
+
const int nr_w = nall < NR ? nall : NR;
|
|
209
|
+
// pass A, lanes over the (contact, slot) items (a contact's support slots spread over the warp, not one lane's loop): each
|
|
210
|
+
// item's Jacobian column from its signed entries, rotated into the contact frame, stored as the hand's CONJ entries
|
|
211
|
+
const int nitem = o.coff[nc_w];
|
|
212
|
+
for (int i = lane; i < nitem; i += 32) {
|
|
213
|
+
int lo = 0, hi = nc_w - 1; // the contact holding item i: the last c with coff[c] <= i
|
|
214
|
+
while (lo < hi) { const int mid = (lo + hi + 1) >> 1; if (o.coff[mid] <= i) lo = mid; else hi = mid - 1; }
|
|
215
|
+
const int c = lo, sl = i - o.coff[c];
|
|
216
|
+
const int pr = o.cpair[c], s0 = G14(SupOff, pr);
|
|
217
|
+
const T* p = o.cpos[c];
|
|
218
|
+
T fr[9];
|
|
219
|
+
{
|
|
220
|
+
V3<T> F3[3];
|
|
221
|
+
make_frame(V3<T>{o.cnt[c][0], o.cnt[c][1], o.cnt[c][2]}, V3<T>{o.cnt[c][3], o.cnt[c][4], o.cnt[c][5]}, F3);
|
|
222
|
+
for (int k = 0; k < 3; ++k) { fr[3 * k] = F3[k].x; fr[3 * k + 1] = F3[k].y; fr[3 * k + 2] = F3[k].z; }
|
|
223
|
+
}
|
|
224
|
+
T col[3] = {T(0), T(0), T(0)};
|
|
225
|
+
for (int k = G14(SentOff, s0 + sl); k < G14(SentOff, s0 + sl + 1); ++k) {
|
|
226
|
+
const int e = G14(SentE, k);
|
|
227
|
+
const T cf = T(G14(SentSign, k)) * ldv(V, MD::O_ECOEF + e);
|
|
228
|
+
if (G14(EKind, e) == 0) {
|
|
229
|
+
col[G14(EK, e)] += cf;
|
|
230
|
+
} else {
|
|
231
|
+
const int be = G14(EBody, e);
|
|
232
|
+
const T r[3] = {p[0] - s.xpos[be][0], p[1] - s.xpos[be][1], p[2] - s.xpos[be][2]};
|
|
233
|
+
T wr[3];
|
|
234
|
+
kp14::crs(s.eax[e], r, wr);
|
|
235
|
+
for (int q = 0; q < 3; ++q) col[q] += cf * wr[q];
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
for (int k = 0; k < 3; ++k) rec[HL.conJ + (c * 3 + k) * KD + sl] = fr[3 * k] * col[0] + fr[3 * k + 1] * col[1] + fr[3 * k + 2] * col[2];
|
|
239
|
+
}
|
|
240
|
+
__syncwarp(); // pass B reads the CONJ entries other lanes stored (the barrier orders the warp's global memory)
|
|
241
|
+
// pass B, lanes over contacts: the contact velocity in slot order from the stored entries (the same products and sums as one
|
|
242
|
+
// lane's loop), the support's dof bytes, the zero slots, the meta words and the rows
|
|
243
|
+
T mn = T(INFINITY);
|
|
244
|
+
for (int c = lane; c < nc_w; c += 32) {
|
|
245
|
+
const int pr = o.cpair[c], g1 = G14(PG1, pr), g2 = G14(PG2, pr);
|
|
246
|
+
const int b1 = G14(GBody, g1), b2 = G14(GBody, g2);
|
|
247
|
+
T vel[3] = {T(0), T(0), T(0)};
|
|
248
|
+
const int s0 = G14(SupOff, pr), s1 = G14(SupOff, pr + 1), nd = s1 - s0;
|
|
249
|
+
uint32_t dw[KD / 4];
|
|
250
|
+
for (int w = 0; w < KD / 4; ++w) dw[w] = 0xFFFFFFFFu;
|
|
251
|
+
for (int sl = 0; sl < nd; ++sl) {
|
|
252
|
+
const int dof = G14(SupDof, s0 + sl);
|
|
253
|
+
for (int k = 0; k < 3; ++k) {
|
|
254
|
+
const T j = rec[HL.conJ + (c * 3 + k) * KD + sl];
|
|
255
|
+
vel[k] += j * s.qvel[dof];
|
|
256
|
+
}
|
|
257
|
+
dw[sl / 4] = (dw[sl / 4] & ~(0xFFu << (8 * (sl % 4)))) | (static_cast<uint32_t>(dof) << (8 * (sl % 4)));
|
|
258
|
+
}
|
|
259
|
+
for (int k = 0; k < 3; ++k)
|
|
260
|
+
for (int sl = nd; sl < KD; ++sl) rec[HL.conJ + (c * 3 + k) * KD + sl] = T(0);
|
|
261
|
+
for (int w = 0; w < KD / 4; ++w) tape_put_u(rec, HL.condof + c * (KD / 4) + w, dw[w]);
|
|
262
|
+
const T* pv = V + MD::O_PAIR + 10 * pr;
|
|
263
|
+
const T mu0 = ldv(pv, 0), mu = mu0 < T(1e-5) ? T(1e-5) : mu0, margin = ldv(pv, 1);
|
|
264
|
+
const KBT<T> kb{ldv(pv, 3), ldv(pv, 4)};
|
|
265
|
+
const T imp5[5] = {ldv(pv, 5), ldv(pv, 6), ldv(pv, 7), ldv(pv, 8), ldv(pv, 9)};
|
|
266
|
+
const T tran = ldv(V, MD::O_BIW + 2 * b1) + ldv(V, MD::O_BIW + 2 * b2);
|
|
267
|
+
const int condim = G14(PCondim, pr), row0 = o.crow0[c];
|
|
268
|
+
const T dist = o.cdist[c];
|
|
269
|
+
const T imp = impedance<T, T>(imp5, dist, margin);
|
|
270
|
+
tape_put_u(rec, HL.conmeta + c, hand_conmeta(pr, o.cslot[c], condim, row0, nd));
|
|
271
|
+
rec[HL.conmu + c] = mu;
|
|
272
|
+
if (G14(GType, g1) != 0 && G14(GType, g2) != 0) {
|
|
273
|
+
const T v = dist + ldv(V, MD::O_GEOM + 15 * g1) + ldv(V, MD::O_GEOM + 15 * g2);
|
|
274
|
+
mn = v < mn ? v : mn;
|
|
275
|
+
}
|
|
276
|
+
if (condim == 1) {
|
|
277
|
+
if (row0 < NR) {
|
|
278
|
+
const T R = regularizer<T, T>(imp, tran), D = T(1) / R;
|
|
279
|
+
rec[HL.aref + row0] = reference_accel<T, T>(kb, imp, vel[0], dist, margin);
|
|
280
|
+
rec[HL.efcD + row0] = D;
|
|
281
|
+
tape_put_u(rec, HL.rowmeta + row0, hand_rowmeta(kHandRowFrictionless, c, 0, false));
|
|
282
|
+
}
|
|
283
|
+
} else {
|
|
284
|
+
const T dA = tran + mu * mu * tran;
|
|
285
|
+
const T R0 = regularizer<T, T>(imp, dA);
|
|
286
|
+
const T Rpy = pyramid_regularizer<T, T>(R0, mu, T(MD::IMPRATIO)), D = T(1) / Rpy;
|
|
287
|
+
int j = 0;
|
|
288
|
+
for (int k = 1; k < 3; ++k)
|
|
289
|
+
for (int sg = 0; sg < 2; ++sg, ++j) {
|
|
290
|
+
const int r = row0 + j;
|
|
291
|
+
if (r >= NR) continue;
|
|
292
|
+
const T v = vel[0] + (sg == 0 ? mu : -mu) * vel[k];
|
|
293
|
+
rec[HL.aref + r] = reference_accel<T, T>(kb, imp, v, dist, margin);
|
|
294
|
+
rec[HL.efcD + r] = D;
|
|
295
|
+
tape_put_u(rec, HL.rowmeta + r, hand_rowmeta(kHandRowPyramidal, c, j, false));
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
for (int x = 16; x > 0; x >>= 1) { const T y = __shfl_xor_sync(0xffffffffu, mn, x); mn = y < mn ? y : mn; }
|
|
300
|
+
L2_MARK(6);
|
|
301
|
+
// the smooth block (M went first) and the counts
|
|
302
|
+
for (int d = lane; d < MD::NV; d += 32) { rec[HL.qfrc + d] = s.qf[d]; rec[HL.qacc + d] = s.qa[d]; }
|
|
303
|
+
if (lane == 0) {
|
|
304
|
+
#if defined(D16_NV_GT64)
|
|
305
|
+
for (int k = 0; k < HL.n_clamp; ++k) tape_put_u(rec, HL.clamp + k, 0u);
|
|
306
|
+
#else
|
|
307
|
+
tape_put_u(rec, HL.clamp, 0u); tape_put_u(rec, HL.clamp + 1, 0u);
|
|
308
|
+
#endif
|
|
309
|
+
tape_put_u(rec, HL.counts, static_cast<uint32_t>(nc_w)); tape_put_u(rec, HL.counts + 1, static_cast<uint32_t>(nr_w));
|
|
310
|
+
tape_put_u(rec, HL.counts + 2, static_cast<uint32_t>(nlim)); tape_put_u(rec, HL.counts + 3, ovf ? 1u : 0u);
|
|
311
|
+
rec[HL.min_nu] = mn;
|
|
312
|
+
if (nefc_out) *nefc_out = nr_w;
|
|
313
|
+
}
|
|
314
|
+
L2_MARK(7);
|
|
315
|
+
#undef L2_MARK
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
} // namespace l2x14
|
|
319
|
+
} // namespace d16
|