This is a camera tha can be aimed with hand controls over the leap motion touchless 3D hand tracker.

 

 

.

Here's the script I run in the Java interpreter:

import org.myrobotlab.framework.Message;
import org.myrobotlab.framework.Service;
import org.myrobotlab.leapmotion.LeapListener;
import org.myrobotlab.logging.Level;
import org.myrobotlab.logging.LoggerFactory;
import org.myrobotlab.logging.LoggingFactory;
import org.slf4j.Logger;
import com.leapmotion.leap.Controller;
import com.leapmotion.leap.Gesture;
LoggingFactory.getInstance().configure();
LoggingFactory.getInstance().setLevel(Level.WARN);
 
LeapMotion leapmotion = new LeapMotion("leapmotion");
leapmotion.startService();
 
Runtime.createAndStart("gui", "GUIService");
Runtime.createAndStart("runtime", "Runtime");
Runtime.createAndStart("python", "Python");
Runtime.createAndStart("java", "Java");
Arduino arduino=new Arduino("arduino");
arduino.startService();
arduino.setSerialDevice("COM17",57600,8,1,0);
//Runtime.createAndStart("servox","Servo");
Servo servox=new Servo("servox");
servox.startService();
 
//Runtime.createAndStart("servoy","Servo");
Servo servoy=new Servo("servoy");
servoy.startService();
 
 
arduino.servoAttach("servox",14);
arduino.servoAttach("servoy",15);
 
OpenCV opencv=new OpenCV("opencv");
opencv.startService();
opencv.setCameraIndex(0);
opencv.setInpurtSource(OpenCV.INPUT_SOURCE_CAMERA);
//opencv.capture();
//
servox.subscribe("publishInvScreenX", leapmotion.getName(), "move", Float.class);
servoy.subscribe("publishScreenY", leapmotion.getName(), "move", Float.class);
 
 
Log log=new Log("log");
log.startService();
log.subscribe("keyTap",leapmotion.getName(),"log",Message.class);
 

 

GroG

11 years 5 months ago

Another service added by Raver !   Awesome Work !