I encountered the a bug in the surface-walk tool path planner relating to the specification of the cut_direction and cut_centroid parameters. The size of the cut_direction vector is used to create the initial slice through the mesh. If you set this without regard to the size of your mesh, the first plane cutting the mesh may not fully cross the mesh. The result is tool paths that do not span the entire surface. My solution to this issue is to scale the cut_direction vector by the size of the largest OBB axis such that the cutting plane is always wide enough to intersect the entire mesh
This PR also removes the cut_centroid parameter. This parameter is unused in the rest of the repository and isn't even defined in the noether_msgs surface walk planner config message. Retaining the default value of [0, 0, 0] causes issues if the centroid of the mesh is not near [0, 0, 0], like the example below:
Here the cutting plane (whose size is defined by the extents of the mesh) doesn't even intersect the mesh because it's assumed to be at the defined centroid of [0, 0, 0]. Since we already know the centroid of the mesh, why does the user need to specify a centroid if they just want to specify the cut direction? If you do this naively or incorrectly (like how I initially encountered this issue), then the planner fails or only cuts through part of the mesh. My solution is to eliminate the cut_centroid parameter and use the already-known centroid of the mesh to generate the cutting plane. The result for my mesh then looks appropriate:
I encountered the a bug in the surface-walk tool path planner relating to the specification of the
cut_direction
andcut_centroid
parameters. The size of thecut_direction
vector is used to create the initial slice through the mesh. If you set this without regard to the size of your mesh, the first plane cutting the mesh may not fully cross the mesh. The result is tool paths that do not span the entire surface. My solution to this issue is to scale thecut_direction
vector by the size of the largest OBB axis such that the cutting plane is always wide enough to intersect the entire meshThis PR also removes the
cut_centroid
parameter. This parameter is unused in the rest of the repository and isn't even defined in thenoether_msgs
surface walk planner config message. Retaining the default value of[0, 0, 0]
causes issues if the centroid of the mesh is not near[0, 0, 0]
, like the example below:Here the cutting plane (whose size is defined by the extents of the mesh) doesn't even intersect the mesh because it's assumed to be at the defined centroid of
[0, 0, 0]
. Since we already know the centroid of the mesh, why does the user need to specify a centroid if they just want to specify the cut direction? If you do this naively or incorrectly (like how I initially encountered this issue), then the planner fails or only cuts through part of the mesh. My solution is to eliminate thecut_centroid
parameter and use the already-known centroid of the mesh to generate the cutting plane. The result for my mesh then looks appropriate: