ModelOrderReduction icon indicating copy to clipboard operation
ModelOrderReduction copied to clipboard

[Scenes] Add an example of a hexaBeam scene under the gravity force

Open rmolazem opened this issue 1 year ago • 4 comments

rmolazem avatar May 03 '24 15:05 rmolazem

  1. This scene was originally written by Felix; I only made a few modifications. For scenes involving collisions, the Python script of the MOR plugin currently only works with the FreeMotionAnimationLoop. However, for this simple scene, the DefaultAnimationLoop also works. If you prefer, I can modify it to use DefaultAnimationLoop.
  2. This scene demonstrates the use of the plugin without any actuators, where deformation is caused by gravity (The example of the hexaBeam in the documentation is this one.). To use the plugin in this way, you only need to define a node as I have done at lines 55 and 56.

rmolazem avatar May 21 '24 08:05 rmolazem

Thanks for your answers.

If constraints are not used, I would go for simplicity and use a DefaultAnimationLoop. This way, you can remove the constraint solver, and the ConstraintResolution.

I understand that you added an actuator so the scene can be used in a reduction. I suggest you add a comment on the actuator node to explain why you added it. I also would like to know if you plan to add a reduced scene of hexaBeam_gravity.py. I don't really understand the content of examples/others/hexaBeam

alxbilger avatar May 21 '24 08:05 alxbilger

Yes, I agree that simpler is better. So, I will do the following modifications:

  1. Use DefaultAnimationLoop.
  2. Add a clear comment for the actuator node.

I understand that it might seem counterintuitive to use the plugin for simulations not related to soft robotics, as the plugin was originally designed for that purpose. To use the plugin in this way, there's still a lot to do with the Python script to make it more understandable and user-friendly. For now, the directory contains two original scenes: Soft Robot Application(hexaBeam): Similar to the diamond robot example, a cable constraint is used for actuation. Beyond Soft Robot Applications(hexaBeam_gravity): This scene inherits interaction from the original scene instead of using actuators.

P.S. If you think it's beneficial, I can also include the (Sofa) reduced scenes related to these original scenes. But note that the images of these reduced scenes are available in the documentation directory already.

rmolazem avatar May 21 '24 09:05 rmolazem

@rmolazem can you please remove the listActiveNodes.txt because they are no longer useful ? Can you do the same for the _Gie file, they are heavy and not useful for the debug.

Apart from that it seems ok for me, @alxbilger have you something to add ?

VannesteFelix avatar Jun 14 '24 13:06 VannesteFelix