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
Path Actuator class to simulate the active actuators
- Maryam khamar
- Posts: 4
- Joined: Wed Nov 18, 2015 4:52 am
- Dimitar Stanev
- Posts: 1096
- Joined: Fri Jan 31, 2014 5:14 am
Re: Path Actuator class to simulate the active actuators
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
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
You can use the PrescribedForce method to define a joint torque and then run a forward simulation to get a resultant movement.