DO NOT NEED THIS UNTIL JMONKEY DISPLAYS VIDEO DATA - SLAM MAPPING if (service.getTypeKey().equals("org.myrobotlab.service.OpenCV")) { AbstractComputerVision cv = (AbstractComputerVision) service; subscribe(service.getName(), "publishCvData"); - } + }+ */ if (service.getTypeKey().equals("org.myrobotlab.service.Servo")) { // non-batched - "instantaneous" move data subscription @@ -1469,7 +1468,7 @@ public void onAnalog(String name, float keyPressed, float tpf) { // PAN -- works(ish) if (mouseMiddle && shiftLeft) { - log.info("PAN !!!!"); + log.debug("panning"); switch (name) { case "mouse-axis-x": case "mouse-axis-x-negative": diff --git a/src/main/java/org/myrobotlab/service/OakD.java b/src/main/java/org/myrobotlab/service/OakD.java index 99e9fdbfea..7c0789211c 100644 --- a/src/main/java/org/myrobotlab/service/OakD.java +++ b/src/main/java/org/myrobotlab/service/OakD.java @@ -1,10 +1,12 @@ package org.myrobotlab.service; import org.myrobotlab.framework.Service; +import org.myrobotlab.framework.Status; import org.myrobotlab.logging.Level; import org.myrobotlab.logging.LoggerFactory; import org.myrobotlab.logging.LoggingFactory; -import org.myrobotlab.service.config.ServiceConfig; +import org.myrobotlab.process.GitHub; +import org.myrobotlab.service.config.OakDConfig; import org.slf4j.Logger; /** * @@ -14,16 +16,50 @@ * @author GroG * */ -public class OakD extends Service
+ * + * final Vertx that = this; + * + * java.lang.Runtime.getRuntime().addShutdownHook(new Thread() { + * public void run() { + * System.out.println("Running Shutdown Hook"); + * that.stop(); + * } + * }); + * + *+ */ + + vertx = io.vertx.core.Vertx.vertx(new VertxOptions().setBlockedThreadCheckInterval(100000)); + vertx.deployVerticle(new ApiVerticle(this)); + + } + + @Override + public void startService() { + super.startService(); + start(); + } + + @Override + public void stopService() { + super.stopService(); + stop(); + } + + /** + * Undeploy the verticle serving http and ws + */ + public void stop() { + log.info("stopping driver"); + Set
name | +x | +y | +z | +pitch | +roll | +yaw | +
---|---|---|---|---|---|---|
{{pose.name}} | +{{pose.position.x.toFixed(2)}} | +{{pose.position.y.toFixed(2)}} | +{{pose.position.z.toFixed(2)}} | +{{pose.orientation.pitch.toFixed(2)}} | +{{pose.orientation.roll.toFixed(2)}} | +{{pose.orientation.yaw.toFixed(2)}} | +
id | +handedness | +type | +value | +
---|---|---|---|
{{event.id}} | +{{event.meta.handedness}} | +{{event.type}} | +{{event.value}} | +
joint | +angle | +
---|---|
{{key}} | +{{value.toFixed(2)}} | +