Skip to content

[algorithm] Needle shaft collision is activated only when the tip proximity is in the collision output #78

Closed

Description

@th-skam

This happens because we use the collisionOutput as a sensor to determine whether the insertion has not started. The algorithm must be revisited.

Activity

  1. self-assigned this
    on Aug 28, 2025
  2. added theissue type on Aug 28, 2025
  3. th-skam commented on Aug 29, 2025

    @th-skam
    CollaboratorAuthor

    The video demonstrates the problem. If we approach the surface with the needle base, there is no collision:

    25-08-29-CollisionBug.mp4

    Why it happens

    Collision with the shaft is activated by this check:

    if (collisionOutput.size())
    {
    auto createShaftProximity =
    Operations::CreateCenterProximity::Operation::get(l_shaftGeom->getTypeInfo());
    auto projectOnShaft = Operations::Project::Operation::get(l_shaftGeom);

    Before this check, the collisionOutput is either

    1. filled by the proximities detected by the tip
    2. left empty in case the tip is too far or insertion has started

    The latter is done so as to disable collision with the shaft when insertion begins. As a side effect, collision detection gets disabled when the tip is far away. The proper check to determine whether insertion has began is with the m_couplingPts variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions