Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions configs/celegans_demo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
defaults:
- stac: stac_celegans
- model: celegans
- _self_
197 changes: 197 additions & 0 deletions configs/model/celegans.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
MJCF_PATH: "models/celegans/celegans.xml"

# Tolerance for the optimizations of the full model, limb, and root.
# TODO: Re-implement optimizer loops to use these tolerances
FTOL: 5.0e-03
ROOT_FTOL: 1.0e-05
LIMB_FTOL: 1.0e-06

# Number of alternating pose and offset optimization rounds.
N_ITERS: 6

KP_NAMES:
- 'cl1'
- 'cl2'
- 'cl3'
- 'cl4'
- 'cl5'
- 'cl6'
- 'cl7'
- 'cl8'
- 'cl9'
- 'cl10'
- 'cl11'
- 'cl12'
- 'cl13'
- 'cl14'
- 'cl15'
- 'cl16'
- 'cl17'
- 'cl18'
- 'cl19'
- 'cl20'
- 'cl21'
- 'cl22'
- 'cl23'
- 'cl24'
- 'cl25'

# The model sites used to register the keypoints.
KEYPOINT_MODEL_PAIRS:
cl1: torso1_body
cl2: torso2_body
cl3: torso3_body
cl4: torso4_body
cl5: torso5_body
cl6: torso6_body
cl7: torso7_body
cl8: torso8_body
cl9: torso9_body
cl10: torso10_body
cl11: torso11_body
cl12: torso12_body
cl13: torso13_body
cl14: torso14_body
cl15: torso15_body
cl16: torso16_body
cl17: torso17_body
cl18: torso18_body
cl19: torso19_body
cl20: torso20_body
cl21: torso21_body
cl22: torso22_body
cl23: torso23_body
cl24: torso24_body
cl25: torso25_body

# The initial offsets for each keypoint in meters.
KEYPOINT_INITIAL_OFFSETS:
cl1: 0.0 0.0 0.0
cl2: 0.0 0.0 0.0
cl3: 0.0 0.0 0.0
cl4: 0.0 0.0 0.0
cl5: 0.0 0.0 0.0
cl6: 0.0 0.0 0.0
cl7: 0.0 0.0 0.0
cl8: 0.0 0.0 0.0
cl9: 0.0 0.0 0.0
cl10: 0.0 0.0 0.0
cl11: 0.0 0.0 0.0
cl12: 0.0 0.0 0.0
cl13: 0.0 0.0 0.0
cl14: 0.0 0.0 0.0
cl15: 0.0 0.0 0.0
cl16: 0.0 0.0 0.0
cl17: 0.0 0.0 0.0
cl18: 0.0 0.0 0.0
cl19: 0.0 0.0 0.0
cl20: 0.0 0.0 0.0
cl21: 0.0 0.0 0.0
cl22: 0.0 0.0 0.0
cl23: 0.0 0.0 0.0
cl24: 0.0 0.0 0.0
cl25: 0.0 0.0 0.0

#ROOT_OPTIMIZATION_KEYPOINT: cl13

TRUNK_OPTIMIZATION_KEYPOINTS: []
# - "cl7"
# - "cl8"
# - "cl9"
# - "cl10"
# - "cl11"
# - "cl12"
# - "cl14"
# - "cl15"
# - "cl16"
# - "cl17"
# - "cl18"

INDIVIDUAL_PART_OPTIMIZATION:
"head": [
"torso1_body",
"torso2_body",
"torso3_body",
"torso4_body",
"torso5_body",
]
"abdomen1": [
"torso6_body",
"torso7_body",
"torso8_body",
"torso9_body",
"torso10_body",
]
"abdomen2": [
"torso11_body",
"torso12_body",
"torso13_body",
"torso14_body",
"torso15_body",
]
"abdomen3": [
"torso16_body",
"torso17_body",
"torso18_body",
"torso19_body",
"torso20_body",
]
"tail": [
"torso21_body",
"torso22_body",
"torso23_body",
"torso24_body",
"torso25_body",
]

KEYPOINT_COLOR_PAIRS:
cl1: 0 .5 1 1
cl2: 1 0 .3 1
cl3: 0 .5 .3 1
cl4: .3 0 .3 1
cl5: 0.5 0 .3 1
cl6: 0 1 .3 1
cl7: 0.3 0 1 1
cl8: 0 0.5 .3 1
cl9: 1 0.5 .3 1
cl10: 0.3 0.3 0.3 1
cl11: 0.5 0.5 .5 1
cl12: 0 0 0 1
cl13: 1 1 1 1
cl14: 1.0 0.7 0.5 1
cl15: 0.7 0.5 1.0 1
cl16: 0.5 1.0 0.7 1
cl17: 0.5 0.7 1.0 1
cl18: 1.0 0.7 0.5 1
cl19: 0.7 1.0 .5 1
cl20: 0.3 0.5 .7 1
cl21: 0.3 0.7 .5 1
cl22: 0.5 0.3 .7 1
cl23: 0.5 0.7 0.3 1
cl24: 0.7 0.3 .5 1
cl25: 0.7 0.5 .3 1

# What is the size of the animal you'd like to register, relative to the model?
SCALE_FACTOR: 1.0 #0.4532

# Multiplier to put the mocap data into the same scale as the data. Eg, if the
# mocap data is known to be in millimeters and the model is in meters, this is
# .001
MOCAP_SCALE_FACTOR: 1.0 #1e-6

# If you have reason to believe that the initial offsets are correct for particular keypoints,
# you can regularize those sites using this with M_REG_COEF.
SITES_TO_REGULARIZE: []
# - HandL
# - HandR
# - SpineF
# - SpineL
# - SpineM

RENDER_FPS: 50

N_SAMPLE_FRAMES: 100

# If you have reason to believe that the initial offsets are correct for particular keypoints,
# you can regularize those sites using _SITES_TO_REGULARIZE.
M_REG_COEF: 1
14 changes: 14 additions & 0 deletions configs/stac/stac_celegans.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
fit_offsets_path: "celegans_fit_offsets.h5"
ik_only_path: "celegans_ik_only.h5"
#data_path: "tests/data/test_rodent_mocap_1000_frames.mat"

n_fit_frames: 500
skip_fit_offsets: False
skip_ik_only: True
infer_qvels: True # Infer qvels from stac output
n_frames_per_clip: 250 # 1 if mocap is one session

mujoco:
solver: "newton"
iterations: 1
ls_iterations: 4
3,876 changes: 3,876 additions & 0 deletions demos/stac_celegans.ipynb

Large diffs are not rendered by default.

Loading