Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

rmolazem
Copy link
Contributor

@rmolazem rmolazem commented May 3, 2024

No description provided.

(cherry picked from commit 690c49743bf5a7aaa0bb9a66730415a159974dae)
@epernod epernod changed the title Add an example of a hexaBeam scene under the gravity force. [Scenes] Add an example of a hexaBeam scene under the gravity force May 7, 2024
examples/others/hexaBeam/hexaBeam_gravity.py Outdated Show resolved Hide resolved
examples/others/hexaBeam/hexaBeam_gravity.py Outdated Show resolved Hide resolved
@epernod epernod requested a review from alxbilger May 15, 2024 13:47
Copy link
Member

@alxbilger alxbilger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Can you explain why you use Lagrangian constraints (FreeMotionAnimationLoop and not a DefaultAnimationLoop)?
  2. How is this scene related to model order reduction? I don't see any reduction

@rmolazem
Copy link
Contributor Author

  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.

@alxbilger
Copy link
Member

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

@rmolazem
Copy link
Contributor Author

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.

@VannesteFelix
Copy link
Collaborator

@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 ?

@epernod epernod requested a review from alxbilger July 12, 2024 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants