Plug the device in, check the device connection
$ lsusb | grep "d005"
#Returns the normalised correlation (a number that represents the similarity) between lists of y coordinates | |
#Note: ENSURE that and both lists are of identical length, delta x remains constant and x coordinate is common to both lists | |
import numpy as np | |
a = [0, 1, 0.5] | |
b = [100, 1, 0.5] | |
output = np.correlate((a - np.mean(a)) / (np.std(a) * len(a)), (b - np.mean(b)) / np.std(b)) #Normalised correlation |
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
body { | |
font: 10px sans-serif; | |
} | |
.axis path, | |
.axis line { | |
fill: none; | |
stroke: #000; |
KERNEL=="ttyUSB0", MODE="0666" |
#!/usr/bin/env python | |
import roslib | |
roslib.load_manifest('rgbd_people_tracking') | |
import sys | |
import os | |
import rospy | |
import cv2 | |
import matplotlib.pyplot as plt | |
from std_msgs.msg import String | |
from sensor_msgs.msg import Image |
from subprocess import call | |
''' | |
Emulates a webcam, subscribing to mjpeg stream published by ROS web_video_server | |
First, run "$ sudo modprobe v4l2loopback" to create the virtual webcam device | |
Use "$ rostopic list" to list all available topics. | |
You can subscribe to any topics of type sensor_msgs/Image. | |
- To find out the type of the topic: use "$ rostopic info [TOPIC_NAME]" |
#!/usr/bin/python | |
#import rospy | |
import matplotlib.pyplot as plt | |
import matplotlib.animation as animation | |
import numpy as np | |
import time | |
from scipy import signal | |
from sklearn import datasets | |
from sklearn import svm | |
from serial.serialutil import SerialException |
#For full reference, see http://docs.scipy.org/doc/numpy-1.10.1/reference/routines.polynomials.poly1d.html | |
def generate_poly(points, n): | |
''' | |
Generates an n degree polynomial from 2d array of discrete Points. | |
parameter points is a 2D numpy array: e.g. np.array([(1, 1), (2, 4), (3, 1), (9, 3)]) | |
''' | |
return np.poly1d(np.polyfit(points[:,0], points[:,1], n)) | |
points = np.array([(1050, 1.0), (900, 0.775), (800, 0.5)]) |
On server
On Client
3.sudo apt-get install openvpn
4. Login to openvpn access server (on port 943) with credentials, download the "autologin profile"
5. sudo cp client.ovpn /etc/openvpn/client.conf
6. echo "AUTOSTART=\"ALL\"" | sudo tee -a /etc/default/openvpn
7. To connect to VPN: sudo service openvpn start