Automate plotting of motion

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
User avatar
Thomas Uchida
Posts: 1793
Joined: Wed May 16, 2012 11:40 am

Re: Automate plotting of motion

Post by Thomas Uchida » Sat Jun 29, 2019 2:46 pm

is it possible for a c++ program to open OpenSim and run a script?
OpenSim is written in C++, so it would probably make more sense to just implement everything in C++ using the API. The "Introduction to the OpenSim API" section of the documentation on Confluence may be helpful: https://simtk-confluence.stanford.edu:8 ... penSim+API.

Tags:

User avatar
Joel Quarnstrom
Posts: 15
Joined: Sat Mar 02, 2019 6:18 pm

Re: Automate plotting of motion

Post by Joel Quarnstrom » Sat Jun 29, 2019 6:09 pm

Ok, how do I create a main program? Do I do it in a separate program like Visual Studio?

User avatar
Thomas Uchida
Posts: 1793
Joined: Wed May 16, 2012 11:40 am

Re: Automate plotting of motion

Post by Thomas Uchida » Sat Jun 29, 2019 6:21 pm

Please read the "Introduction to the OpenSim API" section of the documentation (linked above). You can find examples in your "resources" directory (e.g., C:\OpenSim4.0\Resources\Code\CPP). You can install the resources by typing installResources() in the GUI's Scripting Shell if you haven't done this already.

User avatar
Joel Quarnstrom
Posts: 15
Joined: Sat Mar 02, 2019 6:18 pm

Re: Automate plotting of motion

Post by Joel Quarnstrom » Sat Jun 29, 2019 6:36 pm

How do I run those example files?


User avatar
Joel Quarnstrom
Posts: 15
Joined: Sat Mar 02, 2019 6:18 pm

Re: Automate plotting of motion

Post by Joel Quarnstrom » Mon Jul 01, 2019 2:23 pm

Thank you, I was able to open and run a few of the examples.

I am trying to run a .mot file, and I could not find any examples that used .mot files. Do you know what command I could use to run a .mot file after opening a model using the API?

Thank you,
Joel

User avatar
Joel Quarnstrom
Posts: 15
Joined: Sat Mar 02, 2019 6:18 pm

Re: Automate plotting of motion

Post by Joel Quarnstrom » Tue Jul 02, 2019 3:29 pm

Is there a way to run a motion file on an existing model using the API? If not, is there a way to directly code the angles for each joint using Visual Studio?

POST REPLY