Torque-driven simulation
- Gerus Pauline
- Posts: 12
- Joined: Mon Dec 10, 2007 6:28 am
Torque-driven simulation
Hi,
I am trying to create a forward dynamics using only torque without muscles.
It seems that it's possible by using the Forward Dynamics tool but I don't know how can I create the xml files containing the joint torque at each time.
https://simtk.org/forums/viewtopic.php?f=91&t=1295
Is it possible to drive a simulation using torque in the GUI, or do I need to use API mode ?
Do you have an example of actuator xml file containing the torque to drive the simulation ?
Thanks,
Cheers,
Pauline Gerus
I am trying to create a forward dynamics using only torque without muscles.
It seems that it's possible by using the Forward Dynamics tool but I don't know how can I create the xml files containing the joint torque at each time.
https://simtk.org/forums/viewtopic.php?f=91&t=1295
Is it possible to drive a simulation using torque in the GUI, or do I need to use API mode ?
Do you have an example of actuator xml file containing the torque to drive the simulation ?
Thanks,
Cheers,
Pauline Gerus
- Rudolf Klemetti
- Posts: 48
- Joined: Thu Jul 15, 2010 3:09 pm
Re: Torque-driven simulation
Hi Pauline,
You can create a torque-driven forward simulation, for example, by using RRA actuators, controls, and states as inputs to Forward tool.
Hope this helps!
Rudi
You can create a torque-driven forward simulation, for example, by using RRA actuators, controls, and states as inputs to Forward tool.
Hope this helps!
Rudi
- Gerus Pauline
- Posts: 12
- Joined: Mon Dec 10, 2007 6:28 am
Re: Torque-driven simulation
Hi Rudi,
thanks for your reply. I've tried to drive Forward dynamics by using RRA outputs (3DgaitModel2354).
However, it didn't work, the simulation became crazy. I have no idea to solve my problem.
Any example ?
Thanks,
Cheers,
Pauline
thanks for your reply. I've tried to drive Forward dynamics by using RRA outputs (3DgaitModel2354).
However, it didn't work, the simulation became crazy. I have no idea to solve my problem.
Any example ?
Thanks,
Cheers,
Pauline
- Ayman Habib
- Posts: 2248
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Torque-driven simulation
Hi Pauline,
Please make sure you apply ground reaction forces the same way you did in RRA and also that the same Actuators and Controls are used. Generally speaking, without a feedback controller to handle deviations due to numerics, this may not be stable for a long time.
Hope this helps,
-Ayman
Please make sure you apply ground reaction forces the same way you did in RRA and also that the same Actuators and Controls are used. Generally speaking, without a feedback controller to handle deviations due to numerics, this may not be stable for a long time.
Hope this helps,
-Ayman
- Gerus Pauline
- Posts: 12
- Joined: Mon Dec 10, 2007 6:28 am
Re: Torque-driven simulation
Hi Ayman,
I have tried to run the Forward dynamics with the ground reaction forces, the Actuators, States and Controls from RRA, and it didn't work.
I attached the setup file and all the input files that I used for the Forward dynamics.
Could you tell me if I missed something ?
Do I need to change the osim file and remove all the muscles or something else?
Thanks,
Pauline
I have tried to run the Forward dynamics with the ground reaction forces, the Actuators, States and Controls from RRA, and it didn't work.
I attached the setup file and all the input files that I used for the Forward dynamics.
Could you tell me if I missed something ?
Do I need to change the osim file and remove all the muscles or something else?
Thanks,
Pauline
- Attachments
-
- FD_test.zip
- (1016.41 KiB) Downloaded 96 times
- Rudolf Klemetti
- Posts: 48
- Joined: Thu Jul 15, 2010 3:09 pm
Re: Torque-driven simulation
Hi Pauline,
I found quickly at least one error; you should check "Replace model's force set" in Actuators - just like in a RRA setup - in order to use RRA actuators. In your setup, you tried to use muscles, which made the simulation crazy.
Good luck,
Rudi
I found quickly at least one error; you should check "Replace model's force set" in Actuators - just like in a RRA setup - in order to use RRA actuators. In your setup, you tried to use muscles, which made the simulation crazy.
Good luck,
Rudi
- Gerus Pauline
- Posts: 12
- Joined: Mon Dec 10, 2007 6:28 am
Re: Torque-driven simulation
Hi Rudi,
Thanks for your reply.
I tried to run FD with "Replace model's force set", the simulation was crazy.
After that I removed the muscles in the osim file, the simulation was again crazy.
I don't know where is the problem.
Pauline
Thanks for your reply.
I tried to run FD with "Replace model's force set", the simulation was crazy.
After that I removed the muscles in the osim file, the simulation was again crazy.
I don't know where is the problem.
Pauline
- Rudolf Klemetti
- Posts: 48
- Joined: Thu Jul 15, 2010 3:09 pm
Re: Torque-driven simulation
Hi Pauline,
Actually, you had not applied ground reaction forces; your external loads .xml file did not include any forces or torques. Also, kinematics for external loads was missing. You can find help for creating external loads files online. In addition, I recommend to check "Use time steps from states file" in Integrator Settings. And there is no need to remove muscles.
Good luck,
Rudi
Actually, you had not applied ground reaction forces; your external loads .xml file did not include any forces or torques. Also, kinematics for external loads was missing. You can find help for creating external loads files online. In addition, I recommend to check "Use time steps from states file" in Integrator Settings. And there is no need to remove muscles.
Good luck,
Rudi
- Gerus Pauline
- Posts: 12
- Joined: Mon Dec 10, 2007 6:28 am
Re: Torque-driven simulation
Hi Rudi,
the external load and kinematic are included in forces_grf.xml. It's not the problem.
I have tried a lot of different things.
Is it really possible to run Foward Dynamics based on Torque by using the GUI ? Do I need to develop my own code in API mode?
Thanks,
Pauline
the external load and kinematic are included in forces_grf.xml. It's not the problem.
I have tried a lot of different things.
Is it really possible to run Foward Dynamics based on Torque by using the GUI ? Do I need to develop my own code in API mode?
Thanks,
Pauline
- Rudolf Klemetti
- Posts: 48
- Joined: Thu Jul 15, 2010 3:09 pm
Re: Torque-driven simulation
Hi Pauline,
I am sorry, I had viewed your setup file in OpenSim 2.2.1 which did not show the external loads you had specified. In OpenSim 2.4 it is fine. I changed the external loads kinematics file. I think your biggest problem was too long integration time. As Ayman wrote, the simulation won't be stable for a long time. I run the simulation for 0.05 s, and one can already see deviation.
I attached the edited setup file, and results.
You really don't need API to do this!
Rudi
I am sorry, I had viewed your setup file in OpenSim 2.2.1 which did not show the external loads you had specified. In OpenSim 2.4 it is fine. I changed the external loads kinematics file. I think your biggest problem was too long integration time. As Ayman wrote, the simulation won't be stable for a long time. I run the simulation for 0.05 s, and one can already see deviation.
I attached the edited setup file, and results.
You really don't need API to do this!
Rudi
- Attachments
-
- Pauline.zip
- An example setup and results
- (1.22 MiB) Downloaded 118 times