Backend that powers the dashboard
# sqlite3
sudo apt-get install sqlite3
# node.js
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
# robo ops server
git clone https://github.com/wm-robo-ops/server.git && cd server
npm install
make
./init_db.js
you may also have to run the following after the database is created:
chown 664 robo-ops.db
ROBO_OPS_PASSWORD="<THE_PASSWORD>" nohup ./password_server.js | tee -a password.log
nohup ./server.js | tee -a server.log
nohup ./video_stream_server.js | tee -a video.log
nohup ./dof_stream_server.js | tee -a dof.log
Most problems can be solved by restarting the offending server. Don't forget to cat
the logs to see wassup!
####/stats
{
"cameras":{
"bdfront":{
"device":"192.168.1.133",
"port":8001,
"vehicle":"bigDaddy",
"nameReadable":"Big Daddy Front",
"on":false,
"frameRate":0
},
"bdright":{
"device":"192.168.1.121",
"port":8002,
"vehicle":"bigDaddy",
"nameReadable":"Big Daddy Right",
"on":false,
"frameRate":0
},
"bdback":{
"device":"192.168.1.151",
"port":8003,
"vehicle":"bigDaddy",
"nameReadable":"Big Daddy Back",
"on":false,
"frameRate":0
},
"bdleft":{
"device":"192.168.1.142",
"port":8004,
"vehicle":"bigDaddy",
"nameReadable":"Big Daddy Left",
"on":false,
"frameRate":0
},
"arm":{
"device":"192.168.1.000",
"port":8005,
"vehicle":"bigDaddy",
"nameReadable":"Arm",
"on":false,
"frameRate":0
},
"scout":{
"device":"192.168.1.200",
"port":8006,
"vehicle":"scout",
"nameReadable":"Scout",
"on":false,
"frameRate":0
}
},
"gps":{
"bigDaddy":{
"device":"192.168.1.133",
"port":4001,
"name":"bigDaddy"
},
"scout":{
"device":"192.168.1.200",
"port":4002,
"name":"scout"
},
"flyer":{
"device":"192.168.1.000",
"port":4003,
"name":"flyer"
}
},
"dofDevice":{
"bigDaddy":{
"device":"192.168.1.133",
"port":3001,
"name":"bigDaddy"
},
"scout":{
"device":"192.168.1.200",
"port":3002,
"name":"scout"
},
"flyer":{
"device":"192.168.1.000",
"port":3003,
"name":"flyer"
}
}
}
####/rocks/add
Request body:
{
"lon": <Number>,
"lat": <Number>,
"color": <String>,
"id": <String>
}
Response
ok
####/rocks/remove/:id
Remove a rock by its id
Response
ok
####/:vehicle/video/:camera
Response
some video streaming socket
- 5555 - Web API
- 9000 - Pi command server
- 7000 - Pi camera streaming server
- 300* - dof devices
3000
: Pi Server3001
: Web/big daddy3002
: Web/scout3003
: Web/flyer
- 400* - gps
4000
: Pi server4001
: Web/big daddy4002
: Web/scout4003
: Web/flyer
- 800* - cameras
8000
: Pi Server8001
: Web/big daddy front8002
: Web/big daddy right8003
: Web/big daddy back8004
: Web/big daddy left8005
: Web/arm8006
: Web/scout