13 January 2022 at 05:46 #21382
As discussed, I was hoping to create some respiratory motion for my simulation and I was wondering how I could achieve this? Thanks13 January 2022 at 09:53 #21393
Thanks for posting it on the forum.
The way I would recreate a desired motion of an object would be to implement this change of position (dofs) as a controller, whether a python or a C++ one, which would overwrite the new positions of your object at each time step.
For oscillatory motion, we also have a projective constraint (similar to what I wrote just previously, projecting at the end of the time step the new positions) named: OscillatorConstraint.
Would this suit you?
Is a whole object moving or would you like just to impose an oscillatory motion of a part of an object?
Hugo14 January 2022 at 06:20 #21401
@Hugo Thank you! The OscillatorConstraint does the job, I think I would like to later implement this as a controller. In my case, the whole object is moving, is there a way I can achieve this too? Thanks 🙂14 January 2022 at 11:56 #21402
Great that OscillatorConstraint does the job!
Regarding a later implementation as a controller, all you would need in your controller is a link to the MechanicalObject of your object so that you can write in it the new position at each time step.
The MechanicalStateController (C++ class in SOFA) could be worth looking at.
—14 January 2022 at 21:33 #21403
Regarding the forum migration, interesting move. Does this mean that in the future, users will be unable to ask questions on the SOFA Forum?17 January 2022 at 08:46 #21404
Correct. Starting from this week:
– new registration on the Forum will be prevented and redirected towards GitHub Discussions
– Users will not be able to create new topics
– All admin replies will include the footer your noticed
The issue #2591 has been opened for you to follow the migration process.
Any feedback is most welcome.
—17 January 2022 at 12:27 #21407
I see. For what it’s worth, I think it’s a good move
- You must be logged in to reply to this topic.