Search found 11 matches

by Jonathan SAVIN
Thu Sep 14, 2023 5:47 am
Forum: OpenSim
Topic: How to include a visualisation in a web (html) page ?
Replies: 2
Views: 889

Re: How to include a visualisation in a web (html) page ?

Thanks Ayman for your answer. I guess I should open an issue in the opensim-viewer channel on github (https://github.com/opensim-org/opensim-viewer), that's right ?
by Jonathan SAVIN
Tue Sep 05, 2023 6:38 am
Forum: OpenSim
Topic: How to include a visualisation in a web (html) page ?
Replies: 2
Views: 889

How to include a visualisation in a web (html) page ?

Hi every one, did somebody try to include a "Visualizer" canvas in an html page ? I'd like to create a small web-hosted app using the opensim API to visualize a musculosqueletal model in a web page (webGL in a html canvas ?). A quick search on this forum ("visualizer html", "visualizer web page") di...
by Jonathan SAVIN
Thu May 25, 2023 2:22 am
Forum: OpenSim
Topic: Saving visualization from scripts
Replies: 1
Views: 630

Re: Saving visualization from scripts

Hi everyone, Has anyone found a way to save a "screenshot" of the visualizer by means of a Python API ? Or is there a way "perform an action" through Python API as in the GUI shell to apply the approach described in the topic "Shell scripting to save images" (https://simtk.org/plugins/phpBB/viewtopi...
by Jonathan SAVIN
Tue Apr 25, 2023 2:04 am
Forum: OpenSim
Topic: OpenSim API: problem of muscle force velocity function with Millard muscle type
Replies: 13
Views: 5761

Re: OpenSim API: problem of muscle force velocity function with Millard muscle type

Changing one property for all Millard muscles leads to the expected simulation :
<ignore_tendon_compliance>false</ignore_tendon_compliance>
by Jonathan SAVIN
Fri Feb 24, 2023 9:14 am
Forum: OpenSim
Topic: How to retrieve a "SimTK::Force::Gravity" object in Python scripting ?
Replies: 5
Views: 1183

Re: How to retrieve a "SimTK::Force::Gravity" object in Python scripting ?

Dear Ayman, thank you very much for your answer. I haven't been coding in C/C++ for years, so I'm not very comfortable in carrying out the task alone. Please enclosed find a tar.gz archive with minimum test code (no swig interface yet but it shall not be to complicated with such a light code). I hav...
by Jonathan SAVIN
Fri Feb 03, 2023 7:41 am
Forum: OpenSim
Topic: How to retrieve a "SimTK::Force::Gravity" object in Python scripting ?
Replies: 5
Views: 1183

Re: How to retrieve a "SimTK::Force::Gravity" object in Python scripting ?

Most internal classes of simbody are not exposed to the scripting interface as they were rarely needed (if ever) by our users. Instead we expose methods that live on the OpenSim side/wrapper. Hi Mr Habib and OpenSim users. Would you please explain me how to expose this simTK interface ? I guess it ...
by Jonathan SAVIN
Fri Feb 03, 2023 2:47 am
Forum: OpenSim
Topic: OpenSim API: problem of muscle force velocity function with Millard muscle type
Replies: 13
Views: 5761

Re: OpenSim API: problem of muscle force velocity function with Millard muscle type

Hi everyone, unfortunately I confirm that this bug still exists in Opensim 4.4 (with python 3.8). The force-velocity multiplier remains totally flat. If anyone has an idea, it would be greatly appreciated, as this topic seems to have been ignored for months :?
by Jonathan SAVIN
Fri Dec 09, 2022 3:33 am
Forum: OpenSim
Topic: How to retrieve a "SimTK::Force::Gravity" object in Python scripting ?
Replies: 5
Views: 1183

Re: How to retrieve a "SimTK::Force::Gravity" object in Python scripting ?

Thank you very much Ayman for your message. Basically, I'd like to compensate for gravity torque in the residual torque capacity of a body. I hoped I could retrieve directly this gravity torque, without having to "manually" compute the relative position of its CoM and compute associated jacobians, e...
by Jonathan SAVIN
Mon Nov 28, 2022 7:23 am
Forum: OpenSim
Topic: How to retrieve a "SimTK::Force::Gravity" object in Python scripting ?
Replies: 5
Views: 1183

How to retrieve a "SimTK::Force::Gravity" object in Python scripting ?

Hi everyone, I'd like to retrieve the "SimTK::Force::Gravity" object in a Python script from the current osim.Model. mdl = osim.Model(xxx) state = mdl.initSystem() gf = mdl.getGravityForce() bf = gf.getBodyForces() gf is correctly assigned : <Swig Object of type 'SimTK::Force::Gravity *' at 0x000001...
by Jonathan SAVIN
Mon Nov 21, 2022 7:00 am
Forum: OpenSim
Topic: OpenSim API: problem of muscle force velocity function with Millard muscle type
Replies: 13
Views: 5761

Re: OpenSim API: problem of muscle force velocity function with Millard muscle type

Thanks Mr. Uchida for this idea. It works only with Opensim4.4, right ? With Opensim 4.1 python scripting, I get a "'Millard2012EquilibriumMuscle' object has no attribute 'getFiberVelocityInfo'" error. For test purpose, please attached find py test script, the associated models and matplotlib figure...