Commit 0b8d93ec authored by Galo Maldonado's avatar Galo Maldonado
Browse files

first minimal version of the package including a whole-body musculo-skelatal human model

parents
import sys
sys.path.append('src')
import viewer_utils as vw
import wrapper as wr
import motion_parser as mtp
# The path to the model meshes
mesh_path='/local/gmaldona/devel/Models/data/whole_body/obj'
# The path to the model and the filename
filename='/local/gmaldona/devel/Models/data/whole_body/wholebody.osim'
# Create a wrapper specific to the whole-body model
# The wrapper parse the OpenSim model and builds pinocchio model and data
wb_model = wr.Wrapper(filename, mesh_path, name='whole-body_model1')
# Init the viewer and add the model to it
viewer = vw.Viewer('viewer',wb_model)
viewer.setVisibility(wb_model.name+"/floor", "OFF")
viewer.display(wb_model.q0, wb_model.name)
# See kinematic ranges of motion
# parse motion:
time, q, colheaders, qOsim = mtp.parseMotion(wb_model.model, wb_model.joint_transformations, '/home/gmaldona/Dropbox/kv03_filtered_ik.mot','quat')
#!/bin/bash
echo conversion fichiers stl to obj
for i in *.stl
do
ctmconv $(basename $i .${i##*.}).stl $(basename $i .${i##*.}).obj
done
This diff is collapsed.
# Visualization Toolkit generated SLA File
v -0.013905 -0.02605 0.0027409999
v -0.013803 -0.026907999 0.0039929999
v -0.013661 -0.025862999 0.0040569999
v -0.013424 -0.02214 0.00088000001
v -0.012682 -0.027713999 0.0068190005
v -0.012616 -0.024168 -0.00091100001
v -0.012024 -0.022476999 0.0034779999
v -0.01191 -0.027009999 0.0090270005
v -0.011822 -0.023895999 0.0084249992
v -0.011745 -0.027669 0.0024850001
v -0.011697 -0.026264999 -0.00032799999
v -0.011637 -0.019667 -0.00029500001
v -0.011494 -0.024014 -0.003175
v -0.011125 -0.02138 -0.0022189999
v -0.010435 -0.020082001 0.0074880002
v -0.010398 -0.028566999 0.0060149999
v -0.010003 -0.021570999 -0.004733
v -0.0092679998 -0.022701999 0.0083230007
v -0.0090809995 -0.027998 0.007584
v -0.0086399997 -0.017906999 0.0016749999
v -0.0073750005 -0.012289 0.0031010001
v -0.0073230006 -0.01497 0.0065049995
v -0.0071030003 -0.013523 0.004834
v -0.0068939999 -0.011255 -0.001543
v -0.0068780002 -0.014404 0.0042750002
v -0.006393 -0.01537 -0.00048300001
v -0.0063900002 -0.01581 -0.001282
v -0.006147 -0.012992 -0.00060999999
v -0.0056150001 -0.019156 -0.006846
v -0.0054239999 -0.012075 -0.004458
v -0.0052470001 -0.027214 0.0029279999
v -0.0049510002 -0.014096 -0.002447
v -0.0048369998 -0.012741 0.0058380002
v -0.0046879998 -0.014503 0.0067449994
v -0.004373 -0.017152 -0.0077630002
v -0.0042440002 -0.027458999 0.004371
v -0.0038379999 -0.016383 -0.0042670001
v -0.0038000001 -0.015528 -0.0042809998
v -0.0035570001 -0.022498 -0.005508
v -0.0034050001 -0.024908001 -0.003243
v -0.0033559999 -0.014774 -0.005632
v -0.003336 -0.013121 -0.0065329997
v -0.0032500001 -0.013934 -0.0066529997
v -0.0029480001 -0.016417 0.0069240001
v -0.0028949999 -0.0097889993 0.0054370002
v -0.002754 -0.020648999 -0.0064649996
v -0.0026829999 -0.014074 -0.0071809995
v -0.002479 -0.013306 -0.0070870002
v -0.0022140001 -0.027799999 0.0023980001
v -0.001701 -0.018797001 -0.0073219999
v -0.001663 -0.013427 -0.0075579998
v -0.00162 -0.024553999 0.0038620001
v -0.001251 -0.0092249997 -0.0054930001
v -0.000225 -0.021341 -0.0074280002
v -0.000168 -0.0070249997 0.0026380001
v 0.000138 -0.027014 -0.0071569998
v 0.000162 -0.0061940001 -0.000696
v 0.00047699999 -0.013368 0.0068680001
v 0.000486 -0.029865 -0.001249
v 0.00070199999 -0.029952999 -0.0045559998
v 0.00071599998 -0.029113 -0.0063029998
v 0.000932 -0.01354 -0.0083270008
v 0.001265 -0.015036 -0.0084880004
v 0.001377 -0.028922999 -0.00039900001
v 0.001478 -0.025645999 0.0018729999
v 0.001681 -0.021415999 -0.0068899998
v 0.0020949999 -0.019074 -0.0073079998
v 0.0023930001 -0.010394 0.0072030006
v 0.002452 -0.008688 0.0064590005
v 0.0026390001 -0.028099 -0.0059349998
v 0.002655 -0.029199 -0.003518
v 0.0027010001 -0.020423001 -0.0063240002
v 0.0030670001 -0.016721001 0.0049629998
v 0.003186 -0.014688 0.0059710001
v 0.00333 -0.0058960002 8.6e-05
v 0.004036 -0.0064380001 -0.002998
v 0.0040489999 -0.009966 0.0070449994
v 0.0040489999 -0.0072430004 0.003664
v 0.004406 -0.019733001 0.002237
v 0.004435 -0.026331 -0.0033100001
v 0.0046509998 -0.011557 -0.005686
v 0.0048469999 -0.014447 0.0043529999
v 0.0050269999 -0.01224 0.0065660002
v 0.0050300001 -0.0067110006 -0.002757
v 0.0051290002 -0.016008001 0.001241
v 0.0055280002 -0.014984 -0.0054179998
v 0.0055780001 -0.019517999 -0.000184
v 0.0066419998 -0.011715 0.0033259999
v 0.0066729998 -0.010579 0.0037149999
v 0.0068100002 -0.011927 -0.0035250001
s 1
f 2// 9// 3//
f 2// 3// 1//
f 5// 9// 2//
f 16// 2// 10//
f 2// 16// 5//
f 2// 11// 10//
f 2// 1// 11//
f 9// 7// 3//
f 9// 5// 8//
f 7// 9// 15//
f 18// 9// 8//
f 15// 9// 18//
f 4// 3// 7//
f 3// 4// 1//
f 1// 4// 6//
f 6// 11// 1//
f 16// 8// 5//
f 8// 16// 19//
f 31// 16// 10//
f 16// 31// 36//
f 36// 19// 16//
f 11// 31// 10//
f 40// 31// 11//
f 6// 13// 11//
f 13// 39// 11//
f 11// 39// 40//
f 4// 7// 12//
f 22// 7// 15//
f 25// 7// 22//
f 7// 25// 20//
f 12// 7// 20//
f 18// 8// 19//
f 22// 15// 18//
f 34// 22// 18//
f 18// 19// 52//
f 44// 34// 18//
f 52// 44// 18//
f 4// 12// 14//
f 6// 4// 14//
f 13// 6// 14//
f 36// 52// 19//
f 49// 36// 31//
f 31// 40// 49//
f 36// 49// 52//
f 40// 39// 61//
f 40// 61// 60//
f 40// 60// 49//
f 13// 14// 17//
f 13// 17// 39//
f 46// 39// 29//
f 17// 29// 39//
f 56// 39// 46//
f 39// 56// 61//
f 12// 20// 26//
f 12// 26// 27//
f 37// 14// 12//
f 37// 12// 27//
f 22// 23// 25//
f 33// 23// 22//
f 34// 33// 22//
f 25// 26// 20//
f 26// 25// 28//
f 28// 25// 23//
f 33// 34// 45//
f 58// 45// 34//
f 34// 44// 58//
f 52// 65// 44//
f 52// 49// 65//
f 58// 44// 74//
f 44// 73// 74//
f 65// 73// 44//
f 17// 14// 37//
f 64// 65// 49//
f 59// 64// 49//
f 49// 60// 59//
f 61// 71// 60//
f 61// 70// 71//
f 70// 61// 56//
f 60// 71// 59//
f 37// 29// 17//
f 29// 50// 46//
f 54// 46// 50//
f 46// 54// 56//
f 29// 37// 35//
f 35// 50// 29//
f 70// 56// 72//
f 56// 66// 72//
f 56// 54// 66//
f 32// 26// 28//
f 27// 26// 32//
f 37// 27// 38//
f 38// 27// 32//
f 35// 37// 41//
f 38// 41// 37//
f 21// 28// 23//
f 23// 33// 21//
f 33// 45// 21//
f 21// 24// 28//
f 24// 32// 28//
f 69// 55// 45//
f 45// 55// 21//
f 45// 68// 69//
f 68// 45// 58//
f 58// 77// 68//
f 58// 83// 77//
f 74// 83// 58//
f 65// 64// 79//
f 65// 79// 73//
f 73// 82// 74//
f 83// 74// 82//
f 73// 79// 85//
f 82// 73// 85//
f 79// 64// 87//
f 87// 64// 80//
f 64// 71// 80//
f 59// 71// 64//
f 70// 80// 71//
f 72// 80// 70//
f 63// 50// 35//
f 67// 50// 63//
f 54// 50// 67//
f 54// 67// 66//
f 51// 35// 47//
f 43// 35// 41//
f 43// 47// 35//
f 51// 63// 35//
f 72// 85// 87//
f 85// 72// 67//
f 72// 87// 80//
f 66// 67// 72//
f 32// 24// 30//
f 32// 30// 38//
f 38// 42// 41//
f 38// 30// 42//
f 42// 43// 41//
f 21// 55// 57//
f 21// 57// 24//
f 24// 57// 53//
f 30// 24// 53//
f 69// 78// 55//
f 78// 69// 77//
f 77// 69// 68//
f 75// 57// 55//
f 78// 75// 55//
f 89// 77// 83//
f 77// 89// 78//
f 88// 83// 82//
f 89// 83// 88//
f 87// 85// 79//
f 82// 85// 88//
f 85// 90// 88//
f 86// 85// 67//
f 85// 86// 90//
f 63// 51// 62//
f 62// 81// 63//
f 81// 86// 63//
f 63// 86// 67//
f 48// 51// 47//
f 53// 62// 51//
f 53// 51// 48//
f 43// 48// 47//
f 42// 48// 43//
f 30// 53// 42//
f 42// 53// 48//
f 76// 57// 75//
f 76// 53// 57//
f 62// 53// 76//
f 84// 75// 78//
f 78// 89// 84//
f 75// 84// 76//
f 89// 90// 84//
f 90// 89// 88//
f 84// 90// 81//
f 81// 90// 86//
f 84// 81// 62//
f 62// 76// 84//
# Visualization Toolkit generated SLA File
v -0.013905 -0.02605 -0.0027409999
v -0.013803 -0.026907999 -0.0039929999
v -0.013661 -0.025862999 -0.0040569999
v -0.013424 -0.02214 -0.00088000001
v -0.012682 -0.027713999 -0.0068190005
v -0.012616 -0.024168 0.00091100001
v -0.012024 -0.022476999 -0.0034779999
v -0.01191 -0.027009999 -0.0090270005
v -0.011822 -0.023895999 -0.0084249992
v -0.011745 -0.027669 -0.0024850001
v -0.011697 -0.026264999 0.00032799999
v -0.011637 -0.019667 0.00029500001
v -0.011494 -0.024014 0.003175
v -0.011125 -0.02138 0.0022189999
v -0.010435 -0.020082001 -0.0074880002
v -0.010398 -0.028566999 -0.0060149999
v -0.010003 -0.021570999 0.004733
v -0.0092679998 -0.022701999 -0.0083230007
v -0.0090809995 -0.027998 -0.007584
v -0.0086399997 -0.017906999 -0.0016749999
v -0.0073750005 -0.012289 -0.0031010001
v -0.0073230006 -0.01497 -0.0065049995
v -0.0071030003 -0.013523 -0.004834
v -0.0068939999 -0.011255 0.001543
v -0.0068780002 -0.014404 -0.0042750002
v -0.006393 -0.01537 0.00048300001
v -0.0063900002 -0.01581 0.001282
v -0.006147 -0.012992 0.00060999999
v -0.0056150001 -0.019156 0.006846
v -0.0054239999 -0.012075 0.004458
v -0.0052470001 -0.027214 -0.0029279999
v -0.0049510002 -0.014096 0.002447
v -0.0048369998 -0.012741 -0.0058380002
v -0.0046879998 -0.014503 -0.0067449994
v -0.004373 -0.017152 0.0077630002
v -0.0042440002 -0.027458999 -0.004371
v -0.0038379999 -0.016383 0.0042670001
v -0.0038000001 -0.015528 0.0042809998
v -0.0035570001 -0.022498 0.005508
v -0.0034050001 -0.024908001 0.003243
v -0.0033559999 -0.014774 0.005632
v -0.003336 -0.013121 0.0065329997
v -0.0032500001 -0.013934 0.0066529997
v -0.0029480001 -0.016417 -0.0069240001
v -0.0028949999 -0.0097889993 -0.0054370002
v -0.002754 -0.020648999 0.0064649996
v -0.0026829999 -0.014074 0.0071809995
v -0.002479 -0.013306 0.0070870002
v -0.0022140001 -0.027799999 -0.0023980001
v -0.001701 -0.018797001 0.0073219999
v -0.001663 -0.013427 0.0075579998
v -0.00162 -0.024553999 -0.0038620001
v -0.001251 -0.0092249997 0.0054930001
v -0.000225 -0.021341 0.0074280002
v -0.000168 -0.0070249997 -0.0026380001
v 0.000138 -0.027014 0.0071569998
v 0.000162 -0.0061940001 0.000696
v 0.00047699999 -0.013368 -0.0068680001
v 0.000486 -0.029865 0.001249
v 0.00070199999 -0.029952999 0.0045559998
v 0.00071599998 -0.029113 0.0063029998
v 0.000932 -0.01354 0.0083270008
v 0.001265 -0.015036 0.0084880004
v 0.001377 -0.028922999 0.00039900001
v 0.001478 -0.025645999 -0.0018729999
v 0.001681 -0.021415999 0.0068899998
v 0.0020949999 -0.019074 0.0073079998
v 0.0023930001 -0.010394 -0.0072030006
v 0.002452 -0.008688 -0.0064590005
v 0.0026390001 -0.028099 0.0059349998
v 0.002655 -0.029199 0.003518
v 0.0027010001 -0.020423001 0.0063240002
v 0.0030670001 -0.016721001 -0.0049629998
v 0.003186 -0.014688 -0.0059710001
v 0.00333 -0.0058960002 -8.6e-05
v 0.004036 -0.0064380001 0.002998
v 0.0040489999 -0.009966 -0.0070449994
v 0.0040489999 -0.0072430004 -0.003664
v 0.004406 -0.019733001 -0.002237
v 0.004435 -0.026331 0.0033100001
v 0.0046509998 -0.011557 0.005686
v 0.0048469999 -0.014447 -0.0043529999
v 0.0050269999 -0.01224 -0.0065660002
v 0.0050300001 -0.0067110006 0.002757
v 0.0051290002 -0.016008001 -0.001241
v 0.0055280002 -0.014984 0.0054179998
v 0.0055780001 -0.019517999 0.000184
v 0.0066419998 -0.011715 -0.0033259999
v 0.0066729998 -0.010579 -0.0037149999
v 0.0068100002 -0.011927 0.0035250001
s 1
f 3// 9// 2//
f 1// 3// 2//
f 3// 7// 9//
f 7// 3// 4//
f 1// 4// 3//
f 8// 5// 9//
f 2// 9// 5//
f 15// 9// 7//
f 8// 9// 18//
f 18// 9// 15//
f 10// 2// 16//
f 5// 16// 2//
f 10// 11// 2//
f 11// 1// 2//
f 6// 4// 1//
f 1// 11// 6//
f 12// 7// 4//
f 15// 7// 22//
f 22// 7// 25//
f 20// 25// 7//
f 20// 7// 12//
f 14// 12// 4//
f 14// 4// 6//
f 5// 8// 16//
f 19// 16// 8//
f 19// 8// 18//
f 18// 15// 22//
f 18// 22// 34//
f 52// 19// 18//
f 18// 34// 44//
f 18// 44// 52//
f 10// 16// 31//
f 10// 31// 11//
f 36// 31// 16//
f 16// 19// 36//
f 11// 31// 40//
f 11// 13// 6//
f 11// 39// 13//
f 40// 39// 11//
f 14// 6// 13//
f 26// 20// 12//
f 27// 26// 12//
f 12// 14// 37//
f 27// 12// 37//
f 25// 23// 22//
f 22// 23// 33//
f 22// 33// 34//
f 20// 26// 25//
f 28// 25// 26//
f 23// 25// 28//
f 17// 14// 13//
f 37// 14// 17//
f 19// 52// 36//
f 45// 34// 33//
f 34// 45// 58//
f 58// 44// 34//
f 52// 49// 36//
f 44// 65// 52//
f 65// 49// 52//
f 74// 44// 58//
f 74// 73// 44//
f 44// 73// 65//
f 31// 36// 49//
f 49// 40// 31//
f 61// 39// 40//
f 60// 61// 40//
f 49// 60// 40//
f 39// 17// 13//
f 29// 39// 46//
f 39// 29// 17//
f 46// 39// 56//
f 61// 56// 39//
f 28// 26// 32//
f 32// 26// 27//
f 38// 27// 37//
f 32// 27// 38//
f 17// 29// 37//
f 35// 37// 29//
f 41// 37// 35//
f 37// 41// 38//
f 23// 28// 21//
f 21// 33// 23//
f 21// 45// 33//
f 28// 24// 21//
f 28// 32// 24//
f 45// 55// 69//
f 21// 55// 45//
f 69// 68// 45//
f 58// 45// 68//
f 68// 77// 58//
f 77// 83// 58//
f 58// 83// 74//
f 49// 65// 64//
f 49// 64// 59//
f 59// 60// 49//
f 79// 64// 65//
f 73// 79// 65//
f 74// 82// 73//
f 82// 74// 83//
f 85// 79// 73//
f 85// 73// 82//
f 60// 71// 61//
f 71// 70// 61//
f 56// 61// 70//
f 59// 71// 60//
f 29// 50// 35//
f 46// 50// 29//
f 50// 46// 54//
f 56// 54// 46//
f 72// 56// 70//
f 72// 66// 56//
f 66// 54// 56//
f 30// 24// 32//
f 38// 30// 32//
f 41// 42// 38//
f 42// 30// 38//
f 47// 35// 51//
f 41// 35// 43//
f 35// 47// 43//
f 35// 63// 51//
f 35// 50// 63//
f 41// 43// 42//
f 57// 55// 21//
f 24// 57// 21//
f 53// 57// 24//
f 53// 24// 30//
f 55// 78// 69//
f 55// 57// 75//
f 55// 75// 78//
f 77// 69// 78//
f 68// 69// 77//
f 83// 77// 89//
f 78// 89// 77//
f 82// 83// 88//
f 88// 83// 89//
f 87// 64// 79//
f 80// 64// 87//
f 80// 71// 64//
f 64// 71// 59//
f 79// 85// 87//
f 88// 85// 82//
f 88// 90// 85//
f 87// 85// 72//
f 67// 72// 85//
f 67// 85// 86//
f 90// 86// 85//
f 71// 80// 70//
f 70// 80// 72//
f 63// 50// 67//
f 67// 50// 54//
f 66// 67// 54//
f 80// 87// 72//
f 72// 67// 66//
f 42// 53// 30//
f 43// 48// 42//
f 48// 53// 42//
f 47// 51// 48//
f 47// 48// 43//
f 62// 51// 63//
f 51// 62// 53//
f 48// 51// 53//
f 63// 81// 62//
f 63// 86// 81//
f 67// 86// 63//
f 75// 57// 76//
f 57// 53// 76//
f 76// 53// 62//
f 78// 75// 84//
f 84// 89// 78//
f 76// 84// 75//
f 84// 90// 89//
f 88// 89// 90//
f 81// 90// 84//
f 86// 90// 81//
f 62// 81// 84//
f 84// 76// 62//
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# Visualization Toolkit generated SLA File
v -0.011885 -0.023716999 0.011429
v -0.011575 -0.027395999 0.012939
v -0.011247 -0.02751 0.010638
v -0.011228 -0.015132 0.0095720002
v -0.01065 -0.016771 0.012496
v -0.010289 -0.015154 0.014141
v -0.010059 -0.01424 0.012035
v -0.0099030007 -0.013983 0.0090470007
v -0.0094839996 -0.028542999 0.018376
v -0.0091380002 -0.026921 0.019862
v -0.0082550002 -0.028631 0.020303
v -0.0082510002 -0.018952001 0.020509999
v -0.0077950004 -0.022396 0.020671001
v -0.0065139998 -0.026668999 0.022934999
v -0.0055470001 -0.023301 0.023691
v -0.0040779999 -0.02603 0.023303
v -0.0022829999 -0.014538 0.015063
v -0.0021259999 -0.012808 0.01318
v -0.001988 -0.023669999 0.022217
v -0.0017040001 -0.010813 0.0085420003
v -0.001518 -0.025396001 0.022817001
v -0.0010779999 -0.027651001 0.019175
v -0.00089600001 -0.027339 0.0070230002
v -0.00088100001 -0.017294001 0.016903
v 0.000206 -0.027817 0.0074110003
v 0.00028899999 -0.011602 0.013463
v 0.00064400001 -0.0253 0.007462
v 0.00080699997 -0.019773999 0.0066729998
v 0.00083199999 -0.0092790006 0.0094049992
v 0.00086099998 -0.027948 0.0086519998
v 0.000902 -0.025326001 0.021120001
v 0.001015 -0.027758 0.012976
v 0.001312 -0.01535 0.0075310003
v 0.001604 -0.017382 0.0087580001
v 0.001713 -0.012777 0.01093
v 0.0018269999 -0.019355999 0.014453
v 0.0018579999 -0.020304 0.0081150001
v 0.001863 -0.022640999 0.010025
v 0.002104 -0.028192 0.010042
v 0.0024530001 -0.020300001 0.012426
v 0.002511 -0.027976999 0.015623
v 0.0026499999 -0.026596 0.010144
v 0.003 -0.021806 0.016911
v 0.0033120001 -0.023886001 0.011316
v 0.0036170001 -0.027264999 0.017143
v 0.003943 -0.024186 0.018107001
v 0.004162 -0.021312 0.014654
v 0.0043029999 -0.021891 0.016288999
v 0.0043839999 -0.029844999 0.014579
v 0.004888 -0.0283 0.010896
v 0.005318 -0.031500999 0.011535
v 0.0058909999 -0.025423 0.011701
v 0.0060339998 -0.029231001 0.015393