Update for Capytaine version 3 - #454
Conversation
|
@mancellin Thanks for these updates. I made a small change removing the function initialization for Looks like the tests are now failing due to the removal of |
|
My bad, the removal of the Overall, the philosophy behind almost all the breaking changes in the recent version of Capytaine is that everything about (for instance) a body should be set at initialization and nothing should be updated later as On second thought, even the code I left from will fail for the new |
|
@mancellin Thanks for the updates. Since it sounds like the code you left will fail in v3 but is necessary in v2.x, should we wait until v3 is released and bug free, then switch over to using that format? For now, we could just require Capytaine <=2.3.1 until we're ready to switch. |
|
v3 has been published last week and the failing CI job (build documentation) is using it. It fails because I forgot to remove a direct setting of rotation center which has been disabled in v3. |
|
PS: feel free to add a temporary "capytaine<3" bound in your |
|
@mancellin Ahh okay, for some reason I thought I saw that v3 hadn't been released yet. I'm testing out the cases locally and ran into some other errors as well.
Also, could you adjust this PR so it goes into the dev branch instead of main? |
No, but you can reimplement your own easily: def axis_aligned_bbox(mesh):
x, y, z = mesh.vertices.T
return (x.min(), x.max(), y.min(), y.max(), z.min(), z.max())
Adding "global" dofs to a Multibody is not supported yet. As a workaround you should be able to reproduce the behavior of the previous version by merging the multibody into a single one and adding dofs to it. both = (body_1 + body_2).as_FloatingBody
both.add_rigid_body_dofs(...) |
|
Thank you. I am working through the updates in the tutorials. I used the |
|
It is a bug. Working on a fix: capytaine/capytaine#936. I can propose a workaround, but maybe since there seems to be several issues with local/global rigid body dofs in v3, the simplest solution would be to enforce the use of Capytaine 2.3.1 for the LUPA example. |
To be compatible with the upcoming version of Capytaine (and stay compatible with 2.3.1), you should replace
load_from_meshioby the genericload_mesh.Also, setting the rotation center of a body independently from the dofs does not really make sense in Capytaine, so I propose to remove it.