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,134 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
// D16 14x adjoint (engine C, 2026-11-03; tools/d16_x14adj/PLAN.md "rows14", contacts): the reverse of the 14x's plane-ellipsoid
|
|
3
|
+
// contact (core/soft/x14/collide14.h plane_ellipsoid, MuJoCo 3.16's mjc_PlaneConvex with mjc_ellipsoidSupport), and the map of a
|
|
4
|
+
// geom's pose cotangent to its body's.
|
|
5
|
+
// The forward (collide14.h's operations in its order): dir = -n (n the plane's normal), ld = R' dir, w = S ld (S = diag(size)),
|
|
6
|
+
// the local support point u = S w / |w| (|w|^2 < mjMINVAL^2: u = size0 e0), v = R u + xg, dist = n . (v - p1), pos = v - n dist / 2.
|
|
7
|
+
// The contact's frame is make_frame(n, 0): the static plane's normal only, so its cotangent does not reach the geom's pose and is
|
|
8
|
+
// not an input here; nor is the plane's pose (the static world floor). With S, R, n held:
|
|
9
|
+
// v_bar = pos_bar + n (dist_bar - (n . pos_bar) / 2)
|
|
10
|
+
// xg_bar += v_bar
|
|
11
|
+
// rg_bar += (R u) x v_bar + g x dir, g = R Jf R' v_bar, Jf = S (I - w^ w^') S / |w| (w^ = w / |w|; du = Jf d ld)
|
|
12
|
+
// for the geom's pose in the world left-increment chart about its centre: xg <- xg + dx, R <- exp([dphi]x) R, so
|
|
13
|
+
// delta L = xg_bar . dx + rg_bar . dphi. The second rotation term is the support point sliding on the surface as the geom turns;
|
|
14
|
+
// Jf R' dir = 0 (the support's stationarity), so it is invisible to dist_bar alone and only pos_bar's tangential part sees it.
|
|
15
|
+
// geom_to_body_wrench maps a rigidly attached geom's (xg_bar, rg_bar) to its body's pose cotangent in the same chart about the
|
|
16
|
+
// body's origin xb: xb_bar += xg_bar, rb_bar += rg_bar + (xg - xb) x xg_bar (rows_adj.h's geom -> body rule).
|
|
17
|
+
// The model is read only from the value array V (gen14.py's O_GEOM: per geom size 3, pos 3, R 9 row-major) and the generated
|
|
18
|
+
// tables (X14T: PG1, PG2, GType, GBody). Outputs ACCUMULATE. The generated model header must be included and D16_X14_NS defined
|
|
19
|
+
// first. Test hook (gate builds only): -DX14ADJ_PLANT=2 drops the support point's rotation dependence (the g x dir term).
|
|
20
|
+
#include <cassert> // JS_DEVICE_ASSERT is assert() outside the device pass
|
|
21
|
+
#include "diffneusim/macros.h"
|
|
22
|
+
#include "../../math/so3.h"
|
|
23
|
+
|
|
24
|
+
#ifndef D16_X14_NS
|
|
25
|
+
#error "include the generated 14x model header and define D16_X14_NS before collide14_adj.h"
|
|
26
|
+
#endif
|
|
27
|
+
#ifndef X14ADJ_PLANT
|
|
28
|
+
#define X14ADJ_PLANT 0
|
|
29
|
+
#endif
|
|
30
|
+
|
|
31
|
+
namespace d16 {
|
|
32
|
+
namespace x14adj {
|
|
33
|
+
namespace MD = D16_X14_NS;
|
|
34
|
+
|
|
35
|
+
#ifndef X14T
|
|
36
|
+
#ifdef __CUDA_ARCH__
|
|
37
|
+
#define X14T(name) MD::c##name
|
|
38
|
+
#else
|
|
39
|
+
#define X14T(name) MD::k##name
|
|
40
|
+
#endif
|
|
41
|
+
#endif
|
|
42
|
+
|
|
43
|
+
template <class T> DN_HOST_DEVICE inline void x14_cross(const T* a, const T* b, T* o) {
|
|
44
|
+
const T x = a[1] * b[2] - a[2] * b[1], y = a[2] * b[0] - a[0] * b[2], z = a[0] * b[1] - a[1] * b[0];
|
|
45
|
+
o[0] = x; o[1] = y; o[2] = z;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// the ellipsoid's support point along dir = -n (mjc_ellipsoidSupport as collide14.h computes it): the local point u, w = S R' dir and
|
|
49
|
+
// 1 / |w|; returns false in the degenerate branch (|w|^2 < mjMINVAL^2: u = size0 e0, w and inv unset)
|
|
50
|
+
template <class T>
|
|
51
|
+
DN_HOST_DEVICE inline bool plane_ellipsoid_support(const T* n, const T* R, const T* size, T* u, T* w, T* inv) {
|
|
52
|
+
using js::so3::js_sqrt;
|
|
53
|
+
const T dir[3] = {T(0) - n[0], T(0) - n[1], T(0) - n[2]};
|
|
54
|
+
const T ld[3] = {R[0] * dir[0] + R[3] * dir[1] + R[6] * dir[2], R[1] * dir[0] + R[4] * dir[1] + R[7] * dir[2],
|
|
55
|
+
R[2] * dir[0] + R[5] * dir[1] + R[8] * dir[2]};
|
|
56
|
+
for (int k = 0; k < 3; ++k) w[k] = ld[k] * size[k];
|
|
57
|
+
const T norm2 = w[0] * w[0] + w[1] * w[1] + w[2] * w[2];
|
|
58
|
+
if (norm2 < T(1e-15) * T(1e-15)) { u[0] = size[0]; u[1] = T(0); u[2] = T(0); return false; }
|
|
59
|
+
*inv = T(1) / js_sqrt(norm2);
|
|
60
|
+
for (int k = 0; k < 3; ++k) u[k] = w[k] * *inv * size[k];
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// the forward: dist and pos of the contact (no margin test: the caller's contact exists). n, p1: the plane's normal and position
|
|
65
|
+
template <class T>
|
|
66
|
+
DN_HOST_DEVICE void plane_ellipsoid_fwd(const T* n, const T* p1, const T* xg, const T* R, const T* size, T* dist, T* pos) {
|
|
67
|
+
T u[3], w[3], inv;
|
|
68
|
+
plane_ellipsoid_support(n, R, size, u, w, &inv);
|
|
69
|
+
T v[3];
|
|
70
|
+
for (int i = 0; i < 3; ++i) v[i] = R[3 * i] * u[0] + R[3 * i + 1] * u[1] + R[3 * i + 2] * u[2] + xg[i];
|
|
71
|
+
const T d = n[0] * (v[0] - p1[0]) + n[1] * (v[1] - p1[1]) + n[2] * (v[2] - p1[2]);
|
|
72
|
+
const T h = T(-0.5) * d;
|
|
73
|
+
*dist = d;
|
|
74
|
+
for (int i = 0; i < 3; ++i) pos[i] = v[i] + n[i] * h;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// the reverse: (dist_bar, pos_bar) -> the ellipsoid's world pose cotangent, xg_bar [3] and rg_bar [3] (+=)
|
|
78
|
+
template <class T>
|
|
79
|
+
DN_HOST_DEVICE void plane_ellipsoid_vjp(const T* n, const T* R, const T* size, T dist_bar, const T* pos_bar, T* xg_bar,
|
|
80
|
+
T* rg_bar) {
|
|
81
|
+
T u[3], w[3], inv;
|
|
82
|
+
const bool regular = plane_ellipsoid_support(n, R, size, u, w, &inv);
|
|
83
|
+
const T np = n[0] * pos_bar[0] + n[1] * pos_bar[1] + n[2] * pos_bar[2];
|
|
84
|
+
const T c = dist_bar - T(0.5) * np;
|
|
85
|
+
T vb[3];
|
|
86
|
+
for (int i = 0; i < 3; ++i) { vb[i] = pos_bar[i] + n[i] * c; xg_bar[i] = xg_bar[i] + vb[i]; }
|
|
87
|
+
// the rigid term: v - xg = R u turns with the geom
|
|
88
|
+
T ru[3], t[3];
|
|
89
|
+
for (int i = 0; i < 3; ++i) ru[i] = R[3 * i] * u[0] + R[3 * i + 1] * u[1] + R[3 * i + 2] * u[2];
|
|
90
|
+
x14_cross(ru, vb, t);
|
|
91
|
+
for (int i = 0; i < 3; ++i) rg_bar[i] = rg_bar[i] + t[i];
|
|
92
|
+
if (!regular || X14ADJ_PLANT == 2) return; // the degenerate branch's u is constant
|
|
93
|
+
// the support's term: d ld = R' (dir x dphi), du = Jf d ld
|
|
94
|
+
T b[3], cs[3], gl[3], g[3];
|
|
95
|
+
for (int k = 0; k < 3; ++k) b[k] = R[k] * vb[0] + R[3 + k] * vb[1] + R[6 + k] * vb[2]; // R' v_bar
|
|
96
|
+
for (int k = 0; k < 3; ++k) cs[k] = size[k] * b[k];
|
|
97
|
+
const T wc = (w[0] * cs[0] + w[1] * cs[1] + w[2] * cs[2]) * inv * inv; // (w^ . S b) / |w|
|
|
98
|
+
for (int k = 0; k < 3; ++k) gl[k] = size[k] * (cs[k] - w[k] * wc) * inv;
|
|
99
|
+
for (int i = 0; i < 3; ++i) g[i] = R[3 * i] * gl[0] + R[3 * i + 1] * gl[1] + R[3 * i + 2] * gl[2];
|
|
100
|
+
const T dir[3] = {T(0) - n[0], T(0) - n[1], T(0) - n[2]};
|
|
101
|
+
x14_cross(g, dir, t);
|
|
102
|
+
for (int i = 0; i < 3; ++i) rg_bar[i] = rg_bar[i] + t[i];
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// the model's pair pr (plane g1 = PG1[pr], the world floor; ellipsoid g2 = PG2[pr]); xg, R: the ellipsoid's world pose
|
|
106
|
+
template <class T>
|
|
107
|
+
DN_HOST_DEVICE void collide14_plane_ellipsoid(const T* V, int pr, const T* xg, const T* R, T* dist, T* pos) {
|
|
108
|
+
const int g1 = X14T(PG1)[pr], g2 = X14T(PG2)[pr];
|
|
109
|
+
JS_DEVICE_ASSERT(X14T(GType)[g1] == 0 && X14T(GBody)[g1] == 0 && X14T(GType)[g2] == 4 && "a floor-ellipsoid pair");
|
|
110
|
+
const T* pg = V + MD::O_GEOM + 15 * g1; // the floor's world pose is its local pose (body 0)
|
|
111
|
+
const T n[3] = {pg[6 + 2], pg[6 + 5], pg[6 + 8]};
|
|
112
|
+
plane_ellipsoid_fwd(n, pg + 3, xg, R, V + MD::O_GEOM + 15 * g2, dist, pos);
|
|
113
|
+
}
|
|
114
|
+
template <class T>
|
|
115
|
+
DN_HOST_DEVICE void collide14_plane_ellipsoid_vjp(const T* V, int pr, const T* R, T dist_bar, const T* pos_bar, T* xg_bar,
|
|
116
|
+
T* rg_bar) {
|
|
117
|
+
const int g1 = X14T(PG1)[pr], g2 = X14T(PG2)[pr];
|
|
118
|
+
JS_DEVICE_ASSERT(X14T(GType)[g1] == 0 && X14T(GBody)[g1] == 0 && X14T(GType)[g2] == 4 && "a floor-ellipsoid pair");
|
|
119
|
+
const T* pg = V + MD::O_GEOM + 15 * g1;
|
|
120
|
+
const T n[3] = {pg[6 + 2], pg[6 + 5], pg[6 + 8]};
|
|
121
|
+
plane_ellipsoid_vjp(n, R, V + MD::O_GEOM + 15 * g2, dist_bar, pos_bar, xg_bar, rg_bar);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// a geom rigidly attached to body b (geom centre xg, body origin xb): its pose cotangent (xg_bar, rg_bar) to the body's (+=)
|
|
125
|
+
template <class T>
|
|
126
|
+
DN_HOST_DEVICE void geom_to_body_wrench(const T* xg, const T* xb, const T* xg_bar, const T* rg_bar, T* xb_bar, T* rb_bar) {
|
|
127
|
+
const T r[3] = {xg[0] - xb[0], xg[1] - xb[1], xg[2] - xb[2]};
|
|
128
|
+
T t[3];
|
|
129
|
+
x14_cross(r, xg_bar, t);
|
|
130
|
+
for (int i = 0; i < 3; ++i) { xb_bar[i] = xb_bar[i] + xg_bar[i]; rb_bar[i] = rb_bar[i] + rg_bar[i] + t[i]; }
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
} // namespace x14adj
|
|
134
|
+
} // namespace d16
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
// D16 14x adjoint (engine C, 2026-11-03; tools/d16_x14adj/PLAN.md "passive14"): the passive force of the 14x soft law and its
|
|
3
|
+
// reverse, d/d(q, v) [lam' passive(q, v)], for the reverse of one substep (the IFT's theta = (q, v) term).
|
|
4
|
+
// passive is law14.h's passive() and kp14.cuh's PAS phase, in the same order of operations:
|
|
5
|
+
// -D v (explicit damping); the two toe springs -k (q - rest); the two hips' ball_rom (intrinsic Z-X'-Y'' angles of the ball's
|
|
6
|
+
// local rotation by atan2, the map E (theta_dot = E w), an exponential spring past each bound (limexp) and a damper gated by
|
|
7
|
+
// srelu', mapped back by E').
|
|
8
|
+
// The reverse: the damping and the springs in closed form; each ball_rom by a 6-direction forward-mode Dual (core/diff/dual.h)
|
|
9
|
+
// on (the ball's 3 tangent rotations, its 3 body-frame angular velocity components). Exact to roundoff, no hand derivation.
|
|
10
|
+
// Tangent coordinates (jvp14.h seed_q14): a ball's q tangent is its body-frame rotation, quat <- quat (x) exp(delta / 2), at the
|
|
11
|
+
// ball's dadr; an independent hinge's is additive at its dadr. The springs act on independent hinges (spring dof = the hinge's
|
|
12
|
+
// dadr, checked on the host by the gate, tools/d16_x14adj/passive14_gate.py).
|
|
13
|
+
// The model is read only from the value array V (gen14.py's kValues layout: O_DAMP, O_SPRING (k, rest), O_ROM (lo 3, hi 3,
|
|
14
|
+
// d_lim 3, exp_a, exp_w, beta)) and the generated tables (k* on the host, c* on the device, through X14T). Outputs ACCUMULATE.
|
|
15
|
+
// The generated model header must be included and D16_X14_NS defined first (as for kp14.cuh).
|
|
16
|
+
// Test hook (gate builds only): -DX14ADJ_PLANT=1 drops the ball_rom's velocity (srelu damping) term from the VJP's Dual.
|
|
17
|
+
#include "diffneusim/macros.h"
|
|
18
|
+
#include "../../diff/dual.h"
|
|
19
|
+
#include "../../math/so3.h"
|
|
20
|
+
|
|
21
|
+
#ifndef D16_X14_NS
|
|
22
|
+
#error "include the generated 14x model header and define D16_X14_NS before passive14_adj.h"
|
|
23
|
+
#endif
|
|
24
|
+
#ifndef X14ADJ_PLANT
|
|
25
|
+
#define X14ADJ_PLANT 0
|
|
26
|
+
#endif
|
|
27
|
+
|
|
28
|
+
namespace d16 {
|
|
29
|
+
namespace x14adj {
|
|
30
|
+
namespace MD = D16_X14_NS;
|
|
31
|
+
|
|
32
|
+
// a generated table: the __constant__ copy on the device, the constexpr one on the host
|
|
33
|
+
#ifndef X14T
|
|
34
|
+
#ifdef __CUDA_ARCH__
|
|
35
|
+
#define X14T(name) MD::c##name
|
|
36
|
+
#else
|
|
37
|
+
#define X14T(name) MD::k##name
|
|
38
|
+
#endif
|
|
39
|
+
#endif
|
|
40
|
+
|
|
41
|
+
// the value of a scalar or a Dual (branches dispatch on the value, as every Dual comparison in dual.h)
|
|
42
|
+
template <class T> DN_HOST_DEVICE inline T x14val(T x) { return x; }
|
|
43
|
+
template <class T, int N> DN_HOST_DEVICE inline T x14val(const js::diff::Dual<T, N>& x) { return x.v; }
|
|
44
|
+
|
|
45
|
+
// mju_mulQuat (kin.h quat_mul, kp14 qmul)
|
|
46
|
+
template <class S> DN_HOST_DEVICE inline void x14_qmul(const S* a, const S* b, S* o) {
|
|
47
|
+
const S w = a[0] * b[0] - a[1] * b[1] - a[2] * b[2] - a[3] * b[3];
|
|
48
|
+
const S x = a[0] * b[1] + a[1] * b[0] + a[2] * b[3] - a[3] * b[2];
|
|
49
|
+
const S y = a[0] * b[2] - a[1] * b[3] + a[2] * b[0] + a[3] * b[1];
|
|
50
|
+
const S z = a[0] * b[3] + a[1] * b[2] - a[2] * b[1] + a[3] * b[0];
|
|
51
|
+
o[0] = w; o[1] = x; o[2] = y; o[3] = z;
|
|
52
|
+
}
|
|
53
|
+
// mju_normalize4 (kin.h quat_normalize, kp14 qnorm): rescale only if |norm - 1| > mjMINVAL
|
|
54
|
+
template <class T, class S> DN_HOST_DEVICE inline void x14_qnorm(S* q) {
|
|
55
|
+
using js::so3::js_sqrt;
|
|
56
|
+
const S n = js_sqrt(q[0] * q[0] + q[1] * q[1] + q[2] * q[2] + q[3] * q[3]);
|
|
57
|
+
if (x14val(n) < T(1e-15)) { q[0] = S(T(1)); q[1] = q[2] = q[3] = S(T(0)); return; }
|
|
58
|
+
const T d = x14val(n) - T(1);
|
|
59
|
+
if (d > T(1e-15) || d < -T(1e-15)) { const S inv = T(1) / n; for (int k = 0; k < 4; ++k) q[k] = q[k] * inv; }
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// law14.h limexp / srelu_d (kp14's): a exp(x / w) up to x / w = 12, linear past it; srelu' = (1 + x / sqrt(x^2 + b^2)) / 2
|
|
63
|
+
template <class T, class S> DN_HOST_DEVICE inline S x14_limexp(S x, T a, T w) {
|
|
64
|
+
using js::so3::js_exp;
|
|
65
|
+
const S u = x / w;
|
|
66
|
+
if (x14val(u) <= T(12)) return a * js_exp(u);
|
|
67
|
+
return a * js_exp(T(12)) * (T(1) + (u - T(12)));
|
|
68
|
+
}
|
|
69
|
+
template <class T, class S> DN_HOST_DEVICE inline S x14_srelu_d(S x, T b) {
|
|
70
|
+
using js::so3::js_sqrt;
|
|
71
|
+
return T(0.5) * (T(1) + x / js_sqrt(x * x + b * b));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// one ball_rom's generalized force, ADDED into tau[3] (the ball's dofs): rv = V + O_ROM + 12 r, quat (wxyz, not necessarily
|
|
75
|
+
// unit: normalized here), om the ball's body-frame angular velocity. S = T (the forward) or Dual<T, N> (the VJP).
|
|
76
|
+
// kDamp = false drops the velocity term (the planted-bug control only).
|
|
77
|
+
template <class T, class S, bool kDamp = true>
|
|
78
|
+
DN_HOST_DEVICE inline void x14_ball_rom_eval(const T* rv, const S* quat, const S* om, S* tau) {
|
|
79
|
+
using js::so3::js_atan2; using js::so3::js_sqrt; using js::so3::js_sin; using js::so3::js_cos;
|
|
80
|
+
S q[4] = {quat[0], quat[1], quat[2], quat[3]};
|
|
81
|
+
x14_qnorm<T>(q);
|
|
82
|
+
const S w = q[0], x = q[1], y = q[2], z = q[3];
|
|
83
|
+
const S R01 = T(2) * (x * y - w * z), R11 = T(1) - T(2) * (x * x + z * z), R20 = T(2) * (x * z - w * y);
|
|
84
|
+
const S R21 = T(2) * (y * z + w * x), R22 = T(1) - T(2) * (x * x + y * y);
|
|
85
|
+
const S th[3] = {js_atan2(-R01, R11), js_atan2(R21, js_sqrt(R01 * R01 + R11 * R11)), js_atan2(-R20, R22)}; // flexion, adduction, rotation
|
|
86
|
+
const S sa = js_sin(th[1]), ca = js_cos(th[1]), sr = js_sin(th[2]), cr = js_cos(th[2]);
|
|
87
|
+
const S zero = S(T(0)), one = S(T(1));
|
|
88
|
+
const S E[9] = {-sr / ca, zero, cr / ca, cr, zero, sr, sa * sr / ca, one, -sa * cr / ca};
|
|
89
|
+
S sk[3];
|
|
90
|
+
for (int k = 0; k < 3; ++k) {
|
|
91
|
+
const S dlo = rv[k] - th[k], dhi = th[k] - rv[3 + k];
|
|
92
|
+
const S spring = x14_limexp(dlo, rv[9], rv[10]) - x14_limexp(dhi, rv[9], rv[10]);
|
|
93
|
+
if (kDamp) {
|
|
94
|
+
const S thd = E[3 * k] * om[0] + E[3 * k + 1] * om[1] + E[3 * k + 2] * om[2];
|
|
95
|
+
const S eng = x14_srelu_d(dlo, rv[11]) + x14_srelu_d(dhi, rv[11]);
|
|
96
|
+
sk[k] = spring - rv[6 + k] * thd * eng;
|
|
97
|
+
} else {
|
|
98
|
+
sk[k] = spring;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
for (int i = 0; i < 3; ++i) tau[i] = tau[i] + E[i] * sk[0] + E[3 + i] * sk[1] + E[6 + i] * sk[2];
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// --- the forward (gates: law14.h passive(), kp14's PAS). out [NV] += passive(q, v)
|
|
105
|
+
template <class T> DN_HOST_DEVICE void passive14_damp_spring(const T* V, const T* q, const T* v, T* out) {
|
|
106
|
+
for (int i = 0; i < MD::NV; ++i) out[i] = out[i] + (-V[MD::O_DAMP + i] * v[i]);
|
|
107
|
+
for (int k = 0; k < MD::NSPRING; ++k) {
|
|
108
|
+
const int d = X14T(SpDof)[k];
|
|
109
|
+
out[d] = out[d] - V[MD::O_SPRING + 2 * k] * (q[X14T(SpQadr)[k]] - V[MD::O_SPRING + 2 * k + 1]);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
template <class T> DN_HOST_DEVICE void ball_rom14(const T* V, int r, const T* q, const T* v, T* out) {
|
|
113
|
+
const int qa = X14T(RomQadr)[r], da = X14T(RomDadr)[r];
|
|
114
|
+
x14_ball_rom_eval<T, T>(V + MD::O_ROM + 12 * r, q + qa, v + da, out + da);
|
|
115
|
+
}
|
|
116
|
+
template <class T> DN_HOST_DEVICE void passive14(const T* V, const T* q, const T* v, T* out) {
|
|
117
|
+
passive14_damp_spring(V, q, v, out);
|
|
118
|
+
for (int r = 0; r < MD::NROM; ++r) ball_rom14(V, r, q, v, out);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// --- the reverse. q_bar_tan [NV] (the tangent chart), v_bar [NV] += d/d(q_tan, v) [lam' passive(q, v)]
|
|
122
|
+
// the damping and the springs (closed form)
|
|
123
|
+
template <class T>
|
|
124
|
+
DN_HOST_DEVICE void passive14_damp_spring_vjp(const T* V, const T* lam, T* q_bar_tan, T* v_bar) {
|
|
125
|
+
for (int i = 0; i < MD::NV; ++i) v_bar[i] = v_bar[i] - V[MD::O_DAMP + i] * lam[i];
|
|
126
|
+
for (int k = 0; k < MD::NSPRING; ++k) {
|
|
127
|
+
const int d = X14T(SpDof)[k]; // = the spring's hinge's tangent index (an independent hinge: its dadr)
|
|
128
|
+
q_bar_tan[d] = q_bar_tan[d] - V[MD::O_SPRING + 2 * k] * lam[d];
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
// ball_rom r: a Dual over (the ball's tangent rotations 0..2, its omega 3..5); quat's tangent d quat = quat (x) (0, e_k) / 2
|
|
132
|
+
// (seed_q14's), then normalized inside as the forward does
|
|
133
|
+
template <class T>
|
|
134
|
+
DN_HOST_DEVICE void ball_rom14_vjp(const T* V, int r, const T* q, const T* v, const T* lam, T* q_bar_tan, T* v_bar) {
|
|
135
|
+
using D = js::diff::Dual<T, 6>;
|
|
136
|
+
const int qa = X14T(RomQadr)[r], da = X14T(RomDadr)[r];
|
|
137
|
+
const T q0[4] = {q[qa], q[qa + 1], q[qa + 2], q[qa + 3]};
|
|
138
|
+
D qd[4], om[3], tau[3];
|
|
139
|
+
for (int j = 0; j < 4; ++j) qd[j] = D(q0[j]);
|
|
140
|
+
for (int k = 0; k < 3; ++k) {
|
|
141
|
+
T dl[4] = {T(0), T(0), T(0), T(0)}, rr[4];
|
|
142
|
+
dl[1 + k] = T(1);
|
|
143
|
+
x14_qmul(q0, dl, rr);
|
|
144
|
+
for (int j = 0; j < 4; ++j) qd[j].d[k] = T(0.5) * rr[j];
|
|
145
|
+
}
|
|
146
|
+
for (int k = 0; k < 3; ++k) { om[k] = D(v[da + k]); om[k].d[3 + k] = T(1); tau[k] = D(T(0)); }
|
|
147
|
+
x14_ball_rom_eval<T, D, X14ADJ_PLANT != 1>(V + MD::O_ROM + 12 * r, qd, om, tau);
|
|
148
|
+
for (int k = 0; k < 3; ++k) {
|
|
149
|
+
T gq = T(0), gv = T(0);
|
|
150
|
+
for (int i = 0; i < 3; ++i) { gq = gq + lam[da + i] * tau[i].d[k]; gv = gv + lam[da + i] * tau[i].d[3 + k]; }
|
|
151
|
+
q_bar_tan[da + k] = q_bar_tan[da + k] + gq;
|
|
152
|
+
v_bar[da + k] = v_bar[da + k] + gv;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
template <class T>
|
|
156
|
+
DN_HOST_DEVICE void passive14_vjp(const T* V, const T* q, const T* v, const T* lam, T* q_bar_tan, T* v_bar) {
|
|
157
|
+
passive14_damp_spring_vjp(V, lam, q_bar_tan, v_bar);
|
|
158
|
+
for (int r = 0; r < MD::NROM; ++r) ball_rom14_vjp(V, r, q, v, lam, q_bar_tan, v_bar);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
} // namespace x14adj
|
|
162
|
+
} // namespace d16
|