21 October 2020 at 12 h 28 min #17433JonnyParticipant
I’m trying to simulate a pneumatic robot with SofaPython (actually using the Soft Robots plugin binaries). In my scene one bellow of the robot(looks like an ellipsoid) inflates using a Python Controller and SurfacePressureConstraint. The inflation is limited by two floors, one above and one below the bellow forcing it to deform when colliding. So far this works reasonably well.
Now I want to translate one of the floors vertically to either compress or expand the bellow and later get the contact area at every time step in order to calculate the contact force. I have tried different methods (move rest_position, free_position, changing translation of mechanical object, LinearMovementConstraint) that I found in the forum to translate the floor but nothing seems to work – at least visually. I checked the properties of my mechanical object via the GUI and the values I tried to change did in fact get updated the way they were supposed to but my scene still looks the same.
How do I get the floor the move? I’m guessing there’s only a minor thing I am missing currently, so any help would be great!
Thanks in advance.21 October 2020 at 12 h 52 min #17434ScheiklParticipant
- Karlsruhe Institute of Technology
I had a similar problem and the SoftRobots tutorial on the tripod was incredibly helpful.
Have a look at the setupanimation function here:
If you can use the splib, great! If not, you may want to copy out the relevant snippets of code from there. 😉
Paul30 October 2020 at 15 h 06 min #17494HugoKeymaster
11 November 2020 at 17 h 32 min #17633JonnyParticipant
- SOFA Consortium
thank you for your replies and sorry for answering so late but I was working on something different in the meantime.
@scheikl: Thanks for the provided example. So far I haven’t been able to get it working that way but I am sure it will come in handy at a later point and has given me a good idea of how to avoid inflating/deflating manually in the future which I did not think about before.
Also I’m struggling to understand how to properly use the different models (especially collision, as my scene gets pretty slow once the bellow hits the floors). The next step would be to have larger floors and two bellows next to each other (as in ‘bellow_rotatory_floors.py’ in the provided folder). Then one of the bellows is inflated causing the floor to rotate around its x-axis and pushing down on the other bellow and so on – both of the bellows should be attached to the floors at their top/bottom center. I found Bilateral Movement Constraint and the corresponding example scene but I don’t understand how to use it properly in my scene. Also I am not sure which component to use regarding the movement of the floor which should be limited to rotation around one axis.
1. How do I get my scene to run smoother during collision?
2. How to best implement the different models and mappings?
3. How to properly attach bellows to floors?
4. How to allow/constraint movements of the floor in case of collision?
Thank you so much for your help! If you have any question regarding my code or this long post please do not hesitate to ask 🙂
- You must be logged in to reply to this topic.