Search found 48 matches

by Brian Umberger
Tue May 21, 2013 1:39 pm
Forum: OpenSim
Topic: ForwardTool - Specify Controls File
Replies: 6
Views: 1576

Re: ForwardTool - Specify Controls File

Hi Ayman, Thanks for the helpful responses. I've been able to apply arbitrary controls to my model by creating a PrescribedController() and defining a PiecewiseLinearFunction(). I think this will work for my current purposes. However, the ControlSetController() did not work for me in Matlab (I'm usi...
by Brian Umberger
Thu May 16, 2013 6:33 pm
Forum: OpenSim
Topic: ForwardTool - Specify Controls File
Replies: 6
Views: 1576

Re: ForwardTool - Specify Controls File

Hi Ayman, Thanks for the reply, that makes sense. I will try it and let you know how I make out. I do have a quick follow-up question: When the forward tool is run by the GUI and it reads a user specified controls file, which type of controller does it create to apply those controls to the model act...
by Brian Umberger
Thu May 16, 2013 8:49 am
Forum: OpenSim
Topic: ForwardTool - Specify Controls File
Replies: 6
Views: 1576

ForwardTool - Specify Controls File

Hi All, I am trying to write a Matlab script that runs a forward dynamics simulation using a specific controls file. I can run the simulation just fine, but it does not use the controls in the file that I specify. The controls all remain at their default values (= 0.0). When I do the same thing in t...
by Brian Umberger
Mon May 06, 2013 2:53 pm
Forum: OpenSim
Topic: Extract values from ArrayDouble in Matlab
Replies: 10
Views: 2779

Re: Extract values from ArrayDouble in Matlab

Hi Ayman, Thanks again for the help. Based on your suggestions, I was able to create a vector and set the values of the controls in version 3.1 beta. However, I am now unable to extract the center of mass velocity of the forearm/hand segment using the getVelocity method. This line of code: simbodyEn...
by Brian Umberger
Wed May 01, 2013 10:00 am
Forum: OpenSim
Topic: Extract values from ArrayDouble in Matlab
Replies: 10
Views: 2779

Re: Extract values from ArrayDouble in Matlab

Hi Ayman, I appreciate your continued feedback and assistance. I'm running the 3.1 beta now and will let you know how I make out. I do have one question about Model.setControls. In some other "set" situations I have encountered, such as coordinate.setValue, a plain old double is passed in. However, ...
by Brian Umberger
Mon Apr 29, 2013 2:39 pm
Forum: OpenSim
Topic: Extract values from ArrayDouble in Matlab
Replies: 10
Views: 2779

Re: Extract values from ArrayDouble in Matlab

First, thanks so much to Ayman and Jiang for the helpful replies. And Ayman, I will try out the 3.1 Beta and let you know how I make out. I nearly have my exercise to recreate the C++ API optimization example working (i.e., to maximize the forward velocity of the arm). The only part I can't seem to ...
by Brian Umberger
Wed Apr 24, 2013 4:32 pm
Forum: OpenSim
Topic: Extract values from ArrayDouble in Matlab
Replies: 10
Views: 2779

Re: Extract values from ArrayDouble in Matlab

Hi Ayman, Thanks for the speedy and helpful reply, getitem(index) worked great in this case. Thanks also for the suggestion to use tab auto completion to get a list of available functions. I did find though, that some functions worked while some did not. As an example, hitting tab after: var = osimM...
by Brian Umberger
Tue Apr 23, 2013 5:53 pm
Forum: OpenSim
Topic: Extract values from ArrayDouble in Matlab
Replies: 10
Views: 2779

Extract values from ArrayDouble in Matlab

In an effort to become more familiar with scripting in Matlab using the OpenSim API, I am trying to recreate the optimization problem from the C++ API Examples where the forward velocity of the forearm/hand segment center of mass is maximized. After running a simulation with a trial set of control v...