Home › Forum › SoftRobots › Programming with SoftRobots › [SOLVED] Units por pressure at fingerController.py
Tagged: pressure, SOFA, SOFA_1912, softrobots, units, Windows_10
- This topic has 5 replies, 2 voices, and was last updated 3 years, 1 month ago by Hugo.
-
AuthorPosts
-
12 October 2021 at 20:21 #20598Agustin SantanaBlocked
Hi everyone! I´ve been looking for the correct units for the pressure used in fingerController.py and other .py files for the control of the soft robots, but I haven´t find it.
This is a section of the code for fingerController.py where pressure is increased through keyboard, but I don´t know which are the units:
if (c == “+”):
pressureValue = self.pressureConstraint1.findData(‘value’).value[0][0] + 0.1
if pressureValue > 1.5:
pressureValue = 1.5
self.pressureConstraint1.findData(‘value’).value = str(pressureValue)Can anybody help me?
Thanks!
14 October 2021 at 09:48 #20606HugoKeymasterHey @agustinsantana
Indeed, this problem with the SurfacePressureConstraint data specification was recently brought to us. It appeared after discussing with SoftRobots developers that the pressure data actually correponds to : pressure / dt where dt is the timestep.
Let me know if it corresponds to what you expect with these units.
Best wishes,Hugo
22 October 2021 at 05:20 #20684Agustin SantanaBlockedThanks for your answer @Hugo. By the moment, I´m not sure about the value of dt, I mean, how can I modify that timestep? Does this dt, refers directly to the DT value of the mainscreen, beside the buttons of “Animate”, “Reset Scene” and “Reset View”.
In the other hand, pressure I guess is “pressureValue” for the fingerController.py right?
Finally, and after undestanding this details, the units of pressure will also depend on the units I use for my scene? I mean if I use MPa, GPa, pressure for fingerController.py is going to be in those terms or is exclusively related to pressure / dt ?
Thanks in advance @Hugo!
2 November 2021 at 19:06 #20724HugoKeymasterHey @agustinsantana
the dt of my previous post indeed refers to the global time step of the simulation : the one defined in your root node and visible in the mainscreen.
Regarding the pressure (sorry for my inaccuracy I am no user of the SoftRobots plugin myself), I meant that in the SurfacePressureConstraint you should specify the data field value where the value defined must be equal to the pressure you want to apply divided by the global time step mentioned above.Let’s say that you want to apply 20 Pa (if your scene uses SI units) and that your time step is dt=0.5, you should then set
value=10
.Is this clearer?
Best wishes,Hugo
8 November 2021 at 05:56 #20747Agustin SantanaBlockedGreat @Hugo! With this explanation, everything is pretty clearer! I´m marking the topic as solved.
Thanks for all your support!
10 November 2021 at 18:24 #20770HugoKeymasterYou’re most welcome @agustinsantana!
-
AuthorPosts
- You must be logged in to reply to this topic.