├── requirements.txt ├── sconegym ├── __init__.py ├── data │ ├── H0918.scone │ ├── H1622.scone │ ├── H0918_S2.scone │ ├── H2190.scone │ ├── H1622_S2.scone │ ├── H2190_S2.scone │ ├── InitStateJump.zml │ ├── InitStateGait10.zml │ ├── neural_delays_FEA_v4.zml │ ├── H0918.hfd │ ├── H0918_S2.hfd │ ├── H1622.hfd │ └── H1622_S2.hfd ├── data-v1 │ ├── H0918_osim.scone │ ├── H0918.scone │ ├── H0918S.scone │ ├── InitStateJump.zml │ ├── H0918_run.scone │ ├── H1622.scone │ ├── H1622S.scone │ ├── H2190.scone │ ├── H2190_S2.scone │ ├── H1622_run.scone │ ├── H2190_run.scone │ ├── InitStateRun45.zml │ ├── InitStateGait10.zml │ ├── InitStateRun55.zml │ ├── neural_delays_FEA_v4.zml │ ├── H0918v2j.hfd │ ├── H0918Sv2j.hfd │ ├── H0918Sv2jb.hfd │ ├── H1622Sv2k.hfd │ ├── H1622Sv2kb.hfd │ └── H1622v2k.hfd ├── init_v0.py └── gaitgym.py ├── poetry.toml ├── pyproject.toml ├── setup.py ├── example_environment.py ├── example_deprl.py ├── test_environments.py ├── README.md ├── sconetools.py ├── .gitignore └── LICENSE /requirements.txt: -------------------------------------------------------------------------------- 1 | gym==0.13 2 | -------------------------------------------------------------------------------- /sconegym/__init__.py: -------------------------------------------------------------------------------- 1 | import sconegym.init_v0 2 | -------------------------------------------------------------------------------- /poetry.toml: -------------------------------------------------------------------------------- 1 | [virtualenvs] 2 | in-project = true 3 | create = true 4 | -------------------------------------------------------------------------------- /sconegym/data/H0918.scone: -------------------------------------------------------------------------------- 1 | # Model used in simulation 2 | ModelHyfydy { 3 | model_file = H0918.hfd 4 | 5 | # Set initial state 6 | state_init_file = InitStateGait10.zml 7 | fixed_control_step_size = 0.005 8 | initial_equilibration_activation = 0.05 9 | << neural_delays_FEA_v4.zml >> 10 | } 11 | -------------------------------------------------------------------------------- /sconegym/data/H1622.scone: -------------------------------------------------------------------------------- 1 | # Model used in simulation 2 | ModelHyfydy { 3 | model_file = H1622.hfd 4 | 5 | # Set initial state 6 | state_init_file = InitStateGait10.zml 7 | fixed_control_step_size = 0.005 8 | initial_equilibration_activation = 0.05 9 | << neural_delays_FEA_v4.zml >> 10 | } 11 | -------------------------------------------------------------------------------- /sconegym/data/H0918_S2.scone: -------------------------------------------------------------------------------- 1 | # Model used in simulation 2 | ModelHyfydy { 3 | model_file = H0918_S2.hfd 4 | 5 | # Set initial state 6 | state_init_file = InitStateGait10.zml 7 | fixed_control_step_size = 0.005 8 | initial_equilibration_activation = 0.05 9 | << neural_delays_FEA_v4.zml >> 10 | } 11 | -------------------------------------------------------------------------------- /sconegym/data-v1/H0918_osim.scone: -------------------------------------------------------------------------------- 1 | # Model used in simulation 2 | ModelOpenSim3 { 3 | model_file = H0918v2j.osim 4 | 5 | # Set initial state 6 | state_init_file = InitStateGait10.zml 7 | fixed_control_step_size = 0.005 8 | initial_equilibration_activation = 0.05 9 | << neural_delays_FEA_v4.zml >> 10 | } 11 | -------------------------------------------------------------------------------- /sconegym/data/H2190.scone: -------------------------------------------------------------------------------- 1 | # Model used in simulation 2 | ModelHyfydy { 3 | model_file = H2190.hfd 4 | 5 | # Set initial state 6 | state_init_file = InitStateGait10.zml 7 | fixed_control_step_size = 0.005 8 | initial_equilibration_activation = 0.05 9 | enable_dof_actuators = 0 10 | << neural_delays_FEA_v4.zml >> 11 | } 12 | -------------------------------------------------------------------------------- /sconegym/data/H1622_S2.scone: -------------------------------------------------------------------------------- 1 | # Model used in simulation 2 | ModelHyfydy { 3 | model_file = H1622_S2.hfd 4 | 5 | # Set initial state 6 | state_init_file = InitStateGait10.zml 7 | fixed_control_step_size = 0.005 8 | initial_equilibration_activation = 0.05 9 | enable_dof_actuators = 0 10 | << neural_delays_FEA_v4.zml >> 11 | } 12 | -------------------------------------------------------------------------------- /sconegym/data/H2190_S2.scone: -------------------------------------------------------------------------------- 1 | # Model used in simulation 2 | ModelHyfydy { 3 | model_file = H2190_S2.hfd 4 | 5 | # Set initial state 6 | state_init_file = InitStateGait10.zml 7 | fixed_control_step_size = 0.005 8 | initial_equilibration_activation = 0.05 9 | enable_dof_actuators = 0 10 | << neural_delays_FEA_v4.zml >> 11 | } 12 | -------------------------------------------------------------------------------- /sconegym/data-v1/H0918.scone: -------------------------------------------------------------------------------- 1 | # Model used in simulation 2 | ModelHyfydy { 3 | model_file = H0918v2j.hfd 4 | 5 | # Set initial state 6 | state_init_file = InitStateGait10.zml 7 | fixed_control_step_size = 0.005 8 | initial_equilibration_activation = 0.05 9 | zero_velocity_equilibration = 1 10 | << neural_delays_FEA_v4.zml >> 11 | } 12 | -------------------------------------------------------------------------------- /sconegym/data-v1/H0918S.scone: -------------------------------------------------------------------------------- 1 | # Model used in simulation 2 | ModelHyfydy { 3 | model_file = H0918Sv2jb.hfd 4 | 5 | # Set initial state 6 | state_init_file = InitStateGait10.zml 7 | fixed_control_step_size = 0.005 8 | initial_equilibration_activation = 0.05 9 | zero_velocity_equilibration = 1 10 | << neural_delays_FEA_v4.zml >> 11 | } 12 | -------------------------------------------------------------------------------- /sconegym/data/InitStateJump.zml: -------------------------------------------------------------------------------- 1 | values { 2 | pelvis_ty = 0.75 3 | pelvis_tilt = -0.610865238198015 4 | hip_flexion_l = 1.39626340159546 5 | hip_flexion_r = 1.39626340159546 6 | knee_angle_l = -1.22173047639603 7 | knee_angle_r = -1.22173047639603 8 | ankle_angle_l = 0.436332312998582 9 | ankle_angle_r = 0.436332312998582 10 | } 11 | velocities { 12 | } 13 | -------------------------------------------------------------------------------- /sconegym/data-v1/InitStateJump.zml: -------------------------------------------------------------------------------- 1 | values { 2 | pelvis_ty = 0.75 3 | pelvis_tilt = -0.610865238198015 4 | hip_flexion_l = 1.39626340159546 5 | hip_flexion_r = 1.39626340159546 6 | knee_angle_l = -1.22173047639603 7 | knee_angle_r = -1.22173047639603 8 | ankle_angle_l = 0.436332312998582 9 | ankle_angle_r = 0.436332312998582 10 | } 11 | velocities { 12 | } 13 | -------------------------------------------------------------------------------- /sconegym/data-v1/H0918_run.scone: -------------------------------------------------------------------------------- 1 | # Model used in simulation 2 | ModelHyfydy { 3 | model_file = H0918v2j.hfd 4 | 5 | # Set initial state 6 | state_init_file = InitStateGait10.zml 7 | fixed_control_step_size = 0.005 8 | initial_equilibration_activation = 0.05 9 | muscle_force_multiplier = 2 10 | zero_velocity_equilibration = 1 11 | << neural_delays_FEA_v4.zml >> 12 | } 13 | -------------------------------------------------------------------------------- /sconegym/data-v1/H1622.scone: -------------------------------------------------------------------------------- 1 | # Model used in simulation 2 | ModelHyfydy { 3 | model_file = H1622v2k.hfd 4 | 5 | # Set initial state 6 | state_init_file = InitStateGait10.zml 7 | fixed_control_step_size = 0.005 8 | initial_equilibration_activation = 0.05 9 | zero_velocity_equilibration = 1 10 | use_omnidirectional_root_dofs = 1 11 | << neural_delays_FEA_v4.zml >> 12 | } 13 | -------------------------------------------------------------------------------- /sconegym/data-v1/H1622S.scone: -------------------------------------------------------------------------------- 1 | # Model used in simulation 2 | ModelHyfydy { 3 | model_file = H1622Sv2kb.hfd 4 | 5 | # Set initial state 6 | state_init_file = InitStateGait10.zml 7 | fixed_control_step_size = 0.005 8 | initial_equilibration_activation = 0.05 9 | zero_velocity_equilibration = 1 10 | use_omnidirectional_root_dofs = 1 11 | << neural_delays_FEA_v4.zml >> 12 | } 13 | -------------------------------------------------------------------------------- /sconegym/data-v1/H2190.scone: -------------------------------------------------------------------------------- 1 | # Model used in simulation 2 | ModelHyfydy { 3 | model_file = H2190v2k.hfd 4 | 5 | # Set initial state 6 | state_init_file = InitStateGait10.zml 7 | fixed_control_step_size = 0.005 8 | initial_equilibration_activation = 0.05 9 | zero_velocity_equilibration = 1 10 | enable_dof_actuators = 0 11 | use_omnidirectional_root_dofs = 1 12 | << neural_delays_FEA_v4.zml >> 13 | } 14 | -------------------------------------------------------------------------------- /sconegym/data-v1/H2190_S2.scone: -------------------------------------------------------------------------------- 1 | # Model used in simulation 2 | ModelHyfydy { 3 | model_file = H2190v2k_S2.hfd 4 | 5 | # Set initial state 6 | state_init_file = InitStateGait10.zml 7 | fixed_control_step_size = 0.005 8 | initial_equilibration_activation = 0.05 9 | zero_velocity_equilibration = 1 10 | enable_dof_actuators = 0 11 | use_omnidirectional_root_dofs = 1 12 | << neural_delays_FEA_v4.zml >> 13 | } 14 | -------------------------------------------------------------------------------- /sconegym/data-v1/H1622_run.scone: -------------------------------------------------------------------------------- 1 | # Model used in simulation 2 | ModelHyfydy { 3 | model_file = H1622v2k.hfd 4 | 5 | # Set initial state 6 | state_init_file = InitStateGait10.zml 7 | fixed_control_step_size = 0.005 8 | initial_equilibration_activation = 0.05 9 | muscle_force_multiplier = 2 10 | zero_velocity_equilibration = 1 11 | enable_dof_actuators = 0 12 | use_omnidirectional_root_dofs = 1 13 | << neural_delays_FEA_v4.zml >> 14 | } 15 | -------------------------------------------------------------------------------- /sconegym/data-v1/H2190_run.scone: -------------------------------------------------------------------------------- 1 | # Model used in simulation 2 | ModelHyfydy { 3 | model_file = H2190v2k.hfd 4 | 5 | # Set initial state 6 | state_init_file = InitStateGait10.zml 7 | fixed_control_step_size = 0.005 8 | initial_equilibration_activation = 0.05 9 | muscle_force_multiplier = 2 10 | zero_velocity_equilibration = 1 11 | enable_dof_actuators = 0 12 | use_omnidirectional_root_dofs = 1 13 | << neural_delays_FEA_v4.zml >> 14 | } 15 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "sconegym" 3 | version = "0.2.0" 4 | description = "Gym environment for scone-hyfydy." 5 | authors = ["Pierre Schumacher "] 6 | license = "MIT" 7 | readme = "README.md" 8 | 9 | [tool.poetry.dependencies] 10 | python = "^3.8" 11 | numpy = "*" 12 | torch = "*" 13 | 14 | [tool.poetry.group.dev.dependencies] 15 | omegaconf = "^2.3.0" 16 | 17 | 18 | [build-system] 19 | requires = ["poetry-core"] 20 | build-backend = "poetry.core.masonry.api" 21 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup( 4 | name="sconegym", 5 | version="0.2.0", 6 | description="SconePy Gym Environments", 7 | url="https://scone.software/", 8 | license="Apache 2.0", 9 | packages=["sconegym"], 10 | package_data={"sconegym": ["data/*.*", "data-v1/*.*"]}, 11 | include_package_data=True, 12 | python_requires="~=3.9", 13 | classifiers=[ 14 | "Intended Audience :: Science/Research", 15 | "Programming Language :: Python :: 3.9", 16 | ], 17 | install_requires=["gym==0.13"], 18 | ) 19 | -------------------------------------------------------------------------------- /sconegym/data-v1/InitStateRun45.zml: -------------------------------------------------------------------------------- 1 | values { 2 | pelvis_tx = 0 3 | pelvis_ty = 0.925037 4 | pelvis_tilt = -0.17427 5 | hip_flexion_r = -0.1104 6 | knee_angle_r = -0.864166 7 | ankle_angle_r = -0.813631 8 | hip_flexion_l = 0.271449 9 | knee_angle_l = 0.0355191 10 | ankle_angle_l = -0.100597 11 | } 12 | velocities { 13 | pelvis_tx = 4.5 14 | pelvis_ty = -0.569601 15 | pelvis_tilt = 1.46663 16 | hip_flexion_r = 2.16651 17 | knee_angle_r = -9.6708 18 | ankle_angle_r = 0.417802 19 | hip_flexion_l = -6.81814 20 | knee_angle_l = -0.00608301 21 | ankle_angle_l = 7.48565 22 | } 23 | -------------------------------------------------------------------------------- /sconegym/data/InitStateGait10.zml: -------------------------------------------------------------------------------- 1 | values { 2 | pelvis_tilt = -0.0336387 3 | pelvis_tx = 0 4 | pelvis_ty = 0.931164 5 | hip_flexion_r = 0.165239 6 | knee_angle_r = -0.0888009 7 | ankle_angle_r = 0.0197104 8 | hip_flexion_l = 0.232604 9 | knee_angle_l = -1.22703 10 | ankle_angle_l = -0.167279 11 | } 12 | velocities { 13 | pelvis_tilt = -0.572135 14 | pelvis_tx = 1 15 | pelvis_ty = 0.0545873 16 | hip_flexion_r = -0.576377 17 | knee_angle_r = 0.175894 18 | ankle_angle_r = 0.988937 19 | hip_flexion_l = 4.90666 20 | knee_angle_l = -3.59786 21 | ankle_angle_l = 0.633253 22 | } 23 | -------------------------------------------------------------------------------- /sconegym/data-v1/InitStateGait10.zml: -------------------------------------------------------------------------------- 1 | values { 2 | pelvis_tilt = -0.0336387 3 | pelvis_tx = 0 4 | pelvis_ty = 0.931164 5 | hip_flexion_r = 0.165239 6 | knee_angle_r = -0.0888009 7 | ankle_angle_r = 0.0197104 8 | hip_flexion_l = 0.232604 9 | knee_angle_l = -1.22703 10 | ankle_angle_l = -0.167279 11 | } 12 | velocities { 13 | pelvis_tilt = -0.572135 14 | pelvis_tx = 1 15 | pelvis_ty = 0.0545873 16 | hip_flexion_r = -0.576377 17 | knee_angle_r = 0.175894 18 | ankle_angle_r = 0.988937 19 | hip_flexion_l = 4.90666 20 | knee_angle_l = -3.59786 21 | ankle_angle_l = 0.633253 22 | } 23 | -------------------------------------------------------------------------------- /sconegym/data-v1/InitStateRun55.zml: -------------------------------------------------------------------------------- 1 | values { 2 | pelvis_tx = 0 3 | pelvis_ty = 0.925037 4 | pelvis_tilt = -0.17427 5 | lumbar_extension = -0.00517378 6 | hip_flexion_r = -0.1104 7 | knee_angle_r = -0.864166 8 | ankle_angle_r = -0.813631 9 | hip_flexion_l = 0.271449 10 | knee_angle_l = 0.0355191 11 | ankle_angle_l = -0.100597 12 | } 13 | velocities { 14 | pelvis_tx = 5.5 15 | pelvis_ty = -0.569601 16 | pelvis_tilt = 1.46663 17 | lumbar_extension = 0.184504 18 | hip_flexion_r = 2.16651 19 | knee_angle_r = -9.6708 20 | ankle_angle_r = 0.417802 21 | hip_flexion_l = -6.81814 22 | knee_angle_l = -0.00608301 23 | ankle_angle_l = 7.48565 24 | } 25 | -------------------------------------------------------------------------------- /example_environment.py: -------------------------------------------------------------------------------- 1 | import gym 2 | import sconegym 3 | 4 | # create the sconegym env 5 | env = gym.make("sconewalk_h0918-v0", use_delayed_sensors=True) 6 | action = env.action_space.sample() 7 | for ep in range(100): 8 | if ep % 10 == 0: 9 | env.store_next_episode() # Store results of every 10th episode 10 | 11 | ep_steps = 0 12 | ep_tot_reward = 0 13 | state = env.reset() 14 | 15 | while True: 16 | # samples random action 17 | action = env.action_space.sample() 18 | # applies action and advances environment by one step 19 | next_state, reward, done, info = env.step(action) 20 | 21 | ep_steps += 1 22 | ep_tot_reward += reward 23 | 24 | # check if done 25 | if done or (ep_steps >= 1000): 26 | print( 27 | f"Episode {ep} ending; steps={ep_steps}; reward={ep_tot_reward:0.3f}; \ 28 | com={env.model.com_pos()}" 29 | ) 30 | break 31 | 32 | env.close() 33 | -------------------------------------------------------------------------------- /example_deprl.py: -------------------------------------------------------------------------------- 1 | import gym, deprl 2 | import sconegym 3 | 4 | # create the sconegym env 5 | env = gym.make("sconerun_h2190-v0") 6 | policy = deprl.load_baseline(env) 7 | env.seed(0) 8 | for ep in range(5): 9 | if ep % 1 == 0: 10 | env.store_next_episode() # Store results of every 10th episode 11 | 12 | ep_steps = 0 13 | ep_tot_reward = 0 14 | state = env.reset() 15 | 16 | while True: 17 | # samples random action 18 | action = policy(state) 19 | # applies action and advances environment by one step 20 | state, reward, done, info = env.step(action) 21 | 22 | ep_steps += 1 23 | ep_tot_reward += reward 24 | 25 | # check if done 26 | if done or (ep_steps >= 1000): 27 | print( 28 | f"Episode {ep} ending; steps={ep_steps}; reward={ep_tot_reward:0.3f}; \ 29 | com={env.model.com_pos()}" 30 | ) 31 | env.write_now() 32 | env.reset() 33 | break 34 | 35 | env.close() 36 | -------------------------------------------------------------------------------- /test_environments.py: -------------------------------------------------------------------------------- 1 | import gym 2 | import sconegym 3 | 4 | def gym_test(environment_name): 5 | env = gym.make(environment_name) 6 | 7 | print(f'Testing environment {environment_name}') 8 | for episode in range(5): 9 | state = env.reset() 10 | env.store_next_episode() 11 | 12 | total_reward = 0 13 | for step in range(1,1000): 14 | # samples random action 15 | action = env.action_space.sample() 16 | 17 | # applies action and advances environment by one step 18 | next_state, reward, done, info = env.step(action) 19 | total_reward += reward 20 | 21 | # check if done 22 | if done: 23 | break 24 | 25 | # episode finished 26 | print(f'Episode {episode} finished; steps={step}; reward={total_reward:0.3f}') 27 | 28 | # cleanup environment 29 | env.close() 30 | 31 | # evaluate all environments in gym 32 | env_names = [env_spec.id for env_spec in gym.envs.registry.all() if env_spec.id.startswith('scone')] 33 | for env_name in env_names: 34 | gym_test(env_name) 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # sconegym 2 | Gym environments for predictive biomechanical simulations using reinforcement learning. 3 | ## Installation 4 | 1. Make sure Python 3.9 is installed on your system 5 | 2. Install the [latest version of SCONE](https://scone.software) 6 | 3. *Optional*: for faster simulations and access to all gym environments, be sure to activate the [Hyfydy simulation engine](https://scone.software/doku.php?id=hyfydy) inside SCONE. Without Hyfydy, you are limited to using OpenSim, which takes much longer to optimize. More information and a free trial can be found on the [Hyfydy website](https://hyfydy.com). 7 | 4. Clone the sconegym repository 8 | 5. Open a console, navigate to your local sconegym folder and type: 9 | 6. `pip install -r requirements.txt` to install the requirements 10 | 7. `pip install -e .` (the `-e` flag will ensure the package automatically gets updated when you update the sconegym repository) 11 | 8. To see if everything works, try out the `example_environment.py` or `test_environments.py` from the sconegym folder 12 | 9. To test sconegym in combination with [depRL](https://github.com/martius-lab/depRL), try running `example_deprl.py`, after following the instructions on the [depRL website](https://github.com/martius-lab/depRL) 13 | ## Render and Analyze 14 | Results of an optimization can be rendered and analyzed in SCONE Studio, using the following steps: 15 | 1. Open SCONE Studio 16 | 2. In the Optimization Results pane on the left, navigate to any checkpoint file (extension `.pt`) and double-click the file 17 | 3. A number of rollouts will be performed, and results will be stored as `.sto` files inside the SCONE data folder, in a subfolder below the `.pt file`. The name of the subfolder starts with `run_checkpoint` and ends with the checkpoint number. 18 | 4. Double-click on any of the `.sto` files to open and display them 19 | 5. In addition to the 3D renders, results can be analyzed via the Analysis Window, and gaits analysis can be performed via `Tools -> Gait Analysis` 20 | 6. For more information, see the [SCONE Website](https://scone.software) 21 | ## Contributors 22 | * Pierre Schumacher [@P-Schumacher](https://github.com/P-Schumacher) 23 | * Thomas Geijtenbeek [@tgeijten](https://github.com/tgeijten) 24 | -------------------------------------------------------------------------------- /sconegym/data/neural_delays_FEA_v4.zml: -------------------------------------------------------------------------------- 1 | neural_delays { 2 | pelvis_tilt = 0.100 3 | pelvis_list = 0.100 4 | pelvis_rotation = 0.100 5 | pelvis_rx = 0.100 6 | pelvis_ry = 0.100 7 | pelvis_rz = 0.100 8 | lumbar_extension = 0.010 9 | lumbar_bending = 0.010 10 | lumbar_rotation = 0.010 11 | thorax_extension = 0.010 12 | thorax_bending = 0.010 13 | thorax_rotation = 0.010 14 | hip_flexion = 0.010 15 | hip_adduction = 0.010 16 | hip_rotation = 0.010 17 | knee_angle = 0.020 18 | ankle_angle = 0.040 19 | ankle_inversion = 0.040 20 | 21 | head = 0.100 22 | torso = 0.100 23 | lumbar = 0.100 24 | pelvis = 0.100 25 | 26 | hamstrings = 0.010 27 | glut_max = 0.010 28 | iliopsoas = 0.010 29 | vasti = 0.020 30 | bifemsh = 0.020 31 | gastroc = 0.040 32 | 33 | glut_med = 0.010 34 | glut_med1 = 0.010 35 | glut_med2 = 0.010 36 | glut_med3 = 0.010 37 | glut_min = 0.010 38 | glut_min1 = 0.010 39 | glut_min2 = 0.010 40 | glut_min3 = 0.010 41 | glut_max1 = 0.010 42 | glut_max2 = 0.010 43 | glut_max3 = 0.010 44 | semimem = 0.010 45 | semiten = 0.010 46 | bifemlh = 0.010 47 | bifemsh = 0.020 48 | sar = 0.010 49 | add_long = 0.010 50 | add_brev = 0.010 51 | add_mag = 0.010 52 | add_mag1 = 0.010 53 | add_mag2 = 0.010 54 | add_mag3 = 0.010 55 | tfl = 0.010 56 | pect = 0.010 57 | grac = 0.010 58 | iliacus = 0.010 59 | psoas = 0.010 60 | quad_fem = 0.010 61 | gem = 0.010 62 | peri = 0.010 63 | rect_fem = 0.010 64 | vas_med = 0.020 65 | vas_int = 0.020 66 | vas_lat = 0.020 67 | gas_med = 0.040 68 | gas_lat = 0.040 69 | soleus = 0.040 70 | tib_post = 0.040 71 | flex_dig = 0.040 72 | flex_hal = 0.040 73 | tib_ant = 0.040 74 | per_brev = 0.040 75 | per_long = 0.040 76 | per_tert = 0.040 77 | ext_dig = 0.040 78 | ext_hal = 0.040 79 | 80 | ercspn = 0.010 81 | intobl = 0.010 82 | extobl = 0.010 83 | rect_abd = 0.010 84 | erec_sp = 0.010 85 | int_obl = 0.010 86 | ext_obl = 0.010 87 | quad_lumb = 0.010 88 | ql_ant = 0.010 89 | ql_post = 0.010 90 | ql_mid = 0.010 91 | erec_sp_pt = 0.010 92 | erec_sp_pl = 0.010 93 | erec_sp_lt = 0.010 94 | erec_sp_st = 0.010 95 | "es_plv-trx" = 0.010 96 | "es_plv-lmb" = 0.010 97 | "es_lmb-trx" = 0.010 98 | "es_sac-trx" = 0.010 99 | } 100 | -------------------------------------------------------------------------------- /sconegym/data-v1/neural_delays_FEA_v4.zml: -------------------------------------------------------------------------------- 1 | neural_delays { 2 | pelvis_tilt = 0.100 3 | pelvis_list = 0.100 4 | pelvis_rotation = 0.100 5 | pelvis_rx = 0.100 6 | pelvis_ry = 0.100 7 | pelvis_rz = 0.100 8 | lumbar_extension = 0.010 9 | lumbar_bending = 0.010 10 | lumbar_rotation = 0.010 11 | thorax_extension = 0.010 12 | thorax_bending = 0.010 13 | thorax_rotation = 0.010 14 | hip_flexion = 0.010 15 | hip_adduction = 0.010 16 | hip_rotation = 0.010 17 | knee_angle = 0.020 18 | ankle_angle = 0.040 19 | ankle_inversion = 0.040 20 | 21 | head = 0.100 22 | torso = 0.100 23 | lumbar = 0.100 24 | pelvis = 0.100 25 | 26 | hamstrings = 0.010 27 | glut_max = 0.010 28 | iliopsoas = 0.010 29 | vasti = 0.020 30 | bifemsh = 0.020 31 | gastroc = 0.040 32 | 33 | glut_med = 0.010 34 | glut_med1 = 0.010 35 | glut_med2 = 0.010 36 | glut_med3 = 0.010 37 | glut_min = 0.010 38 | glut_min1 = 0.010 39 | glut_min2 = 0.010 40 | glut_min3 = 0.010 41 | glut_max1 = 0.010 42 | glut_max2 = 0.010 43 | glut_max3 = 0.010 44 | semimem = 0.010 45 | semiten = 0.010 46 | bifemlh = 0.010 47 | bifemsh = 0.020 48 | sar = 0.010 49 | add_long = 0.010 50 | add_brev = 0.010 51 | add_mag = 0.010 52 | add_mag1 = 0.010 53 | add_mag2 = 0.010 54 | add_mag3 = 0.010 55 | tfl = 0.010 56 | pect = 0.010 57 | grac = 0.010 58 | iliacus = 0.010 59 | psoas = 0.010 60 | quad_fem = 0.010 61 | gem = 0.010 62 | peri = 0.010 63 | rect_fem = 0.010 64 | vas_med = 0.020 65 | vas_int = 0.020 66 | vas_lat = 0.020 67 | gas_med = 0.040 68 | gas_lat = 0.040 69 | soleus = 0.040 70 | tib_post = 0.040 71 | flex_dig = 0.040 72 | flex_hal = 0.040 73 | tib_ant = 0.040 74 | per_brev = 0.040 75 | per_long = 0.040 76 | per_tert = 0.040 77 | ext_dig = 0.040 78 | ext_hal = 0.040 79 | 80 | ercspn = 0.010 81 | intobl = 0.010 82 | extobl = 0.010 83 | rect_abd = 0.010 84 | erec_sp = 0.010 85 | int_obl = 0.010 86 | ext_obl = 0.010 87 | quad_lumb = 0.010 88 | ql_ant = 0.010 89 | ql_post = 0.010 90 | ql_mid = 0.010 91 | erec_sp_pt = 0.010 92 | erec_sp_pl = 0.010 93 | erec_sp_lt = 0.010 94 | erec_sp_st = 0.010 95 | "es_plv-trx" = 0.010 96 | "es_plv-lmb" = 0.010 97 | "es_lmb-trx" = 0.010 98 | "es_sac-trx" = 0.010 99 | } 100 | -------------------------------------------------------------------------------- /sconetools.py: -------------------------------------------------------------------------------- 1 | # sconetools -- helper module to find sconepy 2 | # (C) Copyright Thomas Geijtenbeek 3 | # This file is part of SCONE. For more information, see http://scone.software. 4 | 5 | import sys 6 | import os 7 | import platform 8 | import pathlib 9 | import importlib.util 10 | 11 | # if sys.version_info < (3,9) or sys.version_info >= (3,10): 12 | # raise Exception("sconepy only supports Python 3.9 -- current version: " + platform.python_version() ) 13 | 14 | path_to_sconepy = "" 15 | 16 | def try_find_sconepy(pathlist): 17 | global path_to_sconepy 18 | if path_to_sconepy: 19 | return; # already found 20 | for path in pathlist: 21 | if path: 22 | if sorted(pathlib.Path(path).glob("sconepy*.*")): 23 | path_to_sconepy = str(path) 24 | return; 25 | 26 | # search for sconepy in os-specific paths 27 | if importlib.util.find_spec("sconepy") is None: 28 | path_list = [] 29 | 30 | if sys.platform.startswith("win"): 31 | if scone_install := os.getenv("SCONE_PATH"): 32 | path_list.append(scone_install + "/bin") 33 | path_list.extend([ 34 | os.getenv("LOCALAPPDATA") + "/SCONE/bin", 35 | os.getenv("ProgramFiles") + "/SCONE/bin", 36 | ]) 37 | elif sys.platform.startswith("linux"): 38 | if scone_install := os.getenv("SCONE_PATH"): 39 | path_list.append(scone_install + "/lib") 40 | path_list.extend([ 41 | "/opt/scone-core/lib", 42 | pathlib.Path.home() / "scone-core/lib", 43 | "/opt/scone/lib", 44 | pathlib.Path.home() / "scone/lib" 45 | ]) 46 | elif sys.platform.startswith("darwin"): 47 | if scone_install := os.getenv("SCONE_PATH"): 48 | path_list.append(scone_install + "/lib") 49 | path_list.extend([ 50 | "/Applications/SCONE.app/Contents/MacOS/lib", 51 | pathlib.Path.home() / "SCONE.app/Contents/MacOS/lib" 52 | ]) 53 | 54 | # find sconepy in path_list 55 | try_find_sconepy(path_list) 56 | 57 | # check if we succeeded 58 | if path_to_sconepy: 59 | print("Found sconepy at", path_to_sconepy) 60 | sys.path.append(path_to_sconepy) 61 | else: 62 | print("Could not find sconepy in", path_list) 63 | raise Exception("Could not find SconePy in " + path_list) 64 | 65 | import sconepy -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # DEPRL baselines 2 | baselines_DEPRL/ 3 | 4 | 5 | # Byte-compiled / optimized / DLL files 6 | __pycache__/ 7 | *.py[cod] 8 | *$py.class 9 | 10 | # C extensions 11 | *.so 12 | 13 | # Distribution / packaging 14 | .Python 15 | build/ 16 | develop-eggs/ 17 | dist/ 18 | downloads/ 19 | eggs/ 20 | .eggs/ 21 | lib/ 22 | lib64/ 23 | parts/ 24 | sdist/ 25 | var/ 26 | wheels/ 27 | share/python-wheels/ 28 | *.egg-info/ 29 | .installed.cfg 30 | *.egg 31 | MANIFEST 32 | 33 | # PyInstaller 34 | # Usually these files are written by a python script from a template 35 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 36 | *.manifest 37 | *.spec 38 | 39 | # Installer logs 40 | pip-log.txt 41 | pip-delete-this-directory.txt 42 | 43 | # Unit test / coverage reports 44 | htmlcov/ 45 | .tox/ 46 | .nox/ 47 | .coverage 48 | .coverage.* 49 | .cache 50 | nosetests.xml 51 | coverage.xml 52 | *.cover 53 | *.py,cover 54 | .hypothesis/ 55 | .pytest_cache/ 56 | cover/ 57 | 58 | # Translations 59 | *.mo 60 | *.pot 61 | 62 | # Django stuff: 63 | *.log 64 | local_settings.py 65 | db.sqlite3 66 | db.sqlite3-journal 67 | 68 | # Flask stuff: 69 | instance/ 70 | .webassets-cache 71 | 72 | # Scrapy stuff: 73 | .scrapy 74 | 75 | # Sphinx documentation 76 | docs/_build/ 77 | 78 | # PyBuilder 79 | .pybuilder/ 80 | target/ 81 | 82 | # Jupyter Notebook 83 | .ipynb_checkpoints 84 | 85 | # IPython 86 | profile_default/ 87 | ipython_config.py 88 | 89 | # pyenv 90 | # For a library or package, you might want to ignore these files since the code is 91 | # intended to run in multiple environments; otherwise, check them in: 92 | # .python-version 93 | 94 | # pipenv 95 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 96 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 97 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 98 | # install all needed dependencies. 99 | #Pipfile.lock 100 | 101 | # poetry 102 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. 103 | # This is especially recommended for binary packages to ensure reproducibility, and is more 104 | # commonly ignored for libraries. 105 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control 106 | #poetry.lock 107 | 108 | # pdm 109 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. 110 | #pdm.lock 111 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it 112 | # in version control. 113 | # https://pdm.fming.dev/#use-with-ide 114 | .pdm.toml 115 | 116 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm 117 | __pypackages__/ 118 | 119 | # Celery stuff 120 | celerybeat-schedule 121 | celerybeat.pid 122 | 123 | # SageMath parsed files 124 | *.sage.py 125 | 126 | # Environments 127 | .env 128 | .venv 129 | env/ 130 | venv/ 131 | ENV/ 132 | env.bak/ 133 | venv.bak/ 134 | 135 | # Spyder project settings 136 | .spyderproject 137 | .spyproject 138 | 139 | # Rope project settings 140 | .ropeproject 141 | 142 | # mkdocs documentation 143 | /site 144 | 145 | # mypy 146 | .mypy_cache/ 147 | .dmypy.json 148 | dmypy.json 149 | 150 | # Pyre type checker 151 | .pyre/ 152 | 153 | # pytype static type analyzer 154 | .pytype/ 155 | 156 | # Cython debug symbols 157 | cython_debug/ 158 | 159 | # PyCharm 160 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can 161 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 162 | # and can be added to the global gitignore or merged into this file. For a more nuclear 163 | # option (not recommended) you can uncomment the following to ignore the entire idea folder. 164 | #.idea/ 165 | -------------------------------------------------------------------------------- /sconegym/init_v0.py: -------------------------------------------------------------------------------- 1 | import os 2 | from gym.envs.registration import register 3 | curr_dir = os.path.dirname(os.path.abspath(__file__)) 4 | 5 | 6 | # Walk Environments 7 | register(id="sconewalk_h0918-v1", 8 | entry_point="sconegym.gaitgym:GaitGym", 9 | kwargs={ 10 | 'model_file': curr_dir + '/data-v1/H0918.scone', 11 | 'obs_type': '2D', 12 | 'left_leg_idxs': [3, 4, 5], 13 | 'right_leg_idxs': [6, 7, 8], 14 | 'clip_actions': True, 15 | 'run': False, 16 | 'target_vel': 1.2, 17 | 'leg_switch': True, 18 | 'rew_keys':{ 19 | "vel_coeff": 10, 20 | "grf_coeff": -0.07281, 21 | "joint_limit_coeff": -0.1307, 22 | "smooth_coeff": -0.097, 23 | "nmuscle_coeff": -1.57929, 24 | "self_contact_coeff": 0.0, 25 | } 26 | } 27 | ) 28 | 29 | register(id="sconewalk_h0918_osim-v1", 30 | entry_point="sconegym.gaitgym:GaitGym", 31 | kwargs={ 32 | 'model_file': curr_dir + '/data-v1/H0918_osim.scone', 33 | 'obs_type': '2D', 34 | 'left_leg_idxs': [3, 4, 5], 35 | 'right_leg_idxs': [6, 7, 8], 36 | 'clip_actions': True, 37 | 'run': False, 38 | 'target_vel': 1.2, 39 | 'leg_switch': True, 40 | 'rew_keys':{ 41 | "vel_coeff": 10, 42 | "grf_coeff": -0.07281, 43 | "joint_limit_coeff": -0.1307, 44 | "smooth_coeff": -0.097, 45 | "nmuscle_coeff": -1.57929, 46 | "self_contact_coeff": 0.0, 47 | } 48 | } 49 | ) 50 | 51 | register(id="sconewalk_h1622-v1", 52 | entry_point="sconegym.gaitgym:GaitGym", 53 | kwargs={ 54 | 'model_file': curr_dir + '/data-v1/H1622.scone', 55 | 'obs_type': '3D', 56 | 'left_leg_idxs': [6, 7, 8, 9, 10], 57 | 'right_leg_idxs': [11, 12, 13, 14, 15], 58 | 'clip_actions': True, 59 | 'run': False, 60 | 'target_vel': 1.2, 61 | 'leg_switch': True, 62 | 'rew_keys':{ 63 | "vel_coeff": 10, 64 | "grf_coeff": -0.07281, 65 | "joint_limit_coeff": -0.1307, 66 | "smooth_coeff": -0.097, 67 | "nmuscle_coeff": -1.57929, 68 | "self_contact_coeff": 0.0, 69 | } 70 | } 71 | ) 72 | 73 | register(id="sconewalk_h2190-v1", 74 | entry_point="sconegym.gaitgym:GaitGym", 75 | kwargs={ 76 | 'model_file': curr_dir + '/data-v1/H2190.scone', 77 | 'obs_type': '3D', 78 | 'left_leg_idxs': [6, 7, 8, 9, 10, 11], 79 | 'right_leg_idxs': [12, 13, 14, 15, 16, 17], 80 | 'clip_actions': True, 81 | 'run': False, 82 | 'target_vel': 1.2, 83 | 'leg_switch': True, 84 | 'rew_keys':{ 85 | "vel_coeff": 10, 86 | "grf_coeff": -0.07281, 87 | "joint_limit_coeff": -0.1307, 88 | "smooth_coeff": -0.097, 89 | "nmuscle_coeff": -1.57929, 90 | "self_contact_coeff": 0.0, 91 | } 92 | }, 93 | ) 94 | 95 | # Run Environments 96 | register(id="sconerun_h0918-v1", 97 | entry_point="sconegym.gaitgym:GaitGym", 98 | kwargs={ 99 | 'model_file': curr_dir + '/data-v1/H0918_run.scone', 100 | 'obs_type': '2D', 101 | 'left_leg_idxs': [3, 4, 5], 102 | 'right_leg_idxs': [6, 7, 8], 103 | 'clip_actions': False, 104 | 'run': True, 105 | 'target_vel': 1.2, 106 | 'leg_switch': True, 107 | 'rew_keys':{ 108 | "vel_coeff": 10, 109 | "grf_coeff": -0.07281, 110 | "joint_limit_coeff": -0.1307, 111 | "smooth_coeff": -0.097, 112 | "nmuscle_coeff": -1.57929, 113 | "self_contact_coeff": -10, 114 | } 115 | } 116 | ) 117 | 118 | register(id="sconerun_h1622-v1", 119 | entry_point="sconegym.gaitgym:GaitGym", 120 | kwargs={ 121 | 'model_file': curr_dir + '/data-v1/H1622_run.scone', 122 | 'obs_type': '3D', 123 | 'left_leg_idxs': [6, 7, 8, 9, 10], 124 | 'right_leg_idxs': [11, 12, 13, 14, 15], 125 | 'clip_actions': False, 126 | 'run': True, 127 | 'target_vel': 1.2, 128 | 'leg_switch': True, 129 | 'rew_keys':{ 130 | "vel_coeff": 10, 131 | "grf_coeff": -0.07281, 132 | "joint_limit_coeff": -0.1307, 133 | "smooth_coeff": -0.097, 134 | "nmuscle_coeff": -1.57929, 135 | "self_contact_coeff": -10, 136 | } 137 | }) 138 | 139 | register(id="sconerun_h2190-v1", 140 | entry_point="sconegym.gaitgym:GaitGym", 141 | kwargs={ 142 | 'model_file': curr_dir + '/data-v1/H2190_run.scone', 143 | 'obs_type': '3D', 144 | 'left_leg_idxs': [6, 7, 8, 9, 10, 11], 145 | 'right_leg_idxs': [12, 13, 14, 15, 16, 17], 146 | 'clip_actions': False, 147 | 'run': True, 148 | 'target_vel': 1.2, 149 | 'leg_switch': True, 150 | 'rew_keys':{ 151 | "vel_coeff": 10, 152 | "grf_coeff": -0.07281, 153 | "joint_limit_coeff": -0.1307, 154 | "smooth_coeff": -0.097, 155 | "nmuscle_coeff": -1.57929, 156 | "self_contact_coeff": -10, 157 | } 158 | } 159 | ) 160 | 161 | # v0 Environments 162 | register(id="sconewalk_h0918-v0", 163 | entry_point="sconegym.gaitgym:GaitGym", 164 | kwargs={ 165 | 'model_file': curr_dir + '/data/H0918.scone', 166 | 'obs_type': '2D', 167 | 'left_leg_idxs': [3, 4, 5], 168 | 'right_leg_idxs': [6, 7, 8], 169 | 'clip_actions': True, 170 | 'run': False, 171 | 'target_vel': 1.2, 172 | 'leg_switch': True, 173 | 'rew_keys':{ 174 | "vel_coeff": 10, 175 | "grf_coeff": -0.07281, 176 | "joint_limit_coeff": -0.1307, 177 | "smooth_coeff": -0.097, 178 | "nmuscle_coeff": -1.57929, 179 | "self_contact_coeff": 0.0, 180 | } 181 | } 182 | ) 183 | 184 | register(id="sconewalk_h1622-v0", 185 | entry_point="sconegym.gaitgym:GaitGym", 186 | kwargs={ 187 | 'model_file': curr_dir + '/data/H1622.scone', 188 | 'obs_type': '3D', 189 | 'left_leg_idxs': [6, 7, 8, 9, 10], 190 | 'right_leg_idxs': [11, 12, 13, 14, 15], 191 | 'clip_actions': True, 192 | 'run': False, 193 | 'target_vel': 1.2, 194 | 'leg_switch': True, 195 | 'rew_keys':{ 196 | "vel_coeff": 10, 197 | "grf_coeff": -0.07281, 198 | "joint_limit_coeff": -0.1307, 199 | "smooth_coeff": -0.097, 200 | "nmuscle_coeff": -1.57929, 201 | "self_contact_coeff": 0.0, 202 | } 203 | } 204 | ) 205 | 206 | register(id="sconewalk_h2190-v0", 207 | entry_point="sconegym.gaitgym:GaitGym", 208 | kwargs={ 209 | 'model_file': curr_dir + '/data/H2190.scone', 210 | 'obs_type': '3D', 211 | 'left_leg_idxs': [6, 7, 8, 9, 10, 11], 212 | 'right_leg_idxs': [12, 13, 14, 15, 16, 17], 213 | 'clip_actions': True, 214 | 'run': False, 215 | 'target_vel': 1.2, 216 | 'leg_switch': True, 217 | 'rew_keys':{ 218 | "vel_coeff": 10, 219 | "grf_coeff": -0.07281, 220 | "joint_limit_coeff": -0.1307, 221 | "smooth_coeff": -0.097, 222 | "nmuscle_coeff": -1.57929, 223 | "self_contact_coeff": 0.0, 224 | } 225 | }, 226 | ) 227 | 228 | register(id="sconerun_h0918-v0", 229 | entry_point="sconegym.gaitgym:GaitGym", 230 | kwargs={ 231 | 'model_file': curr_dir + '/data/H0918_S2.scone', 232 | 'obs_type': '2D', 233 | 'left_leg_idxs': [3, 4, 5], 234 | 'right_leg_idxs': [6, 7, 8], 235 | 'clip_actions': False, 236 | 'run': True, 237 | 'target_vel': 1.2, 238 | 'leg_switch': True, 239 | 'rew_keys':{ 240 | "vel_coeff": 10, 241 | "grf_coeff": -0.07281, 242 | "joint_limit_coeff": -0.1307, 243 | "smooth_coeff": -0.097, 244 | "nmuscle_coeff": -1.57929, 245 | "self_contact_coeff": -10, 246 | } 247 | } 248 | ) 249 | 250 | register(id="sconerun_h1622-v0", 251 | entry_point="sconegym.gaitgym:GaitGym", 252 | kwargs={ 253 | 'model_file': curr_dir + '/data/H1622_S2.scone', 254 | 'obs_type': '3D', 255 | 'left_leg_idxs': [6, 7, 8, 9, 10], 256 | 'right_leg_idxs': [11, 12, 13, 14, 15], 257 | 'clip_actions': False, 258 | 'run': True, 259 | 'target_vel': 1.2, 260 | 'leg_switch': True, 261 | 'rew_keys':{ 262 | "vel_coeff": 10, 263 | "grf_coeff": -0.07281, 264 | "joint_limit_coeff": -0.1307, 265 | "smooth_coeff": -0.097, 266 | "nmuscle_coeff": -1.57929, 267 | "self_contact_coeff": -10, 268 | } 269 | }) 270 | 271 | register(id="sconerun_h2190-v0", 272 | entry_point="sconegym.gaitgym:GaitGym", 273 | kwargs={ 274 | 'model_file': curr_dir + '/data/H2190_S2.scone', 275 | 'obs_type': '3D', 276 | 'left_leg_idxs': [6, 7, 8, 9, 10, 11], 277 | 'right_leg_idxs': [12, 13, 14, 15, 16, 17], 278 | 'clip_actions': False, 279 | 'run': True, 280 | 'target_vel': 1.2, 281 | 'leg_switch': True, 282 | 'rew_keys':{ 283 | "vel_coeff": 10, 284 | "grf_coeff": -0.07281, 285 | "joint_limit_coeff": -0.1307, 286 | "smooth_coeff": -0.097, 287 | "nmuscle_coeff": -1.57929, 288 | "self_contact_coeff": -10, 289 | } 290 | } 291 | ) 292 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /sconegym/data/H0918.hfd: -------------------------------------------------------------------------------- 1 | model { 2 | material { 3 | name = default_material 4 | static_friction = 0.9 5 | dynamic_friction = 0.6 6 | stiffness = 5975.21 7 | damping = 1 8 | } 9 | model_options { 10 | joint_stiffness = 1e+06 11 | joint_limit_stiffness = 500 12 | } 13 | body { 14 | name = ground 15 | mass = 0 16 | inertia { x = 0 y = 0 z = 0 } 17 | } 18 | body { 19 | name = pelvis 20 | mass = 11.777 21 | inertia { x = 0.1028 y = 0.0871 z = 0.0579 } 22 | pos { x = -0.0707 y = 0 z = 0 } 23 | mesh { file = sacrum.vtp pos { x = 0.0707 y = 0 z = 0 } } 24 | mesh { file = pelvis.vtp pos { x = 0.0707 y = 0 z = 0 } } 25 | mesh { file = l_pelvis.vtp pos { x = 0.0707 y = 0 z = 0 } } 26 | } 27 | body { 28 | name = femur_r 29 | mass = 9.3014 30 | inertia { x = 0.1339 y = 0.0351 z = 0.1412 } 31 | joint { 32 | name = hip_r 33 | parent = pelvis 34 | pos_in_parent { x = 0 y = -0.0661 z = 0.0835 } 35 | pos_in_child { x = 0 y = 0.17 z = 0 } 36 | limits { x = 0..0 y = 0..0 z = -60..120 } 37 | } 38 | mesh { file = femur.vtp pos { x = 0 y = 0.17 z = 0 } } 39 | } 40 | body { 41 | name = tibia_r 42 | mass = 3.7075 43 | inertia { x = 0.0504 y = 0.0051 z = 0.0511 } 44 | joint { 45 | name = knee_r 46 | parent = femur_r 47 | pos_in_parent { x = 0 y = -0.226 z = 0 } 48 | pos_in_child { x = 0 y = 0.1867 z = 0 } 49 | limit_stiffness = 114.592 50 | limit_damping = 2.86479 51 | limits { x = 0..0 y = 0..0 z = -120..-5 } 52 | } 53 | mesh { file = tibia.vtp pos { x = 0 y = 0.1867 z = 0 } } 54 | mesh { file = fibula.vtp pos { x = 0 y = 0.1867 z = 0 } } 55 | } 56 | body { 57 | name = calcn_r 58 | mass = 1.25 59 | inertia { x = 0.0014 y = 0.0039 z = 0.0041 } 60 | joint { 61 | name = ankle_r 62 | parent = tibia_r 63 | pos_in_parent { x = 0 y = -0.2433 z = 0 } 64 | pos_in_child { x = -0.05123 y = 0.01195 z = -0.00792 } 65 | limits { x = 0..0 y = 0..0 z = -60..60 } 66 | } 67 | mesh { file = foot.vtp pos { x = -0.1 y = -0.03 z = 0 } } 68 | mesh { file = talus.vtp pos { x = -0.05123 y = 0.01195 z = -0.00792 } } 69 | mesh { file = bofoot.vtp pos { x = 0.0788 y = -0.032 z = 0.00108 } } 70 | } 71 | body { 72 | name = femur_l 73 | mass = 9.3014 74 | inertia { x = 0.1339 y = 0.0351 z = 0.1412 } 75 | joint { 76 | name = hip_l 77 | parent = pelvis 78 | pos_in_parent { x = 0 y = -0.0661 z = -0.0835 } 79 | pos_in_child { x = 0 y = 0.17 z = 0 } 80 | limits { x = 0..0 y = 0..0 z = -60..120 } 81 | } 82 | mesh { file = l_femur.vtp pos { x = 0 y = 0.17 z = 0 } } 83 | } 84 | body { 85 | name = tibia_l 86 | mass = 3.7075 87 | inertia { x = 0.0504 y = 0.0051 z = 0.0511 } 88 | joint { 89 | name = knee_l 90 | parent = femur_l 91 | pos_in_parent { x = 0 y = -0.226 z = 0 } 92 | pos_in_child { x = 0 y = 0.1867 z = 0 } 93 | limit_stiffness = 114.592 94 | limit_damping = 2.86479 95 | limits { x = 0..0 y = 0..0 z = -120..-5 } 96 | } 97 | mesh { file = l_tibia.vtp pos { x = 0 y = 0.1867 z = 0 } } 98 | mesh { file = l_fibula.vtp pos { x = 0 y = 0.1867 z = 0 } } 99 | } 100 | body { 101 | name = calcn_l 102 | mass = 1.25 103 | inertia { x = 0.0014 y = 0.0039 z = 0.0041 } 104 | joint { 105 | name = ankle_l 106 | parent = tibia_l 107 | pos_in_parent { x = 0 y = -0.2433 z = 0 } 108 | pos_in_child { x = -0.05123 y = 0.01195 z = 0.00792 } 109 | limits { x = 0..0 y = 0..0 z = -60..60 } 110 | } 111 | mesh { file = l_foot.vtp pos { x = -0.1 y = -0.03 z = 0 } } 112 | mesh { file = l_talus.vtp pos { x = -0.05123 y = 0.01195 z = 0.00792 } } 113 | mesh { file = l_bofoot.vtp pos { x = 0.0788 y = -0.032 z = -0.00108 } } 114 | } 115 | body { 116 | name = torso 117 | mass = 34.2366 118 | inertia { x = 1.4745 y = 0.7555 z = 1.4314 } 119 | joint { 120 | name = back 121 | parent = pelvis 122 | pos_in_parent { x = -0.03 y = 0.0815 z = 0 } 123 | pos_in_child { x = 0.03 y = -0.32 z = 0 } 124 | limits { x = 0..0 y = 0..0 z = 0..0 } 125 | } 126 | mesh { file = hat_spine.vtp pos { x = 0.03 y = -0.32 z = 0 } } 127 | mesh { file = hat_jaw.vtp pos { x = 0.03 y = -0.32 z = 0 } } 128 | mesh { file = hat_skull.vtp pos { x = 0.03 y = -0.32 z = 0 } } 129 | mesh { file = hat_ribs.vtp pos { x = 0.03 y = -0.32 z = 0 } } 130 | } 131 | point_path_muscle { 132 | name = hamstrings_r 133 | max_isometric_force = 2594 134 | optimal_fiber_length = 0.0976 135 | tendon_slack_length = 0.325 136 | pennation_angle = 0.202458 137 | path [ 138 | { body = pelvis pos { x = -0.05526 y = -0.10257 z = 0.06944 } } 139 | { body = tibia_r pos { x = -0.028 y = 0.1667 z = 0.02943 } } 140 | { body = tibia_r pos { x = -0.021 y = 0.1467 z = 0.0343 } } 141 | ] 142 | } 143 | point_path_muscle { 144 | name = bifemsh_r 145 | max_isometric_force = 804 146 | optimal_fiber_length = 0.1103 147 | tendon_slack_length = 0.1 148 | pennation_angle = 0.214675 149 | path [ 150 | { body = femur_r pos { x = 0.005 y = -0.0411 z = 0.0234 } } 151 | { body = tibia_r pos { x = -0.028 y = 0.1667 z = 0.02943 } } 152 | { body = tibia_r pos { x = -0.021 y = 0.1467 z = 0.0343 } } 153 | ] 154 | } 155 | point_path_muscle { 156 | name = glut_max_r 157 | max_isometric_force = 1944 158 | optimal_fiber_length = 0.147 159 | tendon_slack_length = 0.127 160 | pennation_angle = 0 161 | path [ 162 | { body = pelvis pos { x = -0.0642 y = 0.0176 z = 0.0563 } } 163 | { body = pelvis pos { x = -0.0669 y = -0.052 z = 0.0914 } } 164 | { body = femur_r pos { x = -0.0426 y = 0.117 z = 0.0293 } } 165 | { body = femur_r pos { x = -0.0156 y = 0.0684 z = 0.0419 } } 166 | ] 167 | } 168 | point_path_muscle { 169 | name = iliopsoas_r 170 | max_isometric_force = 2342 171 | optimal_fiber_length = 0.1 172 | tendon_slack_length = 0.163 173 | pennation_angle = 0.139626 174 | path [ 175 | { body = pelvis pos { x = 0.006 y = 0.0887 z = 0.0289 } } 176 | { body = pelvis pos { x = 0.0407 y = -0.01 z = 0.076 } } 177 | { body = femur_r pos { x = 0.033 y = 0.135 z = 0.0038 } } 178 | { body = femur_r pos { x = -0.0188 y = 0.1103 z = 0.0104 } } 179 | ] 180 | } 181 | point_path_muscle { 182 | name = rect_fem_r 183 | max_isometric_force = 1169 184 | optimal_fiber_length = 0.114 185 | tendon_slack_length = 0.305 186 | pennation_angle = 0.0872665 187 | path [ 188 | { body = pelvis pos { x = 0.0412 y = -0.0311 z = 0.0968 } } 189 | { body = femur_r pos { x = 0.038 y = -0.17 z = 0.004 } } 190 | { body = tibia_r pos { x = 0.04 y = 0.2117 z = 0.0018 } } 191 | ] 192 | } 193 | point_path_muscle { 194 | name = vasti_r 195 | max_isometric_force = 4530 196 | optimal_fiber_length = 0.087 197 | tendon_slack_length = 0.136 198 | pennation_angle = 0.0523599 199 | path [ 200 | { body = femur_r pos { x = 0.029 y = -0.0224 z = 0.031 } } 201 | { body = femur_r pos { x = 0.038 y = -0.17 z = 0.007 } } 202 | { body = tibia_r pos { x = 0.04 y = 0.2117 z = 0.0018 } } 203 | ] 204 | } 205 | point_path_muscle { 206 | name = gastroc_r 207 | max_isometric_force = 2241 208 | optimal_fiber_length = 0.06 209 | tendon_slack_length = 0.39 210 | pennation_angle = 0.296706 211 | path [ 212 | { body = femur_r pos { x = -0.02 y = -0.218 z = -0.024 } } 213 | { body = calcn_r pos { x = -0.1 y = 0.001 z = -0.0053 } } 214 | ] 215 | } 216 | point_path_muscle { 217 | name = soleus_r 218 | max_isometric_force = 3549 219 | optimal_fiber_length = 0.05 220 | tendon_slack_length = 0.25 221 | pennation_angle = 0.436332 222 | path [ 223 | { body = tibia_r pos { x = -0.0024 y = 0.0334 z = 0.0071 } } 224 | { body = calcn_r pos { x = -0.1 y = 0.001 z = -0.0053 } } 225 | ] 226 | } 227 | point_path_muscle { 228 | name = tib_ant_r 229 | max_isometric_force = 1759 230 | optimal_fiber_length = 0.098 231 | tendon_slack_length = 0.223 232 | pennation_angle = 0.0872665 233 | path [ 234 | { body = tibia_r pos { x = 0.0179 y = 0.0243 z = 0.0115 } } 235 | { body = tibia_r pos { x = 0.0329 y = -0.2084 z = -0.0177 } } 236 | { body = calcn_r pos { x = 0.0166 y = -0.0122 z = -0.0305 } } 237 | ] 238 | } 239 | point_path_muscle { 240 | name = hamstrings_l 241 | max_isometric_force = 2594 242 | optimal_fiber_length = 0.0976 243 | tendon_slack_length = 0.325 244 | pennation_angle = 0.202458 245 | path [ 246 | { body = pelvis pos { x = -0.05526 y = -0.10257 z = -0.06944 } } 247 | { body = tibia_l pos { x = -0.028 y = 0.1667 z = -0.02943 } } 248 | { body = tibia_l pos { x = -0.021 y = 0.1467 z = -0.0343 } } 249 | ] 250 | } 251 | point_path_muscle { 252 | name = bifemsh_l 253 | max_isometric_force = 804 254 | optimal_fiber_length = 0.1103 255 | tendon_slack_length = 0.1 256 | pennation_angle = 0.214675 257 | path [ 258 | { body = femur_l pos { x = 0.005 y = -0.0411 z = -0.0234 } } 259 | { body = tibia_l pos { x = -0.028 y = 0.1667 z = -0.02943 } } 260 | { body = tibia_l pos { x = -0.021 y = 0.1467 z = -0.0343 } } 261 | ] 262 | } 263 | point_path_muscle { 264 | name = glut_max_l 265 | max_isometric_force = 1944 266 | optimal_fiber_length = 0.147 267 | tendon_slack_length = 0.127 268 | pennation_angle = 0 269 | path [ 270 | { body = pelvis pos { x = -0.0642 y = 0.0176 z = -0.0563 } } 271 | { body = pelvis pos { x = -0.0669 y = -0.052 z = -0.0914 } } 272 | { body = femur_l pos { x = -0.0426 y = 0.117 z = -0.0293 } } 273 | { body = femur_l pos { x = -0.0156 y = 0.0684 z = -0.0419 } } 274 | ] 275 | } 276 | point_path_muscle { 277 | name = iliopsoas_l 278 | max_isometric_force = 2342 279 | optimal_fiber_length = 0.1 280 | tendon_slack_length = 0.163 281 | pennation_angle = 0.139626 282 | path [ 283 | { body = pelvis pos { x = 0.006 y = 0.0887 z = -0.0289 } } 284 | { body = pelvis pos { x = 0.0407 y = -0.01 z = -0.076 } } 285 | { body = femur_l pos { x = 0.033 y = 0.135 z = -0.0038 } } 286 | { body = femur_l pos { x = -0.0188 y = 0.1103 z = -0.0104 } } 287 | ] 288 | } 289 | point_path_muscle { 290 | name = rect_fem_l 291 | max_isometric_force = 1169 292 | optimal_fiber_length = 0.114 293 | tendon_slack_length = 0.305 294 | pennation_angle = 0.0872665 295 | path [ 296 | { body = pelvis pos { x = 0.0412 y = -0.0311 z = -0.0968 } } 297 | { body = femur_l pos { x = 0.038 y = -0.17 z = -0.004 } } 298 | { body = tibia_l pos { x = 0.04 y = 0.2117 z = -0.0018 } } 299 | ] 300 | } 301 | point_path_muscle { 302 | name = vasti_l 303 | max_isometric_force = 4530 304 | optimal_fiber_length = 0.087 305 | tendon_slack_length = 0.136 306 | pennation_angle = 0.0523599 307 | path [ 308 | { body = femur_l pos { x = 0.029 y = -0.0224 z = -0.031 } } 309 | { body = femur_l pos { x = 0.038 y = -0.17 z = -0.007 } } 310 | { body = tibia_l pos { x = 0.04 y = 0.2117 z = -0.0018 } } 311 | ] 312 | } 313 | point_path_muscle { 314 | name = gastroc_l 315 | max_isometric_force = 2241 316 | optimal_fiber_length = 0.06 317 | tendon_slack_length = 0.39 318 | pennation_angle = 0.296706 319 | path [ 320 | { body = femur_l pos { x = -0.02 y = -0.218 z = 0.024 } } 321 | { body = calcn_l pos { x = -0.1 y = 0.001 z = 0.0053 } } 322 | ] 323 | } 324 | point_path_muscle { 325 | name = soleus_l 326 | max_isometric_force = 3549 327 | optimal_fiber_length = 0.05 328 | tendon_slack_length = 0.25 329 | pennation_angle = 0.436332 330 | path [ 331 | { body = tibia_l pos { x = -0.0024 y = 0.0334 z = -0.0071 } } 332 | { body = calcn_l pos { x = -0.1 y = 0.001 z = 0.0053 } } 333 | ] 334 | } 335 | point_path_muscle { 336 | name = tib_ant_l 337 | max_isometric_force = 1759 338 | optimal_fiber_length = 0.098 339 | tendon_slack_length = 0.223 340 | pennation_angle = 0.0872665 341 | path [ 342 | { body = tibia_l pos { x = 0.0179 y = 0.0243 z = -0.0115 } } 343 | { body = tibia_l pos { x = 0.0329 y = -0.2084 z = 0.0177 } } 344 | { body = calcn_l pos { x = 0.0166 y = -0.0122 z = 0.0305 } } 345 | ] 346 | } 347 | geometry { 348 | name = platform 349 | type = plane 350 | normal { x = -1 y = 0 z = 0 } 351 | body = ground 352 | pos { x = 0 y = 0 z = 0 } 353 | ori { x = 0 y = 0 z = -90 } 354 | } 355 | geometry { 356 | name = r_heel 357 | type = sphere 358 | radius = 0.03 359 | body = calcn_r 360 | pos { x = -0.085 y = -0.015 z = -0.005 } 361 | ori { x = 0 y = 0 z = 0 } 362 | } 363 | geometry { 364 | name = r_toe 365 | type = sphere 366 | radius = 0.03 367 | body = calcn_r 368 | pos { x = 0.085 y = -0.015 z = 0 } 369 | ori { x = 0 y = 0 z = 0 } 370 | } 371 | geometry { 372 | name = l_heel 373 | type = sphere 374 | radius = 0.03 375 | body = calcn_l 376 | pos { x = -0.085 y = -0.015 z = 0.005 } 377 | ori { x = 0 y = 0 z = 0 } 378 | } 379 | geometry { 380 | name = l_toe 381 | type = sphere 382 | radius = 0.03 383 | body = calcn_l 384 | pos { x = 0.085 y = -0.015 z = 0 } 385 | ori { x = 0 y = 0 z = 0 } 386 | } 387 | dof { name = pelvis_tilt source = pelvis_rz range = -90..90 } 388 | dof { name = pelvis_tx source = pelvis_tx range = -5..5 } 389 | dof { name = pelvis_ty source = pelvis_ty range = -1..2 default = 1 } 390 | dof { name = hip_flexion_r source = hip_rz_r range = -60..120 } 391 | dof { name = knee_angle_r source = knee_rz_r range = -120..10 } 392 | dof { name = ankle_angle_r source = ankle_rz_r range = -60..60 } 393 | dof { name = hip_flexion_l source = hip_rz_l range = -60..120 } 394 | dof { name = knee_angle_l source = knee_rz_l range = -120..10 } 395 | dof { name = ankle_angle_l source = ankle_rz_l range = -60..60 } 396 | } 397 | -------------------------------------------------------------------------------- /sconegym/data-v1/H0918v2j.hfd: -------------------------------------------------------------------------------- 1 | model { 2 | material { 3 | name = default_material 4 | static_friction = 0.9 5 | dynamic_friction = 0.6 6 | stiffness = 11006.4 7 | damping = 1 8 | } 9 | model_options { 10 | joint_stiffness = 1e+06 11 | joint_limit_stiffness = 500 12 | } 13 | body { 14 | name = ground 15 | mass = 0 16 | inertia { x = 0 y = 0 z = 0 } 17 | } 18 | body { 19 | name = pelvis 20 | mass = 11.777 21 | inertia { x = 0.1028 y = 0.0871 z = 0.0579 } 22 | pos { x = -0.0707 y = 0 z = 0 } 23 | mesh { file = sacrum.vtp pos { x = 0.0707 y = 0 z = 0 } } 24 | mesh { file = pelvis.vtp pos { x = 0.0707 y = 0 z = 0 } } 25 | mesh { file = l_pelvis.vtp pos { x = 0.0707 y = 0 z = 0 } } 26 | } 27 | body { 28 | name = femur_r 29 | mass = 9.3014 30 | inertia { x = 0.1339 y = 0.0351 z = 0.1412 } 31 | joint { 32 | name = hip_r 33 | parent = pelvis 34 | pos_in_parent { x = 0 y = -0.0661 z = 0.0835 } 35 | pos_in_child { x = 0 y = 0.17 z = 0 } 36 | limits { x = 0..0 y = 0..0 z = -30..120 } 37 | } 38 | mesh { file = femur.vtp pos { x = 0 y = 0.17 z = 0 } } 39 | } 40 | body { 41 | name = tibia_r 42 | mass = 3.7075 43 | inertia { x = 0.0504 y = 0.0051 z = 0.0511 } 44 | joint { 45 | name = knee_r 46 | parent = femur_r 47 | pos_in_parent { x = 0 y = -0.226 z = 0 } 48 | pos_in_child { x = 0 y = 0.1867 z = 0 } 49 | limit_stiffness = 114.592 50 | limit_damping = 2.86479 51 | limits { x = 0..0 y = 0..0 z = -120..-5 } 52 | } 53 | mesh { file = tibia.vtp pos { x = 0 y = 0.1867 z = 0 } } 54 | mesh { file = fibula.vtp pos { x = 0 y = 0.1867 z = 0 } } 55 | } 56 | body { 57 | name = calcn_r 58 | mass = 1.25 59 | inertia { x = 0.0014 y = 0.0039 z = 0.0041 } 60 | joint { 61 | name = ankle_r 62 | parent = tibia_r 63 | pos_in_parent { x = 0 y = -0.2433 z = 0 } 64 | pos_in_child { x = -0.05123 y = 0.01195 z = -0.00792 } 65 | limits { x = 0..0 y = 0..0 z = -60..25 } 66 | } 67 | mesh { file = foot.vtp pos { x = -0.1 y = -0.03 z = 0 } } 68 | mesh { file = talus.vtp pos { x = -0.05123 y = 0.01195 z = -0.00792 } } 69 | mesh { file = bofoot.vtp pos { x = 0.0788 y = -0.032 z = 0.00108 } } 70 | } 71 | body { 72 | name = femur_l 73 | mass = 9.3014 74 | inertia { x = 0.1339 y = 0.0351 z = 0.1412 } 75 | joint { 76 | name = hip_l 77 | parent = pelvis 78 | pos_in_parent { x = 0 y = -0.0661 z = -0.0835 } 79 | pos_in_child { x = 0 y = 0.17 z = 0 } 80 | limits { x = 0..0 y = 0..0 z = -30..120 } 81 | } 82 | mesh { file = l_femur.vtp pos { x = 0 y = 0.17 z = 0 } } 83 | } 84 | body { 85 | name = tibia_l 86 | mass = 3.7075 87 | inertia { x = 0.0504 y = 0.0051 z = 0.0511 } 88 | joint { 89 | name = knee_l 90 | parent = femur_l 91 | pos_in_parent { x = 0 y = -0.226 z = 0 } 92 | pos_in_child { x = 0 y = 0.1867 z = 0 } 93 | limit_stiffness = 114.592 94 | limit_damping = 2.86479 95 | limits { x = 0..0 y = 0..0 z = -120..-5 } 96 | } 97 | mesh { file = l_tibia.vtp pos { x = 0 y = 0.1867 z = 0 } } 98 | mesh { file = l_fibula.vtp pos { x = 0 y = 0.1867 z = 0 } } 99 | } 100 | body { 101 | name = calcn_l 102 | mass = 1.25 103 | inertia { x = 0.0014 y = 0.0039 z = 0.0041 } 104 | joint { 105 | name = ankle_l 106 | parent = tibia_l 107 | pos_in_parent { x = 0 y = -0.2433 z = 0 } 108 | pos_in_child { x = -0.05123 y = 0.01195 z = 0.00792 } 109 | limits { x = 0..0 y = 0..0 z = -60..25 } 110 | } 111 | mesh { file = l_foot.vtp pos { x = -0.1 y = -0.03 z = 0 } } 112 | mesh { file = l_talus.vtp pos { x = -0.05123 y = 0.01195 z = 0.00792 } } 113 | mesh { file = l_bofoot.vtp pos { x = 0.0788 y = -0.032 z = -0.00108 } } 114 | } 115 | body { 116 | name = torso 117 | mass = 34.2366 118 | inertia { x = 1.4745 y = 0.7555 z = 1.4314 } 119 | joint { 120 | name = back 121 | parent = pelvis 122 | pos_in_parent { x = -0.03 y = 0.0815 z = 0 } 123 | pos_in_child { x = 0.03 y = -0.32 z = 0 } 124 | limits { x = 0..0 y = 0..0 z = 0..0 } 125 | } 126 | mesh { file = hat_spine.vtp pos { x = 0.03 y = -0.32 z = 0 } } 127 | mesh { file = hat_jaw.vtp pos { x = 0.03 y = -0.32 z = 0 } } 128 | mesh { file = hat_skull.vtp pos { x = 0.03 y = -0.32 z = 0 } } 129 | mesh { file = hat_ribs.vtp pos { x = 0.03 y = -0.32 z = 0 } } 130 | } 131 | point_path_muscle { 132 | name = hamstrings_r 133 | max_isometric_force = 2594 134 | optimal_fiber_length = 0.0976 135 | tendon_slack_length = 0.319 136 | pennation_angle = 0.2025 137 | path [ 138 | { body = pelvis pos { x = -0.05526 y = -0.10257 z = 0.06944 } } 139 | { body = tibia_r pos { x = -0.028 y = 0.1667 z = 0.02943 } } 140 | { body = tibia_r pos { x = -0.021 y = 0.1467 z = 0.0343 } } 141 | ] 142 | } 143 | point_path_muscle { 144 | name = bifemsh_r 145 | max_isometric_force = 804 146 | optimal_fiber_length = 0.1103 147 | tendon_slack_length = 0.095 148 | pennation_angle = 0.2147 149 | path [ 150 | { body = femur_r pos { x = 0.005 y = -0.0411 z = 0.0234 } } 151 | { body = tibia_r pos { x = -0.028 y = 0.1667 z = 0.02943 } } 152 | { body = tibia_r pos { x = -0.021 y = 0.1467 z = 0.0343 } } 153 | ] 154 | } 155 | point_path_muscle { 156 | name = glut_max_r 157 | max_isometric_force = 1944 158 | optimal_fiber_length = 0.1569 159 | tendon_slack_length = 0.111 160 | pennation_angle = 0.3822 161 | path [ 162 | { body = pelvis pos { x = -0.0642 y = 0.0176 z = 0.0563 } } 163 | { body = pelvis pos { x = -0.0669 y = -0.052 z = 0.0914 } } 164 | { body = femur_r pos { x = -0.0426 y = 0.117 z = 0.0293 } } 165 | { body = femur_r pos { x = -0.0156 y = 0.0684 z = 0.0419 } } 166 | ] 167 | } 168 | point_path_muscle { 169 | name = iliopsoas_r 170 | max_isometric_force = 2186 171 | optimal_fiber_length = 0.1066 172 | tendon_slack_length = 0.152 173 | pennation_angle = 0.2496 174 | path [ 175 | { body = pelvis pos { x = 0.006 y = 0.0887 z = 0.0289 } } 176 | { body = pelvis pos { x = 0.0407 y = -0.01 z = 0.076 } } 177 | { body = femur_r pos { x = 0.033 y = 0.135 z = 0.0038 } } 178 | { body = femur_r pos { x = -0.0188 y = 0.1103 z = 0.0104 } } 179 | ] 180 | } 181 | point_path_muscle { 182 | name = rect_fem_r 183 | max_isometric_force = 1169 184 | optimal_fiber_length = 0.0759 185 | tendon_slack_length = 0.3449 186 | pennation_angle = 0.2426 187 | path [ 188 | { body = pelvis pos { x = 0.0412 y = -0.0311 z = 0.0968 } } 189 | { body = femur_r pos { x = 0.038 y = -0.17 z = 0.004 } } 190 | { body = tibia_r pos { x = 0.038 y = 0.2117 z = 0.0018 } } 191 | ] 192 | } 193 | point_path_muscle { 194 | name = vasti_r 195 | max_isometric_force = 4530 196 | optimal_fiber_length = 0.0993 197 | tendon_slack_length = 0.1231 198 | pennation_angle = 0.0785 199 | path [ 200 | { body = femur_r pos { x = 0.029 y = -0.0224 z = 0.031 } } 201 | { body = femur_r pos { x = 0.038 y = -0.17 z = 0.007 } } 202 | { body = tibia_r pos { x = 0.038 y = 0.2117 z = 0.0018 } } 203 | ] 204 | } 205 | point_path_muscle { 206 | name = gastroc_r 207 | max_isometric_force = 2241 208 | optimal_fiber_length = 0.051 209 | tendon_slack_length = 0.384 210 | pennation_angle = 0.1728 211 | path [ 212 | { body = femur_r pos { x = -0.02 y = -0.218 z = -0.024 } } 213 | { body = calcn_r pos { x = -0.095 y = 0.001 z = -0.0053 } } 214 | ] 215 | } 216 | point_path_muscle { 217 | name = soleus_r 218 | max_isometric_force = 3549 219 | optimal_fiber_length = 0.044 220 | tendon_slack_length = 0.248 221 | pennation_angle = 0.4939 222 | path [ 223 | { body = tibia_r pos { x = -0.0024 y = 0.0334 z = 0.0071 } } 224 | { body = calcn_r pos { x = -0.095 y = 0.001 z = -0.0053 } } 225 | ] 226 | } 227 | point_path_muscle { 228 | name = tib_ant_r 229 | max_isometric_force = 1579 230 | optimal_fiber_length = 0.0683 231 | tendon_slack_length = 0.243 232 | pennation_angle = 0.1676 233 | path [ 234 | { body = tibia_r pos { x = 0.0179 y = 0.0243 z = 0.0115 } } 235 | { body = tibia_r pos { x = 0.0329 y = -0.2084 z = -0.0177 } } 236 | { body = calcn_r pos { x = 0.0166 y = -0.0122 z = -0.0305 } } 237 | ] 238 | } 239 | point_path_muscle { 240 | name = hamstrings_l 241 | max_isometric_force = 2594 242 | optimal_fiber_length = 0.0976 243 | tendon_slack_length = 0.319 244 | pennation_angle = 0.2025 245 | path [ 246 | { body = pelvis pos { x = -0.05526 y = -0.10257 z = -0.06944 } } 247 | { body = tibia_l pos { x = -0.028 y = 0.1667 z = -0.02943 } } 248 | { body = tibia_l pos { x = -0.021 y = 0.1467 z = -0.0343 } } 249 | ] 250 | } 251 | point_path_muscle { 252 | name = bifemsh_l 253 | max_isometric_force = 804 254 | optimal_fiber_length = 0.1103 255 | tendon_slack_length = 0.095 256 | pennation_angle = 0.2147 257 | path [ 258 | { body = femur_l pos { x = 0.005 y = -0.0411 z = -0.0234 } } 259 | { body = tibia_l pos { x = -0.028 y = 0.1667 z = -0.02943 } } 260 | { body = tibia_l pos { x = -0.021 y = 0.1467 z = -0.0343 } } 261 | ] 262 | } 263 | point_path_muscle { 264 | name = glut_max_l 265 | max_isometric_force = 1944 266 | optimal_fiber_length = 0.1569 267 | tendon_slack_length = 0.111 268 | pennation_angle = 0.3822 269 | path [ 270 | { body = pelvis pos { x = -0.0642 y = 0.0176 z = -0.0563 } } 271 | { body = pelvis pos { x = -0.0669 y = -0.052 z = -0.0914 } } 272 | { body = femur_l pos { x = -0.0426 y = 0.117 z = -0.0293 } } 273 | { body = femur_l pos { x = -0.0156 y = 0.0684 z = -0.0419 } } 274 | ] 275 | } 276 | point_path_muscle { 277 | name = iliopsoas_l 278 | max_isometric_force = 2186 279 | optimal_fiber_length = 0.1066 280 | tendon_slack_length = 0.152 281 | pennation_angle = 0.2496 282 | path [ 283 | { body = pelvis pos { x = 0.006 y = 0.0887 z = -0.0289 } } 284 | { body = pelvis pos { x = 0.0407 y = -0.01 z = -0.076 } } 285 | { body = femur_l pos { x = 0.033 y = 0.135 z = -0.0038 } } 286 | { body = femur_l pos { x = -0.0188 y = 0.1103 z = -0.0104 } } 287 | ] 288 | } 289 | point_path_muscle { 290 | name = rect_fem_l 291 | max_isometric_force = 1169 292 | optimal_fiber_length = 0.0759 293 | tendon_slack_length = 0.3449 294 | pennation_angle = 0.2426 295 | path [ 296 | { body = pelvis pos { x = 0.0412 y = -0.0311 z = -0.0968 } } 297 | { body = femur_l pos { x = 0.038 y = -0.17 z = -0.004 } } 298 | { body = tibia_l pos { x = 0.038 y = 0.2117 z = -0.0018 } } 299 | ] 300 | } 301 | point_path_muscle { 302 | name = vasti_l 303 | max_isometric_force = 4530 304 | optimal_fiber_length = 0.0993 305 | tendon_slack_length = 0.1231 306 | pennation_angle = 0.0785 307 | path [ 308 | { body = femur_l pos { x = 0.029 y = -0.0224 z = -0.031 } } 309 | { body = femur_l pos { x = 0.038 y = -0.17 z = -0.007 } } 310 | { body = tibia_l pos { x = 0.038 y = 0.2117 z = -0.0018 } } 311 | ] 312 | } 313 | point_path_muscle { 314 | name = gastroc_l 315 | max_isometric_force = 2241 316 | optimal_fiber_length = 0.051 317 | tendon_slack_length = 0.384 318 | pennation_angle = 0.1728 319 | path [ 320 | { body = femur_l pos { x = -0.02 y = -0.218 z = 0.024 } } 321 | { body = calcn_l pos { x = -0.095 y = 0.001 z = 0.0053 } } 322 | ] 323 | } 324 | point_path_muscle { 325 | name = soleus_l 326 | max_isometric_force = 3549 327 | optimal_fiber_length = 0.044 328 | tendon_slack_length = 0.248 329 | pennation_angle = 0.4939 330 | path [ 331 | { body = tibia_l pos { x = -0.0024 y = 0.0334 z = -0.0071 } } 332 | { body = calcn_l pos { x = -0.095 y = 0.001 z = 0.0053 } } 333 | ] 334 | } 335 | point_path_muscle { 336 | name = tib_ant_l 337 | max_isometric_force = 1579 338 | optimal_fiber_length = 0.0683 339 | tendon_slack_length = 0.243 340 | pennation_angle = 0.1676 341 | path [ 342 | { body = tibia_l pos { x = 0.0179 y = 0.0243 z = -0.0115 } } 343 | { body = tibia_l pos { x = 0.0329 y = -0.2084 z = 0.0177 } } 344 | { body = calcn_l pos { x = 0.0166 y = -0.0122 z = 0.0305 } } 345 | ] 346 | } 347 | geometry { 348 | name = platform 349 | type = plane 350 | normal { x = -1 y = 0 z = 0 } 351 | body = ground 352 | pos { x = 0 y = 0 z = 0 } 353 | ori { x = 0 y = 0 z = -90 } 354 | } 355 | geometry { 356 | name = heel_r 357 | type = sphere 358 | radius = 0.03 359 | body = calcn_r 360 | pos { x = -0.085 y = -0.015 z = -0.005 } 361 | ori { x = 0 y = 0 z = 0 } 362 | } 363 | geometry { 364 | name = toe_r 365 | type = sphere 366 | radius = 0.03 367 | body = calcn_r 368 | pos { x = 0.085 y = -0.015 z = 0 } 369 | ori { x = 0 y = 0 z = 0 } 370 | } 371 | geometry { 372 | name = heel_l 373 | type = sphere 374 | radius = 0.03 375 | body = calcn_l 376 | pos { x = -0.085 y = -0.015 z = 0.005 } 377 | ori { x = 0 y = 0 z = 0 } 378 | } 379 | geometry { 380 | name = toe_l 381 | type = sphere 382 | radius = 0.03 383 | body = calcn_l 384 | pos { x = 0.085 y = -0.015 z = 0 } 385 | ori { x = 0 y = 0 z = 0 } 386 | } 387 | dof { name = pelvis_tilt source = pelvis_rz range = -90..90 } 388 | dof { name = pelvis_tx source = pelvis_tx range = -5..5 } 389 | dof { name = pelvis_ty source = pelvis_ty range = -1..2 default = 1 } 390 | dof { name = hip_flexion_r source = hip_rz_r range = -30..120 } 391 | dof { name = knee_angle_r source = knee_rz_r range = -120..10 } 392 | dof { name = ankle_angle_r source = ankle_rz_r range = -60..25 } 393 | dof { name = hip_flexion_l source = hip_rz_l range = -30..120 } 394 | dof { name = knee_angle_l source = knee_rz_l range = -120..10 } 395 | dof { name = ankle_angle_l source = ankle_rz_l range = -60..25 } 396 | } 397 | -------------------------------------------------------------------------------- /sconegym/data-v1/H0918Sv2j.hfd: -------------------------------------------------------------------------------- 1 | model { 2 | material { 3 | name = default_material 4 | static_friction = 0.9 5 | dynamic_friction = 0.6 6 | stiffness = 11006.4 7 | damping = 1 8 | } 9 | model_options { 10 | joint_stiffness = 1e+06 11 | joint_limit_stiffness = 500 12 | } 13 | body { 14 | name = ground 15 | mass = 0 16 | inertia { x = 0 y = 0 z = 0 } 17 | } 18 | body { 19 | name = pelvis 20 | mass = 11.777 21 | inertia { x = 0.1028 y = 0.0871 z = 0.0579 } 22 | pos { x = -0.0707 y = 0 z = 0 } 23 | mesh { file = sacrum.vtp pos { x = 0.0707 y = 0 z = 0 } } 24 | mesh { file = pelvis.vtp pos { x = 0.0707 y = 0 z = 0 } } 25 | mesh { file = l_pelvis.vtp pos { x = 0.0707 y = 0 z = 0 } } 26 | } 27 | body { 28 | name = femur_r 29 | mass = 9.3014 30 | inertia { x = 0.1339 y = 0.0351 z = 0.1412 } 31 | joint { 32 | name = hip_r 33 | parent = pelvis 34 | pos_in_parent { x = 0 y = -0.0661 z = 0.0835 } 35 | pos_in_child { x = 0 y = 0.17 z = 0 } 36 | limits { x = 0..0 y = 0..0 z = -30..120 } 37 | } 38 | mesh { file = femur.vtp pos { x = 0 y = 0.17 z = 0 } } 39 | } 40 | body { 41 | name = tibia_r 42 | mass = 3.7075 43 | inertia { x = 0.0504 y = 0.0051 z = 0.0511 } 44 | joint { 45 | name = knee_r 46 | parent = femur_r 47 | pos_in_parent { x = 0 y = -0.226 z = 0 } 48 | pos_in_child { x = 0 y = 0.1867 z = 0 } 49 | limit_stiffness = 114.592 50 | limit_damping = 2.86479 51 | limits { x = 0..0 y = 0..0 z = -120..-5 } 52 | } 53 | mesh { file = tibia.vtp pos { x = 0 y = 0.1867 z = 0 } } 54 | mesh { file = fibula.vtp pos { x = 0 y = 0.1867 z = 0 } } 55 | } 56 | body { 57 | name = calcn_r 58 | mass = 1.25 59 | inertia { x = 0.0014 y = 0.0039 z = 0.0041 } 60 | joint { 61 | name = ankle_r 62 | parent = tibia_r 63 | pos_in_parent { x = 0 y = -0.2433 z = 0 } 64 | pos_in_child { x = -0.05123 y = 0.01195 z = -0.00792 } 65 | limits { x = 0..0 y = 0..0 z = -60..25 } 66 | } 67 | mesh { file = foot.vtp pos { x = -0.1 y = -0.03 z = 0 } } 68 | mesh { file = talus.vtp pos { x = -0.05123 y = 0.01195 z = -0.00792 } } 69 | mesh { file = bofoot.vtp pos { x = 0.0788 y = -0.032 z = 0.00108 } } 70 | } 71 | body { 72 | name = femur_l 73 | mass = 9.3014 74 | inertia { x = 0.1339 y = 0.0351 z = 0.1412 } 75 | joint { 76 | name = hip_l 77 | parent = pelvis 78 | pos_in_parent { x = 0 y = -0.0661 z = -0.0835 } 79 | pos_in_child { x = 0 y = 0.17 z = 0 } 80 | limits { x = 0..0 y = 0..0 z = -30..120 } 81 | } 82 | mesh { file = l_femur.vtp pos { x = 0 y = 0.17 z = 0 } } 83 | } 84 | body { 85 | name = tibia_l 86 | mass = 3.7075 87 | inertia { x = 0.0504 y = 0.0051 z = 0.0511 } 88 | joint { 89 | name = knee_l 90 | parent = femur_l 91 | pos_in_parent { x = 0 y = -0.226 z = 0 } 92 | pos_in_child { x = 0 y = 0.1867 z = 0 } 93 | limit_stiffness = 114.592 94 | limit_damping = 2.86479 95 | limits { x = 0..0 y = 0..0 z = -120..-5 } 96 | } 97 | mesh { file = l_tibia.vtp pos { x = 0 y = 0.1867 z = 0 } } 98 | mesh { file = l_fibula.vtp pos { x = 0 y = 0.1867 z = 0 } } 99 | } 100 | body { 101 | name = calcn_l 102 | mass = 1.25 103 | inertia { x = 0.0014 y = 0.0039 z = 0.0041 } 104 | joint { 105 | name = ankle_l 106 | parent = tibia_l 107 | pos_in_parent { x = 0 y = -0.2433 z = 0 } 108 | pos_in_child { x = -0.05123 y = 0.01195 z = 0.00792 } 109 | limits { x = 0..0 y = 0..0 z = -60..25 } 110 | } 111 | mesh { file = l_foot.vtp pos { x = -0.1 y = -0.03 z = 0 } } 112 | mesh { file = l_talus.vtp pos { x = -0.05123 y = 0.01195 z = 0.00792 } } 113 | mesh { file = l_bofoot.vtp pos { x = 0.0788 y = -0.032 z = -0.00108 } } 114 | } 115 | body { 116 | name = torso 117 | mass = 34.2366 118 | inertia { x = 1.4745 y = 0.7555 z = 1.4314 } 119 | joint { 120 | name = back 121 | parent = pelvis 122 | pos_in_parent { x = -0.03 y = 0.0815 z = 0 } 123 | pos_in_child { x = 0.03 y = -0.32 z = 0 } 124 | limits { x = 0..0 y = 0..0 z = 0..0 } 125 | } 126 | mesh { file = hat_spine.vtp pos { x = 0.03 y = -0.32 z = 0 } } 127 | mesh { file = hat_jaw.vtp pos { x = 0.03 y = -0.32 z = 0 } } 128 | mesh { file = hat_skull.vtp pos { x = 0.03 y = -0.32 z = 0 } } 129 | mesh { file = hat_ribs.vtp pos { x = 0.03 y = -0.32 z = 0 } } 130 | } 131 | point_path_muscle { 132 | name = hamstrings_r 133 | max_isometric_force = 4105 134 | optimal_fiber_length = 0.0976 135 | tendon_slack_length = 0.319 136 | pennation_angle = 0.2025 137 | path [ 138 | { body = pelvis pos { x = -0.05526 y = -0.10257 z = 0.06944 } } 139 | { body = tibia_r pos { x = -0.028 y = 0.1667 z = 0.02943 } } 140 | { body = tibia_r pos { x = -0.021 y = 0.1467 z = 0.0343 } } 141 | ] 142 | } 143 | point_path_muscle { 144 | name = bifemsh_r 145 | max_isometric_force = 557 146 | optimal_fiber_length = 0.1103 147 | tendon_slack_length = 0.095 148 | pennation_angle = 0.2147 149 | path [ 150 | { body = femur_r pos { x = 0.005 y = -0.0411 z = 0.0234 } } 151 | { body = tibia_r pos { x = -0.028 y = 0.1667 z = 0.02943 } } 152 | { body = tibia_r pos { x = -0.021 y = 0.1467 z = 0.0343 } } 153 | ] 154 | } 155 | point_path_muscle { 156 | name = glut_max_r 157 | max_isometric_force = 3338 158 | optimal_fiber_length = 0.1569 159 | tendon_slack_length = 0.111 160 | pennation_angle = 0.3822 161 | path [ 162 | { body = pelvis pos { x = -0.0642 y = 0.0176 z = 0.0563 } } 163 | { body = pelvis pos { x = -0.0669 y = -0.052 z = 0.0914 } } 164 | { body = femur_r pos { x = -0.0426 y = 0.117 z = 0.0293 } } 165 | { body = femur_r pos { x = -0.0156 y = 0.0684 z = 0.0419 } } 166 | ] 167 | } 168 | point_path_muscle { 169 | name = iliopsoas_r 170 | max_isometric_force = 2448 171 | optimal_fiber_length = 0.1066 172 | tendon_slack_length = 0.152 173 | pennation_angle = 0.2496 174 | path [ 175 | { body = pelvis pos { x = 0.006 y = 0.0887 z = 0.0289 } } 176 | { body = pelvis pos { x = 0.0407 y = -0.01 z = 0.076 } } 177 | { body = femur_r pos { x = 0.033 y = 0.135 z = 0.0038 } } 178 | { body = femur_r pos { x = -0.0188 y = 0.1103 z = 0.0104 } } 179 | ] 180 | } 181 | point_path_muscle { 182 | name = rect_fem_r 183 | max_isometric_force = 2192 184 | optimal_fiber_length = 0.0759 185 | tendon_slack_length = 0.3449 186 | pennation_angle = 0.2426 187 | path [ 188 | { body = pelvis pos { x = 0.0412 y = -0.0311 z = 0.0968 } } 189 | { body = femur_r pos { x = 0.038 y = -0.17 z = 0.004 } } 190 | { body = tibia_r pos { x = 0.038 y = 0.2117 z = 0.0018 } } 191 | ] 192 | } 193 | point_path_muscle { 194 | name = vasti_r 195 | max_isometric_force = 9594 196 | optimal_fiber_length = 0.0993 197 | tendon_slack_length = 0.1231 198 | pennation_angle = 0.0785 199 | path [ 200 | { body = femur_r pos { x = 0.029 y = -0.0224 z = 0.031 } } 201 | { body = femur_r pos { x = 0.038 y = -0.17 z = 0.007 } } 202 | { body = tibia_r pos { x = 0.038 y = 0.2117 z = 0.0018 } } 203 | ] 204 | } 205 | point_path_muscle { 206 | name = gastroc_r 207 | max_isometric_force = 4691 208 | optimal_fiber_length = 0.051 209 | tendon_slack_length = 0.384 210 | pennation_angle = 0.1728 211 | path [ 212 | { body = femur_r pos { x = -0.02 y = -0.218 z = -0.024 } } 213 | { body = calcn_r pos { x = -0.095 y = 0.001 z = -0.0053 } } 214 | ] 215 | } 216 | point_path_muscle { 217 | name = soleus_r 218 | max_isometric_force = 6195 219 | optimal_fiber_length = 0.044 220 | tendon_slack_length = 0.248 221 | pennation_angle = 0.4939 222 | path [ 223 | { body = tibia_r pos { x = -0.0024 y = 0.0334 z = 0.0071 } } 224 | { body = calcn_r pos { x = -0.095 y = 0.001 z = -0.0053 } } 225 | ] 226 | } 227 | point_path_muscle { 228 | name = tib_ant_r 229 | max_isometric_force = 2116 230 | optimal_fiber_length = 0.0683 231 | tendon_slack_length = 0.243 232 | pennation_angle = 0.1676 233 | path [ 234 | { body = tibia_r pos { x = 0.0179 y = 0.0243 z = 0.0115 } } 235 | { body = tibia_r pos { x = 0.0329 y = -0.2084 z = -0.0177 } } 236 | { body = calcn_r pos { x = 0.0166 y = -0.0122 z = -0.0305 } } 237 | ] 238 | } 239 | point_path_muscle { 240 | name = hamstrings_l 241 | max_isometric_force = 4105 242 | optimal_fiber_length = 0.0976 243 | tendon_slack_length = 0.319 244 | pennation_angle = 0.2025 245 | path [ 246 | { body = pelvis pos { x = -0.05526 y = -0.10257 z = -0.06944 } } 247 | { body = tibia_l pos { x = -0.028 y = 0.1667 z = -0.02943 } } 248 | { body = tibia_l pos { x = -0.021 y = 0.1467 z = -0.0343 } } 249 | ] 250 | } 251 | point_path_muscle { 252 | name = bifemsh_l 253 | max_isometric_force = 557 254 | optimal_fiber_length = 0.1103 255 | tendon_slack_length = 0.095 256 | pennation_angle = 0.2147 257 | path [ 258 | { body = femur_l pos { x = 0.005 y = -0.0411 z = -0.0234 } } 259 | { body = tibia_l pos { x = -0.028 y = 0.1667 z = -0.02943 } } 260 | { body = tibia_l pos { x = -0.021 y = 0.1467 z = -0.0343 } } 261 | ] 262 | } 263 | point_path_muscle { 264 | name = glut_max_l 265 | max_isometric_force = 3338 266 | optimal_fiber_length = 0.1569 267 | tendon_slack_length = 0.111 268 | pennation_angle = 0.3822 269 | path [ 270 | { body = pelvis pos { x = -0.0642 y = 0.0176 z = -0.0563 } } 271 | { body = pelvis pos { x = -0.0669 y = -0.052 z = -0.0914 } } 272 | { body = femur_l pos { x = -0.0426 y = 0.117 z = -0.0293 } } 273 | { body = femur_l pos { x = -0.0156 y = 0.0684 z = -0.0419 } } 274 | ] 275 | } 276 | point_path_muscle { 277 | name = iliopsoas_l 278 | max_isometric_force = 2448 279 | optimal_fiber_length = 0.1066 280 | tendon_slack_length = 0.152 281 | pennation_angle = 0.2496 282 | path [ 283 | { body = pelvis pos { x = 0.006 y = 0.0887 z = -0.0289 } } 284 | { body = pelvis pos { x = 0.0407 y = -0.01 z = -0.076 } } 285 | { body = femur_l pos { x = 0.033 y = 0.135 z = -0.0038 } } 286 | { body = femur_l pos { x = -0.0188 y = 0.1103 z = -0.0104 } } 287 | ] 288 | } 289 | point_path_muscle { 290 | name = rect_fem_l 291 | max_isometric_force = 2192 292 | optimal_fiber_length = 0.0759 293 | tendon_slack_length = 0.3449 294 | pennation_angle = 0.2426 295 | path [ 296 | { body = pelvis pos { x = 0.0412 y = -0.0311 z = -0.0968 } } 297 | { body = femur_l pos { x = 0.038 y = -0.17 z = -0.004 } } 298 | { body = tibia_l pos { x = 0.038 y = 0.2117 z = -0.0018 } } 299 | ] 300 | } 301 | point_path_muscle { 302 | name = vasti_l 303 | max_isometric_force = 9594 304 | optimal_fiber_length = 0.0993 305 | tendon_slack_length = 0.1231 306 | pennation_angle = 0.0785 307 | path [ 308 | { body = femur_l pos { x = 0.029 y = -0.0224 z = -0.031 } } 309 | { body = femur_l pos { x = 0.038 y = -0.17 z = -0.007 } } 310 | { body = tibia_l pos { x = 0.038 y = 0.2117 z = -0.0018 } } 311 | ] 312 | } 313 | point_path_muscle { 314 | name = gastroc_l 315 | max_isometric_force = 4691 316 | optimal_fiber_length = 0.051 317 | tendon_slack_length = 0.384 318 | pennation_angle = 0.1728 319 | path [ 320 | { body = femur_l pos { x = -0.02 y = -0.218 z = 0.024 } } 321 | { body = calcn_l pos { x = -0.095 y = 0.001 z = 0.0053 } } 322 | ] 323 | } 324 | point_path_muscle { 325 | name = soleus_l 326 | max_isometric_force = 6195 327 | optimal_fiber_length = 0.044 328 | tendon_slack_length = 0.248 329 | pennation_angle = 0.4939 330 | path [ 331 | { body = tibia_l pos { x = -0.0024 y = 0.0334 z = -0.0071 } } 332 | { body = calcn_l pos { x = -0.095 y = 0.001 z = 0.0053 } } 333 | ] 334 | } 335 | point_path_muscle { 336 | name = tib_ant_l 337 | max_isometric_force = 2116 338 | optimal_fiber_length = 0.0683 339 | tendon_slack_length = 0.243 340 | pennation_angle = 0.1676 341 | path [ 342 | { body = tibia_l pos { x = 0.0179 y = 0.0243 z = -0.0115 } } 343 | { body = tibia_l pos { x = 0.0329 y = -0.2084 z = 0.0177 } } 344 | { body = calcn_l pos { x = 0.0166 y = -0.0122 z = 0.0305 } } 345 | ] 346 | } 347 | geometry { 348 | name = platform 349 | type = plane 350 | normal { x = -1 y = 0 z = 0 } 351 | body = ground 352 | pos { x = 0 y = 0 z = 0 } 353 | ori { x = 0 y = 0 z = -90 } 354 | } 355 | geometry { 356 | name = heel_r 357 | type = sphere 358 | radius = 0.03 359 | body = calcn_r 360 | pos { x = -0.085 y = -0.015 z = -0.005 } 361 | ori { x = 0 y = 0 z = 0 } 362 | } 363 | geometry { 364 | name = toe_r 365 | type = sphere 366 | radius = 0.03 367 | body = calcn_r 368 | pos { x = 0.085 y = -0.015 z = 0 } 369 | ori { x = 0 y = 0 z = 0 } 370 | } 371 | geometry { 372 | name = heel_l 373 | type = sphere 374 | radius = 0.03 375 | body = calcn_l 376 | pos { x = -0.085 y = -0.015 z = 0.005 } 377 | ori { x = 0 y = 0 z = 0 } 378 | } 379 | geometry { 380 | name = toe_l 381 | type = sphere 382 | radius = 0.03 383 | body = calcn_l 384 | pos { x = 0.085 y = -0.015 z = 0 } 385 | ori { x = 0 y = 0 z = 0 } 386 | } 387 | dof { name = pelvis_tilt source = pelvis_rz range = -90..90 } 388 | dof { name = pelvis_tx source = pelvis_tx range = -5..5 } 389 | dof { name = pelvis_ty source = pelvis_ty range = -1..2 default = 1 } 390 | dof { name = hip_flexion_r source = hip_rz_r range = -30..120 } 391 | dof { name = knee_angle_r source = knee_rz_r range = -120..10 } 392 | dof { name = ankle_angle_r source = ankle_rz_r range = -60..25 } 393 | dof { name = hip_flexion_l source = hip_rz_l range = -30..120 } 394 | dof { name = knee_angle_l source = knee_rz_l range = -120..10 } 395 | dof { name = ankle_angle_l source = ankle_rz_l range = -60..25 } 396 | } 397 | -------------------------------------------------------------------------------- /sconegym/data-v1/H0918Sv2jb.hfd: -------------------------------------------------------------------------------- 1 | model { 2 | material { 3 | name = default_material 4 | static_friction = 0.9 5 | dynamic_friction = 0.6 6 | stiffness = 11006.4 7 | damping = 1 8 | } 9 | model_options { 10 | joint_stiffness = 1e+06 11 | joint_limit_stiffness = 500 12 | } 13 | body { 14 | name = ground 15 | mass = 0 16 | inertia { x = 0 y = 0 z = 0 } 17 | } 18 | body { 19 | name = pelvis 20 | mass = 11.777 21 | inertia { x = 0.1028 y = 0.0871 z = 0.0579 } 22 | pos { x = -0.0707 y = 0 z = 0 } 23 | mesh { file = sacrum.vtp pos { x = 0.0707 y = 0 z = 0 } } 24 | mesh { file = pelvis.vtp pos { x = 0.0707 y = 0 z = 0 } } 25 | mesh { file = l_pelvis.vtp pos { x = 0.0707 y = 0 z = 0 } } 26 | } 27 | body { 28 | name = femur_r 29 | mass = 9.3014 30 | inertia { x = 0.1339 y = 0.0351 z = 0.1412 } 31 | joint { 32 | name = hip_r 33 | parent = pelvis 34 | pos_in_parent { x = 0 y = -0.0661 z = 0.0835 } 35 | pos_in_child { x = 0 y = 0.17 z = 0 } 36 | limits { x = 0..0 y = 0..0 z = -30..120 } 37 | } 38 | mesh { file = femur.vtp pos { x = 0 y = 0.17 z = 0 } } 39 | } 40 | body { 41 | name = tibia_r 42 | mass = 3.7075 43 | inertia { x = 0.0504 y = 0.0051 z = 0.0511 } 44 | joint { 45 | name = knee_r 46 | parent = femur_r 47 | pos_in_parent { x = 0 y = -0.226 z = 0 } 48 | pos_in_child { x = 0 y = 0.1867 z = 0 } 49 | limit_stiffness = 114.592 50 | limit_damping = 2.86479 51 | limits { x = 0..0 y = 0..0 z = -120..-5 } 52 | } 53 | mesh { file = tibia.vtp pos { x = 0 y = 0.1867 z = 0 } } 54 | mesh { file = fibula.vtp pos { x = 0 y = 0.1867 z = 0 } } 55 | } 56 | body { 57 | name = calcn_r 58 | mass = 1.25 59 | inertia { x = 0.0014 y = 0.0039 z = 0.0041 } 60 | joint { 61 | name = ankle_r 62 | parent = tibia_r 63 | pos_in_parent { x = 0 y = -0.2433 z = 0 } 64 | pos_in_child { x = -0.05123 y = 0.01195 z = -0.00792 } 65 | limits { x = 0..0 y = 0..0 z = -60..25 } 66 | } 67 | mesh { file = foot.vtp pos { x = -0.1 y = -0.03 z = 0 } } 68 | mesh { file = talus.vtp pos { x = -0.05123 y = 0.01195 z = -0.00792 } } 69 | mesh { file = bofoot.vtp pos { x = 0.0788 y = -0.032 z = 0.00108 } } 70 | } 71 | body { 72 | name = femur_l 73 | mass = 9.3014 74 | inertia { x = 0.1339 y = 0.0351 z = 0.1412 } 75 | joint { 76 | name = hip_l 77 | parent = pelvis 78 | pos_in_parent { x = 0 y = -0.0661 z = -0.0835 } 79 | pos_in_child { x = 0 y = 0.17 z = 0 } 80 | limits { x = 0..0 y = 0..0 z = -30..120 } 81 | } 82 | mesh { file = l_femur.vtp pos { x = 0 y = 0.17 z = 0 } } 83 | } 84 | body { 85 | name = tibia_l 86 | mass = 3.7075 87 | inertia { x = 0.0504 y = 0.0051 z = 0.0511 } 88 | joint { 89 | name = knee_l 90 | parent = femur_l 91 | pos_in_parent { x = 0 y = -0.226 z = 0 } 92 | pos_in_child { x = 0 y = 0.1867 z = 0 } 93 | limit_stiffness = 114.592 94 | limit_damping = 2.86479 95 | limits { x = 0..0 y = 0..0 z = -120..-5 } 96 | } 97 | mesh { file = l_tibia.vtp pos { x = 0 y = 0.1867 z = 0 } } 98 | mesh { file = l_fibula.vtp pos { x = 0 y = 0.1867 z = 0 } } 99 | } 100 | body { 101 | name = calcn_l 102 | mass = 1.25 103 | inertia { x = 0.0014 y = 0.0039 z = 0.0041 } 104 | joint { 105 | name = ankle_l 106 | parent = tibia_l 107 | pos_in_parent { x = 0 y = -0.2433 z = 0 } 108 | pos_in_child { x = -0.05123 y = 0.01195 z = 0.00792 } 109 | limits { x = 0..0 y = 0..0 z = -60..25 } 110 | } 111 | mesh { file = l_foot.vtp pos { x = -0.1 y = -0.03 z = 0 } } 112 | mesh { file = l_talus.vtp pos { x = -0.05123 y = 0.01195 z = 0.00792 } } 113 | mesh { file = l_bofoot.vtp pos { x = 0.0788 y = -0.032 z = -0.00108 } } 114 | } 115 | body { 116 | name = torso 117 | mass = 34.2366 118 | inertia { x = 1.4745 y = 0.7555 z = 1.4314 } 119 | joint { 120 | name = back 121 | parent = pelvis 122 | pos_in_parent { x = -0.03 y = 0.0815 z = 0 } 123 | pos_in_child { x = 0.03 y = -0.32 z = 0 } 124 | limits { x = 0..0 y = 0..0 z = 0..0 } 125 | } 126 | mesh { file = hat_spine.vtp pos { x = 0.03 y = -0.32 z = 0 } } 127 | mesh { file = hat_jaw.vtp pos { x = 0.03 y = -0.32 z = 0 } } 128 | mesh { file = hat_skull.vtp pos { x = 0.03 y = -0.32 z = 0 } } 129 | mesh { file = hat_ribs.vtp pos { x = 0.03 y = -0.32 z = 0 } } 130 | } 131 | point_path_muscle { 132 | name = hamstrings_r 133 | max_isometric_force = 4105 134 | optimal_fiber_length = 0.0976 135 | tendon_slack_length = 0.319 136 | pennation_angle = 0.2025 137 | path [ 138 | { body = pelvis pos { x = -0.05526 y = -0.10257 z = 0.06944 } } 139 | { body = tibia_r pos { x = -0.028 y = 0.1667 z = 0.02943 } } 140 | { body = tibia_r pos { x = -0.021 y = 0.1467 z = 0.0343 } } 141 | ] 142 | } 143 | point_path_muscle { 144 | name = bifemsh_r 145 | max_isometric_force = 1273 146 | optimal_fiber_length = 0.1103 147 | tendon_slack_length = 0.095 148 | pennation_angle = 0.2147 149 | path [ 150 | { body = femur_r pos { x = 0.005 y = -0.0411 z = 0.0234 } } 151 | { body = tibia_r pos { x = -0.028 y = 0.1667 z = 0.02943 } } 152 | { body = tibia_r pos { x = -0.021 y = 0.1467 z = 0.0343 } } 153 | ] 154 | } 155 | point_path_muscle { 156 | name = glut_max_r 157 | max_isometric_force = 3338 158 | optimal_fiber_length = 0.1569 159 | tendon_slack_length = 0.111 160 | pennation_angle = 0.3822 161 | path [ 162 | { body = pelvis pos { x = -0.0642 y = 0.0176 z = 0.0563 } } 163 | { body = pelvis pos { x = -0.0669 y = -0.052 z = 0.0914 } } 164 | { body = femur_r pos { x = -0.0426 y = 0.117 z = 0.0293 } } 165 | { body = femur_r pos { x = -0.0156 y = 0.0684 z = 0.0419 } } 166 | ] 167 | } 168 | point_path_muscle { 169 | name = iliopsoas_r 170 | max_isometric_force = 2448 171 | optimal_fiber_length = 0.1066 172 | tendon_slack_length = 0.152 173 | pennation_angle = 0.2496 174 | path [ 175 | { body = pelvis pos { x = 0.006 y = 0.0887 z = 0.0289 } } 176 | { body = pelvis pos { x = 0.0407 y = -0.01 z = 0.076 } } 177 | { body = femur_r pos { x = 0.033 y = 0.135 z = 0.0038 } } 178 | { body = femur_r pos { x = -0.0188 y = 0.1103 z = 0.0104 } } 179 | ] 180 | } 181 | point_path_muscle { 182 | name = rect_fem_r 183 | max_isometric_force = 2192 184 | optimal_fiber_length = 0.0759 185 | tendon_slack_length = 0.3449 186 | pennation_angle = 0.2426 187 | path [ 188 | { body = pelvis pos { x = 0.0412 y = -0.0311 z = 0.0968 } } 189 | { body = femur_r pos { x = 0.038 y = -0.17 z = 0.004 } } 190 | { body = tibia_r pos { x = 0.038 y = 0.2117 z = 0.0018 } } 191 | ] 192 | } 193 | point_path_muscle { 194 | name = vasti_r 195 | max_isometric_force = 9594 196 | optimal_fiber_length = 0.0993 197 | tendon_slack_length = 0.1231 198 | pennation_angle = 0.0785 199 | path [ 200 | { body = femur_r pos { x = 0.029 y = -0.0224 z = 0.031 } } 201 | { body = femur_r pos { x = 0.038 y = -0.17 z = 0.007 } } 202 | { body = tibia_r pos { x = 0.038 y = 0.2117 z = 0.0018 } } 203 | ] 204 | } 205 | point_path_muscle { 206 | name = gastroc_r 207 | max_isometric_force = 4691 208 | optimal_fiber_length = 0.051 209 | tendon_slack_length = 0.384 210 | pennation_angle = 0.1728 211 | path [ 212 | { body = femur_r pos { x = -0.02 y = -0.218 z = -0.024 } } 213 | { body = calcn_r pos { x = -0.095 y = 0.001 z = -0.0053 } } 214 | ] 215 | } 216 | point_path_muscle { 217 | name = soleus_r 218 | max_isometric_force = 6195 219 | optimal_fiber_length = 0.044 220 | tendon_slack_length = 0.248 221 | pennation_angle = 0.4939 222 | path [ 223 | { body = tibia_r pos { x = -0.0024 y = 0.0334 z = 0.0071 } } 224 | { body = calcn_r pos { x = -0.095 y = 0.001 z = -0.0053 } } 225 | ] 226 | } 227 | point_path_muscle { 228 | name = tib_ant_r 229 | max_isometric_force = 2116 230 | optimal_fiber_length = 0.0683 231 | tendon_slack_length = 0.243 232 | pennation_angle = 0.1676 233 | path [ 234 | { body = tibia_r pos { x = 0.0179 y = 0.0243 z = 0.0115 } } 235 | { body = tibia_r pos { x = 0.0329 y = -0.2084 z = -0.0177 } } 236 | { body = calcn_r pos { x = 0.0166 y = -0.0122 z = -0.0305 } } 237 | ] 238 | } 239 | point_path_muscle { 240 | name = hamstrings_l 241 | max_isometric_force = 4105 242 | optimal_fiber_length = 0.0976 243 | tendon_slack_length = 0.319 244 | pennation_angle = 0.2025 245 | path [ 246 | { body = pelvis pos { x = -0.05526 y = -0.10257 z = -0.06944 } } 247 | { body = tibia_l pos { x = -0.028 y = 0.1667 z = -0.02943 } } 248 | { body = tibia_l pos { x = -0.021 y = 0.1467 z = -0.0343 } } 249 | ] 250 | } 251 | point_path_muscle { 252 | name = bifemsh_l 253 | max_isometric_force = 1273 254 | optimal_fiber_length = 0.1103 255 | tendon_slack_length = 0.095 256 | pennation_angle = 0.2147 257 | path [ 258 | { body = femur_l pos { x = 0.005 y = -0.0411 z = -0.0234 } } 259 | { body = tibia_l pos { x = -0.028 y = 0.1667 z = -0.02943 } } 260 | { body = tibia_l pos { x = -0.021 y = 0.1467 z = -0.0343 } } 261 | ] 262 | } 263 | point_path_muscle { 264 | name = glut_max_l 265 | max_isometric_force = 3338 266 | optimal_fiber_length = 0.1569 267 | tendon_slack_length = 0.111 268 | pennation_angle = 0.3822 269 | path [ 270 | { body = pelvis pos { x = -0.0642 y = 0.0176 z = -0.0563 } } 271 | { body = pelvis pos { x = -0.0669 y = -0.052 z = -0.0914 } } 272 | { body = femur_l pos { x = -0.0426 y = 0.117 z = -0.0293 } } 273 | { body = femur_l pos { x = -0.0156 y = 0.0684 z = -0.0419 } } 274 | ] 275 | } 276 | point_path_muscle { 277 | name = iliopsoas_l 278 | max_isometric_force = 2448 279 | optimal_fiber_length = 0.1066 280 | tendon_slack_length = 0.152 281 | pennation_angle = 0.2496 282 | path [ 283 | { body = pelvis pos { x = 0.006 y = 0.0887 z = -0.0289 } } 284 | { body = pelvis pos { x = 0.0407 y = -0.01 z = -0.076 } } 285 | { body = femur_l pos { x = 0.033 y = 0.135 z = -0.0038 } } 286 | { body = femur_l pos { x = -0.0188 y = 0.1103 z = -0.0104 } } 287 | ] 288 | } 289 | point_path_muscle { 290 | name = rect_fem_l 291 | max_isometric_force = 2192 292 | optimal_fiber_length = 0.0759 293 | tendon_slack_length = 0.3449 294 | pennation_angle = 0.2426 295 | path [ 296 | { body = pelvis pos { x = 0.0412 y = -0.0311 z = -0.0968 } } 297 | { body = femur_l pos { x = 0.038 y = -0.17 z = -0.004 } } 298 | { body = tibia_l pos { x = 0.038 y = 0.2117 z = -0.0018 } } 299 | ] 300 | } 301 | point_path_muscle { 302 | name = vasti_l 303 | max_isometric_force = 9594 304 | optimal_fiber_length = 0.0993 305 | tendon_slack_length = 0.1231 306 | pennation_angle = 0.0785 307 | path [ 308 | { body = femur_l pos { x = 0.029 y = -0.0224 z = -0.031 } } 309 | { body = femur_l pos { x = 0.038 y = -0.17 z = -0.007 } } 310 | { body = tibia_l pos { x = 0.038 y = 0.2117 z = -0.0018 } } 311 | ] 312 | } 313 | point_path_muscle { 314 | name = gastroc_l 315 | max_isometric_force = 4691 316 | optimal_fiber_length = 0.051 317 | tendon_slack_length = 0.384 318 | pennation_angle = 0.1728 319 | path [ 320 | { body = femur_l pos { x = -0.02 y = -0.218 z = 0.024 } } 321 | { body = calcn_l pos { x = -0.095 y = 0.001 z = 0.0053 } } 322 | ] 323 | } 324 | point_path_muscle { 325 | name = soleus_l 326 | max_isometric_force = 6195 327 | optimal_fiber_length = 0.044 328 | tendon_slack_length = 0.248 329 | pennation_angle = 0.4939 330 | path [ 331 | { body = tibia_l pos { x = -0.0024 y = 0.0334 z = -0.0071 } } 332 | { body = calcn_l pos { x = -0.095 y = 0.001 z = 0.0053 } } 333 | ] 334 | } 335 | point_path_muscle { 336 | name = tib_ant_l 337 | max_isometric_force = 2116 338 | optimal_fiber_length = 0.0683 339 | tendon_slack_length = 0.243 340 | pennation_angle = 0.1676 341 | path [ 342 | { body = tibia_l pos { x = 0.0179 y = 0.0243 z = -0.0115 } } 343 | { body = tibia_l pos { x = 0.0329 y = -0.2084 z = 0.0177 } } 344 | { body = calcn_l pos { x = 0.0166 y = -0.0122 z = 0.0305 } } 345 | ] 346 | } 347 | geometry { 348 | name = platform 349 | type = plane 350 | normal { x = -1 y = 0 z = 0 } 351 | body = ground 352 | pos { x = 0 y = 0 z = 0 } 353 | ori { x = 0 y = 0 z = -90 } 354 | } 355 | geometry { 356 | name = heel_r 357 | type = sphere 358 | radius = 0.03 359 | body = calcn_r 360 | pos { x = -0.085 y = -0.015 z = -0.005 } 361 | ori { x = 0 y = 0 z = 0 } 362 | } 363 | geometry { 364 | name = toe_r 365 | type = sphere 366 | radius = 0.03 367 | body = calcn_r 368 | pos { x = 0.085 y = -0.015 z = 0 } 369 | ori { x = 0 y = 0 z = 0 } 370 | } 371 | geometry { 372 | name = heel_l 373 | type = sphere 374 | radius = 0.03 375 | body = calcn_l 376 | pos { x = -0.085 y = -0.015 z = 0.005 } 377 | ori { x = 0 y = 0 z = 0 } 378 | } 379 | geometry { 380 | name = toe_l 381 | type = sphere 382 | radius = 0.03 383 | body = calcn_l 384 | pos { x = 0.085 y = -0.015 z = 0 } 385 | ori { x = 0 y = 0 z = 0 } 386 | } 387 | dof { name = pelvis_tilt source = pelvis_rz range = -90..90 } 388 | dof { name = pelvis_tx source = pelvis_tx range = -5..5 } 389 | dof { name = pelvis_ty source = pelvis_ty range = -1..2 default = 1 } 390 | dof { name = hip_flexion_r source = hip_rz_r range = -30..120 } 391 | dof { name = knee_angle_r source = knee_rz_r range = -120..10 } 392 | dof { name = ankle_angle_r source = ankle_rz_r range = -60..25 } 393 | dof { name = hip_flexion_l source = hip_rz_l range = -30..120 } 394 | dof { name = knee_angle_l source = knee_rz_l range = -120..10 } 395 | dof { name = ankle_angle_l source = ankle_rz_l range = -60..25 } 396 | } 397 | -------------------------------------------------------------------------------- /sconegym/data/H0918_S2.hfd: -------------------------------------------------------------------------------- 1 | model { 2 | material { 3 | name = default_material 4 | static_friction = 0.9 5 | dynamic_friction = 0.6 6 | stiffness = 5975.21 7 | damping = 1 8 | } 9 | model_options { 10 | joint_stiffness = 1e+06 11 | joint_limit_stiffness = 500 12 | muscle_force_multiplier = 2 13 | } 14 | body { 15 | name = ground 16 | mass = 0 17 | inertia { x = 0 y = 0 z = 0 } 18 | } 19 | body { 20 | name = pelvis 21 | mass = 11.777 22 | inertia { x = 0.1028 y = 0.0871 z = 0.0579 } 23 | pos { x = -0.0707 y = 0 z = 0 } 24 | mesh { file = sacrum.vtp pos { x = 0.0707 y = 0 z = 0 } } 25 | mesh { file = pelvis.vtp pos { x = 0.0707 y = 0 z = 0 } } 26 | mesh { file = l_pelvis.vtp pos { x = 0.0707 y = 0 z = 0 } } 27 | } 28 | body { 29 | name = femur_r 30 | mass = 9.3014 31 | inertia { x = 0.1339 y = 0.0351 z = 0.1412 } 32 | joint { 33 | name = hip_r 34 | parent = pelvis 35 | pos_in_parent { x = 0 y = -0.0661 z = 0.0835 } 36 | pos_in_child { x = 0 y = 0.17 z = 0 } 37 | limits { x = 0..0 y = 0..0 z = -60..120 } 38 | } 39 | mesh { file = femur.vtp pos { x = 0 y = 0.17 z = 0 } } 40 | } 41 | body { 42 | name = tibia_r 43 | mass = 3.7075 44 | inertia { x = 0.0504 y = 0.0051 z = 0.0511 } 45 | joint { 46 | name = knee_r 47 | parent = femur_r 48 | pos_in_parent { x = 0 y = -0.226 z = 0 } 49 | pos_in_child { x = 0 y = 0.1867 z = 0 } 50 | limit_stiffness = 114.592 51 | limit_damping = 2.86479 52 | limits { x = 0..0 y = 0..0 z = -120..-5 } 53 | } 54 | mesh { file = tibia.vtp pos { x = 0 y = 0.1867 z = 0 } } 55 | mesh { file = fibula.vtp pos { x = 0 y = 0.1867 z = 0 } } 56 | } 57 | body { 58 | name = calcn_r 59 | mass = 1.25 60 | inertia { x = 0.0014 y = 0.0039 z = 0.0041 } 61 | joint { 62 | name = ankle_r 63 | parent = tibia_r 64 | pos_in_parent { x = 0 y = -0.2433 z = 0 } 65 | pos_in_child { x = -0.05123 y = 0.01195 z = -0.00792 } 66 | limits { x = 0..0 y = 0..0 z = -60..60 } 67 | } 68 | mesh { file = foot.vtp pos { x = -0.1 y = -0.03 z = 0 } } 69 | mesh { file = talus.vtp pos { x = -0.05123 y = 0.01195 z = -0.00792 } } 70 | mesh { file = bofoot.vtp pos { x = 0.0788 y = -0.032 z = 0.00108 } } 71 | } 72 | body { 73 | name = femur_l 74 | mass = 9.3014 75 | inertia { x = 0.1339 y = 0.0351 z = 0.1412 } 76 | joint { 77 | name = hip_l 78 | parent = pelvis 79 | pos_in_parent { x = 0 y = -0.0661 z = -0.0835 } 80 | pos_in_child { x = 0 y = 0.17 z = 0 } 81 | limits { x = 0..0 y = 0..0 z = -60..120 } 82 | } 83 | mesh { file = l_femur.vtp pos { x = 0 y = 0.17 z = 0 } } 84 | } 85 | body { 86 | name = tibia_l 87 | mass = 3.7075 88 | inertia { x = 0.0504 y = 0.0051 z = 0.0511 } 89 | joint { 90 | name = knee_l 91 | parent = femur_l 92 | pos_in_parent { x = 0 y = -0.226 z = 0 } 93 | pos_in_child { x = 0 y = 0.1867 z = 0 } 94 | limit_stiffness = 114.592 95 | limit_damping = 2.86479 96 | limits { x = 0..0 y = 0..0 z = -120..-5 } 97 | } 98 | mesh { file = l_tibia.vtp pos { x = 0 y = 0.1867 z = 0 } } 99 | mesh { file = l_fibula.vtp pos { x = 0 y = 0.1867 z = 0 } } 100 | } 101 | body { 102 | name = calcn_l 103 | mass = 1.25 104 | inertia { x = 0.0014 y = 0.0039 z = 0.0041 } 105 | joint { 106 | name = ankle_l 107 | parent = tibia_l 108 | pos_in_parent { x = 0 y = -0.2433 z = 0 } 109 | pos_in_child { x = -0.05123 y = 0.01195 z = 0.00792 } 110 | limits { x = 0..0 y = 0..0 z = -60..60 } 111 | } 112 | mesh { file = l_foot.vtp pos { x = -0.1 y = -0.03 z = 0 } } 113 | mesh { file = l_talus.vtp pos { x = -0.05123 y = 0.01195 z = 0.00792 } } 114 | mesh { file = l_bofoot.vtp pos { x = 0.0788 y = -0.032 z = -0.00108 } } 115 | } 116 | body { 117 | name = torso 118 | mass = 34.2366 119 | inertia { x = 1.4745 y = 0.7555 z = 1.4314 } 120 | joint { 121 | name = back 122 | parent = pelvis 123 | pos_in_parent { x = -0.03 y = 0.0815 z = 0 } 124 | pos_in_child { x = 0.03 y = -0.32 z = 0 } 125 | limits { x = 0..0 y = 0..0 z = 0..0 } 126 | } 127 | mesh { file = hat_spine.vtp pos { x = 0.03 y = -0.32 z = 0 } } 128 | mesh { file = hat_jaw.vtp pos { x = 0.03 y = -0.32 z = 0 } } 129 | mesh { file = hat_skull.vtp pos { x = 0.03 y = -0.32 z = 0 } } 130 | mesh { file = hat_ribs.vtp pos { x = 0.03 y = -0.32 z = 0 } } 131 | } 132 | point_path_muscle { 133 | name = hamstrings_r 134 | max_isometric_force = 2594 135 | optimal_fiber_length = 0.0976 136 | tendon_slack_length = 0.325 137 | pennation_angle = 0.202458 138 | path [ 139 | { body = pelvis pos { x = -0.05526 y = -0.10257 z = 0.06944 } } 140 | { body = tibia_r pos { x = -0.028 y = 0.1667 z = 0.02943 } } 141 | { body = tibia_r pos { x = -0.021 y = 0.1467 z = 0.0343 } } 142 | ] 143 | } 144 | point_path_muscle { 145 | name = bifemsh_r 146 | max_isometric_force = 804 147 | optimal_fiber_length = 0.1103 148 | tendon_slack_length = 0.1 149 | pennation_angle = 0.214675 150 | path [ 151 | { body = femur_r pos { x = 0.005 y = -0.0411 z = 0.0234 } } 152 | { body = tibia_r pos { x = -0.028 y = 0.1667 z = 0.02943 } } 153 | { body = tibia_r pos { x = -0.021 y = 0.1467 z = 0.0343 } } 154 | ] 155 | } 156 | point_path_muscle { 157 | name = glut_max_r 158 | max_isometric_force = 1944 159 | optimal_fiber_length = 0.147 160 | tendon_slack_length = 0.127 161 | pennation_angle = 0 162 | path [ 163 | { body = pelvis pos { x = -0.0642 y = 0.0176 z = 0.0563 } } 164 | { body = pelvis pos { x = -0.0669 y = -0.052 z = 0.0914 } } 165 | { body = femur_r pos { x = -0.0426 y = 0.117 z = 0.0293 } } 166 | { body = femur_r pos { x = -0.0156 y = 0.0684 z = 0.0419 } } 167 | ] 168 | } 169 | point_path_muscle { 170 | name = iliopsoas_r 171 | max_isometric_force = 2342 172 | optimal_fiber_length = 0.1 173 | tendon_slack_length = 0.163 174 | pennation_angle = 0.139626 175 | path [ 176 | { body = pelvis pos { x = 0.006 y = 0.0887 z = 0.0289 } } 177 | { body = pelvis pos { x = 0.0407 y = -0.01 z = 0.076 } } 178 | { body = femur_r pos { x = 0.033 y = 0.135 z = 0.0038 } } 179 | { body = femur_r pos { x = -0.0188 y = 0.1103 z = 0.0104 } } 180 | ] 181 | } 182 | point_path_muscle { 183 | name = rect_fem_r 184 | max_isometric_force = 1169 185 | optimal_fiber_length = 0.114 186 | tendon_slack_length = 0.305 187 | pennation_angle = 0.0872665 188 | path [ 189 | { body = pelvis pos { x = 0.0412 y = -0.0311 z = 0.0968 } } 190 | { body = femur_r pos { x = 0.038 y = -0.17 z = 0.004 } } 191 | { body = tibia_r pos { x = 0.04 y = 0.2117 z = 0.0018 } } 192 | ] 193 | } 194 | point_path_muscle { 195 | name = vasti_r 196 | max_isometric_force = 4530 197 | optimal_fiber_length = 0.087 198 | tendon_slack_length = 0.136 199 | pennation_angle = 0.0523599 200 | path [ 201 | { body = femur_r pos { x = 0.029 y = -0.0224 z = 0.031 } } 202 | { body = femur_r pos { x = 0.038 y = -0.17 z = 0.007 } } 203 | { body = tibia_r pos { x = 0.04 y = 0.2117 z = 0.0018 } } 204 | ] 205 | } 206 | point_path_muscle { 207 | name = gastroc_r 208 | max_isometric_force = 2241 209 | optimal_fiber_length = 0.06 210 | tendon_slack_length = 0.39 211 | pennation_angle = 0.296706 212 | path [ 213 | { body = femur_r pos { x = -0.02 y = -0.218 z = -0.024 } } 214 | { body = calcn_r pos { x = -0.1 y = 0.001 z = -0.0053 } } 215 | ] 216 | } 217 | point_path_muscle { 218 | name = soleus_r 219 | max_isometric_force = 3549 220 | optimal_fiber_length = 0.05 221 | tendon_slack_length = 0.25 222 | pennation_angle = 0.436332 223 | path [ 224 | { body = tibia_r pos { x = -0.0024 y = 0.0334 z = 0.0071 } } 225 | { body = calcn_r pos { x = -0.1 y = 0.001 z = -0.0053 } } 226 | ] 227 | } 228 | point_path_muscle { 229 | name = tib_ant_r 230 | max_isometric_force = 1759 231 | optimal_fiber_length = 0.098 232 | tendon_slack_length = 0.223 233 | pennation_angle = 0.0872665 234 | path [ 235 | { body = tibia_r pos { x = 0.0179 y = 0.0243 z = 0.0115 } } 236 | { body = tibia_r pos { x = 0.0329 y = -0.2084 z = -0.0177 } } 237 | { body = calcn_r pos { x = 0.0166 y = -0.0122 z = -0.0305 } } 238 | ] 239 | } 240 | point_path_muscle { 241 | name = hamstrings_l 242 | max_isometric_force = 2594 243 | optimal_fiber_length = 0.0976 244 | tendon_slack_length = 0.325 245 | pennation_angle = 0.202458 246 | path [ 247 | { body = pelvis pos { x = -0.05526 y = -0.10257 z = -0.06944 } } 248 | { body = tibia_l pos { x = -0.028 y = 0.1667 z = -0.02943 } } 249 | { body = tibia_l pos { x = -0.021 y = 0.1467 z = -0.0343 } } 250 | ] 251 | } 252 | point_path_muscle { 253 | name = bifemsh_l 254 | max_isometric_force = 804 255 | optimal_fiber_length = 0.1103 256 | tendon_slack_length = 0.1 257 | pennation_angle = 0.214675 258 | path [ 259 | { body = femur_l pos { x = 0.005 y = -0.0411 z = -0.0234 } } 260 | { body = tibia_l pos { x = -0.028 y = 0.1667 z = -0.02943 } } 261 | { body = tibia_l pos { x = -0.021 y = 0.1467 z = -0.0343 } } 262 | ] 263 | } 264 | point_path_muscle { 265 | name = glut_max_l 266 | max_isometric_force = 1944 267 | optimal_fiber_length = 0.147 268 | tendon_slack_length = 0.127 269 | pennation_angle = 0 270 | path [ 271 | { body = pelvis pos { x = -0.0642 y = 0.0176 z = -0.0563 } } 272 | { body = pelvis pos { x = -0.0669 y = -0.052 z = -0.0914 } } 273 | { body = femur_l pos { x = -0.0426 y = 0.117 z = -0.0293 } } 274 | { body = femur_l pos { x = -0.0156 y = 0.0684 z = -0.0419 } } 275 | ] 276 | } 277 | point_path_muscle { 278 | name = iliopsoas_l 279 | max_isometric_force = 2342 280 | optimal_fiber_length = 0.1 281 | tendon_slack_length = 0.163 282 | pennation_angle = 0.139626 283 | path [ 284 | { body = pelvis pos { x = 0.006 y = 0.0887 z = -0.0289 } } 285 | { body = pelvis pos { x = 0.0407 y = -0.01 z = -0.076 } } 286 | { body = femur_l pos { x = 0.033 y = 0.135 z = -0.0038 } } 287 | { body = femur_l pos { x = -0.0188 y = 0.1103 z = -0.0104 } } 288 | ] 289 | } 290 | point_path_muscle { 291 | name = rect_fem_l 292 | max_isometric_force = 1169 293 | optimal_fiber_length = 0.114 294 | tendon_slack_length = 0.305 295 | pennation_angle = 0.0872665 296 | path [ 297 | { body = pelvis pos { x = 0.0412 y = -0.0311 z = -0.0968 } } 298 | { body = femur_l pos { x = 0.038 y = -0.17 z = -0.004 } } 299 | { body = tibia_l pos { x = 0.04 y = 0.2117 z = -0.0018 } } 300 | ] 301 | } 302 | point_path_muscle { 303 | name = vasti_l 304 | max_isometric_force = 4530 305 | optimal_fiber_length = 0.087 306 | tendon_slack_length = 0.136 307 | pennation_angle = 0.0523599 308 | path [ 309 | { body = femur_l pos { x = 0.029 y = -0.0224 z = -0.031 } } 310 | { body = femur_l pos { x = 0.038 y = -0.17 z = -0.007 } } 311 | { body = tibia_l pos { x = 0.04 y = 0.2117 z = -0.0018 } } 312 | ] 313 | } 314 | point_path_muscle { 315 | name = gastroc_l 316 | max_isometric_force = 2241 317 | optimal_fiber_length = 0.06 318 | tendon_slack_length = 0.39 319 | pennation_angle = 0.296706 320 | path [ 321 | { body = femur_l pos { x = -0.02 y = -0.218 z = 0.024 } } 322 | { body = calcn_l pos { x = -0.1 y = 0.001 z = 0.0053 } } 323 | ] 324 | } 325 | point_path_muscle { 326 | name = soleus_l 327 | max_isometric_force = 3549 328 | optimal_fiber_length = 0.05 329 | tendon_slack_length = 0.25 330 | pennation_angle = 0.436332 331 | path [ 332 | { body = tibia_l pos { x = -0.0024 y = 0.0334 z = -0.0071 } } 333 | { body = calcn_l pos { x = -0.1 y = 0.001 z = 0.0053 } } 334 | ] 335 | } 336 | point_path_muscle { 337 | name = tib_ant_l 338 | max_isometric_force = 1759 339 | optimal_fiber_length = 0.098 340 | tendon_slack_length = 0.223 341 | pennation_angle = 0.0872665 342 | path [ 343 | { body = tibia_l pos { x = 0.0179 y = 0.0243 z = -0.0115 } } 344 | { body = tibia_l pos { x = 0.0329 y = -0.2084 z = 0.0177 } } 345 | { body = calcn_l pos { x = 0.0166 y = -0.0122 z = 0.0305 } } 346 | ] 347 | } 348 | geometry { 349 | name = platform 350 | type = plane 351 | normal { x = -1 y = 0 z = 0 } 352 | body = ground 353 | pos { x = 0 y = 0 z = 0 } 354 | ori { x = 0 y = 0 z = -90 } 355 | } 356 | geometry { 357 | name = r_heel 358 | type = sphere 359 | radius = 0.03 360 | body = calcn_r 361 | pos { x = -0.085 y = -0.015 z = -0.005 } 362 | ori { x = 0 y = 0 z = 0 } 363 | } 364 | geometry { 365 | name = r_toe 366 | type = sphere 367 | radius = 0.03 368 | body = calcn_r 369 | pos { x = 0.085 y = -0.015 z = 0 } 370 | ori { x = 0 y = 0 z = 0 } 371 | } 372 | geometry { 373 | name = l_heel 374 | type = sphere 375 | radius = 0.03 376 | body = calcn_l 377 | pos { x = -0.085 y = -0.015 z = 0.005 } 378 | ori { x = 0 y = 0 z = 0 } 379 | } 380 | geometry { 381 | name = l_toe 382 | type = sphere 383 | radius = 0.03 384 | body = calcn_l 385 | pos { x = 0.085 y = -0.015 z = 0 } 386 | ori { x = 0 y = 0 z = 0 } 387 | } 388 | dof { name = pelvis_tilt source = pelvis_rz range = -90..90 } 389 | dof { name = pelvis_tx source = pelvis_tx range = -5..5 } 390 | dof { name = pelvis_ty source = pelvis_ty range = -1..2 default = 1 } 391 | dof { name = hip_flexion_r source = hip_rz_r range = -60..120 } 392 | dof { name = knee_angle_r source = knee_rz_r range = -120..10 } 393 | dof { name = ankle_angle_r source = ankle_rz_r range = -60..60 } 394 | dof { name = hip_flexion_l source = hip_rz_l range = -60..120 } 395 | dof { name = knee_angle_l source = knee_rz_l range = -120..10 } 396 | dof { name = ankle_angle_l source = ankle_rz_l range = -60..60 } 397 | } 398 | -------------------------------------------------------------------------------- /sconegym/data/H1622.hfd: -------------------------------------------------------------------------------- 1 | model { 2 | material { 3 | name = default_material 4 | static_friction = 0.9 5 | dynamic_friction = 0.6 6 | stiffness = 5975.21 7 | damping = 1 8 | } 9 | model_options { 10 | joint_stiffness = 1e+06 11 | joint_limit_stiffness = 500 12 | } 13 | body { 14 | name = ground 15 | mass = 0 16 | inertia { x = 0 y = 0 z = 0 } 17 | } 18 | body { 19 | name = pelvis 20 | mass = 11.777 21 | inertia { x = 0.1028 y = 0.0871 z = 0.0579 } 22 | pos { x = -0.0707 y = 0 z = 0 } 23 | mesh { file = sacrum.vtp pos { x = 0.0707 y = 0 z = 0 } } 24 | mesh { file = pelvis.vtp pos { x = 0.0707 y = 0 z = 0 } } 25 | mesh { file = l_pelvis.vtp pos { x = 0.0707 y = 0 z = 0 } } 26 | } 27 | body { 28 | name = femur_r 29 | mass = 9.3014 30 | inertia { x = 0.1339 y = 0.0351 z = 0.1412 } 31 | joint { 32 | name = hip_r 33 | parent = pelvis 34 | pos_in_parent { x = 0 y = -0.0661 z = 0.0835 } 35 | pos_in_child { x = 0 y = 0.17 z = 0 } 36 | limits { x = -45..45 y = 0..0 z = -40..120 } 37 | limit_stiffness = 20 38 | } 39 | mesh { file = femur.vtp pos { x = 0 y = 0.17 z = 0 } } 40 | } 41 | body { 42 | name = tibia_r 43 | mass = 3.7075 44 | inertia { x = 0.0504 y = 0.0051 z = 0.0511 } 45 | joint { 46 | name = knee_r 47 | parent = femur_r 48 | pos_in_parent { x = 0 y = -0.226 z = 0 } 49 | pos_in_child { x = 0 y = 0.1867 z = 0 } 50 | limits { x = 0..0 y = 0..0 z = -120..-3 } 51 | } 52 | mesh { file = tibia.vtp pos { x = 0 y = 0.1867 z = 0 } } 53 | mesh { file = fibula.vtp pos { x = 0 y = 0.1867 z = 0 } } 54 | } 55 | body { 56 | name = calcn_r 57 | mass = 1.25 58 | inertia { x = 0.0014 y = 0.0039 z = 0.0041 } 59 | joint { 60 | name = ankle_r 61 | parent = tibia_r 62 | pos_in_parent { x = 0 y = -0.2433 z = 0 } 63 | pos_in_child { x = -0.05123 y = 0.01195 z = -0.00792 } 64 | limits { x = 0..0 y = 0..0 z = -120..120 } 65 | } 66 | mesh { file = foot.vtp pos { x = -0.1 y = -0.03 z = 0 } } 67 | mesh { file = talus.vtp pos { x = -0.05123 y = 0.01195 z = -0.00792 } } 68 | mesh { file = bofoot.vtp pos { x = 0.0788 y = -0.032 z = 0.00108 } } 69 | } 70 | body { 71 | name = femur_l 72 | mass = 9.3014 73 | inertia { x = 0.1339 y = 0.0351 z = 0.1412 } 74 | joint { 75 | name = hip_l 76 | parent = pelvis 77 | pos_in_parent { x = 0 y = -0.0661 z = -0.0835 } 78 | pos_in_child { x = 0 y = 0.17 z = 0 } 79 | limits { x = -45..45 y = 0..0 z = -40..120 } 80 | limit_stiffness = 20 81 | } 82 | mesh { file = l_femur.vtp pos { x = 0 y = 0.17 z = 0 } } 83 | } 84 | body { 85 | name = tibia_l 86 | mass = 3.7075 87 | inertia { x = 0.0504 y = 0.0051 z = 0.0511 } 88 | joint { 89 | name = knee_l 90 | parent = femur_l 91 | pos_in_parent { x = 0 y = -0.226 z = 0 } 92 | pos_in_child { x = 0 y = 0.1867 z = 0 } 93 | limits { x = 0..0 y = 0..0 z = -120..-3 } 94 | } 95 | mesh { file = l_tibia.vtp pos { x = 0 y = 0.1867 z = 0 } } 96 | mesh { file = l_fibula.vtp pos { x = 0 y = 0.1867 z = 0 } } 97 | } 98 | body { 99 | name = calcn_l 100 | mass = 1.25 101 | inertia { x = 0.0014 y = 0.0039 z = 0.0041 } 102 | joint { 103 | name = ankle_l 104 | parent = tibia_l 105 | pos_in_parent { x = 0 y = -0.2433 z = 0 } 106 | pos_in_child { x = -0.05123 y = 0.01195 z = 0.00792 } 107 | limits { x = 0..0 y = 0..0 z = -120..120 } 108 | } 109 | mesh { file = l_foot.vtp pos { x = -0.1 y = -0.03 z = 0 } } 110 | mesh { file = l_talus.vtp pos { x = -0.05123 y = 0.01195 z = 0.00792 } } 111 | mesh { file = l_bofoot.vtp pos { x = 0.0788 y = -0.032 z = -0.00108 } } 112 | } 113 | body { 114 | name = torso 115 | mass = 34.2366 116 | inertia { x = 1.4745 y = 0.7555 z = 1.4314 } 117 | joint { 118 | name = lumbar_joint 119 | parent = pelvis 120 | pos_in_parent { x = -0.03 y = 0.0815 z = 0 } 121 | pos_in_child { x = 0.03 y = -0.32 z = 0 } 122 | limits { x = 0..0 y = 0..0 z = 0..0 } 123 | } 124 | mesh { file = hat_spine.vtp pos { x = 0.03 y = -0.32 z = 0 } } 125 | mesh { file = hat_jaw.vtp pos { x = 0.03 y = -0.32 z = 0 } } 126 | mesh { file = hat_skull.vtp pos { x = 0.03 y = -0.32 z = 0 } } 127 | mesh { file = hat_ribs.vtp pos { x = 0.03 y = -0.32 z = 0 } } 128 | } 129 | point_path_muscle { 130 | name = glut_med_r 131 | tendon_slack_length = 0.053 132 | optimal_fiber_length = 0.0845 133 | max_isometric_force = 2045 134 | pennation_angle = 0 135 | path [ 136 | { body = pelvis pos { x = -0.0148 y = 0.0445 z = 0.0766 } } 137 | { body = femur_r pos { x = -0.0258 y = 0.1642 z = 0.0527 } } 138 | ] 139 | } 140 | point_path_muscle { 141 | name = add_mag_r 142 | tendon_slack_length = 0.06 143 | optimal_fiber_length = 0.087 144 | max_isometric_force = 2268 145 | pennation_angle = 0.0872665 146 | path [ 147 | { body = pelvis pos { x = -0.0025 y = -0.1174 z = 0.0255 } } 148 | { body = femur_r pos { x = -0.0045 y = 0.0489 z = 0.0339 } } 149 | ] 150 | } 151 | point_path_muscle { 152 | name = hamstrings_r 153 | tendon_slack_length = 0.325 154 | optimal_fiber_length = 0.0976 155 | max_isometric_force = 2594 156 | pennation_angle = 0.202458 157 | path [ 158 | { body = pelvis pos { x = -0.05526 y = -0.10257 z = 0.06944 } } 159 | { body = tibia_r pos { x = -0.028 y = 0.1667 z = 0.02943 } } 160 | { body = tibia_r pos { x = -0.021 y = 0.1467 z = 0.0343 } } 161 | ] 162 | } 163 | point_path_muscle { 164 | name = bifemsh_r 165 | tendon_slack_length = 0.1 166 | optimal_fiber_length = 0.1103 167 | max_isometric_force = 804 168 | pennation_angle = 0.214675 169 | path [ 170 | { body = femur_r pos { x = 0.005 y = -0.0411 z = 0.0234 } } 171 | { body = tibia_r pos { x = -0.028 y = 0.1667 z = 0.02943 } } 172 | { body = tibia_r pos { x = -0.021 y = 0.1467 z = 0.0343 } } 173 | ] 174 | } 175 | point_path_muscle { 176 | name = glut_max_r 177 | tendon_slack_length = 0.127 178 | optimal_fiber_length = 0.147 179 | max_isometric_force = 1944 180 | pennation_angle = 0 181 | path [ 182 | { body = pelvis pos { x = -0.0642 y = 0.0176 z = 0.0563 } } 183 | { body = pelvis pos { x = -0.0669 y = -0.052 z = 0.0914 } } 184 | { body = femur_r pos { x = -0.0426 y = 0.117 z = 0.0293 } } 185 | { body = femur_r pos { x = -0.0156 y = 0.0684 z = 0.0419 } } 186 | ] 187 | } 188 | point_path_muscle { 189 | name = iliopsoas_r 190 | tendon_slack_length = 0.163 191 | optimal_fiber_length = 0.1 192 | max_isometric_force = 2342 193 | pennation_angle = 0.139626 194 | path [ 195 | { body = pelvis pos { x = 0.006 y = 0.0887 z = 0.0289 } } 196 | { body = pelvis pos { x = 0.0407 y = -0.01 z = 0.076 } } 197 | { body = femur_r pos { x = 0.033 y = 0.135 z = 0.0038 } } 198 | { body = femur_r pos { x = -0.0188 y = 0.1103 z = 0.0104 } } 199 | ] 200 | } 201 | point_path_muscle { 202 | name = rect_fem_r 203 | tendon_slack_length = 0.305 204 | optimal_fiber_length = 0.114 205 | max_isometric_force = 1169 206 | pennation_angle = 0.0872665 207 | path [ 208 | { body = pelvis pos { x = 0.0412 y = -0.0311 z = 0.0968 } } 209 | { body = femur_r pos { x = 0.035 y = -0.15 z = 0.004 } } 210 | { body = tibia_r pos { x = 0.035 y = 0.2067 z = 0.002 } } 211 | ] 212 | } 213 | point_path_muscle { 214 | name = vasti_r 215 | tendon_slack_length = 0.136 216 | optimal_fiber_length = 0.087 217 | max_isometric_force = 4530 218 | pennation_angle = 0.0523599 219 | path [ 220 | { body = femur_r pos { x = 0.029 y = -0.0224 z = 0.031 } } 221 | { body = femur_r pos { x = 0.035 y = -0.15 z = 0.01 } } 222 | { body = tibia_r pos { x = 0.035 y = 0.2067 z = 0.002 } } 223 | ] 224 | } 225 | point_path_muscle { 226 | name = gastroc_r 227 | tendon_slack_length = 0.39 228 | optimal_fiber_length = 0.06 229 | max_isometric_force = 2241 230 | pennation_angle = 0.296706 231 | path [ 232 | { body = femur_r pos { x = -0.02 y = -0.216 z = -0.024 } } 233 | { body = calcn_r pos { x = -0.1 y = 0.001 z = -0.0053 } } 234 | ] 235 | } 236 | point_path_muscle { 237 | name = soleus_r 238 | tendon_slack_length = 0.25 239 | optimal_fiber_length = 0.05 240 | max_isometric_force = 3549 241 | pennation_angle = 0.436332 242 | path [ 243 | { body = tibia_r pos { x = -0.0024 y = 0.0334 z = 0.0071 } } 244 | { body = calcn_r pos { x = -0.1 y = 0.001 z = -0.0053 } } 245 | ] 246 | } 247 | point_path_muscle { 248 | name = tib_ant_r 249 | tendon_slack_length = 0.223 250 | optimal_fiber_length = 0.098 251 | max_isometric_force = 1759 252 | pennation_angle = 0.0872665 253 | path [ 254 | { body = tibia_r pos { x = 0.0179 y = 0.0243 z = 0.0115 } } 255 | { body = tibia_r pos { x = 0.0329 y = -0.2084 z = -0.0177 } } 256 | { body = calcn_r pos { x = 0.0166 y = -0.0122 z = -0.0305 } } 257 | ] 258 | } 259 | point_path_muscle { 260 | name = glut_med_l 261 | tendon_slack_length = 0.053 262 | optimal_fiber_length = 0.0845 263 | max_isometric_force = 2045 264 | pennation_angle = 0 265 | path [ 266 | { body = pelvis pos { x = -0.0148 y = 0.0445 z = -0.0766 } } 267 | { body = femur_l pos { x = -0.0258 y = 0.1642 z = -0.0527 } } 268 | ] 269 | } 270 | point_path_muscle { 271 | name = add_mag_l 272 | tendon_slack_length = 0.06 273 | optimal_fiber_length = 0.087 274 | max_isometric_force = 2268 275 | pennation_angle = 0.0872665 276 | path [ 277 | { body = pelvis pos { x = -0.0025 y = -0.1174 z = -0.0255 } } 278 | { body = femur_l pos { x = -0.0045 y = 0.0489 z = -0.0339 } } 279 | ] 280 | } 281 | point_path_muscle { 282 | name = hamstrings_l 283 | tendon_slack_length = 0.325 284 | optimal_fiber_length = 0.0976 285 | max_isometric_force = 2594 286 | pennation_angle = 0.202458 287 | path [ 288 | { body = pelvis pos { x = -0.05526 y = -0.10257 z = -0.06944 } } 289 | { body = tibia_l pos { x = -0.028 y = 0.1667 z = -0.02943 } } 290 | { body = tibia_l pos { x = -0.021 y = 0.1467 z = -0.0343 } } 291 | ] 292 | } 293 | point_path_muscle { 294 | name = bifemsh_l 295 | tendon_slack_length = 0.1 296 | optimal_fiber_length = 0.1103 297 | max_isometric_force = 804 298 | pennation_angle = 0.214675 299 | path [ 300 | { body = femur_l pos { x = 0.005 y = -0.0411 z = -0.0234 } } 301 | { body = tibia_l pos { x = -0.028 y = 0.1667 z = -0.02943 } } 302 | { body = tibia_l pos { x = -0.021 y = 0.1467 z = -0.0343 } } 303 | ] 304 | } 305 | point_path_muscle { 306 | name = glut_max_l 307 | tendon_slack_length = 0.127 308 | optimal_fiber_length = 0.147 309 | max_isometric_force = 1944 310 | pennation_angle = 0 311 | path [ 312 | { body = pelvis pos { x = -0.0642 y = 0.0176 z = -0.0563 } } 313 | { body = pelvis pos { x = -0.0669 y = -0.052 z = -0.0914 } } 314 | { body = femur_l pos { x = -0.0426 y = 0.117 z = -0.0293 } } 315 | { body = femur_l pos { x = -0.0156 y = 0.0684 z = -0.0419 } } 316 | ] 317 | } 318 | point_path_muscle { 319 | name = iliopsoas_l 320 | tendon_slack_length = 0.163 321 | optimal_fiber_length = 0.1 322 | max_isometric_force = 2342 323 | pennation_angle = 0.139626 324 | path [ 325 | { body = pelvis pos { x = 0.006 y = 0.0887 z = -0.0289 } } 326 | { body = pelvis pos { x = 0.0407 y = -0.01 z = -0.076 } } 327 | { body = femur_l pos { x = 0.033 y = 0.135 z = -0.0038 } } 328 | { body = femur_l pos { x = -0.0188 y = 0.1103 z = -0.0104 } } 329 | ] 330 | } 331 | point_path_muscle { 332 | name = rect_fem_l 333 | tendon_slack_length = 0.305 334 | optimal_fiber_length = 0.114 335 | max_isometric_force = 1169 336 | pennation_angle = 0.0872665 337 | path [ 338 | { body = pelvis pos { x = 0.0412 y = -0.0311 z = -0.0968 } } 339 | { body = femur_l pos { x = 0.035 y = -0.15 z = -0.004 } } 340 | { body = tibia_l pos { x = 0.035 y = 0.2067 z = -0.002 } } 341 | ] 342 | } 343 | point_path_muscle { 344 | name = vasti_l 345 | tendon_slack_length = 0.136 346 | optimal_fiber_length = 0.087 347 | max_isometric_force = 4530 348 | pennation_angle = 0.0523599 349 | path [ 350 | { body = femur_l pos { x = 0.029 y = -0.0224 z = -0.031 } } 351 | { body = femur_l pos { x = 0.035 y = -0.15 z = -0.01 } } 352 | { body = tibia_l pos { x = 0.035 y = 0.2067 z = -0.002 } } 353 | ] 354 | } 355 | point_path_muscle { 356 | name = gastroc_l 357 | tendon_slack_length = 0.39 358 | optimal_fiber_length = 0.06 359 | max_isometric_force = 2241 360 | pennation_angle = 0.296706 361 | path [ 362 | { body = femur_l pos { x = -0.02 y = -0.216 z = 0.024 } } 363 | { body = calcn_l pos { x = -0.1 y = 0.001 z = 0.0053 } } 364 | ] 365 | } 366 | point_path_muscle { 367 | name = soleus_l 368 | tendon_slack_length = 0.25 369 | optimal_fiber_length = 0.05 370 | max_isometric_force = 3549 371 | pennation_angle = 0.436332 372 | path [ 373 | { body = tibia_l pos { x = -0.0024 y = 0.0334 z = -0.0071 } } 374 | { body = calcn_l pos { x = -0.1 y = 0.001 z = 0.0053 } } 375 | ] 376 | } 377 | point_path_muscle { 378 | name = tib_ant_l 379 | tendon_slack_length = 0.223 380 | optimal_fiber_length = 0.098 381 | max_isometric_force = 1759 382 | pennation_angle = 0.0872665 383 | path [ 384 | { body = tibia_l pos { x = 0.0179 y = 0.0243 z = -0.0115 } } 385 | { body = tibia_l pos { x = 0.0329 y = -0.2084 z = 0.0177 } } 386 | { body = calcn_l pos { x = 0.0166 y = -0.0122 z = 0.0305 } } 387 | ] 388 | } 389 | geometry { 390 | name = platform 391 | type = plane 392 | normal { x = -1 y = 0 z = 0 } 393 | body = ground 394 | pos { x = 0 y = 0 z = 0 } 395 | ori { x = 0 y = 0 z = -90 } 396 | } 397 | geometry { 398 | name = heel_r 399 | type = sphere 400 | radius = 0.03 401 | body = calcn_r 402 | pos { x = -0.085 y = -0.015 z = -0.005 } 403 | ori { x = 0 y = 0 z = 0 } 404 | } 405 | geometry { 406 | name = toe_lat_r 407 | type = sphere 408 | radius = 0.02 409 | body = calcn_r 410 | pos { x = 0.0425 y = -0.03 z = 0.041 } 411 | ori { x = 0 y = 0 z = 0 } 412 | } 413 | geometry { 414 | name = toe_med_r 415 | type = sphere 416 | radius = 0.02 417 | body = calcn_r 418 | pos { x = 0.085 y = -0.03 z = -0.0275 } 419 | ori { x = 0 y = 0 z = 0 } 420 | } 421 | geometry { 422 | name = heel_l 423 | type = sphere 424 | radius = 0.03 425 | body = calcn_l 426 | pos { x = -0.085 y = -0.015 z = 0.005 } 427 | ori { x = 0 y = 0 z = 0 } 428 | } 429 | geometry { 430 | name = toe_lat_l 431 | type = sphere 432 | radius = 0.02 433 | body = calcn_l 434 | pos { x = 0.0425 y = -0.03 z = -0.041 } 435 | ori { x = 0 y = 0 z = 0 } 436 | } 437 | geometry { 438 | name = toe_med_l 439 | type = sphere 440 | radius = 0.02 441 | body = calcn_l 442 | pos { x = 0.085 y = -0.03 z = 0.0275 } 443 | ori { x = 0 y = 0 z = 0 } 444 | } 445 | geometry { 446 | name = upper_leg_r 447 | type = capsule 448 | radius = 0.05 449 | height = 0.37 450 | body = femur_r 451 | pos { x = 0 y = -0.04 z = 0.01 } 452 | ori { x = -3 y = 0 z = 0 } 453 | } 454 | geometry { 455 | name = lower_leg_r 456 | type = capsule 457 | radius = 0.04 458 | height = 0.35 459 | body = tibia_r 460 | pos { x = 0 y = -0.05 z = 0 } 461 | ori { x = 0 y = 0 z = 3 } 462 | } 463 | geometry { 464 | name = upper_leg_l 465 | type = capsule 466 | radius = 0.05 467 | height = 0.37 468 | body = femur_l 469 | pos { x = 0 y = -0.04 z = -0.01 } 470 | ori { x = 3 y = 0 z = 0 } 471 | } 472 | geometry { 473 | name = lower_leg_l 474 | type = capsule 475 | radius = 0.04 476 | height = 0.35 477 | body = tibia_l 478 | pos { x = 0 y = -0.05 z = 0 } 479 | ori { x = 0 y = 0 z = 3 } 480 | } 481 | geometry { 482 | name = lower_trunk 483 | type = capsule 484 | radius = 0.1 485 | height = 0.12 486 | body = pelvis 487 | pos { x = -0.01 y = -0.01 z = 0 } 488 | ori { x = 90 y = 0 z = 0 } 489 | } 490 | geometry { 491 | name = belly 492 | type = capsule 493 | radius = 0.10 494 | height = 0.1 495 | body = torso 496 | pos { x = 0.05 y = -0.27 z = 0 } 497 | ori { x = 90 y = 0 z = 0 } 498 | } 499 | geometry { 500 | name = middle_trunk 501 | type = capsule 502 | radius = 0.10 503 | height = 0.12 504 | body = torso 505 | pos { x = 0.04 y = -0.15 z = 0 } 506 | ori { x = 90 y = 0 z = 0 } 507 | } 508 | geometry { 509 | name = upper_trunk 510 | type = capsule 511 | radius = 0.11 512 | height = 0.13 513 | body = torso 514 | pos { x = 0.03 y = -0.01 z = 0 } 515 | ori { x = 90 y = 0 z = 0 } 516 | } 517 | geometry { 518 | name = head 519 | type = sphere 520 | radius = 0.1 521 | body = torso 522 | pos { x = 0.04 y = 0.24 z = 0 } 523 | } 524 | dof { name = pelvis_tilt source = pelvis_rz range = -90..90 } 525 | dof { name = pelvis_list source = pelvis_rx range = -90..90 } 526 | dof { name = pelvis_rotation source = pelvis_ry range = -90..90 } 527 | dof { name = pelvis_tx source = pelvis_tx range = -5..5 } 528 | dof { name = pelvis_ty source = pelvis_ty range = -1..2 } 529 | dof { name = pelvis_tz source = pelvis_tz range = -3..3 } 530 | dof { name = hip_flexion_r source = hip_rz_r range = -120..120 } 531 | dof { name = hip_adduction_r source = hip_rx_r range = -120..120 } 532 | dof { name = hip_rotation_r source = hip_ry_r range = -120..120 } 533 | dof { name = knee_angle_r source = knee_rz_r range = -120..10 } 534 | dof { name = ankle_angle_r source = ankle_rz_r range = -60..60 } 535 | dof { name = hip_flexion_l source = hip_rz_l range = -120..120 } 536 | dof { name = hip_adduction_l source = -hip_rx_l range = -120..120 } 537 | dof { name = hip_rotation_l source = -hip_ry_l range = -120..120 } 538 | dof { name = knee_angle_l source = knee_rz_l range = -120..10 } 539 | dof { name = ankle_angle_l source = ankle_rz_l range = -60..60 } 540 | dof { name = lumbar_extension source = lumbar_joint_rz range = -90..90 } 541 | dof { name = lumbar_bending source = lumbar_joint_rx range = -90..90 } 542 | dof { name = lumbar_rotation source = lumbar_joint_ry range = -90..90 } 543 | } 544 | -------------------------------------------------------------------------------- /sconegym/data-v1/H1622Sv2k.hfd: -------------------------------------------------------------------------------- 1 | model { 2 | material { 3 | name = default_material 4 | static_friction = 0.9 5 | dynamic_friction = 0.6 6 | stiffness = 11006.4 7 | damping = 1 8 | } 9 | model_options { 10 | joint_stiffness = 1e+06 11 | joint_limit_stiffness = 500 12 | } 13 | body { 14 | name = ground 15 | mass = 0 16 | inertia { x = 0 y = 0 z = 0 } 17 | } 18 | body { 19 | name = pelvis 20 | mass = 11.777 21 | inertia { x = 0.1028 y = 0.0871 z = 0.0579 } 22 | pos { x = -0.0707 y = 0 z = 0 } 23 | mesh { file = sacrum.vtp pos { x = 0.0707 y = 0 z = 0 } } 24 | mesh { file = pelvis.vtp pos { x = 0.0707 y = 0 z = 0 } } 25 | mesh { file = l_pelvis.vtp pos { x = 0.0707 y = 0 z = 0 } } 26 | } 27 | body { 28 | name = femur_r 29 | mass = 9.3014 30 | inertia { x = 0.1339 y = 0.0351 z = 0.1412 } 31 | joint { 32 | name = hip_r 33 | parent = pelvis 34 | pos_in_parent { x = 0 y = -0.0661 z = 0.0835 } 35 | pos_in_child { x = 0 y = 0.17 z = 0 } 36 | limits { x = -45..20 y = 0..0 z = -30..120 } 37 | limit_stiffness = 20 38 | } 39 | mesh { file = femur.vtp pos { x = 0 y = 0.17 z = 0 } } 40 | } 41 | body { 42 | name = tibia_r 43 | mass = 3.7075 44 | inertia { x = 0.0504 y = 0.0051 z = 0.0511 } 45 | joint { 46 | name = knee_r 47 | parent = femur_r 48 | pos_in_parent { x = 0 y = -0.226 z = 0 } 49 | pos_in_child { x = 0 y = 0.1867 z = 0 } 50 | limits { x = 0..0 y = 0..0 z = -120..-3 } 51 | } 52 | mesh { file = tibia.vtp pos { x = 0 y = 0.1867 z = 0 } } 53 | mesh { file = fibula.vtp pos { x = 0 y = 0.1867 z = 0 } } 54 | } 55 | body { 56 | name = calcn_r 57 | mass = 1.25 58 | inertia { x = 0.0014 y = 0.0039 z = 0.0041 } 59 | joint { 60 | name = ankle_r 61 | parent = tibia_r 62 | pos_in_parent { x = 0 y = -0.2433 z = 0 } 63 | pos_in_child { x = -0.05123 y = 0.01195 z = -0.00792 } 64 | limits { x = 0..0 y = 0..0 z = -60..25 } 65 | } 66 | mesh { file = foot.vtp pos { x = -0.1 y = -0.03 z = 0 } } 67 | mesh { file = talus.vtp pos { x = -0.05123 y = 0.01195 z = -0.00792 } } 68 | mesh { file = bofoot.vtp pos { x = 0.0788 y = -0.032 z = 0.00108 } } 69 | } 70 | body { 71 | name = femur_l 72 | mass = 9.3014 73 | inertia { x = 0.1339 y = 0.0351 z = 0.1412 } 74 | joint { 75 | name = hip_l 76 | parent = pelvis 77 | pos_in_parent { x = 0 y = -0.0661 z = -0.0835 } 78 | pos_in_child { x = 0 y = 0.17 z = 0 } 79 | limits { x = -20..45 y = 0..0 z = -30..120 } 80 | limit_stiffness = 20 81 | } 82 | mesh { file = l_femur.vtp pos { x = 0 y = 0.17 z = 0 } } 83 | } 84 | body { 85 | name = tibia_l 86 | mass = 3.7075 87 | inertia { x = 0.0504 y = 0.0051 z = 0.0511 } 88 | joint { 89 | name = knee_l 90 | parent = femur_l 91 | pos_in_parent { x = 0 y = -0.226 z = 0 } 92 | pos_in_child { x = 0 y = 0.1867 z = 0 } 93 | limits { x = 0..0 y = 0..0 z = -120..-3 } 94 | } 95 | mesh { file = l_tibia.vtp pos { x = 0 y = 0.1867 z = 0 } } 96 | mesh { file = l_fibula.vtp pos { x = 0 y = 0.1867 z = 0 } } 97 | } 98 | body { 99 | name = calcn_l 100 | mass = 1.25 101 | inertia { x = 0.0014 y = 0.0039 z = 0.0041 } 102 | joint { 103 | name = ankle_l 104 | parent = tibia_l 105 | pos_in_parent { x = 0 y = -0.2433 z = 0 } 106 | pos_in_child { x = -0.05123 y = 0.01195 z = 0.00792 } 107 | limits { x = 0..0 y = 0..0 z = -60..25 } 108 | } 109 | mesh { file = l_foot.vtp pos { x = -0.1 y = -0.03 z = 0 } } 110 | mesh { file = l_talus.vtp pos { x = -0.05123 y = 0.01195 z = 0.00792 } } 111 | mesh { file = l_bofoot.vtp pos { x = 0.0788 y = -0.032 z = -0.00108 } } 112 | } 113 | body { 114 | name = torso 115 | mass = 34.2366 116 | inertia { x = 1.4745 y = 0.7555 z = 1.4314 } 117 | joint { 118 | name = lumbar_joint 119 | parent = pelvis 120 | pos_in_parent { x = -0.03 y = 0.0815 z = 0 } 121 | pos_in_child { x = 0.03 y = -0.32 z = 0 } 122 | limits { x = 0..0 y = 0..0 z = 0..0 } 123 | } 124 | mesh { file = hat_spine.vtp pos { x = 0.03 y = -0.32 z = 0 } } 125 | mesh { file = hat_jaw.vtp pos { x = 0.03 y = -0.32 z = 0 } } 126 | mesh { file = hat_skull.vtp pos { x = 0.03 y = -0.32 z = 0 } } 127 | mesh { file = hat_ribs.vtp pos { x = 0.03 y = -0.32 z = 0 } } 128 | } 129 | point_path_muscle { 130 | name = glut_med_r 131 | max_isometric_force = 2729 132 | optimal_fiber_length = 0.0733 133 | tendon_slack_length = 0.066 134 | pennation_angle = 0.3578 135 | path [ 136 | { body = pelvis pos { x = -0.0148 y = 0.0445 z = 0.0766 } } 137 | { body = femur_r pos { x = -0.0258 y = 0.1642 z = 0.0527 } } 138 | ] 139 | } 140 | point_path_muscle { 141 | name = add_mag_r 142 | max_isometric_force = 3931 143 | optimal_fiber_length = 0.087 144 | tendon_slack_length = 0.06 145 | pennation_angle = 0.0872665 146 | path [ 147 | { body = pelvis pos { x = -0.0025 y = -0.1174 z = 0.0255 } } 148 | { body = femur_r pos { x = -0.0045 y = 0.0489 z = 0.0339 } } 149 | ] 150 | } 151 | point_path_muscle { 152 | name = hamstrings_r 153 | max_isometric_force = 4105 154 | optimal_fiber_length = 0.0976 155 | tendon_slack_length = 0.319 156 | pennation_angle = 0.2025 157 | path [ 158 | { body = pelvis pos { x = -0.05526 y = -0.10257 z = 0.06944 } } 159 | { body = tibia_r pos { x = -0.028 y = 0.1667 z = 0.02943 } } 160 | { body = tibia_r pos { x = -0.021 y = 0.1467 z = 0.0343 } } 161 | ] 162 | } 163 | point_path_muscle { 164 | name = bifemsh_r 165 | max_isometric_force = 557 166 | optimal_fiber_length = 0.1103 167 | tendon_slack_length = 0.095 168 | pennation_angle = 0.2147 169 | path [ 170 | { body = femur_r pos { x = 0.005 y = -0.0411 z = 0.0234 } } 171 | { body = tibia_r pos { x = -0.028 y = 0.1667 z = 0.02943 } } 172 | { body = tibia_r pos { x = -0.021 y = 0.1467 z = 0.0343 } } 173 | ] 174 | } 175 | point_path_muscle { 176 | name = glut_max_r 177 | max_isometric_force = 3338 178 | optimal_fiber_length = 0.1569 179 | tendon_slack_length = 0.111 180 | pennation_angle = 0.3822 181 | path [ 182 | { body = pelvis pos { x = -0.0642 y = 0.0176 z = 0.0563 } } 183 | { body = pelvis pos { x = -0.0669 y = -0.052 z = 0.0914 } } 184 | { body = femur_r pos { x = -0.0426 y = 0.117 z = 0.0293 } } 185 | { body = femur_r pos { x = -0.0156 y = 0.0684 z = 0.0419 } } 186 | ] 187 | } 188 | point_path_muscle { 189 | name = iliopsoas_r 190 | max_isometric_force = 2448 191 | optimal_fiber_length = 0.1066 192 | tendon_slack_length = 0.152 193 | pennation_angle = 0.2496 194 | path [ 195 | { body = pelvis pos { x = 0.006 y = 0.0887 z = 0.0289 } } 196 | { body = pelvis pos { x = 0.0407 y = -0.01 z = 0.076 } } 197 | { body = femur_r pos { x = 0.033 y = 0.135 z = 0.0038 } } 198 | { body = femur_r pos { x = -0.0188 y = 0.1103 z = 0.0104 } } 199 | ] 200 | } 201 | point_path_muscle { 202 | name = rect_fem_r 203 | max_isometric_force = 2192 204 | optimal_fiber_length = 0.0759 205 | tendon_slack_length = 0.3449 206 | pennation_angle = 0.2426 207 | path [ 208 | { body = pelvis pos { x = 0.0412 y = -0.0311 z = 0.0968 } } 209 | { body = femur_r pos { x = 0.038 y = -0.17 z = 0.004 } } 210 | { body = tibia_r pos { x = 0.038 y = 0.2117 z = 0.0018 } } 211 | ] 212 | } 213 | point_path_muscle { 214 | name = vasti_r 215 | max_isometric_force = 9594 216 | optimal_fiber_length = 0.0993 217 | tendon_slack_length = 0.1231 218 | pennation_angle = 0.0785 219 | path [ 220 | { body = femur_r pos { x = 0.029 y = -0.0224 z = 0.031 } } 221 | { body = femur_r pos { x = 0.038 y = -0.17 z = 0.007 } } 222 | { body = tibia_r pos { x = 0.038 y = 0.2117 z = 0.0018 } } 223 | ] 224 | } 225 | point_path_muscle { 226 | name = gastroc_r 227 | max_isometric_force = 4691 228 | optimal_fiber_length = 0.051 229 | tendon_slack_length = 0.384 230 | pennation_angle = 0.1728 231 | path [ 232 | { body = femur_r pos { x = -0.02 y = -0.218 z = -0.024 } } 233 | { body = calcn_r pos { x = -0.095 y = 0.001 z = -0.0053 } } 234 | ] 235 | } 236 | point_path_muscle { 237 | name = soleus_r 238 | max_isometric_force = 6195 239 | optimal_fiber_length = 0.044 240 | tendon_slack_length = 0.248 241 | pennation_angle = 0.4939 242 | path [ 243 | { body = tibia_r pos { x = -0.0024 y = 0.0334 z = 0.0071 } } 244 | { body = calcn_r pos { x = -0.095 y = 0.001 z = -0.0053 } } 245 | ] 246 | } 247 | point_path_muscle { 248 | name = tib_ant_r 249 | max_isometric_force = 2116 250 | optimal_fiber_length = 0.0683 251 | tendon_slack_length = 0.243 252 | pennation_angle = 0.1676 253 | path [ 254 | { body = tibia_r pos { x = 0.0179 y = 0.0243 z = 0.0115 } } 255 | { body = tibia_r pos { x = 0.0329 y = -0.2084 z = -0.0177 } } 256 | { body = calcn_r pos { x = 0.0166 y = -0.0122 z = -0.0305 } } 257 | ] 258 | } 259 | point_path_muscle { 260 | name = glut_med_l 261 | max_isometric_force = 2729 262 | optimal_fiber_length = 0.0733 263 | tendon_slack_length = 0.066 264 | pennation_angle = 0.3578 265 | path [ 266 | { body = pelvis pos { x = -0.0148 y = 0.0445 z = -0.0766 } } 267 | { body = femur_l pos { x = -0.0258 y = 0.1642 z = -0.0527 } } 268 | ] 269 | } 270 | point_path_muscle { 271 | name = add_mag_l 272 | max_isometric_force = 3931 273 | optimal_fiber_length = 0.087 274 | tendon_slack_length = 0.06 275 | pennation_angle = 0.0872665 276 | path [ 277 | { body = pelvis pos { x = -0.0025 y = -0.1174 z = -0.0255 } } 278 | { body = femur_l pos { x = -0.0045 y = 0.0489 z = -0.0339 } } 279 | ] 280 | } 281 | point_path_muscle { 282 | name = hamstrings_l 283 | max_isometric_force = 4105 284 | optimal_fiber_length = 0.0976 285 | tendon_slack_length = 0.319 286 | pennation_angle = 0.2025 287 | path [ 288 | { body = pelvis pos { x = -0.05526 y = -0.10257 z = -0.06944 } } 289 | { body = tibia_l pos { x = -0.028 y = 0.1667 z = -0.02943 } } 290 | { body = tibia_l pos { x = -0.021 y = 0.1467 z = -0.0343 } } 291 | ] 292 | } 293 | point_path_muscle { 294 | name = bifemsh_l 295 | max_isometric_force = 557 296 | optimal_fiber_length = 0.1103 297 | tendon_slack_length = 0.095 298 | pennation_angle = 0.2147 299 | path [ 300 | { body = femur_l pos { x = 0.005 y = -0.0411 z = -0.0234 } } 301 | { body = tibia_l pos { x = -0.028 y = 0.1667 z = -0.02943 } } 302 | { body = tibia_l pos { x = -0.021 y = 0.1467 z = -0.0343 } } 303 | ] 304 | } 305 | point_path_muscle { 306 | name = glut_max_l 307 | max_isometric_force = 3338 308 | optimal_fiber_length = 0.1569 309 | tendon_slack_length = 0.111 310 | pennation_angle = 0.3822 311 | path [ 312 | { body = pelvis pos { x = -0.0642 y = 0.0176 z = -0.0563 } } 313 | { body = pelvis pos { x = -0.0669 y = -0.052 z = -0.0914 } } 314 | { body = femur_l pos { x = -0.0426 y = 0.117 z = -0.0293 } } 315 | { body = femur_l pos { x = -0.0156 y = 0.0684 z = -0.0419 } } 316 | ] 317 | } 318 | point_path_muscle { 319 | name = iliopsoas_l 320 | max_isometric_force = 2448 321 | optimal_fiber_length = 0.1066 322 | tendon_slack_length = 0.152 323 | pennation_angle = 0.2496 324 | path [ 325 | { body = pelvis pos { x = 0.006 y = 0.0887 z = -0.0289 } } 326 | { body = pelvis pos { x = 0.0407 y = -0.01 z = -0.076 } } 327 | { body = femur_l pos { x = 0.033 y = 0.135 z = -0.0038 } } 328 | { body = femur_l pos { x = -0.0188 y = 0.1103 z = -0.0104 } } 329 | ] 330 | } 331 | point_path_muscle { 332 | name = rect_fem_l 333 | max_isometric_force = 2192 334 | optimal_fiber_length = 0.0759 335 | tendon_slack_length = 0.3449 336 | pennation_angle = 0.2426 337 | path [ 338 | { body = pelvis pos { x = 0.0412 y = -0.0311 z = -0.0968 } } 339 | { body = femur_l pos { x = 0.038 y = -0.17 z = -0.004 } } 340 | { body = tibia_l pos { x = 0.038 y = 0.2117 z = -0.0018 } } 341 | ] 342 | } 343 | point_path_muscle { 344 | name = vasti_l 345 | max_isometric_force = 9594 346 | optimal_fiber_length = 0.0993 347 | tendon_slack_length = 0.1231 348 | pennation_angle = 0.0785 349 | path [ 350 | { body = femur_l pos { x = 0.029 y = -0.0224 z = -0.031 } } 351 | { body = femur_l pos { x = 0.038 y = -0.17 z = -0.007 } } 352 | { body = tibia_l pos { x = 0.038 y = 0.2117 z = -0.0018 } } 353 | ] 354 | } 355 | point_path_muscle { 356 | name = gastroc_l 357 | max_isometric_force = 4691 358 | optimal_fiber_length = 0.051 359 | tendon_slack_length = 0.384 360 | pennation_angle = 0.1728 361 | path [ 362 | { body = femur_l pos { x = -0.02 y = -0.218 z = 0.024 } } 363 | { body = calcn_l pos { x = -0.095 y = 0.001 z = 0.0053 } } 364 | ] 365 | } 366 | point_path_muscle { 367 | name = soleus_l 368 | max_isometric_force = 6195 369 | optimal_fiber_length = 0.044 370 | tendon_slack_length = 0.248 371 | pennation_angle = 0.4939 372 | path [ 373 | { body = tibia_l pos { x = -0.0024 y = 0.0334 z = -0.0071 } } 374 | { body = calcn_l pos { x = -0.095 y = 0.001 z = 0.0053 } } 375 | ] 376 | } 377 | point_path_muscle { 378 | name = tib_ant_l 379 | max_isometric_force = 2116 380 | optimal_fiber_length = 0.0683 381 | tendon_slack_length = 0.243 382 | pennation_angle = 0.1676 383 | path [ 384 | { body = tibia_l pos { x = 0.0179 y = 0.0243 z = -0.0115 } } 385 | { body = tibia_l pos { x = 0.0329 y = -0.2084 z = 0.0177 } } 386 | { body = calcn_l pos { x = 0.0166 y = -0.0122 z = 0.0305 } } 387 | ] 388 | } 389 | geometry { 390 | name = platform 391 | type = plane 392 | normal { x = -1 y = 0 z = 0 } 393 | body = ground 394 | pos { x = 0 y = 0 z = 0 } 395 | ori { x = 0 y = 0 z = -90 } 396 | } 397 | geometry { 398 | name = heel_r 399 | type = sphere 400 | radius = 0.03 401 | body = calcn_r 402 | pos { x = -0.085 y = -0.015 z = -0.005 } 403 | ori { x = 0 y = 0 z = 0 } 404 | } 405 | geometry { 406 | name = toe_lat_r 407 | type = sphere 408 | radius = 0.02 409 | body = calcn_r 410 | pos { x = 0.0425 y = -0.03 z = 0.041 } 411 | ori { x = 0 y = 0 z = 0 } 412 | } 413 | geometry { 414 | name = toe_med_r 415 | type = sphere 416 | radius = 0.02 417 | body = calcn_r 418 | pos { x = 0.085 y = -0.03 z = -0.0275 } 419 | ori { x = 0 y = 0 z = 0 } 420 | } 421 | geometry { 422 | name = heel_l 423 | type = sphere 424 | radius = 0.03 425 | body = calcn_l 426 | pos { x = -0.085 y = -0.015 z = 0.005 } 427 | ori { x = 0 y = 0 z = 0 } 428 | } 429 | geometry { 430 | name = toe_lat_l 431 | type = sphere 432 | radius = 0.02 433 | body = calcn_l 434 | pos { x = 0.0425 y = -0.03 z = -0.041 } 435 | ori { x = 0 y = 0 z = 0 } 436 | } 437 | geometry { 438 | name = toe_med_l 439 | type = sphere 440 | radius = 0.02 441 | body = calcn_l 442 | pos { x = 0.085 y = -0.03 z = 0.0275 } 443 | ori { x = 0 y = 0 z = 0 } 444 | } 445 | geometry { 446 | name = upper_leg_r 447 | type = capsule 448 | radius = 0.05 449 | height = 0.37 450 | body = femur_r 451 | pos { x = 0 y = -0.04 z = 0.01 } 452 | ori { x = -3 y = 0 z = 0 } 453 | } 454 | geometry { 455 | name = lower_leg_r 456 | type = capsule 457 | radius = 0.04 458 | height = 0.35 459 | body = tibia_r 460 | pos { x = 0 y = -0.05 z = 0 } 461 | ori { x = 0 y = 0 z = 3 } 462 | } 463 | geometry { 464 | name = upper_leg_l 465 | type = capsule 466 | radius = 0.05 467 | height = 0.37 468 | body = femur_l 469 | pos { x = 0 y = -0.04 z = -0.01 } 470 | ori { x = 3 y = 0 z = 0 } 471 | } 472 | geometry { 473 | name = lower_leg_l 474 | type = capsule 475 | radius = 0.04 476 | height = 0.35 477 | body = tibia_l 478 | pos { x = 0 y = -0.05 z = 0 } 479 | ori { x = 0 y = 0 z = 3 } 480 | } 481 | geometry { 482 | name = lower_trunk 483 | type = capsule 484 | radius = 0.1 485 | height = 0.12 486 | body = pelvis 487 | pos { x = -0.01 y = -0.01 z = 0 } 488 | ori { x = 90 y = 0 z = 0 } 489 | } 490 | geometry { 491 | name = belly 492 | type = capsule 493 | radius = 0.10 494 | height = 0.1 495 | body = torso 496 | pos { x = 0.05 y = -0.27 z = 0 } 497 | ori { x = 90 y = 0 z = 0 } 498 | } 499 | geometry { 500 | name = middle_trunk 501 | type = capsule 502 | radius = 0.10 503 | height = 0.12 504 | body = torso 505 | pos { x = 0.04 y = -0.15 z = 0 } 506 | ori { x = 90 y = 0 z = 0 } 507 | } 508 | geometry { 509 | name = upper_trunk 510 | type = capsule 511 | radius = 0.11 512 | height = 0.13 513 | body = torso 514 | pos { x = 0.03 y = -0.01 z = 0 } 515 | ori { x = 90 y = 0 z = 0 } 516 | } 517 | geometry { 518 | name = head 519 | type = sphere 520 | radius = 0.1 521 | body = torso 522 | pos { x = 0.04 y = 0.24 z = 0 } 523 | } 524 | dof { name = pelvis_tilt source = pelvis_rz range = -90..90 } 525 | dof { name = pelvis_list source = pelvis_rx range = -90..90 } 526 | dof { name = pelvis_rotation source = pelvis_ry range = -90..90 } 527 | dof { name = pelvis_tx source = pelvis_tx range = -5..5 } 528 | dof { name = pelvis_ty source = pelvis_ty range = -1..2 default = 1 } 529 | dof { name = pelvis_tz source = pelvis_tz range = -3..3 } 530 | dof { name = hip_flexion_r source = hip_rz_r range = -30..120 } 531 | dof { name = hip_adduction_r source = hip_rx_r range = -45..20 } 532 | dof { name = hip_rotation_r source = hip_ry_r range = -45..45 } 533 | dof { name = knee_angle_r source = knee_rz_r range = -120..10 } 534 | dof { name = ankle_angle_r source = ankle_rz_r range = -60..25 } 535 | dof { name = hip_flexion_l source = hip_rz_l range = -30..120 } 536 | dof { name = hip_adduction_l source = -hip_rx_l range = -45..20 } 537 | dof { name = hip_rotation_l source = -hip_ry_l range = -45..45 } 538 | dof { name = knee_angle_l source = knee_rz_l range = -120..10 } 539 | dof { name = ankle_angle_l source = ankle_rz_l range = -60..25 } 540 | dof { name = lumbar_extension source = lumbar_joint_rz range = -90..90 } 541 | dof { name = lumbar_bending source = lumbar_joint_rx range = -90..90 } 542 | dof { name = lumbar_rotation source = lumbar_joint_ry range = -90..90 } 543 | } 544 | -------------------------------------------------------------------------------- /sconegym/data-v1/H1622Sv2kb.hfd: -------------------------------------------------------------------------------- 1 | model { 2 | material { 3 | name = default_material 4 | static_friction = 0.9 5 | dynamic_friction = 0.6 6 | stiffness = 11006.4 7 | damping = 1 8 | } 9 | model_options { 10 | joint_stiffness = 1e+06 11 | joint_limit_stiffness = 500 12 | } 13 | body { 14 | name = ground 15 | mass = 0 16 | inertia { x = 0 y = 0 z = 0 } 17 | } 18 | body { 19 | name = pelvis 20 | mass = 11.777 21 | inertia { x = 0.1028 y = 0.0871 z = 0.0579 } 22 | pos { x = -0.0707 y = 0 z = 0 } 23 | mesh { file = sacrum.vtp pos { x = 0.0707 y = 0 z = 0 } } 24 | mesh { file = pelvis.vtp pos { x = 0.0707 y = 0 z = 0 } } 25 | mesh { file = l_pelvis.vtp pos { x = 0.0707 y = 0 z = 0 } } 26 | } 27 | body { 28 | name = femur_r 29 | mass = 9.3014 30 | inertia { x = 0.1339 y = 0.0351 z = 0.1412 } 31 | joint { 32 | name = hip_r 33 | parent = pelvis 34 | pos_in_parent { x = 0 y = -0.0661 z = 0.0835 } 35 | pos_in_child { x = 0 y = 0.17 z = 0 } 36 | limits { x = -45..20 y = 0..0 z = -30..120 } 37 | limit_stiffness = 20 38 | } 39 | mesh { file = femur.vtp pos { x = 0 y = 0.17 z = 0 } } 40 | } 41 | body { 42 | name = tibia_r 43 | mass = 3.7075 44 | inertia { x = 0.0504 y = 0.0051 z = 0.0511 } 45 | joint { 46 | name = knee_r 47 | parent = femur_r 48 | pos_in_parent { x = 0 y = -0.226 z = 0 } 49 | pos_in_child { x = 0 y = 0.1867 z = 0 } 50 | limits { x = 0..0 y = 0..0 z = -120..-3 } 51 | } 52 | mesh { file = tibia.vtp pos { x = 0 y = 0.1867 z = 0 } } 53 | mesh { file = fibula.vtp pos { x = 0 y = 0.1867 z = 0 } } 54 | } 55 | body { 56 | name = calcn_r 57 | mass = 1.25 58 | inertia { x = 0.0014 y = 0.0039 z = 0.0041 } 59 | joint { 60 | name = ankle_r 61 | parent = tibia_r 62 | pos_in_parent { x = 0 y = -0.2433 z = 0 } 63 | pos_in_child { x = -0.05123 y = 0.01195 z = -0.00792 } 64 | limits { x = 0..0 y = 0..0 z = -60..25 } 65 | } 66 | mesh { file = foot.vtp pos { x = -0.1 y = -0.03 z = 0 } } 67 | mesh { file = talus.vtp pos { x = -0.05123 y = 0.01195 z = -0.00792 } } 68 | mesh { file = bofoot.vtp pos { x = 0.0788 y = -0.032 z = 0.00108 } } 69 | } 70 | body { 71 | name = femur_l 72 | mass = 9.3014 73 | inertia { x = 0.1339 y = 0.0351 z = 0.1412 } 74 | joint { 75 | name = hip_l 76 | parent = pelvis 77 | pos_in_parent { x = 0 y = -0.0661 z = -0.0835 } 78 | pos_in_child { x = 0 y = 0.17 z = 0 } 79 | limits { x = -20..45 y = 0..0 z = -30..120 } 80 | limit_stiffness = 20 81 | } 82 | mesh { file = l_femur.vtp pos { x = 0 y = 0.17 z = 0 } } 83 | } 84 | body { 85 | name = tibia_l 86 | mass = 3.7075 87 | inertia { x = 0.0504 y = 0.0051 z = 0.0511 } 88 | joint { 89 | name = knee_l 90 | parent = femur_l 91 | pos_in_parent { x = 0 y = -0.226 z = 0 } 92 | pos_in_child { x = 0 y = 0.1867 z = 0 } 93 | limits { x = 0..0 y = 0..0 z = -120..-3 } 94 | } 95 | mesh { file = l_tibia.vtp pos { x = 0 y = 0.1867 z = 0 } } 96 | mesh { file = l_fibula.vtp pos { x = 0 y = 0.1867 z = 0 } } 97 | } 98 | body { 99 | name = calcn_l 100 | mass = 1.25 101 | inertia { x = 0.0014 y = 0.0039 z = 0.0041 } 102 | joint { 103 | name = ankle_l 104 | parent = tibia_l 105 | pos_in_parent { x = 0 y = -0.2433 z = 0 } 106 | pos_in_child { x = -0.05123 y = 0.01195 z = 0.00792 } 107 | limits { x = 0..0 y = 0..0 z = -60..25 } 108 | } 109 | mesh { file = l_foot.vtp pos { x = -0.1 y = -0.03 z = 0 } } 110 | mesh { file = l_talus.vtp pos { x = -0.05123 y = 0.01195 z = 0.00792 } } 111 | mesh { file = l_bofoot.vtp pos { x = 0.0788 y = -0.032 z = -0.00108 } } 112 | } 113 | body { 114 | name = torso 115 | mass = 34.2366 116 | inertia { x = 1.4745 y = 0.7555 z = 1.4314 } 117 | joint { 118 | name = lumbar_joint 119 | parent = pelvis 120 | pos_in_parent { x = -0.03 y = 0.0815 z = 0 } 121 | pos_in_child { x = 0.03 y = -0.32 z = 0 } 122 | limits { x = 0..0 y = 0..0 z = 0..0 } 123 | } 124 | mesh { file = hat_spine.vtp pos { x = 0.03 y = -0.32 z = 0 } } 125 | mesh { file = hat_jaw.vtp pos { x = 0.03 y = -0.32 z = 0 } } 126 | mesh { file = hat_skull.vtp pos { x = 0.03 y = -0.32 z = 0 } } 127 | mesh { file = hat_ribs.vtp pos { x = 0.03 y = -0.32 z = 0 } } 128 | } 129 | point_path_muscle { 130 | name = glut_med_r 131 | max_isometric_force = 2729 132 | optimal_fiber_length = 0.0733 133 | tendon_slack_length = 0.066 134 | pennation_angle = 0.3578 135 | path [ 136 | { body = pelvis pos { x = -0.0148 y = 0.0445 z = 0.0766 } } 137 | { body = femur_r pos { x = -0.0258 y = 0.1642 z = 0.0527 } } 138 | ] 139 | } 140 | point_path_muscle { 141 | name = add_mag_r 142 | max_isometric_force = 3931 143 | optimal_fiber_length = 0.087 144 | tendon_slack_length = 0.06 145 | pennation_angle = 0.0872665 146 | path [ 147 | { body = pelvis pos { x = -0.0025 y = -0.1174 z = 0.0255 } } 148 | { body = femur_r pos { x = -0.0045 y = 0.0489 z = 0.0339 } } 149 | ] 150 | } 151 | point_path_muscle { 152 | name = hamstrings_r 153 | max_isometric_force = 4105 154 | optimal_fiber_length = 0.0976 155 | tendon_slack_length = 0.319 156 | pennation_angle = 0.2025 157 | path [ 158 | { body = pelvis pos { x = -0.05526 y = -0.10257 z = 0.06944 } } 159 | { body = tibia_r pos { x = -0.028 y = 0.1667 z = 0.02943 } } 160 | { body = tibia_r pos { x = -0.021 y = 0.1467 z = 0.0343 } } 161 | ] 162 | } 163 | point_path_muscle { 164 | name = bifemsh_r 165 | max_isometric_force = 1273 166 | optimal_fiber_length = 0.1103 167 | tendon_slack_length = 0.095 168 | pennation_angle = 0.2147 169 | path [ 170 | { body = femur_r pos { x = 0.005 y = -0.0411 z = 0.0234 } } 171 | { body = tibia_r pos { x = -0.028 y = 0.1667 z = 0.02943 } } 172 | { body = tibia_r pos { x = -0.021 y = 0.1467 z = 0.0343 } } 173 | ] 174 | } 175 | point_path_muscle { 176 | name = glut_max_r 177 | max_isometric_force = 3338 178 | optimal_fiber_length = 0.1569 179 | tendon_slack_length = 0.111 180 | pennation_angle = 0.3822 181 | path [ 182 | { body = pelvis pos { x = -0.0642 y = 0.0176 z = 0.0563 } } 183 | { body = pelvis pos { x = -0.0669 y = -0.052 z = 0.0914 } } 184 | { body = femur_r pos { x = -0.0426 y = 0.117 z = 0.0293 } } 185 | { body = femur_r pos { x = -0.0156 y = 0.0684 z = 0.0419 } } 186 | ] 187 | } 188 | point_path_muscle { 189 | name = iliopsoas_r 190 | max_isometric_force = 2448 191 | optimal_fiber_length = 0.1066 192 | tendon_slack_length = 0.152 193 | pennation_angle = 0.2496 194 | path [ 195 | { body = pelvis pos { x = 0.006 y = 0.0887 z = 0.0289 } } 196 | { body = pelvis pos { x = 0.0407 y = -0.01 z = 0.076 } } 197 | { body = femur_r pos { x = 0.033 y = 0.135 z = 0.0038 } } 198 | { body = femur_r pos { x = -0.0188 y = 0.1103 z = 0.0104 } } 199 | ] 200 | } 201 | point_path_muscle { 202 | name = rect_fem_r 203 | max_isometric_force = 2192 204 | optimal_fiber_length = 0.0759 205 | tendon_slack_length = 0.3449 206 | pennation_angle = 0.2426 207 | path [ 208 | { body = pelvis pos { x = 0.0412 y = -0.0311 z = 0.0968 } } 209 | { body = femur_r pos { x = 0.038 y = -0.17 z = 0.004 } } 210 | { body = tibia_r pos { x = 0.038 y = 0.2117 z = 0.0018 } } 211 | ] 212 | } 213 | point_path_muscle { 214 | name = vasti_r 215 | max_isometric_force = 9594 216 | optimal_fiber_length = 0.0993 217 | tendon_slack_length = 0.1231 218 | pennation_angle = 0.0785 219 | path [ 220 | { body = femur_r pos { x = 0.029 y = -0.0224 z = 0.031 } } 221 | { body = femur_r pos { x = 0.038 y = -0.17 z = 0.007 } } 222 | { body = tibia_r pos { x = 0.038 y = 0.2117 z = 0.0018 } } 223 | ] 224 | } 225 | point_path_muscle { 226 | name = gastroc_r 227 | max_isometric_force = 4691 228 | optimal_fiber_length = 0.051 229 | tendon_slack_length = 0.384 230 | pennation_angle = 0.1728 231 | path [ 232 | { body = femur_r pos { x = -0.02 y = -0.218 z = -0.024 } } 233 | { body = calcn_r pos { x = -0.095 y = 0.001 z = -0.0053 } } 234 | ] 235 | } 236 | point_path_muscle { 237 | name = soleus_r 238 | max_isometric_force = 6195 239 | optimal_fiber_length = 0.044 240 | tendon_slack_length = 0.248 241 | pennation_angle = 0.4939 242 | path [ 243 | { body = tibia_r pos { x = -0.0024 y = 0.0334 z = 0.0071 } } 244 | { body = calcn_r pos { x = -0.095 y = 0.001 z = -0.0053 } } 245 | ] 246 | } 247 | point_path_muscle { 248 | name = tib_ant_r 249 | max_isometric_force = 2116 250 | optimal_fiber_length = 0.0683 251 | tendon_slack_length = 0.243 252 | pennation_angle = 0.1676 253 | path [ 254 | { body = tibia_r pos { x = 0.0179 y = 0.0243 z = 0.0115 } } 255 | { body = tibia_r pos { x = 0.0329 y = -0.2084 z = -0.0177 } } 256 | { body = calcn_r pos { x = 0.0166 y = -0.0122 z = -0.0305 } } 257 | ] 258 | } 259 | point_path_muscle { 260 | name = glut_med_l 261 | max_isometric_force = 2729 262 | optimal_fiber_length = 0.0733 263 | tendon_slack_length = 0.066 264 | pennation_angle = 0.3578 265 | path [ 266 | { body = pelvis pos { x = -0.0148 y = 0.0445 z = -0.0766 } } 267 | { body = femur_l pos { x = -0.0258 y = 0.1642 z = -0.0527 } } 268 | ] 269 | } 270 | point_path_muscle { 271 | name = add_mag_l 272 | max_isometric_force = 3931 273 | optimal_fiber_length = 0.087 274 | tendon_slack_length = 0.06 275 | pennation_angle = 0.0872665 276 | path [ 277 | { body = pelvis pos { x = -0.0025 y = -0.1174 z = -0.0255 } } 278 | { body = femur_l pos { x = -0.0045 y = 0.0489 z = -0.0339 } } 279 | ] 280 | } 281 | point_path_muscle { 282 | name = hamstrings_l 283 | max_isometric_force = 4105 284 | optimal_fiber_length = 0.0976 285 | tendon_slack_length = 0.319 286 | pennation_angle = 0.2025 287 | path [ 288 | { body = pelvis pos { x = -0.05526 y = -0.10257 z = -0.06944 } } 289 | { body = tibia_l pos { x = -0.028 y = 0.1667 z = -0.02943 } } 290 | { body = tibia_l pos { x = -0.021 y = 0.1467 z = -0.0343 } } 291 | ] 292 | } 293 | point_path_muscle { 294 | name = bifemsh_l 295 | max_isometric_force = 1273 296 | optimal_fiber_length = 0.1103 297 | tendon_slack_length = 0.095 298 | pennation_angle = 0.2147 299 | path [ 300 | { body = femur_l pos { x = 0.005 y = -0.0411 z = -0.0234 } } 301 | { body = tibia_l pos { x = -0.028 y = 0.1667 z = -0.02943 } } 302 | { body = tibia_l pos { x = -0.021 y = 0.1467 z = -0.0343 } } 303 | ] 304 | } 305 | point_path_muscle { 306 | name = glut_max_l 307 | max_isometric_force = 3338 308 | optimal_fiber_length = 0.1569 309 | tendon_slack_length = 0.111 310 | pennation_angle = 0.3822 311 | path [ 312 | { body = pelvis pos { x = -0.0642 y = 0.0176 z = -0.0563 } } 313 | { body = pelvis pos { x = -0.0669 y = -0.052 z = -0.0914 } } 314 | { body = femur_l pos { x = -0.0426 y = 0.117 z = -0.0293 } } 315 | { body = femur_l pos { x = -0.0156 y = 0.0684 z = -0.0419 } } 316 | ] 317 | } 318 | point_path_muscle { 319 | name = iliopsoas_l 320 | max_isometric_force = 2448 321 | optimal_fiber_length = 0.1066 322 | tendon_slack_length = 0.152 323 | pennation_angle = 0.2496 324 | path [ 325 | { body = pelvis pos { x = 0.006 y = 0.0887 z = -0.0289 } } 326 | { body = pelvis pos { x = 0.0407 y = -0.01 z = -0.076 } } 327 | { body = femur_l pos { x = 0.033 y = 0.135 z = -0.0038 } } 328 | { body = femur_l pos { x = -0.0188 y = 0.1103 z = -0.0104 } } 329 | ] 330 | } 331 | point_path_muscle { 332 | name = rect_fem_l 333 | max_isometric_force = 2192 334 | optimal_fiber_length = 0.0759 335 | tendon_slack_length = 0.3449 336 | pennation_angle = 0.2426 337 | path [ 338 | { body = pelvis pos { x = 0.0412 y = -0.0311 z = -0.0968 } } 339 | { body = femur_l pos { x = 0.038 y = -0.17 z = -0.004 } } 340 | { body = tibia_l pos { x = 0.038 y = 0.2117 z = -0.0018 } } 341 | ] 342 | } 343 | point_path_muscle { 344 | name = vasti_l 345 | max_isometric_force = 9594 346 | optimal_fiber_length = 0.0993 347 | tendon_slack_length = 0.1231 348 | pennation_angle = 0.0785 349 | path [ 350 | { body = femur_l pos { x = 0.029 y = -0.0224 z = -0.031 } } 351 | { body = femur_l pos { x = 0.038 y = -0.17 z = -0.007 } } 352 | { body = tibia_l pos { x = 0.038 y = 0.2117 z = -0.0018 } } 353 | ] 354 | } 355 | point_path_muscle { 356 | name = gastroc_l 357 | max_isometric_force = 4691 358 | optimal_fiber_length = 0.051 359 | tendon_slack_length = 0.384 360 | pennation_angle = 0.1728 361 | path [ 362 | { body = femur_l pos { x = -0.02 y = -0.218 z = 0.024 } } 363 | { body = calcn_l pos { x = -0.095 y = 0.001 z = 0.0053 } } 364 | ] 365 | } 366 | point_path_muscle { 367 | name = soleus_l 368 | max_isometric_force = 6195 369 | optimal_fiber_length = 0.044 370 | tendon_slack_length = 0.248 371 | pennation_angle = 0.4939 372 | path [ 373 | { body = tibia_l pos { x = -0.0024 y = 0.0334 z = -0.0071 } } 374 | { body = calcn_l pos { x = -0.095 y = 0.001 z = 0.0053 } } 375 | ] 376 | } 377 | point_path_muscle { 378 | name = tib_ant_l 379 | max_isometric_force = 2116 380 | optimal_fiber_length = 0.0683 381 | tendon_slack_length = 0.243 382 | pennation_angle = 0.1676 383 | path [ 384 | { body = tibia_l pos { x = 0.0179 y = 0.0243 z = -0.0115 } } 385 | { body = tibia_l pos { x = 0.0329 y = -0.2084 z = 0.0177 } } 386 | { body = calcn_l pos { x = 0.0166 y = -0.0122 z = 0.0305 } } 387 | ] 388 | } 389 | geometry { 390 | name = platform 391 | type = plane 392 | normal { x = -1 y = 0 z = 0 } 393 | body = ground 394 | pos { x = 0 y = 0 z = 0 } 395 | ori { x = 0 y = 0 z = -90 } 396 | } 397 | geometry { 398 | name = heel_r 399 | type = sphere 400 | radius = 0.03 401 | body = calcn_r 402 | pos { x = -0.085 y = -0.015 z = -0.005 } 403 | ori { x = 0 y = 0 z = 0 } 404 | } 405 | geometry { 406 | name = toe_lat_r 407 | type = sphere 408 | radius = 0.02 409 | body = calcn_r 410 | pos { x = 0.0425 y = -0.03 z = 0.041 } 411 | ori { x = 0 y = 0 z = 0 } 412 | } 413 | geometry { 414 | name = toe_med_r 415 | type = sphere 416 | radius = 0.02 417 | body = calcn_r 418 | pos { x = 0.085 y = -0.03 z = -0.0275 } 419 | ori { x = 0 y = 0 z = 0 } 420 | } 421 | geometry { 422 | name = heel_l 423 | type = sphere 424 | radius = 0.03 425 | body = calcn_l 426 | pos { x = -0.085 y = -0.015 z = 0.005 } 427 | ori { x = 0 y = 0 z = 0 } 428 | } 429 | geometry { 430 | name = toe_lat_l 431 | type = sphere 432 | radius = 0.02 433 | body = calcn_l 434 | pos { x = 0.0425 y = -0.03 z = -0.041 } 435 | ori { x = 0 y = 0 z = 0 } 436 | } 437 | geometry { 438 | name = toe_med_l 439 | type = sphere 440 | radius = 0.02 441 | body = calcn_l 442 | pos { x = 0.085 y = -0.03 z = 0.0275 } 443 | ori { x = 0 y = 0 z = 0 } 444 | } 445 | geometry { 446 | name = upper_leg_r 447 | type = capsule 448 | radius = 0.05 449 | height = 0.37 450 | body = femur_r 451 | pos { x = 0 y = -0.04 z = 0.01 } 452 | ori { x = -3 y = 0 z = 0 } 453 | } 454 | geometry { 455 | name = lower_leg_r 456 | type = capsule 457 | radius = 0.04 458 | height = 0.35 459 | body = tibia_r 460 | pos { x = 0 y = -0.05 z = 0 } 461 | ori { x = 0 y = 0 z = 3 } 462 | } 463 | geometry { 464 | name = upper_leg_l 465 | type = capsule 466 | radius = 0.05 467 | height = 0.37 468 | body = femur_l 469 | pos { x = 0 y = -0.04 z = -0.01 } 470 | ori { x = 3 y = 0 z = 0 } 471 | } 472 | geometry { 473 | name = lower_leg_l 474 | type = capsule 475 | radius = 0.04 476 | height = 0.35 477 | body = tibia_l 478 | pos { x = 0 y = -0.05 z = 0 } 479 | ori { x = 0 y = 0 z = 3 } 480 | } 481 | geometry { 482 | name = lower_trunk 483 | type = capsule 484 | radius = 0.1 485 | height = 0.12 486 | body = pelvis 487 | pos { x = -0.01 y = -0.01 z = 0 } 488 | ori { x = 90 y = 0 z = 0 } 489 | } 490 | geometry { 491 | name = belly 492 | type = capsule 493 | radius = 0.10 494 | height = 0.1 495 | body = torso 496 | pos { x = 0.05 y = -0.27 z = 0 } 497 | ori { x = 90 y = 0 z = 0 } 498 | } 499 | geometry { 500 | name = middle_trunk 501 | type = capsule 502 | radius = 0.10 503 | height = 0.12 504 | body = torso 505 | pos { x = 0.04 y = -0.15 z = 0 } 506 | ori { x = 90 y = 0 z = 0 } 507 | } 508 | geometry { 509 | name = upper_trunk 510 | type = capsule 511 | radius = 0.11 512 | height = 0.13 513 | body = torso 514 | pos { x = 0.03 y = -0.01 z = 0 } 515 | ori { x = 90 y = 0 z = 0 } 516 | } 517 | geometry { 518 | name = head 519 | type = sphere 520 | radius = 0.1 521 | body = torso 522 | pos { x = 0.04 y = 0.24 z = 0 } 523 | } 524 | dof { name = pelvis_tilt source = pelvis_rz range = -90..90 } 525 | dof { name = pelvis_list source = pelvis_rx range = -90..90 } 526 | dof { name = pelvis_rotation source = pelvis_ry range = -90..90 } 527 | dof { name = pelvis_tx source = pelvis_tx range = -5..5 } 528 | dof { name = pelvis_ty source = pelvis_ty range = -1..2 default = 1 } 529 | dof { name = pelvis_tz source = pelvis_tz range = -3..3 } 530 | dof { name = hip_flexion_r source = hip_rz_r range = -30..120 } 531 | dof { name = hip_adduction_r source = hip_rx_r range = -45..20 } 532 | dof { name = hip_rotation_r source = hip_ry_r range = -45..45 } 533 | dof { name = knee_angle_r source = knee_rz_r range = -120..10 } 534 | dof { name = ankle_angle_r source = ankle_rz_r range = -60..25 } 535 | dof { name = hip_flexion_l source = hip_rz_l range = -30..120 } 536 | dof { name = hip_adduction_l source = -hip_rx_l range = -45..20 } 537 | dof { name = hip_rotation_l source = -hip_ry_l range = -45..45 } 538 | dof { name = knee_angle_l source = knee_rz_l range = -120..10 } 539 | dof { name = ankle_angle_l source = ankle_rz_l range = -60..25 } 540 | dof { name = lumbar_extension source = lumbar_joint_rz range = -90..90 } 541 | dof { name = lumbar_bending source = lumbar_joint_rx range = -90..90 } 542 | dof { name = lumbar_rotation source = lumbar_joint_ry range = -90..90 } 543 | } 544 | -------------------------------------------------------------------------------- /sconegym/data-v1/H1622v2k.hfd: -------------------------------------------------------------------------------- 1 | model { 2 | material { 3 | name = default_material 4 | static_friction = 0.9 5 | dynamic_friction = 0.6 6 | stiffness = 11006.4 7 | damping = 1 8 | } 9 | model_options { 10 | joint_stiffness = 1e+06 11 | joint_limit_stiffness = 500 12 | } 13 | body { 14 | name = ground 15 | mass = 0 16 | inertia { x = 0 y = 0 z = 0 } 17 | } 18 | body { 19 | name = pelvis 20 | mass = 11.777 21 | inertia { x = 0.1028 y = 0.0871 z = 0.0579 } 22 | pos { x = -0.0707 y = 0 z = 0 } 23 | mesh { file = sacrum.vtp pos { x = 0.0707 y = 0 z = 0 } } 24 | mesh { file = pelvis.vtp pos { x = 0.0707 y = 0 z = 0 } } 25 | mesh { file = l_pelvis.vtp pos { x = 0.0707 y = 0 z = 0 } } 26 | } 27 | body { 28 | name = femur_r 29 | mass = 9.3014 30 | inertia { x = 0.1339 y = 0.0351 z = 0.1412 } 31 | joint { 32 | name = hip_r 33 | parent = pelvis 34 | pos_in_parent { x = 0 y = -0.0661 z = 0.0835 } 35 | pos_in_child { x = 0 y = 0.17 z = 0 } 36 | limits { x = -45..20 y = 0..0 z = -30..120 } 37 | limit_stiffness = 20 38 | } 39 | mesh { file = femur.vtp pos { x = 0 y = 0.17 z = 0 } } 40 | } 41 | body { 42 | name = tibia_r 43 | mass = 3.7075 44 | inertia { x = 0.0504 y = 0.0051 z = 0.0511 } 45 | joint { 46 | name = knee_r 47 | parent = femur_r 48 | pos_in_parent { x = 0 y = -0.226 z = 0 } 49 | pos_in_child { x = 0 y = 0.1867 z = 0 } 50 | limits { x = 0..0 y = 0..0 z = -120..-3 } 51 | } 52 | mesh { file = tibia.vtp pos { x = 0 y = 0.1867 z = 0 } } 53 | mesh { file = fibula.vtp pos { x = 0 y = 0.1867 z = 0 } } 54 | } 55 | body { 56 | name = calcn_r 57 | mass = 1.25 58 | inertia { x = 0.0014 y = 0.0039 z = 0.0041 } 59 | joint { 60 | name = ankle_r 61 | parent = tibia_r 62 | pos_in_parent { x = 0 y = -0.2433 z = 0 } 63 | pos_in_child { x = -0.05123 y = 0.01195 z = -0.00792 } 64 | limits { x = 0..0 y = 0..0 z = -60..25 } 65 | } 66 | mesh { file = foot.vtp pos { x = -0.1 y = -0.03 z = 0 } } 67 | mesh { file = talus.vtp pos { x = -0.05123 y = 0.01195 z = -0.00792 } } 68 | mesh { file = bofoot.vtp pos { x = 0.0788 y = -0.032 z = 0.00108 } } 69 | } 70 | body { 71 | name = femur_l 72 | mass = 9.3014 73 | inertia { x = 0.1339 y = 0.0351 z = 0.1412 } 74 | joint { 75 | name = hip_l 76 | parent = pelvis 77 | pos_in_parent { x = 0 y = -0.0661 z = -0.0835 } 78 | pos_in_child { x = 0 y = 0.17 z = 0 } 79 | limits { x = -20..45 y = 0..0 z = -30..120 } 80 | limit_stiffness = 20 81 | } 82 | mesh { file = l_femur.vtp pos { x = 0 y = 0.17 z = 0 } } 83 | } 84 | body { 85 | name = tibia_l 86 | mass = 3.7075 87 | inertia { x = 0.0504 y = 0.0051 z = 0.0511 } 88 | joint { 89 | name = knee_l 90 | parent = femur_l 91 | pos_in_parent { x = 0 y = -0.226 z = 0 } 92 | pos_in_child { x = 0 y = 0.1867 z = 0 } 93 | limits { x = 0..0 y = 0..0 z = -120..-3 } 94 | } 95 | mesh { file = l_tibia.vtp pos { x = 0 y = 0.1867 z = 0 } } 96 | mesh { file = l_fibula.vtp pos { x = 0 y = 0.1867 z = 0 } } 97 | } 98 | body { 99 | name = calcn_l 100 | mass = 1.25 101 | inertia { x = 0.0014 y = 0.0039 z = 0.0041 } 102 | joint { 103 | name = ankle_l 104 | parent = tibia_l 105 | pos_in_parent { x = 0 y = -0.2433 z = 0 } 106 | pos_in_child { x = -0.05123 y = 0.01195 z = 0.00792 } 107 | limits { x = 0..0 y = 0..0 z = -60..25 } 108 | } 109 | mesh { file = l_foot.vtp pos { x = -0.1 y = -0.03 z = 0 } } 110 | mesh { file = l_talus.vtp pos { x = -0.05123 y = 0.01195 z = 0.00792 } } 111 | mesh { file = l_bofoot.vtp pos { x = 0.0788 y = -0.032 z = -0.00108 } } 112 | } 113 | body { 114 | name = torso 115 | mass = 34.2366 116 | inertia { x = 1.4745 y = 0.7555 z = 1.4314 } 117 | joint { 118 | name = lumbar_joint 119 | parent = pelvis 120 | pos_in_parent { x = -0.03 y = 0.0815 z = 0 } 121 | pos_in_child { x = 0.03 y = -0.32 z = 0 } 122 | limits { x = 0..0 y = 0..0 z = 0..0 } 123 | } 124 | mesh { file = hat_spine.vtp pos { x = 0.03 y = -0.32 z = 0 } } 125 | mesh { file = hat_jaw.vtp pos { x = 0.03 y = -0.32 z = 0 } } 126 | mesh { file = hat_skull.vtp pos { x = 0.03 y = -0.32 z = 0 } } 127 | mesh { file = hat_ribs.vtp pos { x = 0.03 y = -0.32 z = 0 } } 128 | } 129 | point_path_muscle { 130 | name = glut_med_r 131 | max_isometric_force = 2045 132 | optimal_fiber_length = 0.0733 133 | tendon_slack_length = 0.066 134 | pennation_angle = 0.3578 135 | path [ 136 | { body = pelvis pos { x = -0.0148 y = 0.0445 z = 0.0766 } } 137 | { body = femur_r pos { x = -0.0258 y = 0.1642 z = 0.0527 } } 138 | ] 139 | } 140 | point_path_muscle { 141 | name = add_mag_r 142 | max_isometric_force = 2268 143 | optimal_fiber_length = 0.087 144 | tendon_slack_length = 0.06 145 | pennation_angle = 0.0872665 146 | path [ 147 | { body = pelvis pos { x = -0.0025 y = -0.1174 z = 0.0255 } } 148 | { body = femur_r pos { x = -0.0045 y = 0.0489 z = 0.0339 } } 149 | ] 150 | } 151 | point_path_muscle { 152 | name = hamstrings_r 153 | max_isometric_force = 2594 154 | optimal_fiber_length = 0.0976 155 | tendon_slack_length = 0.319 156 | pennation_angle = 0.2025 157 | path [ 158 | { body = pelvis pos { x = -0.05526 y = -0.10257 z = 0.06944 } } 159 | { body = tibia_r pos { x = -0.028 y = 0.1667 z = 0.02943 } } 160 | { body = tibia_r pos { x = -0.021 y = 0.1467 z = 0.0343 } } 161 | ] 162 | } 163 | point_path_muscle { 164 | name = bifemsh_r 165 | max_isometric_force = 804 166 | optimal_fiber_length = 0.1103 167 | tendon_slack_length = 0.095 168 | pennation_angle = 0.2147 169 | path [ 170 | { body = femur_r pos { x = 0.005 y = -0.0411 z = 0.0234 } } 171 | { body = tibia_r pos { x = -0.028 y = 0.1667 z = 0.02943 } } 172 | { body = tibia_r pos { x = -0.021 y = 0.1467 z = 0.0343 } } 173 | ] 174 | } 175 | point_path_muscle { 176 | name = glut_max_r 177 | max_isometric_force = 1944 178 | optimal_fiber_length = 0.1569 179 | tendon_slack_length = 0.111 180 | pennation_angle = 0.3822 181 | path [ 182 | { body = pelvis pos { x = -0.0642 y = 0.0176 z = 0.0563 } } 183 | { body = pelvis pos { x = -0.0669 y = -0.052 z = 0.0914 } } 184 | { body = femur_r pos { x = -0.0426 y = 0.117 z = 0.0293 } } 185 | { body = femur_r pos { x = -0.0156 y = 0.0684 z = 0.0419 } } 186 | ] 187 | } 188 | point_path_muscle { 189 | name = iliopsoas_r 190 | max_isometric_force = 2186 191 | optimal_fiber_length = 0.1066 192 | tendon_slack_length = 0.152 193 | pennation_angle = 0.2496 194 | path [ 195 | { body = pelvis pos { x = 0.006 y = 0.0887 z = 0.0289 } } 196 | { body = pelvis pos { x = 0.0407 y = -0.01 z = 0.076 } } 197 | { body = femur_r pos { x = 0.033 y = 0.135 z = 0.0038 } } 198 | { body = femur_r pos { x = -0.0188 y = 0.1103 z = 0.0104 } } 199 | ] 200 | } 201 | point_path_muscle { 202 | name = rect_fem_r 203 | max_isometric_force = 1169 204 | optimal_fiber_length = 0.0759 205 | tendon_slack_length = 0.3449 206 | pennation_angle = 0.2426 207 | path [ 208 | { body = pelvis pos { x = 0.0412 y = -0.0311 z = 0.0968 } } 209 | { body = femur_r pos { x = 0.038 y = -0.17 z = 0.004 } } 210 | { body = tibia_r pos { x = 0.038 y = 0.2117 z = 0.0018 } } 211 | ] 212 | } 213 | point_path_muscle { 214 | name = vasti_r 215 | max_isometric_force = 4530 216 | optimal_fiber_length = 0.0993 217 | tendon_slack_length = 0.1231 218 | pennation_angle = 0.0785 219 | path [ 220 | { body = femur_r pos { x = 0.029 y = -0.0224 z = 0.031 } } 221 | { body = femur_r pos { x = 0.038 y = -0.17 z = 0.007 } } 222 | { body = tibia_r pos { x = 0.038 y = 0.2117 z = 0.0018 } } 223 | ] 224 | } 225 | point_path_muscle { 226 | name = gastroc_r 227 | max_isometric_force = 2241 228 | optimal_fiber_length = 0.051 229 | tendon_slack_length = 0.384 230 | pennation_angle = 0.1728 231 | path [ 232 | { body = femur_r pos { x = -0.02 y = -0.218 z = -0.024 } } 233 | { body = calcn_r pos { x = -0.095 y = 0.001 z = -0.0053 } } 234 | ] 235 | } 236 | point_path_muscle { 237 | name = soleus_r 238 | max_isometric_force = 3549 239 | optimal_fiber_length = 0.044 240 | tendon_slack_length = 0.248 241 | pennation_angle = 0.4939 242 | path [ 243 | { body = tibia_r pos { x = -0.0024 y = 0.0334 z = 0.0071 } } 244 | { body = calcn_r pos { x = -0.095 y = 0.001 z = -0.0053 } } 245 | ] 246 | } 247 | point_path_muscle { 248 | name = tib_ant_r 249 | max_isometric_force = 1579 250 | optimal_fiber_length = 0.0683 251 | tendon_slack_length = 0.243 252 | pennation_angle = 0.1676 253 | path [ 254 | { body = tibia_r pos { x = 0.0179 y = 0.0243 z = 0.0115 } } 255 | { body = tibia_r pos { x = 0.0329 y = -0.2084 z = -0.0177 } } 256 | { body = calcn_r pos { x = 0.0166 y = -0.0122 z = -0.0305 } } 257 | ] 258 | } 259 | point_path_muscle { 260 | name = glut_med_l 261 | max_isometric_force = 2045 262 | optimal_fiber_length = 0.0733 263 | tendon_slack_length = 0.066 264 | pennation_angle = 0.3578 265 | path [ 266 | { body = pelvis pos { x = -0.0148 y = 0.0445 z = -0.0766 } } 267 | { body = femur_l pos { x = -0.0258 y = 0.1642 z = -0.0527 } } 268 | ] 269 | } 270 | point_path_muscle { 271 | name = add_mag_l 272 | max_isometric_force = 2268 273 | optimal_fiber_length = 0.087 274 | tendon_slack_length = 0.06 275 | pennation_angle = 0.0872665 276 | path [ 277 | { body = pelvis pos { x = -0.0025 y = -0.1174 z = -0.0255 } } 278 | { body = femur_l pos { x = -0.0045 y = 0.0489 z = -0.0339 } } 279 | ] 280 | } 281 | point_path_muscle { 282 | name = hamstrings_l 283 | max_isometric_force = 2594 284 | optimal_fiber_length = 0.0976 285 | tendon_slack_length = 0.319 286 | pennation_angle = 0.2025 287 | path [ 288 | { body = pelvis pos { x = -0.05526 y = -0.10257 z = -0.06944 } } 289 | { body = tibia_l pos { x = -0.028 y = 0.1667 z = -0.02943 } } 290 | { body = tibia_l pos { x = -0.021 y = 0.1467 z = -0.0343 } } 291 | ] 292 | } 293 | point_path_muscle { 294 | name = bifemsh_l 295 | max_isometric_force = 804 296 | optimal_fiber_length = 0.1103 297 | tendon_slack_length = 0.095 298 | pennation_angle = 0.2147 299 | path [ 300 | { body = femur_l pos { x = 0.005 y = -0.0411 z = -0.0234 } } 301 | { body = tibia_l pos { x = -0.028 y = 0.1667 z = -0.02943 } } 302 | { body = tibia_l pos { x = -0.021 y = 0.1467 z = -0.0343 } } 303 | ] 304 | } 305 | point_path_muscle { 306 | name = glut_max_l 307 | max_isometric_force = 1944 308 | optimal_fiber_length = 0.1569 309 | tendon_slack_length = 0.111 310 | pennation_angle = 0.3822 311 | path [ 312 | { body = pelvis pos { x = -0.0642 y = 0.0176 z = -0.0563 } } 313 | { body = pelvis pos { x = -0.0669 y = -0.052 z = -0.0914 } } 314 | { body = femur_l pos { x = -0.0426 y = 0.117 z = -0.0293 } } 315 | { body = femur_l pos { x = -0.0156 y = 0.0684 z = -0.0419 } } 316 | ] 317 | } 318 | point_path_muscle { 319 | name = iliopsoas_l 320 | max_isometric_force = 2186 321 | optimal_fiber_length = 0.1066 322 | tendon_slack_length = 0.152 323 | pennation_angle = 0.2496 324 | path [ 325 | { body = pelvis pos { x = 0.006 y = 0.0887 z = -0.0289 } } 326 | { body = pelvis pos { x = 0.0407 y = -0.01 z = -0.076 } } 327 | { body = femur_l pos { x = 0.033 y = 0.135 z = -0.0038 } } 328 | { body = femur_l pos { x = -0.0188 y = 0.1103 z = -0.0104 } } 329 | ] 330 | } 331 | point_path_muscle { 332 | name = rect_fem_l 333 | max_isometric_force = 1169 334 | optimal_fiber_length = 0.0759 335 | tendon_slack_length = 0.3449 336 | pennation_angle = 0.2426 337 | path [ 338 | { body = pelvis pos { x = 0.0412 y = -0.0311 z = -0.0968 } } 339 | { body = femur_l pos { x = 0.038 y = -0.17 z = -0.004 } } 340 | { body = tibia_l pos { x = 0.038 y = 0.2117 z = -0.0018 } } 341 | ] 342 | } 343 | point_path_muscle { 344 | name = vasti_l 345 | max_isometric_force = 4530 346 | optimal_fiber_length = 0.0993 347 | tendon_slack_length = 0.1231 348 | pennation_angle = 0.0785 349 | path [ 350 | { body = femur_l pos { x = 0.029 y = -0.0224 z = -0.031 } } 351 | { body = femur_l pos { x = 0.038 y = -0.17 z = -0.007 } } 352 | { body = tibia_l pos { x = 0.038 y = 0.2117 z = -0.0018 } } 353 | ] 354 | } 355 | point_path_muscle { 356 | name = gastroc_l 357 | max_isometric_force = 2241 358 | optimal_fiber_length = 0.051 359 | tendon_slack_length = 0.384 360 | pennation_angle = 0.1728 361 | path [ 362 | { body = femur_l pos { x = -0.02 y = -0.218 z = 0.024 } } 363 | { body = calcn_l pos { x = -0.095 y = 0.001 z = 0.0053 } } 364 | ] 365 | } 366 | point_path_muscle { 367 | name = soleus_l 368 | max_isometric_force = 3549 369 | optimal_fiber_length = 0.044 370 | tendon_slack_length = 0.248 371 | pennation_angle = 0.4939 372 | path [ 373 | { body = tibia_l pos { x = -0.0024 y = 0.0334 z = -0.0071 } } 374 | { body = calcn_l pos { x = -0.095 y = 0.001 z = 0.0053 } } 375 | ] 376 | } 377 | point_path_muscle { 378 | name = tib_ant_l 379 | max_isometric_force = 1579 380 | optimal_fiber_length = 0.0683 381 | tendon_slack_length = 0.243 382 | pennation_angle = 0.1676 383 | path [ 384 | { body = tibia_l pos { x = 0.0179 y = 0.0243 z = -0.0115 } } 385 | { body = tibia_l pos { x = 0.0329 y = -0.2084 z = 0.0177 } } 386 | { body = calcn_l pos { x = 0.0166 y = -0.0122 z = 0.0305 } } 387 | ] 388 | } 389 | geometry { 390 | name = platform 391 | type = plane 392 | normal { x = -1 y = 0 z = 0 } 393 | body = ground 394 | pos { x = 0 y = 0 z = 0 } 395 | ori { x = 0 y = 0 z = -90 } 396 | } 397 | geometry { 398 | name = heel_r 399 | type = sphere 400 | radius = 0.03 401 | body = calcn_r 402 | pos { x = -0.085 y = -0.015 z = -0.005 } 403 | ori { x = 0 y = 0 z = 0 } 404 | } 405 | geometry { 406 | name = toe_lat_r 407 | type = sphere 408 | radius = 0.02 409 | body = calcn_r 410 | pos { x = 0.0425 y = -0.03 z = 0.041 } 411 | ori { x = 0 y = 0 z = 0 } 412 | } 413 | geometry { 414 | name = toe_med_r 415 | type = sphere 416 | radius = 0.02 417 | body = calcn_r 418 | pos { x = 0.085 y = -0.03 z = -0.0275 } 419 | ori { x = 0 y = 0 z = 0 } 420 | } 421 | geometry { 422 | name = heel_l 423 | type = sphere 424 | radius = 0.03 425 | body = calcn_l 426 | pos { x = -0.085 y = -0.015 z = 0.005 } 427 | ori { x = 0 y = 0 z = 0 } 428 | } 429 | geometry { 430 | name = toe_lat_l 431 | type = sphere 432 | radius = 0.02 433 | body = calcn_l 434 | pos { x = 0.0425 y = -0.03 z = -0.041 } 435 | ori { x = 0 y = 0 z = 0 } 436 | } 437 | geometry { 438 | name = toe_med_l 439 | type = sphere 440 | radius = 0.02 441 | body = calcn_l 442 | pos { x = 0.085 y = -0.03 z = 0.0275 } 443 | ori { x = 0 y = 0 z = 0 } 444 | } 445 | geometry { 446 | name = upper_leg_r 447 | type = capsule 448 | radius = 0.05 449 | height = 0.37 450 | body = femur_r 451 | pos { x = 0 y = -0.04 z = 0.01 } 452 | ori { x = -3 y = 0 z = 0 } 453 | } 454 | geometry { 455 | name = lower_leg_r 456 | type = capsule 457 | radius = 0.04 458 | height = 0.35 459 | body = tibia_r 460 | pos { x = 0 y = -0.05 z = 0 } 461 | ori { x = 0 y = 0 z = 3 } 462 | } 463 | geometry { 464 | name = upper_leg_l 465 | type = capsule 466 | radius = 0.05 467 | height = 0.37 468 | body = femur_l 469 | pos { x = 0 y = -0.04 z = -0.01 } 470 | ori { x = 3 y = 0 z = 0 } 471 | } 472 | geometry { 473 | name = lower_leg_l 474 | type = capsule 475 | radius = 0.04 476 | height = 0.35 477 | body = tibia_l 478 | pos { x = 0 y = -0.05 z = 0 } 479 | ori { x = 0 y = 0 z = 3 } 480 | } 481 | geometry { 482 | name = lower_trunk 483 | type = capsule 484 | radius = 0.1 485 | height = 0.12 486 | body = pelvis 487 | pos { x = -0.01 y = -0.01 z = 0 } 488 | ori { x = 90 y = 0 z = 0 } 489 | } 490 | geometry { 491 | name = belly 492 | type = capsule 493 | radius = 0.10 494 | height = 0.1 495 | body = torso 496 | pos { x = 0.05 y = -0.27 z = 0 } 497 | ori { x = 90 y = 0 z = 0 } 498 | } 499 | geometry { 500 | name = middle_trunk 501 | type = capsule 502 | radius = 0.10 503 | height = 0.12 504 | body = torso 505 | pos { x = 0.04 y = -0.15 z = 0 } 506 | ori { x = 90 y = 0 z = 0 } 507 | } 508 | geometry { 509 | name = upper_trunk 510 | type = capsule 511 | radius = 0.11 512 | height = 0.13 513 | body = torso 514 | pos { x = 0.03 y = -0.01 z = 0 } 515 | ori { x = 90 y = 0 z = 0 } 516 | } 517 | geometry { 518 | name = head 519 | type = sphere 520 | radius = 0.1 521 | body = torso 522 | pos { x = 0.04 y = 0.24 z = 0 } 523 | } 524 | dof { name = pelvis_tilt source = pelvis_rz range = -90..90 } 525 | dof { name = pelvis_list source = pelvis_rx range = -90..90 } 526 | dof { name = pelvis_rotation source = pelvis_ry range = -90..90 } 527 | dof { name = pelvis_tx source = pelvis_tx range = -5..5 } 528 | dof { name = pelvis_ty source = pelvis_ty range = -1..2 default = 1 } 529 | dof { name = pelvis_tz source = pelvis_tz range = -3..3 } 530 | dof { name = hip_flexion_r source = hip_rz_r range = -30..120 } 531 | dof { name = hip_adduction_r source = hip_rx_r range = -45..20 } 532 | dof { name = hip_rotation_r source = hip_ry_r range = -45..45 } 533 | dof { name = knee_angle_r source = knee_rz_r range = -120..10 } 534 | dof { name = ankle_angle_r source = ankle_rz_r range = -60..25 } 535 | dof { name = hip_flexion_l source = hip_rz_l range = -30..120 } 536 | dof { name = hip_adduction_l source = -hip_rx_l range = -45..20 } 537 | dof { name = hip_rotation_l source = -hip_ry_l range = -45..45 } 538 | dof { name = knee_angle_l source = knee_rz_l range = -120..10 } 539 | dof { name = ankle_angle_l source = ankle_rz_l range = -60..25 } 540 | dof { name = lumbar_extension source = lumbar_joint_rz range = -90..90 } 541 | dof { name = lumbar_bending source = lumbar_joint_rx range = -90..90 } 542 | dof { name = lumbar_rotation source = lumbar_joint_ry range = -90..90 } 543 | } 544 | -------------------------------------------------------------------------------- /sconegym/data/H1622_S2.hfd: -------------------------------------------------------------------------------- 1 | model { 2 | material { 3 | name = default_material 4 | static_friction = 0.9 5 | dynamic_friction = 0.6 6 | stiffness = 5975.21 7 | damping = 1 8 | } 9 | model_options { 10 | joint_stiffness = 1e+06 11 | joint_limit_stiffness = 500 12 | muscle_force_multiplier = 2 13 | 14 | } 15 | body { 16 | name = ground 17 | mass = 0 18 | inertia { x = 0 y = 0 z = 0 } 19 | } 20 | body { 21 | name = pelvis 22 | mass = 11.777 23 | inertia { x = 0.1028 y = 0.0871 z = 0.0579 } 24 | pos { x = -0.0707 y = 0 z = 0 } 25 | mesh { file = sacrum.vtp pos { x = 0.0707 y = 0 z = 0 } } 26 | mesh { file = pelvis.vtp pos { x = 0.0707 y = 0 z = 0 } } 27 | mesh { file = l_pelvis.vtp pos { x = 0.0707 y = 0 z = 0 } } 28 | } 29 | body { 30 | name = femur_r 31 | mass = 9.3014 32 | inertia { x = 0.1339 y = 0.0351 z = 0.1412 } 33 | joint { 34 | name = hip_r 35 | parent = pelvis 36 | pos_in_parent { x = 0 y = -0.0661 z = 0.0835 } 37 | pos_in_child { x = 0 y = 0.17 z = 0 } 38 | limits { x = -45..45 y = 0..0 z = -40..120 } 39 | limit_stiffness = 20 40 | } 41 | mesh { file = femur.vtp pos { x = 0 y = 0.17 z = 0 } } 42 | } 43 | body { 44 | name = tibia_r 45 | mass = 3.7075 46 | inertia { x = 0.0504 y = 0.0051 z = 0.0511 } 47 | joint { 48 | name = knee_r 49 | parent = femur_r 50 | pos_in_parent { x = 0 y = -0.226 z = 0 } 51 | pos_in_child { x = 0 y = 0.1867 z = 0 } 52 | limits { x = 0..0 y = 0..0 z = -120..-3 } 53 | } 54 | mesh { file = tibia.vtp pos { x = 0 y = 0.1867 z = 0 } } 55 | mesh { file = fibula.vtp pos { x = 0 y = 0.1867 z = 0 } } 56 | } 57 | body { 58 | name = calcn_r 59 | mass = 1.25 60 | inertia { x = 0.0014 y = 0.0039 z = 0.0041 } 61 | joint { 62 | name = ankle_r 63 | parent = tibia_r 64 | pos_in_parent { x = 0 y = -0.2433 z = 0 } 65 | pos_in_child { x = -0.05123 y = 0.01195 z = -0.00792 } 66 | limits { x = 0..0 y = 0..0 z = -120..120 } 67 | } 68 | mesh { file = foot.vtp pos { x = -0.1 y = -0.03 z = 0 } } 69 | mesh { file = talus.vtp pos { x = -0.05123 y = 0.01195 z = -0.00792 } } 70 | mesh { file = bofoot.vtp pos { x = 0.0788 y = -0.032 z = 0.00108 } } 71 | } 72 | body { 73 | name = femur_l 74 | mass = 9.3014 75 | inertia { x = 0.1339 y = 0.0351 z = 0.1412 } 76 | joint { 77 | name = hip_l 78 | parent = pelvis 79 | pos_in_parent { x = 0 y = -0.0661 z = -0.0835 } 80 | pos_in_child { x = 0 y = 0.17 z = 0 } 81 | limits { x = -45..45 y = 0..0 z = -40..120 } 82 | limit_stiffness = 20 83 | } 84 | mesh { file = l_femur.vtp pos { x = 0 y = 0.17 z = 0 } } 85 | } 86 | body { 87 | name = tibia_l 88 | mass = 3.7075 89 | inertia { x = 0.0504 y = 0.0051 z = 0.0511 } 90 | joint { 91 | name = knee_l 92 | parent = femur_l 93 | pos_in_parent { x = 0 y = -0.226 z = 0 } 94 | pos_in_child { x = 0 y = 0.1867 z = 0 } 95 | limits { x = 0..0 y = 0..0 z = -120..-3 } 96 | } 97 | mesh { file = l_tibia.vtp pos { x = 0 y = 0.1867 z = 0 } } 98 | mesh { file = l_fibula.vtp pos { x = 0 y = 0.1867 z = 0 } } 99 | } 100 | body { 101 | name = calcn_l 102 | mass = 1.25 103 | inertia { x = 0.0014 y = 0.0039 z = 0.0041 } 104 | joint { 105 | name = ankle_l 106 | parent = tibia_l 107 | pos_in_parent { x = 0 y = -0.2433 z = 0 } 108 | pos_in_child { x = -0.05123 y = 0.01195 z = 0.00792 } 109 | limits { x = 0..0 y = 0..0 z = -120..120 } 110 | } 111 | mesh { file = l_foot.vtp pos { x = -0.1 y = -0.03 z = 0 } } 112 | mesh { file = l_talus.vtp pos { x = -0.05123 y = 0.01195 z = 0.00792 } } 113 | mesh { file = l_bofoot.vtp pos { x = 0.0788 y = -0.032 z = -0.00108 } } 114 | } 115 | body { 116 | name = torso 117 | mass = 34.2366 118 | inertia { x = 1.4745 y = 0.7555 z = 1.4314 } 119 | joint { 120 | name = lumbar_joint 121 | parent = pelvis 122 | pos_in_parent { x = -0.03 y = 0.0815 z = 0 } 123 | pos_in_child { x = 0.03 y = -0.32 z = 0 } 124 | limits { x = 0..0 y = 0..0 z = 0..0 } 125 | } 126 | mesh { file = hat_spine.vtp pos { x = 0.03 y = -0.32 z = 0 } } 127 | mesh { file = hat_jaw.vtp pos { x = 0.03 y = -0.32 z = 0 } } 128 | mesh { file = hat_skull.vtp pos { x = 0.03 y = -0.32 z = 0 } } 129 | mesh { file = hat_ribs.vtp pos { x = 0.03 y = -0.32 z = 0 } } 130 | } 131 | point_path_muscle { 132 | name = glut_med_r 133 | tendon_slack_length = 0.053 134 | optimal_fiber_length = 0.0845 135 | max_isometric_force = 2045 136 | pennation_angle = 0 137 | path [ 138 | { body = pelvis pos { x = -0.0148 y = 0.0445 z = 0.0766 } } 139 | { body = femur_r pos { x = -0.0258 y = 0.1642 z = 0.0527 } } 140 | ] 141 | } 142 | point_path_muscle { 143 | name = add_mag_r 144 | tendon_slack_length = 0.06 145 | optimal_fiber_length = 0.087 146 | max_isometric_force = 2268 147 | pennation_angle = 0.0872665 148 | path [ 149 | { body = pelvis pos { x = -0.0025 y = -0.1174 z = 0.0255 } } 150 | { body = femur_r pos { x = -0.0045 y = 0.0489 z = 0.0339 } } 151 | ] 152 | } 153 | point_path_muscle { 154 | name = hamstrings_r 155 | tendon_slack_length = 0.325 156 | optimal_fiber_length = 0.0976 157 | max_isometric_force = 2594 158 | pennation_angle = 0.202458 159 | path [ 160 | { body = pelvis pos { x = -0.05526 y = -0.10257 z = 0.06944 } } 161 | { body = tibia_r pos { x = -0.028 y = 0.1667 z = 0.02943 } } 162 | { body = tibia_r pos { x = -0.021 y = 0.1467 z = 0.0343 } } 163 | ] 164 | } 165 | point_path_muscle { 166 | name = bifemsh_r 167 | tendon_slack_length = 0.1 168 | optimal_fiber_length = 0.1103 169 | max_isometric_force = 804 170 | pennation_angle = 0.214675 171 | path [ 172 | { body = femur_r pos { x = 0.005 y = -0.0411 z = 0.0234 } } 173 | { body = tibia_r pos { x = -0.028 y = 0.1667 z = 0.02943 } } 174 | { body = tibia_r pos { x = -0.021 y = 0.1467 z = 0.0343 } } 175 | ] 176 | } 177 | point_path_muscle { 178 | name = glut_max_r 179 | tendon_slack_length = 0.127 180 | optimal_fiber_length = 0.147 181 | max_isometric_force = 1944 182 | pennation_angle = 0 183 | path [ 184 | { body = pelvis pos { x = -0.0642 y = 0.0176 z = 0.0563 } } 185 | { body = pelvis pos { x = -0.0669 y = -0.052 z = 0.0914 } } 186 | { body = femur_r pos { x = -0.0426 y = 0.117 z = 0.0293 } } 187 | { body = femur_r pos { x = -0.0156 y = 0.0684 z = 0.0419 } } 188 | ] 189 | } 190 | point_path_muscle { 191 | name = iliopsoas_r 192 | tendon_slack_length = 0.163 193 | optimal_fiber_length = 0.1 194 | max_isometric_force = 2342 195 | pennation_angle = 0.139626 196 | path [ 197 | { body = pelvis pos { x = 0.006 y = 0.0887 z = 0.0289 } } 198 | { body = pelvis pos { x = 0.0407 y = -0.01 z = 0.076 } } 199 | { body = femur_r pos { x = 0.033 y = 0.135 z = 0.0038 } } 200 | { body = femur_r pos { x = -0.0188 y = 0.1103 z = 0.0104 } } 201 | ] 202 | } 203 | point_path_muscle { 204 | name = rect_fem_r 205 | tendon_slack_length = 0.305 206 | optimal_fiber_length = 0.114 207 | max_isometric_force = 1169 208 | pennation_angle = 0.0872665 209 | path [ 210 | { body = pelvis pos { x = 0.0412 y = -0.0311 z = 0.0968 } } 211 | { body = femur_r pos { x = 0.035 y = -0.15 z = 0.004 } } 212 | { body = tibia_r pos { x = 0.035 y = 0.2067 z = 0.002 } } 213 | ] 214 | } 215 | point_path_muscle { 216 | name = vasti_r 217 | tendon_slack_length = 0.136 218 | optimal_fiber_length = 0.087 219 | max_isometric_force = 4530 220 | pennation_angle = 0.0523599 221 | path [ 222 | { body = femur_r pos { x = 0.029 y = -0.0224 z = 0.031 } } 223 | { body = femur_r pos { x = 0.035 y = -0.15 z = 0.01 } } 224 | { body = tibia_r pos { x = 0.035 y = 0.2067 z = 0.002 } } 225 | ] 226 | } 227 | point_path_muscle { 228 | name = gastroc_r 229 | tendon_slack_length = 0.39 230 | optimal_fiber_length = 0.06 231 | max_isometric_force = 2241 232 | pennation_angle = 0.296706 233 | path [ 234 | { body = femur_r pos { x = -0.02 y = -0.216 z = -0.024 } } 235 | { body = calcn_r pos { x = -0.1 y = 0.001 z = -0.0053 } } 236 | ] 237 | } 238 | point_path_muscle { 239 | name = soleus_r 240 | tendon_slack_length = 0.25 241 | optimal_fiber_length = 0.05 242 | max_isometric_force = 3549 243 | pennation_angle = 0.436332 244 | path [ 245 | { body = tibia_r pos { x = -0.0024 y = 0.0334 z = 0.0071 } } 246 | { body = calcn_r pos { x = -0.1 y = 0.001 z = -0.0053 } } 247 | ] 248 | } 249 | point_path_muscle { 250 | name = tib_ant_r 251 | tendon_slack_length = 0.223 252 | optimal_fiber_length = 0.098 253 | max_isometric_force = 1759 254 | pennation_angle = 0.0872665 255 | path [ 256 | { body = tibia_r pos { x = 0.0179 y = 0.0243 z = 0.0115 } } 257 | { body = tibia_r pos { x = 0.0329 y = -0.2084 z = -0.0177 } } 258 | { body = calcn_r pos { x = 0.0166 y = -0.0122 z = -0.0305 } } 259 | ] 260 | } 261 | point_path_muscle { 262 | name = glut_med_l 263 | tendon_slack_length = 0.053 264 | optimal_fiber_length = 0.0845 265 | max_isometric_force = 2045 266 | pennation_angle = 0 267 | path [ 268 | { body = pelvis pos { x = -0.0148 y = 0.0445 z = -0.0766 } } 269 | { body = femur_l pos { x = -0.0258 y = 0.1642 z = -0.0527 } } 270 | ] 271 | } 272 | point_path_muscle { 273 | name = add_mag_l 274 | tendon_slack_length = 0.06 275 | optimal_fiber_length = 0.087 276 | max_isometric_force = 2268 277 | pennation_angle = 0.0872665 278 | path [ 279 | { body = pelvis pos { x = -0.0025 y = -0.1174 z = -0.0255 } } 280 | { body = femur_l pos { x = -0.0045 y = 0.0489 z = -0.0339 } } 281 | ] 282 | } 283 | point_path_muscle { 284 | name = hamstrings_l 285 | tendon_slack_length = 0.325 286 | optimal_fiber_length = 0.0976 287 | max_isometric_force = 2594 288 | pennation_angle = 0.202458 289 | path [ 290 | { body = pelvis pos { x = -0.05526 y = -0.10257 z = -0.06944 } } 291 | { body = tibia_l pos { x = -0.028 y = 0.1667 z = -0.02943 } } 292 | { body = tibia_l pos { x = -0.021 y = 0.1467 z = -0.0343 } } 293 | ] 294 | } 295 | point_path_muscle { 296 | name = bifemsh_l 297 | tendon_slack_length = 0.1 298 | optimal_fiber_length = 0.1103 299 | max_isometric_force = 804 300 | pennation_angle = 0.214675 301 | path [ 302 | { body = femur_l pos { x = 0.005 y = -0.0411 z = -0.0234 } } 303 | { body = tibia_l pos { x = -0.028 y = 0.1667 z = -0.02943 } } 304 | { body = tibia_l pos { x = -0.021 y = 0.1467 z = -0.0343 } } 305 | ] 306 | } 307 | point_path_muscle { 308 | name = glut_max_l 309 | tendon_slack_length = 0.127 310 | optimal_fiber_length = 0.147 311 | max_isometric_force = 1944 312 | pennation_angle = 0 313 | path [ 314 | { body = pelvis pos { x = -0.0642 y = 0.0176 z = -0.0563 } } 315 | { body = pelvis pos { x = -0.0669 y = -0.052 z = -0.0914 } } 316 | { body = femur_l pos { x = -0.0426 y = 0.117 z = -0.0293 } } 317 | { body = femur_l pos { x = -0.0156 y = 0.0684 z = -0.0419 } } 318 | ] 319 | } 320 | point_path_muscle { 321 | name = iliopsoas_l 322 | tendon_slack_length = 0.163 323 | optimal_fiber_length = 0.1 324 | max_isometric_force = 2342 325 | pennation_angle = 0.139626 326 | path [ 327 | { body = pelvis pos { x = 0.006 y = 0.0887 z = -0.0289 } } 328 | { body = pelvis pos { x = 0.0407 y = -0.01 z = -0.076 } } 329 | { body = femur_l pos { x = 0.033 y = 0.135 z = -0.0038 } } 330 | { body = femur_l pos { x = -0.0188 y = 0.1103 z = -0.0104 } } 331 | ] 332 | } 333 | point_path_muscle { 334 | name = rect_fem_l 335 | tendon_slack_length = 0.305 336 | optimal_fiber_length = 0.114 337 | max_isometric_force = 1169 338 | pennation_angle = 0.0872665 339 | path [ 340 | { body = pelvis pos { x = 0.0412 y = -0.0311 z = -0.0968 } } 341 | { body = femur_l pos { x = 0.035 y = -0.15 z = -0.004 } } 342 | { body = tibia_l pos { x = 0.035 y = 0.2067 z = -0.002 } } 343 | ] 344 | } 345 | point_path_muscle { 346 | name = vasti_l 347 | tendon_slack_length = 0.136 348 | optimal_fiber_length = 0.087 349 | max_isometric_force = 4530 350 | pennation_angle = 0.0523599 351 | path [ 352 | { body = femur_l pos { x = 0.029 y = -0.0224 z = -0.031 } } 353 | { body = femur_l pos { x = 0.035 y = -0.15 z = -0.01 } } 354 | { body = tibia_l pos { x = 0.035 y = 0.2067 z = -0.002 } } 355 | ] 356 | } 357 | point_path_muscle { 358 | name = gastroc_l 359 | tendon_slack_length = 0.39 360 | optimal_fiber_length = 0.06 361 | max_isometric_force = 2241 362 | pennation_angle = 0.296706 363 | path [ 364 | { body = femur_l pos { x = -0.02 y = -0.216 z = 0.024 } } 365 | { body = calcn_l pos { x = -0.1 y = 0.001 z = 0.0053 } } 366 | ] 367 | } 368 | point_path_muscle { 369 | name = soleus_l 370 | tendon_slack_length = 0.25 371 | optimal_fiber_length = 0.05 372 | max_isometric_force = 3549 373 | pennation_angle = 0.436332 374 | path [ 375 | { body = tibia_l pos { x = -0.0024 y = 0.0334 z = -0.0071 } } 376 | { body = calcn_l pos { x = -0.1 y = 0.001 z = 0.0053 } } 377 | ] 378 | } 379 | point_path_muscle { 380 | name = tib_ant_l 381 | tendon_slack_length = 0.223 382 | optimal_fiber_length = 0.098 383 | max_isometric_force = 1759 384 | pennation_angle = 0.0872665 385 | path [ 386 | { body = tibia_l pos { x = 0.0179 y = 0.0243 z = -0.0115 } } 387 | { body = tibia_l pos { x = 0.0329 y = -0.2084 z = 0.0177 } } 388 | { body = calcn_l pos { x = 0.0166 y = -0.0122 z = 0.0305 } } 389 | ] 390 | } 391 | geometry { 392 | name = platform 393 | type = plane 394 | normal { x = -1 y = 0 z = 0 } 395 | body = ground 396 | pos { x = 0 y = 0 z = 0 } 397 | ori { x = 0 y = 0 z = -90 } 398 | } 399 | geometry { 400 | name = heel_r 401 | type = sphere 402 | radius = 0.03 403 | body = calcn_r 404 | pos { x = -0.085 y = -0.015 z = -0.005 } 405 | ori { x = 0 y = 0 z = 0 } 406 | } 407 | geometry { 408 | name = toe_lat_r 409 | type = sphere 410 | radius = 0.02 411 | body = calcn_r 412 | pos { x = 0.0425 y = -0.03 z = 0.041 } 413 | ori { x = 0 y = 0 z = 0 } 414 | } 415 | geometry { 416 | name = toe_med_r 417 | type = sphere 418 | radius = 0.02 419 | body = calcn_r 420 | pos { x = 0.085 y = -0.03 z = -0.0275 } 421 | ori { x = 0 y = 0 z = 0 } 422 | } 423 | geometry { 424 | name = heel_l 425 | type = sphere 426 | radius = 0.03 427 | body = calcn_l 428 | pos { x = -0.085 y = -0.015 z = 0.005 } 429 | ori { x = 0 y = 0 z = 0 } 430 | } 431 | geometry { 432 | name = toe_lat_l 433 | type = sphere 434 | radius = 0.02 435 | body = calcn_l 436 | pos { x = 0.0425 y = -0.03 z = -0.041 } 437 | ori { x = 0 y = 0 z = 0 } 438 | } 439 | geometry { 440 | name = toe_med_l 441 | type = sphere 442 | radius = 0.02 443 | body = calcn_l 444 | pos { x = 0.085 y = -0.03 z = 0.0275 } 445 | ori { x = 0 y = 0 z = 0 } 446 | } 447 | geometry { 448 | name = upper_leg_r 449 | type = capsule 450 | radius = 0.05 451 | height = 0.37 452 | body = femur_r 453 | pos { x = 0 y = -0.04 z = 0.01 } 454 | ori { x = -3 y = 0 z = 0 } 455 | } 456 | geometry { 457 | name = lower_leg_r 458 | type = capsule 459 | radius = 0.04 460 | height = 0.35 461 | body = tibia_r 462 | pos { x = 0 y = -0.05 z = 0 } 463 | ori { x = 0 y = 0 z = 3 } 464 | } 465 | geometry { 466 | name = upper_leg_l 467 | type = capsule 468 | radius = 0.05 469 | height = 0.37 470 | body = femur_l 471 | pos { x = 0 y = -0.04 z = -0.01 } 472 | ori { x = 3 y = 0 z = 0 } 473 | } 474 | geometry { 475 | name = lower_leg_l 476 | type = capsule 477 | radius = 0.04 478 | height = 0.35 479 | body = tibia_l 480 | pos { x = 0 y = -0.05 z = 0 } 481 | ori { x = 0 y = 0 z = 3 } 482 | } 483 | geometry { 484 | name = lower_trunk 485 | type = capsule 486 | radius = 0.1 487 | height = 0.12 488 | body = pelvis 489 | pos { x = -0.01 y = -0.01 z = 0 } 490 | ori { x = 90 y = 0 z = 0 } 491 | } 492 | geometry { 493 | name = belly 494 | type = capsule 495 | radius = 0.10 496 | height = 0.1 497 | body = torso 498 | pos { x = 0.05 y = -0.27 z = 0 } 499 | ori { x = 90 y = 0 z = 0 } 500 | } 501 | geometry { 502 | name = middle_trunk 503 | type = capsule 504 | radius = 0.10 505 | height = 0.12 506 | body = torso 507 | pos { x = 0.04 y = -0.15 z = 0 } 508 | ori { x = 90 y = 0 z = 0 } 509 | } 510 | geometry { 511 | name = upper_trunk 512 | type = capsule 513 | radius = 0.11 514 | height = 0.13 515 | body = torso 516 | pos { x = 0.03 y = -0.01 z = 0 } 517 | ori { x = 90 y = 0 z = 0 } 518 | } 519 | geometry { 520 | name = head 521 | type = sphere 522 | radius = 0.1 523 | body = torso 524 | pos { x = 0.04 y = 0.24 z = 0 } 525 | } 526 | dof { name = pelvis_tilt source = pelvis_rz range = -90..90 } 527 | dof { name = pelvis_list source = pelvis_rx range = -90..90 } 528 | dof { name = pelvis_rotation source = pelvis_ry range = -90..90 } 529 | dof { name = pelvis_tx source = pelvis_tx range = -5..5 } 530 | dof { name = pelvis_ty source = pelvis_ty range = -1..2 } 531 | dof { name = pelvis_tz source = pelvis_tz range = -3..3 } 532 | dof { name = hip_flexion_r source = hip_rz_r range = -120..120 } 533 | dof { name = hip_adduction_r source = hip_rx_r range = -120..120 } 534 | dof { name = hip_rotation_r source = hip_ry_r range = -120..120 } 535 | dof { name = knee_angle_r source = knee_rz_r range = -120..10 } 536 | dof { name = ankle_angle_r source = ankle_rz_r range = -60..60 } 537 | dof { name = hip_flexion_l source = hip_rz_l range = -120..120 } 538 | dof { name = hip_adduction_l source = -hip_rx_l range = -120..120 } 539 | dof { name = hip_rotation_l source = -hip_ry_l range = -120..120 } 540 | dof { name = knee_angle_l source = knee_rz_l range = -120..10 } 541 | dof { name = ankle_angle_l source = ankle_rz_l range = -60..60 } 542 | dof { name = lumbar_extension source = lumbar_joint_rz range = -90..90 } 543 | dof { name = lumbar_bending source = lumbar_joint_rx range = -90..90 } 544 | dof { name = lumbar_rotation source = lumbar_joint_ry range = -90..90 } 545 | } 546 | -------------------------------------------------------------------------------- /sconegym/gaitgym.py: -------------------------------------------------------------------------------- 1 | import os 2 | # Set non-random initial muscle activations 3 | import sys 4 | from abc import ABC, abstractmethod 5 | from typing import Optional 6 | 7 | import gym 8 | import numpy as np 9 | 10 | from sconetools import sconepy 11 | 12 | def find_model_file(model_file): 13 | this_dir, this_file = os.path.split(__file__) 14 | return os.path.join(this_dir, "data", model_file) 15 | 16 | 17 | DEFAULT_REW_KEYS = { 18 | "vel_coeff": 10, 19 | "grf_coeff": 0.0, 20 | "joint_limit_coeff": "0.0", 21 | "smooth_coeff": 0.0, 22 | "nmuscle_coeff": 0.0, 23 | "self_contact_coeff": 0.0, 24 | } 25 | 26 | 27 | class SconeGym(gym.Env, ABC): 28 | """ 29 | Main general purpose class that gives you a gym-ready sconepy interface 30 | It has to be inherited by the environments you actually want to use and 31 | some methods have to be defined (see end of class). This class would probably 32 | be a good starting point for new environments. 33 | New environments also have to be registered in sconegym/__init__.py ! 34 | """ 35 | 36 | def __init__(self, 37 | model_file, 38 | left_leg_idxs, 39 | right_leg_idxs, 40 | root_body_name = 'pelvis', 41 | foot_body_name = 'calcn', 42 | clip_actions = False, 43 | target_vel = 1.2, 44 | leg_switch = True, 45 | use_delayed_sensors = False, 46 | use_delayed_actuators = False, 47 | run = False, 48 | obs_type = '2D', 49 | init_activations_mean = 0.3, 50 | init_activations_std = 0.1, 51 | min_com_height = 0.5, 52 | min_head_height = 0.9, 53 | fall_recovery_time = 0.0, 54 | rew_keys = DEFAULT_REW_KEYS, 55 | *args, **kwargs): 56 | # Internal settings 57 | self.episode = 0 58 | self.total_reward = 0.0 59 | self.init_dof_pos_std = 0.05 60 | self.init_dof_vel_std = 0.1 61 | self.init_load = 0.5 62 | self.init_activations_mean = init_activations_mean 63 | self.init_activations_std = init_activations_std 64 | self.min_com_height = min_com_height 65 | self.min_head_height = min_head_height 66 | self.step_size = 0.01 67 | self.total_steps = 0 68 | self.steps = 0 69 | self.fall_time = -1.0 70 | self.has_reset = False 71 | self.store_next = False 72 | # Reward coefficients from kwargs 73 | for k, v in rew_keys.items(): 74 | setattr(self, k, float(v)) 75 | self.target_vel = target_vel 76 | self.use_delayed_sensors = use_delayed_sensors 77 | self.use_delayed_actuators = use_delayed_actuators 78 | self.clip_actions = clip_actions 79 | self.leg_switch = leg_switch 80 | self.run = run 81 | self.obs_type = obs_type 82 | self.left_leg_idxs = left_leg_idxs 83 | self.right_leg_idxs = right_leg_idxs 84 | self.root_body_name = root_body_name 85 | self.left_foot_body_name = foot_body_name + "_l" 86 | self.right_foot_body_name = foot_body_name + "_r" 87 | self.fall_recovery_time = fall_recovery_time 88 | super().__init__(*args, **kwargs) 89 | sconepy.set_log_level(3) 90 | self.model = sconepy.load_model(model_file) 91 | self.init_dof_pos = self.model.dof_position_array().copy() 92 | self.init_dof_vel = self.model.dof_velocity_array().copy() 93 | self.set_output_dir("DATE_TIME." + self.model.name()) 94 | self._find_head_body() 95 | self._setup_action_observation_spaces() 96 | 97 | def step(self, action): 98 | """ 99 | takes an action and advances environment by 1 step. 100 | """ 101 | if self.clip_actions: 102 | action = np.clip(action, 0, 0.5) 103 | else: 104 | action = np.clip(action, 0, 1.0) 105 | if not self.has_reset: 106 | raise Exception("You have to call reset() once before step()") 107 | 108 | if self.use_delayed_actuators: 109 | self.model.set_delayed_actuator_inputs(action) 110 | else: 111 | self.model.set_actuator_inputs(action) 112 | 113 | self.model.advance_simulation_to(self.time + self.step_size) 114 | reward = self._get_rew() 115 | obs = self._get_obs() 116 | done = self._get_done() 117 | reward = self._apply_termination_cost(reward, done) 118 | self.time += self.step_size 119 | self.total_reward += reward 120 | 121 | if done: 122 | if self.store_next: 123 | self.model.write_results( 124 | self.output_dir, f"{self.episode:05d}_{self.total_reward:.3f}" 125 | ) 126 | self.store_next = False 127 | self.episode += 1 128 | return obs, reward, done, {} 129 | 130 | def write_now(self): 131 | if self.store_next: 132 | self.model.write_results( 133 | self.output_dir, f"{self.episode:05d}_{self.total_reward:.3f}" 134 | ) 135 | self.store_next = False 136 | 137 | def reset( 138 | self, 139 | *, 140 | seed: Optional[int] = None, 141 | return_info: bool = False, 142 | options: Optional[dict] = None, 143 | ): 144 | """ 145 | Reset and randomize the initial state. 146 | """ 147 | self.episode_number = np.random.randint(0, 1000000) 148 | self.model.reset() 149 | self.has_reset = True 150 | self.time = 0 151 | self.total_reward = 0.0 152 | self.steps = 0 153 | self.fall_time = -1.0 154 | 155 | # Check if data should be stored (slow) 156 | self.model.set_store_data(self.store_next) 157 | # Randomize initial pose 158 | dof_pos = self.init_dof_pos + np.random.normal( 159 | 0, self.init_dof_pos_std, len(self.init_dof_pos) 160 | ) 161 | self.model.set_dof_positions(dof_pos) 162 | dof_vel = self.init_dof_vel + np.random.normal( 163 | 0, self.init_dof_vel_std, len(self.init_dof_vel) 164 | ) 165 | self.model.set_dof_velocities(dof_vel) 166 | if self.leg_switch: 167 | if np.random.uniform() < 0.5: 168 | self._switch_legs() 169 | if self.init_activations_std != 0: 170 | # Randomize initial muscle activations 171 | muscle_activations = np.clip( 172 | np.random.normal( 173 | self.init_activations_mean, 174 | self.init_activations_std, 175 | size=len(self.model.muscles()), 176 | ), 177 | 0.01, 178 | 1.0, 179 | ) 180 | else: 181 | # Set non-random initial muscle activations 182 | muscle_activations = np.ones((len(self.model.muscles()),)) * self.init_activations_mean 183 | self.prev_acts = muscle_activations 184 | self.prev_excs = self.model.muscle_excitation_array() 185 | self.model.init_muscle_activations(muscle_activations) 186 | 187 | # Initialize state and equilibrate muscles 188 | self.model.init_state_from_dofs() 189 | 190 | if self.init_load > 0: 191 | self.model.adjust_state_for_load(self.init_load) 192 | obs = self._get_obs() 193 | if return_info: 194 | return obs, (obs, {}) 195 | else: 196 | return obs 197 | 198 | def store_next_episode(self): 199 | """ 200 | Primes the environment to store the next episode. 201 | This also calls reset() to ensure that the data is 202 | written correctly. 203 | """ 204 | self.store_next = True 205 | self.reset() 206 | 207 | def set_output_dir(self, dir_name): 208 | self.output_dir = sconepy.replace_string_tags(dir_name) 209 | 210 | def manually_load_model(self): 211 | self.model = sconepy.load_model(self.model_file) 212 | self.model.set_store_data(True) 213 | 214 | def render(self, *args, **kwargs): 215 | """ 216 | Not yet supported 217 | """ 218 | return 219 | 220 | def model_velocity(self): 221 | return self.model.com_vel().x 222 | 223 | def _setup_action_observation_spaces(self): 224 | num_act = len(self.model.actuators()) 225 | self.action_space = gym.spaces.Box( 226 | low=np.zeros(shape=(num_act,)), 227 | high=np.ones(shape=(num_act,)), 228 | dtype=np.float32, 229 | ) 230 | self.observation_space = gym.spaces.Box( 231 | low=-10000, high=10000, shape=self._get_obs().shape, dtype=np.float32 232 | ) 233 | 234 | def _find_head_body(self): 235 | head_names = ["torso", "head", "lumbar"] 236 | self.head_body = None 237 | for b in self.model.bodies(): 238 | if b.name() in head_names: 239 | self.head_body = b 240 | if self.head_body is None: 241 | raise Exception("Could not find head body") 242 | 243 | def _switch_legs(self): 244 | """ 245 | Switches leg joint angles. Good for initial 246 | state randomization. 247 | """ 248 | pos = self.model.dof_position_array() 249 | vel = self.model.dof_velocity_array() 250 | for left, right in zip(self.left_leg_idxs, self.right_leg_idxs): 251 | pos[left], pos[right] = pos[right], pos[left] 252 | vel[left], vel[right] = vel[right], vel[left] 253 | self.model.set_dof_positions(pos) 254 | self.model.set_dof_velocities(vel) 255 | 256 | def apply_args(self): 257 | pass 258 | 259 | def _apply_termination_cost(self, reward, done): 260 | return reward 261 | 262 | # these all need to be defined by environments 263 | @abstractmethod 264 | def _get_obs(self): 265 | pass 266 | 267 | @abstractmethod 268 | def _get_rew(self): 269 | pass 270 | 271 | @abstractmethod 272 | def _get_done(self): 273 | pass 274 | 275 | @property 276 | def results_dir(self): 277 | return sconepy.scone_results_dir() 278 | 279 | 280 | class GaitGym(SconeGym): 281 | def __init__(self, model_file, *args, **kwargs): 282 | self._max_episode_steps = 1000 283 | super().__init__(model_file, *args, **kwargs) 284 | self.rwd_dict = None 285 | self.mass = np.sum([x.mass() for x in self.model.bodies()]) 286 | 287 | def _get_obs(self): 288 | if self.obs_type == '2D': 289 | return self._get_obs_2d() 290 | elif self.obs_type == '3D': 291 | return self._get_obs_3d() 292 | else: 293 | raise NotImplementedError 294 | 295 | def _get_obs_3d(self): 296 | acts = self.model.muscle_activation_array() 297 | self.prev_acts = self.model.muscle_activation_array().copy() 298 | self.prev_excs = self.model.muscle_excitation_array() 299 | dof_values = self.model.dof_position_array() 300 | dof_vels = self.model.dof_velocity_array() 301 | # No x or y position in the state 302 | dof_values[3] = 0.0 303 | dof_values[5] = 0.0 304 | return np.concatenate( 305 | [ 306 | self.model.muscle_fiber_length_array(), 307 | self.model.muscle_fiber_velocity_array(), 308 | self.model.muscle_force_array(), 309 | self.model.muscle_excitation_array(), 310 | self.head_body.orientation().array(), 311 | self.head_body.ang_vel().array(), 312 | self._get_feet_relative_position(), 313 | dof_values, 314 | dof_vels, 315 | acts, 316 | ], 317 | dtype=np.float32, 318 | ).copy() 319 | 320 | def _get_feet_relative_position(self): 321 | pelvis = ( 322 | [x for x in self.model.bodies() if self.root_body_name in x.name()][0] 323 | .com_pos() 324 | .array() 325 | ) 326 | foot_l = ( 327 | [x for x in self.model.bodies() if self.left_foot_body_name in x.name()][0] 328 | .com_pos() 329 | .array() 330 | ) 331 | foot_r = ( 332 | [x for x in self.model.bodies() if self.right_foot_body_name in x.name()][0] 333 | .com_pos() 334 | .array() 335 | ) 336 | return np.concatenate([foot_l - pelvis, foot_r - pelvis], dtype=np.float32) 337 | 338 | def _get_obs_2d(self): 339 | acts = self.model.muscle_activation_array() 340 | self.prev_acts = self.model.muscle_activation_array().copy() 341 | self.prev_excs = self.model.muscle_excitation_array() 342 | dof_values = self.model.dof_position_array() 343 | dof_vels = self.model.dof_velocity_array() 344 | dof_values[1] = 0.0 345 | if not self.use_delayed_sensors: 346 | return np.concatenate( 347 | [ 348 | self.model.muscle_fiber_length_array(), 349 | self.model.muscle_fiber_velocity_array(), 350 | self.model.muscle_force_array(), 351 | self.model.muscle_excitation_array(), 352 | self.head_body.orientation().array(), 353 | self.head_body.ang_vel().array(), 354 | self._get_feet_relative_position(), 355 | dof_values, 356 | dof_vels, 357 | acts, 358 | ], 359 | dtype=np.float32, 360 | ).copy() 361 | 362 | else: 363 | return np.concatenate( 364 | [ 365 | self.model.delayed_muscle_fiber_length_array(), 366 | self.model.delayed_muscle_fiber_velocity_array(), 367 | self.model.delayed_muscle_force_array(), 368 | self.model.delayed_vestibular_array(), 369 | self.model.muscle_excitation_array(), 370 | self.model.muscle_activation_array(), 371 | ], 372 | dtype=np.float32, 373 | ).copy() 374 | 375 | def _get_rew(self): 376 | """ 377 | Reward function. 378 | """ 379 | self.total_steps += 1 380 | self.steps += 1 381 | return self.custom_reward() 382 | 383 | def custom_reward(self): 384 | self._update_rwd_dict() 385 | return np.sum(list(self.rwd_dict.values())) 386 | 387 | def _update_rwd_dict(self): 388 | self.rwd_dict = { 389 | "gaussian_vel": self.vel_coeff * self._gaussian_plateau_vel(), 390 | "grf": self.grf_coeff * self._grf(), 391 | "smooth": self.smooth_coeff * self._exc_smooth_cost(), 392 | "number_muscles": self.nmuscle_coeff * self._number_muscle_cost(), 393 | "constr": self.joint_limit_coeff * self._joint_limit_torques(), 394 | "self_contact": self.self_contact_coeff * self._get_self_contact(), 395 | } 396 | return self.rwd_dict 397 | 398 | def get_rwd_dict(self): 399 | if not self.rwd_dict: 400 | self.rwd_dict = self._update_rwd_dict() 401 | rwd_dict = {k: v for k, v in self.rwd_dict.items()} 402 | return rwd_dict 403 | 404 | def _number_muscle_cost(self): 405 | """ 406 | Get number of muscle with activations over 0.15. 407 | """ 408 | return self._get_active_muscles(0.15) 409 | 410 | def _get_active_muscles(self, threshold): 411 | """ 412 | Get the number of muscles whose activations is above the threshold. 413 | """ 414 | return ( 415 | np.sum( 416 | np.where(self.model.muscle_activation_array() > threshold)[0].shape[0] 417 | ) 418 | / self.action_space.shape[0] 419 | ) 420 | 421 | def _gaussian_vel(self): 422 | vel = self.model_velocity() 423 | return np.exp(-np.square(vel - self.target_vel)) 424 | 425 | def _gaussian_plateau_vel(self): 426 | if self.run: 427 | return self.model_velocity() 428 | vel = self.model_velocity() 429 | if vel < self.target_vel: 430 | return self._gaussian_vel() 431 | else: 432 | return 1.0 433 | 434 | def _exc_smooth_cost(self): 435 | excs = self.model.muscle_excitation_array() 436 | delta_excs = excs - self.prev_excs 437 | return np.mean(np.square(delta_excs)) 438 | 439 | def _get_self_contact(self): 440 | ignore_bodies = ["calcn_r", "calcn_l"] 441 | contact_force = np.sum( 442 | [ 443 | np.abs(x.contact_force().array()) 444 | for x in self.model.bodies() 445 | if x.name() not in ignore_bodies 446 | ] 447 | ) 448 | return np.clip(contact_force, -100, 100) / 100 449 | 450 | def _joint_limit_torques(self): 451 | return np.mean( 452 | [np.mean(np.abs(x.limit_torque().array())) for x in self.model.joints()] 453 | ) 454 | 455 | def _grf(self): 456 | grf = self.model.contact_load() 457 | return max(0, grf - 1.2) 458 | 459 | def _get_done(self) -> bool: 460 | """ 461 | The episode ends if the center of mass is below min_com_height. 462 | """ 463 | fall = self.model.com_pos().y < self.min_com_height 464 | fall = fall or self.head_body.com_pos().y < self.min_head_height 465 | current_time = self.model.time() 466 | if fall: 467 | if self.fall_time < 0: 468 | self.fall_time = current_time 469 | if current_time - self.fall_time >= self.fall_recovery_time: 470 | return True 471 | else: 472 | self.fall_time = -1.0 473 | 474 | return False 475 | 476 | @property 477 | def horizon(self): 478 | # TODO put this in model kwargs such that it works with deprl 479 | return 1000 480 | 481 | 482 | # Tutorial environments to see features 483 | # The Measure one needs to be fixed 484 | 485 | # TODO @thomas add right model file 486 | class GaitGymMeasureH0918(GaitGym): 487 | """ 488 | Shows how to use custom measures from the .scone files in 489 | python. 490 | """ 491 | 492 | def __init__(self, *args, **kwargs): 493 | self.delay = False 494 | super().__init__(find_model_file("H0918_hfd_measure.scone"), *args, **kwargs) 495 | 496 | def custom_reward(self): 497 | self.rwd_dict = self.create_rwd_dict() 498 | return self.model.current_measure() 499 | 500 | 501 | --------------------------------------------------------------------------------