Page 1 of 1

Python Scripting Question

Posted: Sun Nov 18, 2018 10:07 am
by barabasicsongor
Hey dear community!

I am trying to get my head around OpenSim scripting. Unfortunately the documentation for Python is not perfect. So I would like to ask if anybody could help me in this. I would like to load up a full body model (which I could not find, with upper and lower body muscles) and just visualize it on the screen.

After that my plans are to control those muscle and joint activations from code, so my model starts moving.

Could you help me please?

Thanks!

Re: Python Scripting Question

Posted: Sun Nov 18, 2018 1:45 pm
by chrisdembia

Code: Select all

import opensim
m = opensim.Model('<filename>')
m.setUseVisualizer(True)
state = m.initSystem()
m.getVisualizer().show(state)

Re: Python Scripting Question

Posted: Mon Nov 19, 2018 1:39 am
by barabasicsongor
Thank you for your help! :D