Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collision calculation has a bug #145

Closed
tskisner opened this issue Sep 25, 2018 · 0 comments · Fixed by #146
Closed

Collision calculation has a bug #145

tskisner opened this issue Sep 25, 2018 · 0 comments · Fixed by #146
Assignees
Labels
Projects

Comments

@tskisner
Copy link
Member

As part of my work re-factoring / re-writing fiberassign, I discovered a bug in the collision calculation. The central body and ferrule holders are modeled as circles and segments, and overlap of these shapes are used to detect collisions. For mult-point segments, each subsegment must be checked for a collision. However, the current code returns immediately after checking only the first piece of a multi-point segment:

https://github.com/desihub/fiberassign/blob/master/src/collision.cpp#L186

For verification of the problem, using the small test data set, tile 1148, fiber 1597 is assigned to a target which produces the configuration in the attached image. My new code identified this as a collision, but the master version did not. I'll open a PR in a moment to fix this in master, even though the code will be replaced shortly. The consequences are that any previous collision calculations involving the multi-point central body segment and the ferrule holder head, where the head crosses segments other than the first one, would be identified as not colliding.
collide

@tskisner tskisner added the bug label Sep 25, 2018
@tskisner tskisner self-assigned this Sep 25, 2018
@tskisner tskisner added this to To do in 18.11 via automation Sep 25, 2018
@tskisner tskisner moved this from To do to In progress in 18.11 Sep 25, 2018
18.11 automation moved this from In progress to Done Sep 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
18.11
  
Done
Development

Successfully merging a pull request may close this issue.

1 participant