Search found 136 matches

by Ajay Seth
Thu Nov 20, 2014 10:29 pm
Forum: OpenSim
Topic: Modeling through Matlab
Replies: 3
Views: 716

Re: Modeling through Matlab

coordinate.setSpeedValue(state, value) takes the state object and the value of the speed you want to set in the state. To ensure that the actuator then respects the new speed, you want to call model.computeStateVariableDerivatives(state); to make sure all internal dynamics are realized. Then you can...
by Ajay Seth
Wed Nov 12, 2014 11:49 am
Forum: OpenSim
Topic: forces in joints
Replies: 35
Views: 7524

Re: forces in joints

An inverse kinematics analysis is a purely kinematic analysis. There is no evaluation of any forces (no system dynamics). Specifically, it is the solution for the generalized (or internal) coordinates (joint angles, etc...) that match measurements of spatial (or absolute) coordinate measurements suc...
by Ajay Seth
Tue Nov 11, 2014 11:51 am
Forum: OpenSim
Topic: Input to coordinate actuator
Replies: 24
Views: 3121

Re: Input to coordinate actuator

calcPower returns a double not an Array<double>
by Ajay Seth
Tue Nov 11, 2014 10:55 am
Forum: OpenSim
Topic: Adding a Custom Muscle to a model
Replies: 12
Views: 2627

Re: Adding a Custom Muscle to a model

You can find the methods on ModelComponents in Doxygen e.g. https://simtk.org/api_docs/opensim/api_docs/classOpenSim_1_1Coordinate.html . Coordinate has methods to set the default coordinate value and its speed. These should be accessible via scripting in Matlab and you can see the methods using tab...
by Ajay Seth
Fri Nov 07, 2014 1:30 pm
Forum: OpenSim
Topic: Doubts on PinJoints
Replies: 2
Views: 349

Re: Doubts on PinJoints

Your point 1 is irrelevant to PinJoint. The functions in CustomJoint are inside a SpatialTransform which allows you to couple spatial (6dof) kinematics to between 1 and 6 internal coordinates. A PinJoint is not arbitrary and is defined to rotate about the respective Z axis of the parent and child fr...
by Ajay Seth
Tue Nov 04, 2014 5:30 pm
Forum: OpenSim
Topic: Input to coordinate actuator
Replies: 24
Views: 3121

Re: Input to coordinate actuator

1. Good question. The default coordinate value and its speed are overruled by the prescribed motion when the constraint is satisfied (when the model is assembled e.g. at initSystem()). 2. What is the purpose of the CoordinateActuator if the motion is prescribed? The prescribed motion will compensate...
by Ajay Seth
Tue Nov 04, 2014 4:10 pm
Forum: OpenSim
Topic: Input to coordinate actuator
Replies: 24
Views: 3121

Re: Input to coordinate actuator

It would be easier to prescribe the motion of the coordinate. Inside the Coordinate block that you want to prescribe, add: <!--If specified, the coordinate can be prescribed by a function of time. It can be any OpenSim Function with valid second order derivatives.--> <prescribed_function> <LinearFun...
by Ajay Seth
Tue Nov 04, 2014 3:30 pm
Forum: OpenSim
Topic: Adding a Custom Muscle to a model
Replies: 12
Views: 2627

Re: Adding a Custom Muscle to a model

actControls.set(FD, val); %FD= muscle force
looks incorrect.

actControls should be a Vector of length 1, so you should be setting the value not the index to the force value:

Code: Select all

 actControls.set(0, FD); %0 is the index in the Vector (0th element) and FD is your force value 
by Ajay Seth
Tue Nov 04, 2014 12:31 pm
Forum: OpenSim
Topic: State Variable Names do not match order of States?
Replies: 9
Views: 1828

Re: State Variable Names do not match order of States?

We cannot stop you from calling s.getY() etc.. on the State. I guess you can always figure out the order yourself. For others reading this post I strongly advise against doing this since their is absolutely no guarantee that the state layout will remain the same between model versions or releases of...
by Ajay Seth
Tue Nov 04, 2014 12:02 pm
Forum: OpenSim
Topic: Forward simulation: basic steps
Replies: 4
Views: 765

Re: Forward simulation: basic steps

Perhaps what you are looking for is in the Doxygen that documents the code base. Locally you can find it here: <OpenSim32_Install_DIR>\sdk\doc\OpenSimAPI.html Online: https://simtk.org/api_docs/opensim/api_docs/ Furthermore, a Controller is an OpenSim component whose job it is to generate controls f...