Search found 58 matches
- Tue Mar 26, 2019 5:44 am
- Forum: OpenSim
- Topic: Change forces in Matlab
- Replies: 3
- Views: 603
Change forces in Matlab
Hello, I would like to know how may I change a force through Matlab code. I know that for torques is: osimModel.updActuators().get('gear_load').addInControls(Vector(1, controlActionLoad(controlIteration)), modelControls); But I would like to apply a force in a specific direction and in a specific po...
- Wed Jan 09, 2019 11:44 am
- Forum: OpenSim
- Topic: Update set force functions while running a forward simulation [Matlab script]
- Replies: 0
- Views: 250
Update set force functions while running a forward simulation [Matlab script]
Hello, I would like some help updating a force value. I am currently running a script in Matlab with the leg6dof9musc with some adaptations: 1) I looked all coordinates, except for hip_flexion_r , knee_angle_r and pelvis_ty . So the hip and knee joints are free, also the pelvis position in the y-axi...
- Thu Oct 25, 2018 11:10 am
- Forum: 2018 Fall OpenSim Virtual Workshop
- Topic: [Matlab-creating model] Weld joints for three bodies, fixing the foot to a platform
- Replies: 8
- Views: 1091
Re: [Matlab-creating model] Weld joints for three bodies, fixing the foot to a platform
Thanks for the responses. I am still struggling a little bit with these constraints. With the weldjoint, it was too difficult to attach to the right position. Capturar.PNG So, I tried the weld constraint. I tried two different ways, but I got two different problems. 1) I tried to add this to the XML...
- Thu Oct 25, 2018 10:01 am
- Forum: 2018 Fall OpenSim Virtual Workshop
- Topic: [Matlab-creating model] Weld joints for three bodies, fixing the foot to a platform
- Replies: 8
- Views: 1091
Re: [Matlab-creating model] Weld joints for three bodies, fixing the foot to a platform
ok, I fixed this by changing this line: % Create Weld foot to platform footToPlatform = WeldJoint('FootToPlatform', ground, locationInParent, ... orientationInParent, calcn_r, locationInChild, orientationInChild, false); I connected the foot to the ground, and not to the platform. Now both welds app...
- Thu Oct 25, 2018 9:53 am
- Forum: 2018 Fall OpenSim Virtual Workshop
- Topic: [Matlab-creating model] Weld joints for three bodies, fixing the foot to a platform
- Replies: 8
- Views: 1091
Re: [Matlab-creating model] Weld joints for three bodies, fixing the foot to a platform
The navigator is only showing the "FootToPlatform"
![Image](%5Battachment=0%5DCapturar.PNG%5B/attachment%5D)
- Thu Oct 25, 2018 9:51 am
- Forum: 2018 Fall OpenSim Virtual Workshop
- Topic: [Matlab-creating model] Weld joints for three bodies, fixing the foot to a platform
- Replies: 8
- Views: 1091
Re: [Matlab-creating model] Weld joints for three bodies, fixing the foot to a platform
Hello, sorry, yes, it is 3.3. here is the code that I create the model: % Import Java Library clear; clc; import org.opensim.modeling.* %% Open the model osimModel = Model('leg6dof9musc_hipfree_stance.osim'); osimModel.setName('leg6dof9stand_stance'); %% platform DEG2RAD = pi/180; RAD2DEG = 1/DEG2RA...
- Thu Oct 25, 2018 7:59 am
- Forum: 2018 Fall OpenSim Virtual Workshop
- Topic: [Matlab-creating model] Weld joints for three bodies, fixing the foot to a platform
- Replies: 8
- Views: 1091
[Matlab-creating model] Weld joints for three bodies, fixing the foot to a platform
Hello, In my model, I want to weld the foot object to a platform object that I created. So first, I created the platform Body similar to the " DynamicWalkingStarter " from the repository: % Platform platform = Body(); platform.setName('Platform'); platform.setMass(1); platform.setInertia(Inertia(1,1...
- Tue Oct 23, 2018 4:55 am
- Forum: 2018 Fall OpenSim Virtual Workshop
- Topic: Opensim and Matlab
- Replies: 3
- Views: 331
Re: Opensim and Matlab
Hello Arash, I do not know if Matlab opens OpenSim and starts the animation. What I do is the following: 1) I create an .sto file for visualization 2) I open the OpenSim GUI 3) I open the model and load the .sto My code for creating the visualization file: Nsamples = length(motionData.data(:,1)); Ns...