Skip to content

ptcrealitylab/vuforia-spatial-core-addon

Repository files navigation

Vuforia Spatial Edge Server Core Add-on

This is the core-addon for the Vuforia Spatial Edge Server. It provides a baseline set of blocks, interfaces, nodes, and tools to the Edge Server. The server loads code from blocks, interfaces, and nodes. The editor user interface loads blocks, nodes, and tools.

Read First

The Vuforia Spatial Toolbox and Vuforia Spatial Edge Server make up a shared research platform for exploring spatial computing as a community. This research platform is not an out of the box production-ready enterprise solution. Please read the MPL 2.0 license before use.

Join the conversations in our discourse forum if you have questions, ideas want to collaborate or just say hi.

Add-on Content Types

Blocks

Logic blocks available in the data crafting board.

Interfaces

Hardware interfaces which translate between the hardwareInterface.js API and the hardware.

Nodes

Programming nodes associated with an object that can produce and consume values.

Tools

Tools which the user can place on objects or float in world space to provide useful interactions.

Content Scripts

Low-level scripts placed directly into the user interface's context as if they were part of the editor's code.

Examples

This repo contains examples for blocks, interfaces, nodes, and tools. Content scripts are more niche but a simple "hello world" example looks like this:

(function() {
    function initService() {
        let messageDiv = document.createElement('div');
        messageDiv.style.position = 'absolute';
        messageDiv.style.left = 0;
        messageDiv.style.top = 0;
        messageDiv.style.fontFamily = 'sans-serif';
        messageDiv.style.fontSize = '12px';
        messageDiv.style.color = 'cyan';
        messageDiv.style.pointerEvents = 'none';
        messageDiv.textContent = 'Hello world!';

        document.body.appendChild(messageDiv);
    }

    realityEditor.addons.addCallback('init', initService);
}());

Using the Kepware Interface

The Kepware Interface is compatible with both KEPServerEX and Kepware Edge.

Kepware Connection Instructions

  1. Enter the Hardware Interfaces tab on the Vuforia Spatial Edge Server Web UI.
  2. Enable the Kepware interface.
  3. Enter in your connection details and save your changes.
  4. On your KEPServerEX or Kepware Edge server, browse through the rejected certificate list and accept the most recent certificate. This process differs between the two servers, so consult the corresponding User Manual (available at https://www.kepware.com/en-us/products/kepserverex/ and https://www.kepware.com/en-us/products/thingworx-kepware-edge/ respectively).
  5. Refresh the page after a moment to see the available tags.
  6. Select the tags you want to use and save your changes.
  7. (Optional) You can also filter the tag results if you are looking for a specific tag.
  8. The tags you selected will now be available in the Spatial Toolbox!