Server

All devices rely on the server, therefore the server must be running before the clients can connect.

  • SoD Sensor
  • Any iOS client using the SOD iOS Library (iPad, iPhone)
  • Any C# client using the SOD C# Library (tabletop, Windows, SurfacePro)

The server is written in Node.js, and uses several modules such as Express and Socket.IO to handle communications.

  1. Install Node.js: http://nodejs.org/download/
  2. (optional) You may opt for an IDE such as Visual Studio or WebStorm.
  3. Clone the repository:
    • git clone https://github.com/ase-lab/SoD_Locator_SS.git
  4. With command prompt, navigate to the project directory and type npm install to install the necessary modules with Node Package Manager (NPM).
    • To run command prompt, press [Windows key] + R. Then type cmd and hit enter.
  5. You can run the server in command prompt with node frontend.js
  6. To view the Visualizer, open a browser and visit http://localhost:3000

That is all, if you are able to open the Visualizer then your server is already running.

ECONNRESET (Socket not disconnecting immediately):

  • Refer to: https://github.com/Creatiwity/socket.io/commit/2222950b2e21b9f879b585d76aff060e7bb80b0d
  • The above is an unmerged line change for Socket.IO 0.9x. This step should be performed after "npm install", when the node modules have been downloaded.
  • Reason: A proper disconnect results in socket being removed immediately. A connection error should result in the same (eg. force close a client), but the code which handles this calls the wrong onClose method.

To locate your IP address:

  • If running Windows, open Command Prompt and type ipconfig. You want your IPv4 Address.
  • If running Mac, open Network Preferences. Under the connection status you should see your IP address.

Calibration:

Ideal tools you need:

  • Two water bottles with bottle cap(idealy they are similar size).
  • A flat table
  • If would be very helpful if the devices which the sensors are running on  are fast enough to support 30 frames/sec data transfer. You can tell by observing if the video on your device is laggy or not. Of course, more smooth the video shows up on the deivce , the better it is.

The idea behind the calibration:

  • Each sensor has its own coordinate. Since sensors wouldn't be put at the same location, so they see objects differently in terms of the location. The basic idea for calibration is select each of two points from two sensors. Those two points from each sensor should  the same in the reality interms of location and sequence. Then the math convert the two points from each sensor to vector. The rule that can map one vector to another is the calibration rule we obtained and then we pass them to the sensor. Ultimately, the sensors will see the objects at a location that they all agree on. So that they know it is the same object even if they see it from different places.

Calibration Process:

  1. Put the table between the view of two sensors that you want to calibrate, and two bottles on top of the table. You may put them as far from each other as possible. That will increase the calibration accuracy.
  2. Click on the button "Calibration Mode!" on the left of the visualizer which brings you into calibration mode.
  3. If you don't see any Kinect sensor ID shows up you may refresh the page or click on Refresh Sensors" button . We support two kinect2 sensor calibration for now. You can select one sensor socket ID from master reference sensor list and a sensor that is being calibrated.
  4. Click on "Get Image!" button.
  5. If you select the correct sensor ID , there will be two depth frame(image) shows up on both the canvas. Try to point two bottle caps from each image, and please make sure the bottle caps you click is at the right sequence.
  6. Click on "Calibrate!" button. Then the status log on the left side of the visualizer will shows up a green message indicates the calibration suceeded with a calibrate angle. When you go back overview page of visualizer , the two sensor will displayed based on the calibration rule. You may check if they look somewhat close to the reality. (Notes: if you get an red message asking you to calibrate, that means the two points from each sensor don't map. You may try to select the points again after refresh the page.)

 

Traffic Monitoring:

  • For wireshark. Applying filter string "tcp.dstport == 3000 || tcp.srcport == 3000" to capture packets flow on the server.