CSUFTitanRover / TitanRover2018

Titan Rover 2018 Edition: Calypso
http://titanrover.com/
Apache License 2.0
12 stars 10 forks source link

React component for linux motion #49

Closed audstanley closed 6 years ago

audstanley commented 6 years ago

Linux Motion has an API we can use. We need to have buttons that close out web frames. Html for the motion camera:

<img src="http://localhost:8081/" width="320" height="240">

The ip address will be the rovers. Install motion on your laptop to test on your local webcam. Check localhost:8080/ to get the web API for motion, and you can see your webcam at localhost:8081. For cameras that we have in the rover room at the moment, see here The motion config files are stored in /etc/motion/motion.conf and to run motion:

sudo motion

to kill motion:

sudo killall motion

an example get request of the motion API on your laptop running motion would be:

http://localhost:8080/0/config/set?stream_quality=100 where quality is the streaming quality of the jpeg image also: http://localhost:8080/0/config/set?stream_maxrate=15 where maxrate is the framerate of the camera and note that: localhost:8080/0/ <-- The zero is the camera number. As more cameras get added, config files need to be made/changed, for now, setting up the react component for one camera is vital, along with a way to TOGGLE:

<img src="http://localhost:8081/" width="320" height="240">

off and on from the component. ( This will help up save bandwidth for the extra cameras)

Weffe commented 6 years ago

This has been completed by pull request #57