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,425 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
// D16 adjoint, the contact-free reverse half (d5, 2026-11-02; B's tools/d16_adj/INTERFACE.md "Revision of the slot",
|
|
3
|
+
// preregistered in tools/d16_adj_rnea/PREREG.md):
|
|
4
|
+
// adj_rnea adds coef * d/d(q tangent, v) of s = seed' RNEA(q, v, acc) (RNEA = M(q) acc + qfrc_bias(q, v))
|
|
5
|
+
// adj_fk_pullback adds the pull-back of world body-origin cotangents and world rotation-vector cotangents through fk
|
|
6
|
+
// in core/soft/kin.h's world-frame formulation and MuJoCo's coordinates. The q tangent is: root world translation, root
|
|
7
|
+
// body-frame rotation (quat <- quat (x) exp(d / 2)), hinges in dof order; v is qvel (v_world, w_body, hinges).
|
|
8
|
+
//
|
|
9
|
+
// seed' RNEA = sum_b f_b . vc~_b + n_b . w~_b: kin.h's Newton-Euler forces f_b = m a_com, n_b = I al + w x I w against body
|
|
10
|
+
// b's COM and angular velocity under the virtual joint velocity `seed` (the virtual power). The reverse runs level-parallel
|
|
11
|
+
// over the tree with lane = body. Rotation cotangents are world rotation-vector cotangents tau (the moment about the body
|
|
12
|
+
// origin): a hinge's q_bar = a . tau, the root's (xpos_bar, R' tau). Children hand their parent one message each (21 words);
|
|
13
|
+
// a parent sums its children in increasing body index, so the sums are deterministic with no atomics or float shuffles.
|
|
14
|
+
//
|
|
15
|
+
// Every phase is an ADJ_LANES block: on the device lane = threadIdx.x & 31 followed by __syncwarp(); on the host a loop over
|
|
16
|
+
// the 32 lanes. No phase reads what another lane writes in the same phase, so the host loop is exact and the same template
|
|
17
|
+
// is gated on the CPU (tools/d16_adj_rnea/gate.py). Per-lane values that live across phases are LANEA / LANE1 variables: one
|
|
18
|
+
// register set per thread on the device, one array slot per lane on the host.
|
|
19
|
+
#include <type_traits>
|
|
20
|
+
|
|
21
|
+
#include "../kin.h"
|
|
22
|
+
#if defined(__CUDACC__)
|
|
23
|
+
#include "../gpu/fk_rn.cuh"
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
namespace js::soft::adj {
|
|
27
|
+
|
|
28
|
+
constexpr int kNB = 32; // bodies, one per lane (the G1 law: 32 with the world and the terrain)
|
|
29
|
+
constexpr int kMsg = 21; // child -> parent message: xpos_bar 3, tau 3, w_bar, al_bar, ao_bar, wt_bar, vot_bar 3 each
|
|
30
|
+
constexpr int kPub = 22; // parent -> child values: xquat 4, xpos 3, w, al, ao, wt, vot 3 each
|
|
31
|
+
constexpr int kSlot = 22; // scratch words per body (max of the two; the reverse reuses the forward's slots)
|
|
32
|
+
|
|
33
|
+
// ADJ_PROF (section timers, tools/d16_adj_rnea/g3.cu's profiling build only): the first active lane of a phase writes clock64
|
|
34
|
+
// stamps into prof[]; per call 2 + 10 per level: forward (phase start, pose, velocities, COM / inertia, published), reverse
|
|
35
|
+
// (phase start, children summed, own terms, recursion / message), and the end.
|
|
36
|
+
constexpr int kProf = 128;
|
|
37
|
+
#if defined(ADJ_PROF) && defined(__CUDA_ARCH__)
|
|
38
|
+
#define ADJ_LEAD(cond) const int adj_lead_ = __ffs(__ballot_sync(0xffffffffu, (cond))) - 1
|
|
39
|
+
#define ADJ_TS(idx) do { if (prof && lane == adj_lead_) prof[(idx)] = clock64(); } while (0)
|
|
40
|
+
#else
|
|
41
|
+
#define ADJ_LEAD(cond) do {} while (0)
|
|
42
|
+
#define ADJ_TS(idx) do {} while (0)
|
|
43
|
+
#endif
|
|
44
|
+
|
|
45
|
+
#if defined(__CUDA_ARCH__)
|
|
46
|
+
#define ADJ_LANES(lane) for (int lane = static_cast<int>(threadIdx.x & 31u), adj_once_ = 1; adj_once_; adj_once_ = 0, __syncwarp())
|
|
47
|
+
#define LANEA(T, name, n) T name[n]
|
|
48
|
+
#define LANE1(T, name) T name
|
|
49
|
+
#define LV(name) name
|
|
50
|
+
#else
|
|
51
|
+
#define ADJ_LANES(lane) for (int lane = 0; lane < 32; ++lane)
|
|
52
|
+
#define LANEA(T, name, n) T name[32][n]
|
|
53
|
+
#define LANE1(T, name) T name[32]
|
|
54
|
+
#define LV(name) name[lane]
|
|
55
|
+
#endif
|
|
56
|
+
|
|
57
|
+
// The model as the functions read it, through an accessor (Tab): nb(), maxdepth(), parent / jnt / qadr / dadr / depth (b),
|
|
58
|
+
// nchild(b), child(b, i) in increasing index, pos / quat / ipos / iquat / inertia / axis (b) -> const S*, mass(b), gravity(k).
|
|
59
|
+
// The device uses the generated tables (core/soft/gpu/adj_tab.cuh); the host gate uses BodyTable through HostTab. Bodies in
|
|
60
|
+
// topological order (parent < body), body 0 the world, depth(0) = 0.
|
|
61
|
+
template <class S> struct BodyTable {
|
|
62
|
+
int nb = 0, maxdepth = 0;
|
|
63
|
+
int parent[kNB], jnt[kNB], qadr[kNB], dadr[kNB], depth[kNB], nchild[kNB], child[kNB][kNB];
|
|
64
|
+
S pos[kNB][3], quat[kNB][4], ipos[kNB][3], iquat[kNB][4], mass[kNB], inertia[kNB][3], axis[kNB][3];
|
|
65
|
+
S gravity[3];
|
|
66
|
+
};
|
|
67
|
+
template <class S> struct HostTab {
|
|
68
|
+
const BodyTable<S>* t;
|
|
69
|
+
DN_HOST_DEVICE int nb() const { return t->nb; }
|
|
70
|
+
DN_HOST_DEVICE int maxdepth() const { return t->maxdepth; }
|
|
71
|
+
DN_HOST_DEVICE int parent(int b) const { return t->parent[b]; }
|
|
72
|
+
DN_HOST_DEVICE int jnt(int b) const { return t->jnt[b]; }
|
|
73
|
+
DN_HOST_DEVICE int qadr(int b) const { return t->qadr[b]; }
|
|
74
|
+
DN_HOST_DEVICE int dadr(int b) const { return t->dadr[b]; }
|
|
75
|
+
DN_HOST_DEVICE int depth(int b) const { return t->depth[b]; }
|
|
76
|
+
DN_HOST_DEVICE int nchild(int b) const { return t->nchild[b]; }
|
|
77
|
+
DN_HOST_DEVICE int child(int b, int i) const { return t->child[b][i]; }
|
|
78
|
+
DN_HOST_DEVICE const S* pos(int b) const { return t->pos[b]; }
|
|
79
|
+
DN_HOST_DEVICE const S* quat(int b) const { return t->quat[b]; }
|
|
80
|
+
DN_HOST_DEVICE const S* ipos(int b) const { return t->ipos[b]; }
|
|
81
|
+
DN_HOST_DEVICE const S* iquat(int b) const { return t->iquat[b]; }
|
|
82
|
+
DN_HOST_DEVICE const S* inertia(int b) const { return t->inertia[b]; }
|
|
83
|
+
DN_HOST_DEVICE const S* axis(int b) const { return t->axis[b]; }
|
|
84
|
+
DN_HOST_DEVICE S mass(int b) const { return t->mass[b]; }
|
|
85
|
+
DN_HOST_DEVICE S gravity(int k) const { return t->gravity[k]; }
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
template <class S> DN_HOST_DEVICE inline void add3(S* a, const S* b) { a[0] = a[0] + b[0]; a[1] = a[1] + b[1]; a[2] = a[2] + b[2]; }
|
|
89
|
+
template <class S> DN_HOST_DEVICE inline S dot3(const S* a, const S* b) { return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; }
|
|
90
|
+
template <class S> DN_HOST_DEVICE inline void mat_tvec(const S* R, const S* v, S* r) { // r = R' v
|
|
91
|
+
for (int i = 0; i < 3; ++i) r[i] = R[i] * v[0] + R[3 + i] * v[1] + R[6 + i] * v[2];
|
|
92
|
+
}
|
|
93
|
+
// I = X diag(d) X' (X row-major), the world inertia as kin.h forms it
|
|
94
|
+
template <class S> DN_HOST_DEVICE inline void world_inertia(const S* X, const S* d, S* I) {
|
|
95
|
+
for (int i = 0; i < 3; ++i)
|
|
96
|
+
for (int j = 0; j < 3; ++j) {
|
|
97
|
+
S s = S(0);
|
|
98
|
+
for (int k = 0; k < 3; ++k) s = s + X[3 * i + k] * d[k] * X[3 * j + k];
|
|
99
|
+
I[3 * i + j] = s;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// The per-body kinematic forward from the parent's published (xquat, xpos): xquat, xpos, R, r = R_p pos (non-root), a.
|
|
104
|
+
template <class S, class Tab>
|
|
105
|
+
DN_HOST_DEVICE inline void body_kin(const Tab& B, int b, const S* q, const S* pq, const S* pp, S* xq, S* xp,
|
|
106
|
+
S* R, S* r, S* a) {
|
|
107
|
+
const int jt = B.jnt(b);
|
|
108
|
+
#if defined(__CUDA_ARCH__)
|
|
109
|
+
if constexpr (std::is_same<S, float>::value) { // kernel P's own per-body FK (core/soft/gpu/fk_rn.cuh)
|
|
110
|
+
if (jt == kJntFree) {
|
|
111
|
+
d16::fk_free_rn(q + B.qadr(b), xp, xq);
|
|
112
|
+
r[0] = r[1] = r[2] = 0.f;
|
|
113
|
+
} else {
|
|
114
|
+
const bool hinge = jt == kJntHinge;
|
|
115
|
+
d16::fk_child_rn(pp, pq, B.pos(b), B.quat(b), hinge, hinge ? q[B.qadr(b)] : 0.f, B.axis(b), xp, xq);
|
|
116
|
+
d16::qrot_rn(pq, B.pos(b), r);
|
|
117
|
+
}
|
|
118
|
+
quat_to_mat(xq, R);
|
|
119
|
+
if (jt == kJntHinge) mat_vec(R, B.axis(b), a);
|
|
120
|
+
else a[0] = a[1] = a[2] = 0.f;
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
#endif
|
|
124
|
+
if (jt == kJntFree) {
|
|
125
|
+
for (int k = 0; k < 3; ++k) { xp[k] = q[B.qadr(b) + k]; r[k] = S(0); }
|
|
126
|
+
for (int k = 0; k < 4; ++k) xq[k] = q[B.qadr(b) + 3 + k];
|
|
127
|
+
quat_normalize(xq);
|
|
128
|
+
} else {
|
|
129
|
+
S Rp[9];
|
|
130
|
+
quat_to_mat(pq, Rp);
|
|
131
|
+
mat_vec(Rp, B.pos(b), r);
|
|
132
|
+
for (int k = 0; k < 3; ++k) xp[k] = pp[k] + r[k];
|
|
133
|
+
quat_mul(pq, B.quat(b), xq);
|
|
134
|
+
if (jt == kJntHinge) {
|
|
135
|
+
using so3::js_sin; using so3::js_cos;
|
|
136
|
+
const S half = q[B.qadr(b)] * S(0.5);
|
|
137
|
+
const S sh = js_sin(half);
|
|
138
|
+
const S ql[4] = {js_cos(half), B.axis(b)[0] * sh, B.axis(b)[1] * sh, B.axis(b)[2] * sh};
|
|
139
|
+
S t[4];
|
|
140
|
+
quat_mul(xq, ql, t);
|
|
141
|
+
for (int k = 0; k < 4; ++k) xq[k] = t[k];
|
|
142
|
+
}
|
|
143
|
+
quat_normalize(xq);
|
|
144
|
+
}
|
|
145
|
+
quat_to_mat(xq, R);
|
|
146
|
+
if (jt == kJntHinge) mat_vec(R, B.axis(b), a);
|
|
147
|
+
else a[0] = a[1] = a[2] = S(0);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// adds coef * d/d(q tangent, v) of seed' RNEA(q, v, acc); v == nullptr: v = 0 and no v_bar. scratch: kSlot * kNB S words.
|
|
151
|
+
// PC (the gate's positive controls only, 0 in every real build): 1 drops the gyroscopic term's reverse, 2 maps the root's
|
|
152
|
+
// rotation cotangent as tau instead of R' tau.
|
|
153
|
+
template <class S, int PC = 0, class Tab>
|
|
154
|
+
DN_HOST_DEVICE void adj_rnea(const Tab& B, const S* q, const S* v, const S* acc, bool gravity, const S* seed,
|
|
155
|
+
S coef, S* q_bar, S* v_bar, S* scratch, long long* prof = nullptr) {
|
|
156
|
+
(void)prof;
|
|
157
|
+
S (*slot)[kSlot] = reinterpret_cast<S (*)[kSlot]>(scratch);
|
|
158
|
+
const int nb = B.nb();
|
|
159
|
+
// per-lane values kept from the forward for the reverse
|
|
160
|
+
LANEA(S, R, 9); LANEA(S, r, 3); LANEA(S, rc, 3); LANEA(S, a, 3); LANEA(S, I, 9);
|
|
161
|
+
LANEA(S, w, 3); LANEA(S, al, 3); LANEA(S, wt, 3); LANEA(S, vct, 3); LANEA(S, f, 3); LANEA(S, n, 3);
|
|
162
|
+
LANEA(S, wp, 3); LANEA(S, alp, 3); LANEA(S, wtp, 3);
|
|
163
|
+
LANE1(S, vb); LANE1(S, sb); LANE1(S, ab); LANE1(S, m);
|
|
164
|
+
ADJ_LANES(lane) {
|
|
165
|
+
if (lane == 0) { // the world: at rest, base acceleration -gravity
|
|
166
|
+
S* s = slot[0];
|
|
167
|
+
s[0] = S(1); s[1] = s[2] = s[3] = S(0);
|
|
168
|
+
for (int k = 4; k < kPub; ++k) s[k] = S(0);
|
|
169
|
+
if (gravity) for (int k = 0; k < 3; ++k) s[13 + k] = S(0) - B.gravity(k); // ao at words 13-15
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
for (int d = 1; d <= B.maxdepth(); ++d) {
|
|
173
|
+
ADJ_LANES(lane) {
|
|
174
|
+
ADJ_LEAD(lane < nb && B.depth(lane) == d);
|
|
175
|
+
if (lane < nb && B.depth(lane) == d) {
|
|
176
|
+
ADJ_TS(2 + 10 * (d - 1));
|
|
177
|
+
const int b = lane, p = B.parent(b), jt = B.jnt(b);
|
|
178
|
+
const S* ps = slot[p];
|
|
179
|
+
S xq[4], xp[3];
|
|
180
|
+
body_kin(B, b, q, ps, ps + 4, xq, xp, LV(R), LV(r), LV(a));
|
|
181
|
+
ADJ_TS(3 + 10 * (d - 1));
|
|
182
|
+
for (int k = 0; k < 3; ++k) { LV(wp)[k] = ps[7 + k]; LV(alp)[k] = ps[10 + k]; LV(wtp)[k] = ps[16 + k]; }
|
|
183
|
+
const S* aop = ps + 13;
|
|
184
|
+
const S* votp = ps + 19;
|
|
185
|
+
S ao[3], vot[3];
|
|
186
|
+
LV(vb) = S(0); LV(sb) = S(0); LV(ab) = S(0);
|
|
187
|
+
if (jt == kJntFree) {
|
|
188
|
+
const int dd = B.dadr(b);
|
|
189
|
+
S wbody[3] = {v ? v[dd + 3] : S(0), v ? v[dd + 4] : S(0), v ? v[dd + 5] : S(0)};
|
|
190
|
+
S abody[3] = {acc[dd + 3], acc[dd + 4], acc[dd + 5]}, sbody[3] = {seed[dd + 3], seed[dd + 4], seed[dd + 5]};
|
|
191
|
+
S t[3];
|
|
192
|
+
mat_vec(LV(R), wbody, LV(w));
|
|
193
|
+
mat_vec(LV(R), abody, t);
|
|
194
|
+
for (int k = 0; k < 3; ++k) LV(al)[k] = LV(alp)[k] + t[k];
|
|
195
|
+
for (int k = 0; k < 3; ++k) ao[k] = aop[k] + acc[dd + k];
|
|
196
|
+
mat_vec(LV(R), sbody, t);
|
|
197
|
+
for (int k = 0; k < 3; ++k) { LV(wt)[k] = LV(wtp)[k] + t[k]; vot[k] = votp[k] + seed[dd + k]; }
|
|
198
|
+
} else {
|
|
199
|
+
S t1[3], t2[3], t3[3];
|
|
200
|
+
cross3(LV(wp), LV(r), t1);
|
|
201
|
+
cross3(LV(alp), LV(r), t2);
|
|
202
|
+
cross3(LV(wp), t1, t3);
|
|
203
|
+
for (int k = 0; k < 3; ++k) ao[k] = aop[k] + t2[k] + t3[k];
|
|
204
|
+
cross3(LV(wtp), LV(r), t1);
|
|
205
|
+
for (int k = 0; k < 3; ++k) vot[k] = votp[k] + t1[k];
|
|
206
|
+
if (jt == kJntHinge) {
|
|
207
|
+
const int dd = B.dadr(b);
|
|
208
|
+
LV(vb) = v ? v[dd] : S(0); LV(ab) = acc[dd]; LV(sb) = seed[dd];
|
|
209
|
+
S sq[3], c[3];
|
|
210
|
+
for (int k = 0; k < 3; ++k) sq[k] = LV(a)[k] * LV(vb);
|
|
211
|
+
cross3(LV(wp), sq, c);
|
|
212
|
+
for (int k = 0; k < 3; ++k) {
|
|
213
|
+
LV(w)[k] = LV(wp)[k] + sq[k];
|
|
214
|
+
LV(al)[k] = LV(alp)[k] + c[k] + LV(a)[k] * LV(ab);
|
|
215
|
+
LV(wt)[k] = LV(wtp)[k] + LV(a)[k] * LV(sb);
|
|
216
|
+
}
|
|
217
|
+
} else {
|
|
218
|
+
for (int k = 0; k < 3; ++k) { LV(w)[k] = LV(wp)[k]; LV(al)[k] = LV(alp)[k]; LV(wt)[k] = LV(wtp)[k]; }
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
ADJ_TS(4 + 10 * (d - 1));
|
|
222
|
+
// COM: rc = R ipos, a_c = ao + al x rc + w x (w x rc), f = m a_c, n = I al + w x I w, vc~ = vo~ + w~ x rc
|
|
223
|
+
LV(m) = B.mass(b);
|
|
224
|
+
mat_vec(LV(R), B.ipos(b), LV(rc));
|
|
225
|
+
S xq2[4], X[9];
|
|
226
|
+
quat_mul(xq, B.iquat(b), xq2);
|
|
227
|
+
quat_to_mat(xq2, X);
|
|
228
|
+
world_inertia(X, B.inertia(b), LV(I));
|
|
229
|
+
S u1[3], u2[3], u3[3], Iw[3], Ial[3], wIw[3];
|
|
230
|
+
cross3(LV(al), LV(rc), u1);
|
|
231
|
+
cross3(LV(w), LV(rc), u2);
|
|
232
|
+
cross3(LV(w), u2, u3);
|
|
233
|
+
for (int k = 0; k < 3; ++k) LV(f)[k] = LV(m) * (ao[k] + u1[k] + u3[k]);
|
|
234
|
+
mat_vec(LV(I), LV(w), Iw);
|
|
235
|
+
mat_vec(LV(I), LV(al), Ial);
|
|
236
|
+
cross3(LV(w), Iw, wIw);
|
|
237
|
+
for (int k = 0; k < 3; ++k) LV(n)[k] = Ial[k] + wIw[k];
|
|
238
|
+
cross3(LV(wt), LV(rc), u1);
|
|
239
|
+
for (int k = 0; k < 3; ++k) LV(vct)[k] = vot[k] + u1[k];
|
|
240
|
+
ADJ_TS(5 + 10 * (d - 1));
|
|
241
|
+
// publish for the children
|
|
242
|
+
S* s = slot[b];
|
|
243
|
+
for (int k = 0; k < 4; ++k) s[k] = xq[k];
|
|
244
|
+
for (int k = 0; k < 3; ++k) {
|
|
245
|
+
s[4 + k] = xp[k]; s[7 + k] = LV(w)[k]; s[10 + k] = LV(al)[k]; s[13 + k] = ao[k]; s[16 + k] = LV(wt)[k];
|
|
246
|
+
s[19 + k] = vot[k];
|
|
247
|
+
}
|
|
248
|
+
ADJ_TS(6 + 10 * (d - 1));
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
// reverse, deepest level first: sum the children's messages, add this body's own terms, send the message to the parent
|
|
253
|
+
for (int d = B.maxdepth(); d >= 1; --d) {
|
|
254
|
+
ADJ_LANES(lane) {
|
|
255
|
+
ADJ_LEAD(lane < nb && B.depth(lane) == d);
|
|
256
|
+
if (lane < nb && B.depth(lane) == d) {
|
|
257
|
+
ADJ_TS(7 + 10 * (d - 1));
|
|
258
|
+
const int b = lane, jt = B.jnt(b);
|
|
259
|
+
S xpb[3] = {S(0), S(0), S(0)}, tau[3] = {S(0), S(0), S(0)}, wb[3] = {S(0), S(0), S(0)}, alb[3] = {S(0), S(0), S(0)},
|
|
260
|
+
aob[3] = {S(0), S(0), S(0)}, wtb[3] = {S(0), S(0), S(0)}, vtb[3] = {S(0), S(0), S(0)};
|
|
261
|
+
for (int ci = 0; ci < B.nchild(b); ++ci) { // the children, in increasing index (deterministic order)
|
|
262
|
+
const S* mc = slot[B.child(b, ci)];
|
|
263
|
+
add3(xpb, mc); add3(tau, mc + 3); add3(wb, mc + 6); add3(alb, mc + 9); add3(aob, mc + 12); add3(wtb, mc + 15);
|
|
264
|
+
add3(vtb, mc + 18);
|
|
265
|
+
}
|
|
266
|
+
ADJ_TS(8 + 10 * (d - 1));
|
|
267
|
+
// own terms: s_b = coef (f . vc~ + n . w~)
|
|
268
|
+
{
|
|
269
|
+
S fb[3], nbar[3], vcb[3], acb[3], rcb[3] = {S(0), S(0), S(0)}, Ib[9], t[3], t2[3];
|
|
270
|
+
for (int k = 0; k < 3; ++k) { fb[k] = coef * LV(vct)[k]; nbar[k] = coef * LV(wt)[k]; vcb[k] = coef * LV(f)[k];
|
|
271
|
+
wtb[k] = wtb[k] + coef * LV(n)[k]; acb[k] = LV(m) * fb[k]; }
|
|
272
|
+
// n = I al + w x (I w)
|
|
273
|
+
S Iw[3], nxw[3];
|
|
274
|
+
mat_vec(LV(I), nbar, t);
|
|
275
|
+
add3(alb, t);
|
|
276
|
+
mat_vec(LV(I), LV(w), Iw);
|
|
277
|
+
cross3(nbar, LV(w), nxw);
|
|
278
|
+
if (PC != 1) {
|
|
279
|
+
cross3(Iw, nbar, t);
|
|
280
|
+
add3(wb, t);
|
|
281
|
+
mat_vec(LV(I), nxw, t);
|
|
282
|
+
add3(wb, t);
|
|
283
|
+
}
|
|
284
|
+
for (int i = 0; i < 3; ++i)
|
|
285
|
+
for (int j = 0; j < 3; ++j) Ib[3 * i + j] = nbar[i] * LV(al)[j] + nxw[i] * LV(w)[j];
|
|
286
|
+
// a_c = ao + al x rc + w x (w x rc)
|
|
287
|
+
add3(aob, acb);
|
|
288
|
+
cross3(LV(rc), acb, t); add3(alb, t);
|
|
289
|
+
cross3(acb, LV(al), t); add3(rcb, t);
|
|
290
|
+
S u[3], ub[3];
|
|
291
|
+
cross3(LV(w), LV(rc), u);
|
|
292
|
+
cross3(acb, LV(w), ub);
|
|
293
|
+
cross3(u, acb, t); add3(wb, t);
|
|
294
|
+
cross3(LV(rc), ub, t); add3(wb, t);
|
|
295
|
+
cross3(ub, LV(w), t); add3(rcb, t);
|
|
296
|
+
// vc~ = vo~ + w~ x rc
|
|
297
|
+
add3(vtb, vcb);
|
|
298
|
+
cross3(LV(rc), vcb, t); add3(wtb, t);
|
|
299
|
+
cross3(vcb, LV(wt), t); add3(rcb, t);
|
|
300
|
+
// rotations of the body-attached rc and I: tau += rc x rc_bar + vee(Ib I - I Ib)
|
|
301
|
+
cross3(LV(rc), rcb, t); add3(tau, t);
|
|
302
|
+
S G[9];
|
|
303
|
+
for (int i = 0; i < 3; ++i)
|
|
304
|
+
for (int j = 0; j < 3; ++j) {
|
|
305
|
+
S s1 = S(0), s2 = S(0);
|
|
306
|
+
for (int k = 0; k < 3; ++k) { s1 = s1 + Ib[3 * i + k] * LV(I)[3 * k + j]; s2 = s2 + LV(I)[3 * i + k] * Ib[3 * k + j]; }
|
|
307
|
+
G[3 * i + j] = s1 - s2;
|
|
308
|
+
}
|
|
309
|
+
t2[0] = G[7] - G[5]; t2[1] = G[2] - G[6]; t2[2] = G[3] - G[1];
|
|
310
|
+
add3(tau, t2);
|
|
311
|
+
}
|
|
312
|
+
ADJ_TS(9 + 10 * (d - 1));
|
|
313
|
+
S out[kMsg];
|
|
314
|
+
for (int k = 0; k < kMsg; ++k) out[k] = S(0);
|
|
315
|
+
if (jt == kJntFree) {
|
|
316
|
+
const int dd = B.dadr(b);
|
|
317
|
+
S t[3];
|
|
318
|
+
// w = R w_body, al = al_p + R acc_ang, w~ = w~_p + R seed_ang; ao, vo~ carry no q / v dependence of their own
|
|
319
|
+
cross3(LV(w), wb, t); add3(tau, t);
|
|
320
|
+
S alown[3] = {LV(al)[0] - LV(alp)[0], LV(al)[1] - LV(alp)[1], LV(al)[2] - LV(alp)[2]};
|
|
321
|
+
cross3(alown, alb, t); add3(tau, t);
|
|
322
|
+
S wtown[3] = {LV(wt)[0] - LV(wtp)[0], LV(wt)[1] - LV(wtp)[1], LV(wt)[2] - LV(wtp)[2]};
|
|
323
|
+
cross3(wtown, wtb, t); add3(tau, t);
|
|
324
|
+
if (v_bar) { mat_tvec(LV(R), wb, t); for (int k = 0; k < 3; ++k) v_bar[dd + 3 + k] = v_bar[dd + 3 + k] + t[k]; }
|
|
325
|
+
if (PC == 2) for (int k = 0; k < 3; ++k) t[k] = tau[k];
|
|
326
|
+
else mat_tvec(LV(R), tau, t);
|
|
327
|
+
for (int k = 0; k < 3; ++k) { q_bar[dd + k] = q_bar[dd + k] + xpb[k]; q_bar[dd + 3 + k] = q_bar[dd + 3 + k] + t[k]; }
|
|
328
|
+
// the root's parent is the world: its message is not needed
|
|
329
|
+
} else {
|
|
330
|
+
S t[3], rb[3] = {xpb[0], xpb[1], xpb[2]};
|
|
331
|
+
S* ow = out + 6; S* oal = out + 9; S* oao = out + 12; S* owt = out + 15; S* ovt = out + 18;
|
|
332
|
+
// ao = ao_p + al_p x r + w_p x (w_p x r)
|
|
333
|
+
add3(oao, aob);
|
|
334
|
+
cross3(LV(r), aob, t); add3(oal, t);
|
|
335
|
+
cross3(aob, LV(alp), t); add3(rb, t);
|
|
336
|
+
S u[3], ub[3];
|
|
337
|
+
cross3(LV(wp), LV(r), u);
|
|
338
|
+
cross3(aob, LV(wp), ub);
|
|
339
|
+
cross3(u, aob, t); add3(ow, t);
|
|
340
|
+
cross3(LV(r), ub, t); add3(ow, t);
|
|
341
|
+
cross3(ub, LV(wp), t); add3(rb, t);
|
|
342
|
+
// vo~ = vo~_p + w~_p x r
|
|
343
|
+
add3(ovt, vtb);
|
|
344
|
+
cross3(LV(r), vtb, t); add3(owt, t);
|
|
345
|
+
cross3(vtb, LV(wtp), t); add3(rb, t);
|
|
346
|
+
if (jt == kJntHinge) {
|
|
347
|
+
const int dd = B.dadr(b);
|
|
348
|
+
S ab3[3] = {S(0), S(0), S(0)}, sq[3], sqb[3];
|
|
349
|
+
// w = w_p + a v, al = al_p + w_p x (a v) + a acc, w~ = w~_p + a seed
|
|
350
|
+
add3(ow, wb); add3(oal, alb); add3(owt, wtb);
|
|
351
|
+
for (int k = 0; k < 3; ++k) { ab3[k] = LV(vb) * wb[k] + LV(ab) * alb[k] + LV(sb) * wtb[k]; sq[k] = LV(a)[k] * LV(vb); }
|
|
352
|
+
cross3(sq, alb, t); add3(ow, t);
|
|
353
|
+
cross3(alb, LV(wp), sqb);
|
|
354
|
+
for (int k = 0; k < 3; ++k) ab3[k] = ab3[k] + LV(vb) * sqb[k];
|
|
355
|
+
if (v_bar) v_bar[dd] = v_bar[dd] + dot3(LV(a), wb) + dot3(LV(a), sqb);
|
|
356
|
+
cross3(LV(a), ab3, t); add3(tau, t); // a = R axis
|
|
357
|
+
q_bar[dd] = q_bar[dd] + dot3(LV(a), tau);
|
|
358
|
+
} else {
|
|
359
|
+
add3(ow, wb); add3(oal, alb); add3(owt, wtb);
|
|
360
|
+
}
|
|
361
|
+
// xpos = xpos_p + r, r = R_p pos: the parent's position and rotation
|
|
362
|
+
for (int k = 0; k < 3; ++k) out[k] = xpb[k];
|
|
363
|
+
cross3(LV(r), rb, t);
|
|
364
|
+
for (int k = 0; k < 3; ++k) out[3 + k] = tau[k] + t[k];
|
|
365
|
+
}
|
|
366
|
+
if (jt != kJntFree) for (int k = 0; k < kMsg; ++k) slot[b][k] = out[k]; // read by the parent in the next phase
|
|
367
|
+
ADJ_TS(10 + 10 * (d - 1));
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
ADJ_LANES(lane) {
|
|
372
|
+
ADJ_LEAD(lane == 0);
|
|
373
|
+
ADJ_TS(kProf - 1);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
// adds the pull-back of xpos_bar[b] (world, body origin) and xrot_bar[b] (world rotation-vector cotangent, dR_b = [dtheta]x R_b),
|
|
378
|
+
// nb x 3 each, through fk to the q tangent. scratch: kSlot * kNB S words.
|
|
379
|
+
template <class S, class Tab>
|
|
380
|
+
DN_HOST_DEVICE void adj_fk_pullback(const Tab& B, const S* q, const S* xpos_bar, const S* xrot_bar, S* q_bar,
|
|
381
|
+
S* scratch, long long* prof = nullptr) {
|
|
382
|
+
(void)prof;
|
|
383
|
+
S (*slot)[kSlot] = reinterpret_cast<S (*)[kSlot]>(scratch);
|
|
384
|
+
const int nb = B.nb();
|
|
385
|
+
LANEA(S, R, 9); LANEA(S, r, 3); LANEA(S, a, 3);
|
|
386
|
+
ADJ_LANES(lane) {
|
|
387
|
+
if (lane == 0) { S* s = slot[0]; s[0] = S(1); for (int k = 1; k < 7; ++k) s[k] = S(0); }
|
|
388
|
+
}
|
|
389
|
+
for (int d = 1; d <= B.maxdepth(); ++d) {
|
|
390
|
+
ADJ_LANES(lane) {
|
|
391
|
+
if (lane < nb && B.depth(lane) == d) {
|
|
392
|
+
const int b = lane;
|
|
393
|
+
const S* ps = slot[B.parent(b)];
|
|
394
|
+
S xq[4], xp[3];
|
|
395
|
+
body_kin(B, b, q, ps, ps + 4, xq, xp, LV(R), LV(r), LV(a));
|
|
396
|
+
for (int k = 0; k < 4; ++k) slot[b][k] = xq[k];
|
|
397
|
+
for (int k = 0; k < 3; ++k) slot[b][4 + k] = xp[k];
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
for (int d = B.maxdepth(); d >= 1; --d) {
|
|
402
|
+
ADJ_LANES(lane) {
|
|
403
|
+
if (lane < nb && B.depth(lane) == d) {
|
|
404
|
+
const int b = lane, jt = B.jnt(b);
|
|
405
|
+
S xpb[3], tau[3], t[3];
|
|
406
|
+
for (int k = 0; k < 3; ++k) { xpb[k] = xpos_bar[3 * b + k]; tau[k] = xrot_bar[3 * b + k]; }
|
|
407
|
+
for (int ci = 0; ci < B.nchild(b); ++ci) { // the children, in increasing index
|
|
408
|
+
const S* mc = slot[B.child(b, ci)];
|
|
409
|
+
add3(xpb, mc); add3(tau, mc + 3);
|
|
410
|
+
}
|
|
411
|
+
if (jt == kJntFree) {
|
|
412
|
+
const int dd = B.dadr(b);
|
|
413
|
+
mat_tvec(LV(R), tau, t);
|
|
414
|
+
for (int k = 0; k < 3; ++k) { q_bar[dd + k] = q_bar[dd + k] + xpb[k]; q_bar[dd + 3 + k] = q_bar[dd + 3 + k] + t[k]; }
|
|
415
|
+
} else {
|
|
416
|
+
if (jt == kJntHinge) q_bar[B.dadr(b)] = q_bar[B.dadr(b)] + dot3(LV(a), tau);
|
|
417
|
+
cross3(LV(r), xpb, t);
|
|
418
|
+
for (int k = 0; k < 3; ++k) { slot[b][k] = xpb[k]; slot[b][3 + k] = tau[k] + t[k]; }
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
} // namespace js::soft::adj
|