This project aims to provide a generic abstraction of any existing controller. The client-side code should keep a minimum size, as it only sees a generic joystick : the server, on which all the drivers are installed, retrieves and translates all the data from the controller into buttons and axes.
Currently, the only implemented controller is the Leap Motion. We are working right now on at least three other controllers.
- Download and install the LeapMotion Setup
- Clone the project
cd Abstraction-ControllerServer
make
- Server side
- Connect your Leap Motion
- Linux : run
sudo leapd
- Mac OS : just run Leap Motion
- Linux : run
./bin/LeapServer <nb_client> <port>
- Connect your Leap Motion
- Client side
-
C/C++
#include "socklib.h" // disponible dans /include int main() { int socketClient = CreeSocketClient ("127.0.0.1", "2222"); if (socketClient == -1) { fprintf(stderr,"erreur de connexion sur la socket"); exit (1) } //bla bla return 0; }
-
JAVA
import java.net.*; import java.io.*; public class Client { public static void main(String[] args) { try { Socket socket = new Socket ("127.0.0.1", 2222); } catch (IOException e) { e.printStackTrace(); } } }
-