I struggled with making the camera work and after a few tweaks to the code-with-passion image I was able to achieve "camera working!". I am using a Microsoft LifeCam HD-5000
As you can see I don't have a lot of real estate on my display screen.
The camera wasn't starting when I was running the app from the /etc/init.d/openrov script. I also kept running into problems with trying to start it via 'node server.js' as the user 'rov' so I did the following:
chown -R root:rov /opt/openrovchmod -r 775 /opt/openrov
This allowed me to fire up the openrov app via 'node server.js' as the rov user. If I loaded the control stream via http://rov:8080 the camera would not stream but the shell window indicated the stream was starting. If I hit 'ctrl r' and refreshed the window the camera would load into the window.
Next I stopped the session and tried to start it again as the root user (since the permissions on the /opt/openrov where all root:root I assumed the service startup was also trying to fire it up as root. I wasn't able to start the app as a root user and I was receiving an error that said "hey you need to set your LD_LIBRARY_PATH". I was going to grab the path out of the rov user .bashrc but I made an assumption that the startup script was also missing the path and maybe that is why the mjpg_streamer couldn't start? Anyway, I next added the following:
echo "export LD_LIBRARY_PATH=/usr/local/lib" >> /etc/profile.d/rov.shecho "export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/node/bin" >> /etc/profile.d/rov.shchmod +x /etc/profile.d/rov.sh
I could of added the LD_LIBRARY_PATH to the root .bashrc but I wanted to see if the script needed the path. I also could of added the same LD_LIBRARY_PATH to the openrov script I suppose. I was going with the plan of setting the PATH and LD_LIBRARY_PATH for everyone so that any user I created or whatever, would have the correct path.
Next I added -l to the shebang ling of /etc/init.d/openrov
#! /bin/sh -l
After that root could start up the server.js, the rov user could start up the server.js and the /etc/init.d/openrov also worked.
Now, the catch is I am still stuck with having to do a refresh after loading the app into the browser. I.E. 'ctrl r'.
Sign Upor Sign In
Or sign in with:
© 2014 Created by Eric Stackpole.
Report an Issue |
Terms of Service
Please check your browser settings or contact your system administrator.