We are trying to get our vision code on a tx1 to run on boot. Using a shell to launch the python script. If I use the terminal to launch the shell launcher or rc.local the code works. Here is a picture of the error.https://goo.gl/photos/EMDU9exiZYtZXS3XA
https://imgur.com/gallery/oaULq
You will note that there are two errors before the networktables import, which indicate that your virtualenv isn’t being set up correctly. I suspect if you resolve that issue then it’ll magically fix itself.
Do I have to have the source call and the workon call?
If you’re using a virtualenv, then I suspect you would need to. But why are you using virtualenv?
I left it in from a project I did for an organization on an amazon server. That is the only opencv project I could not launch from crontab so I just copied the script.
Well, if you’re using virtualenv, then you need to fix those errors, or your script won’t work (as you can see). Presumably the problem is that the rc script isn’t running as you, therefore it won’t have the same PATH.
Generally speaking I like using virtualenvs. However, I don’t really see a good rationale for using virtualenv in this case, I’d probably just install everything to the system python and call it a day.
I got it to work with makin a .desktop file and addING it to autostart
Glad to hear you got it working!