Reading the Real-Time Position after Simulation Completion in SOFA #220
Unanswered
MONArfi
asked this question in
Help - Programming with SoftRobots
Replies: 2 comments 2 replies
-
|
Hello, This Do you need to read those positions to analyse them? With another software maybe? |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
OK, Thank you very much. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello all,
I am working with a soft trunk-like robot that has four cable actuators in SOFA, and I want to read its real-time position after the simulation is complete. In Python, I have created a MechanicalObject named 'dofs' which contains position and velocity. During the simulation, I can observe the position and velocity of 'dofs' under each cable.
I have researched and found that I need to use WriteStates, open(), and read() functions to achieve this. However, I am unsure of the exact steps to do so.
In Python I have:
cable_pos=cableL.addObject('MechanicalObject', name='dofs', position=pullPoint[i]+[pos.toList() for pos in position])cableL.createObject('WriteState', filename='cablePos.txt', writeF='true', period='0.1', listening="1")And, after the below code,
simulation = node.addChild('Simulation')Beta Was this translation helpful? Give feedback.
All reactions