Hi,
Thank you for making this publicly available! Unfortunately, this isn't just a statement of praise...
I had run into 2 unresolved dependencies. I have provided a work around for each (1, 2). I think there are likely better work arounds. I also question the output of the image test (3, 4).
I don't dare muck with python too much. I've read reinstalling can render the OS useless. I had to re-install pip. That's about as far as I dare take it.
$ sudo ./unit_test.sh -e xmas
...
real 0m1.593s
user 0m1.160s
sys 0m0.416s
./unit_test.sh: line 69: gprof2dot: command not found
./unit_test.sh: line 69: dot: command not found
$ which gprof2dot
/home/parallels/.local/bin/gprof2dot
$ echo $PATH | grep parallels
[...]:/home/parallels/.local/bin:[...]
1) unit_test.sh can't find gprof2dot even though it's path is in $PATH.
When I add echo $PATH to the top of the script, I see:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
When the same command is run from terminal, I see the path I would expect. I don't know how $PATH is populated in the bash script. But it certainly isn't pulled in from .bashrc. So, for now, I'll force the path by putting the following at the top of the script. It seems like such a hack! But I'm over it.
export PATH=/home/parallels/.local/bin:$PATH
2) pip refuses to install dot.
$ pip install dot
Collecting dot
Could not find a version that satisfies the requirement dot (from versions: )
No matching distribution found for dot
You are using pip version 8.1.1, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
DON'T DO IT! It was following this advise that caused me to have to reinstall pip. pip could no longer execute anything as it couldn't resolve symbol "main". If you trashed your pip install, this may work for you:
sudo python -m pip uninstall pip && sudo apt install python-pip --reinstall
Solution: this command resolve the dot dependency.
$ sudo apt install python-pydot python-pydot-ng graphviz
3) Is this to be expected after processing image9.bmp twice?
It seems startracker.py throws an exception.
$ sudo ./unit_test.sh -i xmas
rgb.solve_image('xmas/samples/image9.bmp')
Time1: 0.0
Time2: 0.0209100246429
Time3: 0.0264129638672
DEC=325.917697
RA=226.479015
ORIENTATION=-67.095071
stars 3
ang_rate:
Time4: 0.0270230770111
Time5: 0.0272269248962
Time6: 0.0272490978241
rgb.solve_image('xmas/samples/image9.bmp')
0.989962220192,-0.137079447508,-0.0344090275466,-0.52653747797,-0.52269923687,-0.670480251312,0.861267456085 0.987475812435,-0.153092607856,-0.0381328649819,-0.519310355186,-0.512702524662,-0.683705210686,0.856955949765 0.992016375065,-0.0864524319768,-0.0918122828007,-0.484214663506,-0.584132134914,-0.651402950287,0.868609285023
quit()
Traceback (most recent call last):
File "startracker.py", line 522, in <module>
exec(data)
File "<string>", line 1, in <module>
File "/usr/lib/python2.7/site.py", line 375, in __call__
raise SystemExit(code)
SystemExit: None
Traceback (most recent call last):
File "startracker.py", line 522, in <module>
exec(data)
File "<string>", line 1, in <module>
File "/usr/lib/python2.7/site.py", line 375, in __call__
raise SystemExit(code)
SystemExit: None
4) Images: median, 0, 3, 4, and 7 have much less output than the others.
I take that to mean there is no solution. Is this expected? I think I saw an explanation for why 7 and median don't have solutions. Not sure about the rest...
Regards,
Stephen