robotology / find-superquadric

Fit a partial point cloud with a superquadric
BSD 3-Clause "New" or "Revised" License
19 stars 4 forks source link

Fix superquadric display #3

Closed jchevrie closed 5 years ago

jchevrie commented 5 years ago

This PR fixed the display issue due to the different axes used in the model and in VTK for the roundness parameters. In the superquadric model one roundness parameter is shared by axes X and Y, while it is shared by axes X and Z in VTK.

The effect is particularly visible when the two roundness parameters are very different:

Example with a "perfect" cylinder:

find-superquadric gives the same model fitting before and after the fix: [INFO]center = ( 0.446 0.005 0.722 ) [INFO]angle = 174.054 [deg] [INFO]size = ( 0.031 0.027 0.085 ) [INFO]shape = ( 0.135 0.885 )

Bugged display:

Display_bug

Fixed display:

Display_fixed

pattacini commented 5 years ago

@giuliavezzani please have a look at this patch on VTK visualization of SQs. It might be relevant to your code too.