Page 1 of 1

Path Actuator class to simulate the active actuators

Posted: Tue Aug 16, 2016 12:41 am
by robot
dear
I link matlab with opensim, and i want to give joint torque that matlab calculate to opensim and opensim give me angle, but i don't know how do it. In my program, opensim get muscle excitation how i replace active actuator or external force instead of muscle excitation.
I use this project:"Extendable OpenSim-Matlab Infrastructure Using Class Oriented C++ Mex Interface"

https://simtk.org/projects/opensimmatlab

Re: Path Actuator class to simulate the active actuators

Posted: Tue Aug 16, 2016 9:33 am
by mitkof6
Hi,

I would go with implementing a controller by deriving from OpenSim::Force. In the main function of the controller you can set the desired value of the generalized forces. Also, you can expose the setting of your controls so you can interface with MATLAB as in the case in the example of the project.

Best

Re: Path Actuator class to simulate the active actuators

Posted: Tue Aug 16, 2016 1:57 pm
by jimmy
You can use the PrescribedForce method to define a joint torque and then run a forward simulation to get a resultant movement.