Home › Forum › SOFA › Using SOFA › Adding Contact surface meshes to mapped system
Tagged: Linux_ubuntu, SOFA_2006
- This topic has 3 replies, 3 voices, and was last updated 3 years, 6 months ago by Hugo.
-
AuthorPosts
-
13 April 2021 at 23:29 #19159ArthurBlocked
Hello @Hugo, @felixvanneste,
My short term goal is to get surface mesh collision on a mapped node instead of just point collision.
My long term goal is to be able to reuse a leg several times for a robot, where I only need to use model order reduction once on the leg. I am using the Sofia example in MOR as a template to work from. (https://github.com/SofaDefrost/ModelOrderReduction/tree/master/doc/examples/SOFIA)
However instead of legs like the ones used for SOFIA I am using Pneunets and so I need to have collision detection along the length of the legs. I have tried using only the points on the bottom of the legs (see attached scene) however I don’t think this is enough to keep the robot stable on the floor.
I was thinking one way to fix this would be to have a full collision surface (one that you would load through an STL file). Mine would be volume_collision.stl which is attached. I can get it to appear on the original leg position, but I am not sure how to properly map it to the mapped position of the leg. I think it would be at the point in the scene.py file that I haved marked with “COLLISION”. Files here: https://uchicago.box.com/s/um1611rig6riasr9d9o1ac7rdzsdi1x0
How can I do a mapping like this? Or is there another way you suggest to have a more robust collision model along the bottom of the mapped leg (I am hoping not to need a much denser mesh as runtime is already an issue, hence why I want to do model order reduction on this next).
I am also not quite sure how the mapping works — moving the robot with my mouse does not cause the legs to flop around as I would expect. At one point I thought a BilateralInteractionConstraint would be best for my situation, but I was not sure how that works — another solution for me might be just getting that to work, but I am not sure how to do that either.
Build details can be found here:https://github.com/ripl/SofaFramework-Docker/blob/6dcde34d6ee9550635d53478971f2fb0b62d5d5a/Dockerfile
15 April 2021 at 15:07 #19183FélixBlockedHello @amackeith,
I don’t totally see what you want to do with the mapping but I can recommend you to look into the MultiGait-SoftRobot example in the doc which seems to correspond to what you are trying to do (pneumatic actuation with collision).
But at first glance I will use the volume_collision.stl to have triangle for the collision, I have to admit that I don’t really know if you can do proper collision with only point… Anyway if you find the volume_collision.stl to heavy you can always sub-select it or generate a new surface mesh with only the surface you are interested in.
I hope this help you,
Félix15 April 2021 at 18:43 #19184ArthurBlockedThanks @felixvanneste,
My problem is that I do not know how to get the triangular collision mesh from volume_collision.stl to appear on the leg on the robot. Rather it appears on the leg the is in a fixed position. (I need it on the one that is in the mapped position). The the example this is from gets the points to be mapped with:
# mapped collision (with reduce size) mappedCollisionLeg = mappedLeg.createChild('mappedCollisionLeg' + str(i)) mappedCollisionLeg.createObject('MechanicalObject', template='Vec3d', name='mappedCollisionLeg') mappedCollisionLeg.createObject('Point', color='1 0 0 1', group='1', translation=framePosition[i]) mappedCollisionLeg.createObject('SubsetMapping', indices='@../../../' + strLink0 + strLink1 + str( i) + strLink2 + '/boxROICollision.indices', input='@../../mappedLeg' + str(i) + '/mappedLeg')
And I was wondering how to do this kind of mapping but also include triangles (or have the collision mesh be there).
I was also wondering if there is a reason “BilateralInteractionConstraint” was not used in the SOFIA demo where the mappings are used instead? Is there any reason that “BilateralInteractionConstraint” would not work with a reduced model?
Arthur
23 April 2021 at 16:09 #19283HugoKeymasterHey @amackeith
Your scene looks nicely complicated, well done!
The idea of selecting only a subset of point for the collision is cool and should work well.However, the collision model of each leg should appear as the child node of this leg.
Before going further, I would make sure that modeling only one leg (without rigid body or anything else) you can have a proper collision detection and response.Then, creating a rigid part and connecting it with these legs should be easier.
Did you get inspired from the MechanicalMatrixMapper scene?Best
Hugo
-
AuthorPosts
- You must be logged in to reply to this topic.