sofa-framework / sofa

Real-time multi-physics simulation with an emphasis on medical simulation.
https://www.sofa-framework.org
GNU Lesser General Public License v2.1
871 stars 297 forks source link

[plugins] Add fetchable SoftRobots #3882

Closed alxbilger closed 10 months ago

alxbilger commented 11 months ago

Necessitate to update the CI: see https://github.com/sofa-framework/ci/pull/19

[ci-depends-on https://github.com/SofaDefrost/STLIB/pull/106] [ci-depends-on https://github.com/sofa-framework/SofaPython3/pull/354] [ci-depends-on https://github.com/SofaDefrost/SoftRobots/pull/222]


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

alxbilger commented 11 months ago

[ci-build][force-full-build][with-all-tests]

fredroy commented 11 months ago

FYI: unit tests are OK there are no scene tests or regression however.

Plugin SoftRobots: built (found libSoftRobots.so libSoftRobots.so.1.0)
Plugin SoftRobots: no examples/ nor scenes/ directories.
alxbilger commented 11 months ago

Arf the scene directories are hard-coded...

https://github.com/sofa-framework/ci/blob/5fdd611c1c6190c170e41b84a0e5cbe6b0f76e65/scripts/scene-tests.sh#L175

hugtalbot commented 11 months ago

An examples/ folder should be at the root in SoftRobots for the CI to find it. It would be nice to have SoftRobots following this format

alxbilger commented 11 months ago

[ci-build][force-full-build][with-all-tests]

hugtalbot commented 11 months ago

Now SoftRobots plugin have a repository examples/. Force full build triggered, let's wait CI.

alxbilger commented 11 months ago

[ci-build][force-full-build][with-all-tests]

fredroy commented 11 months ago

FIXME: 0 unit, 757 scenes, 0 regression I guess something went wrong 😅

it seems that the destination of the lib is wrong, so the CI and runSofa cannot find the lib (hence the errors)

alxbilger commented 11 months ago

@fredroy Do you think that https://github.com/SofaDefrost/STLIB/pull/106 could solve the issue?

alxbilger commented 11 months ago

[ci-build][force-full-build][with-all-tests]

sofabot commented 11 months ago

[ci-depends-on] detected during build #6.

To unlock the merge button, you must

alxbilger commented 11 months ago

[ci-build][force-full-build][with-all-tests]

sofabot commented 11 months ago

[ci-depends-on] detected during build #7.

To unlock the merge button, you must

alxbilger commented 11 months ago

https://github.com/SofaDefrost/STLIB/pull/106 seems to fix the issues. Now there is only 60 scenes to fix 🥵 ...

alxbilger commented 11 months ago

[ci-build][force-full-build][with-all-tests]

sofabot commented 11 months ago

[ci-depends-on] detected during build #8.

To unlock the merge button, you must

alxbilger commented 11 months ago

[ci-build][force-full-build][with-all-tests]

alxbilger commented 11 months ago

[ci-build][with-all-tests]

sofabot commented 11 months ago

[ci-depends-on] detected during build #9.

To unlock the merge button, you must

alxbilger commented 11 months ago

[ci-build][with-all-tests]

sofabot commented 11 months ago

[ci-depends-on] detected during build #10.

To unlock the merge button, you must

alxbilger commented 11 months ago

@epernod @damienmarchal I have the following error in several scenes of SoftRobots:

[ERROR] [UniformMass(mass)] TopologyData: indices already has a TopologyDataHandler. createTopologyHandler should only be called once at init of the TopologyData.

I think it is due to the fact that a Node is initialized twice. What is your recommendation?

epernod commented 11 months ago

@epernod @damienmarchal I have the following error in several scenes of SoftRobots:

[ERROR] [UniformMass(mass)] TopologyData: indices already has a TopologyDataHandler. createTopologyHandler should only be called once at init of the TopologyData.

I think it is due to the fact that a Node is initialized twice. What is your recommendation?

Quickly: this error is fired because init is not called only once. A "TopologyDataHandler" is created in the UniformMass init method. Creating 2 trackers could create real bugs if topologicalChanges are applied (basically changes will be applied twice) I see several options:

As a quick workaround: replace the TetrahedronSetTopologyContainer by a MeshTopology here : https://github.com/SofaDefrost/SoftRobots/blob/4acf28248278106c2855206f1751dcba41268039/examples/tutorials/Tripod/details/elasticbody.py#L20 This should solve all the tripod tutorials scenes. TopologyDataHandler are not created if the topology is using static containers.

alxbilger commented 11 months ago

@epernod Thanks for your suggestions. Can you clarify the difference between a MeshTopology and a TetrahedronSetTopologyContainer? Just by curiosity

alxbilger commented 11 months ago

I confirm that having a MeshTopology solves the issues. @epernod You call it a workaround. Does it mean I should not do that for some reasons?

epernod commented 11 months ago

I confirm that having a MeshTopology solves the issues. @epernod You call it a workaround. Does it mean I should not do that for some reasons?

MeshTopology -> static containers in the sense, not possible to change it during simulation, XXSetTopologyContainer have lot of methods to update their content. But if I remember well, they are both using vector

epernod commented 11 months ago

and yes... there is probably an issue already created on how to merge them 😸

sofabot commented 11 months ago

[ci-depends-on] detected during build #11.

To unlock the merge button, you must

alxbilger commented 10 months ago

[ci-build][force-full-build][with-all-tests]

sofabot commented 10 months ago

[ci-depends-on] detected during build #12.

To unlock the merge button, you must

alxbilger commented 10 months ago

[ci-build][force-full-build][with-all-tests]

sofabot commented 10 months ago

[ci-depends-on] detected during build #13.

To unlock the merge button, you must

alxbilger commented 10 months ago

[ci-build][with-all-tests]

sofabot commented 10 months ago

[ci-depends-on] detected during build #14.

To unlock the merge button, you must

alxbilger commented 10 months ago

[ci-build][with-all-tests]

sofabot commented 10 months ago

[ci-depends-on] detected during build #15.

To unlock the merge button, you must

fredroy commented 10 months ago

[ci-build][with-all-tests][force-full-build]

sofabot commented 10 months ago

[ci-depends-on] detected during build #16.

To unlock the merge button, you must

alxbilger commented 10 months ago

[ci-build][with-all-tests][force-full-build]

sofabot commented 10 months ago

[ci-depends-on] detected during build #17.

All dependencies are merged/closed and all ExternalProject pointers are up-to-date. Congrats! :+1:

sofabot commented 10 months ago

[ci-depends-on] detected during build #18.

All dependencies are merged/closed and all ExternalProject pointers are up-to-date. Congrats! :+1:

fredroy commented 10 months ago

[ci-build][with-all-tests][force-full-build]

sofabot commented 10 months ago

[ci-depends-on] detected during build #19.

All dependencies are merged/closed and all ExternalProject pointers are up-to-date. Congrats! :+1:

fredroy commented 10 months ago

🥹

 Test Result (2 failures  / +1)
SceneTests.applications/plugins/SoftRobots/examples/tutorials/Tripod/myproject.elasticbody.py
SceneTests.applications/plugins/SoftRobots/examples/tutorials/Tripod/myproject.step6.py
hugtalbot commented 10 months ago

[ci-build][force-full-build][with-all-tests]

sofabot commented 10 months ago

[ci-depends-on] detected during build #20.

All dependencies are merged/closed and all ExternalProject pointers are up-to-date. Congrats! :+1:

fredroy commented 10 months ago

[ci-build][force-full-build][with-all-tests]

sofabot commented 10 months ago

[ci-depends-on] detected during build #21.

All dependencies are merged/closed and all ExternalProject pointers are up-to-date. Congrats! :+1:

alxbilger commented 10 months ago

@hugtalbot @fredroy from what I can see, this PR is good to go

hugtalbot commented 10 months ago

Let's gong !