Jigsaw failure
- Dominant language
- C++
- Stars
- 245
- Forks
- 181
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 15
Description
**ISIS version(s) affected**: 8.3.0 and 9.0.0
I have what I believe is a legit ISIS control network for Mars with two cameras and a stereo convergence angle of 9.3 degrees. It gets read in by jigsaw, and it runs very well as:
`jigsaw fromlist=run/list.txt update=no twist=yes radius=yes maxits=3 cnet=run/run-cnet.net onet=run/run-jigsaw.net file_prefix=run/run
`
Yet, as soon as I increase the number of iterations from 3 to 4 (maxits=4), I get the error:
```
aborting...**USER ERROR** Unable to bundle adjust network [run/run-cnet.net].
**PROGRAMMER ERROR** Could not solve bundle adjust.
**PROGRAMMER ERROR** Negative distances are not supported, the value [-193725241.51332 meters] cannot be stored in the Distance class.
(isis9.0.0)
```
Why would that be? I got this with both Mars (MOC) and Europa (JunoCam) data.
Here are the interest point matches, and they look good:
The most similar issue is https://github.com/DOI-USGS/ISIS3/issues/4111, but that doesn't help figure out what is going on.
Note: The control network is created with ASP's bundle_adjust, but it uses the ISIS API for how to set up and save the measurements, control points, their sigma, etc.
I tested this with ISIS 8.3.0 and ISIS 9.0.0.
Self-contained testcase reproducing the problem, having all inputs, outputs, and the command to run, with a readme, is attached.
Note1: It runs just fine with twist=yes radius=no, or with twist=no radius=yes. Only when these are both set to yes it fails.
Note2: This still fails if adding:
`POINT_RADIUS_SIGMA=10000000
`
but it works with:
`POINT_RADIUS_SIGMA=1000000
`
All this suggests the control network is likely legit, but the solver goes wild.
[jigsaw_bug.tar.gz](https://github.com/user-attachments/files/20471137/jigsaw_bug.tar.gz)
Contributor guide
Research direction
Start with the attached jigsaw_bug.tar.gz README and reproduce the command using the provided inputs. Compare runs with twist and radius enabled separately and together, including the POINT_RADIUS_SIGMA values; done means the combined configuration completes without the negative-distance error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100