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.is it possible for a c++ program to open OpenSim and run a script?
Automate plotting of motion
- Thomas Uchida
- Posts: 1793
- Joined: Wed May 16, 2012 11:40 am
Re: Automate plotting of motion
Tags:
- Joel Quarnstrom
- Posts: 15
- Joined: Sat Mar 02, 2019 6:18 pm
Re: Automate plotting of motion
Ok, how do I create a main program? Do I do it in a separate program like Visual Studio?
- Thomas Uchida
- Posts: 1793
- Joined: Wed May 16, 2012 11:40 am
Re: Automate plotting of motion
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.
- Joel Quarnstrom
- Posts: 15
- Joined: Sat Mar 02, 2019 6:18 pm
Re: Automate plotting of motion
How do I run those example files?
- Thomas Uchida
- Posts: 1793
- Joined: Wed May 16, 2012 11:40 am
- Joel Quarnstrom
- Posts: 15
- Joined: Sat Mar 02, 2019 6:18 pm
Re: Automate plotting of motion
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
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
- Joel Quarnstrom
- Posts: 15
- Joined: Sat Mar 02, 2019 6:18 pm
Re: Automate plotting of motion
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?