SixDegreesTracker

SixDegreesTracker

6d.ai tracks environment features. It needs to find and confirm a ground position on the floor first to enable the feature tracking.
Tracking maps can be saved and restored. It is also possible to scan and colorize a mesh.

See 6d.ai documentation: https://dashboard.6d.ai

Extends

Members

active :boolean

Inherited From:

Is the tracker active or not.

Type:
  • boolean

groundConfirmed :boolean

Inherited From:

Is the ground position already confirmed.

Type:
  • boolean

name :string

Inherited From:

Name of the tracker.

Type:
  • string

options :SixDegreesOptions

Current tracking options.

Type:
  • SixDegreesOptions

scanning :boolean

Inherited From:

Mesh scan status

Type:
  • boolean

targets :Array.<TrackingTarget>

Inherited From:

The list of tracking targets.

Type:

tracking :boolean

Overrides:

Current target tracking status.

Type:
  • boolean

Methods

(async) _saveTrackingMap() → {boolean}

See:

Loads a previously saved tracking map. This requires a confirmed ground position beforehand.

Returns:

True if successful.

Type
boolean

(async) activate()

Inherited From:

Activate the tracker. Disables all other currently active trackers.

(async) confirmGroundPosition()

Inherited From:

Confirms ground position to start feature tracking.

(async) deactivate()

Inherited From:

Deactivate the tracker.

(async) getMeshList() → {Promise.<Array.<Mesh>>}

Inherited From:

Retrieves the list of stored meshes.

Returns:

resolved when done.

Type
Promise.<Array.<Mesh>>

isActive() → {boolean}

Inherited From:

Is the tracker currently active.

Returns:

True if active.

Type
boolean

off(eventName, eventHandler)

Inherited From:
Parameters:
Name Type Description
eventName string
eventHandler function

on(eventName, eventHandler)

Inherited From:
Parameters:
Name Type Description
eventName string
eventHandler function

once(eventName, eventHandler)

Inherited From:
Parameters:
Name Type Description
eventName string
eventHandler function

(async) reset()

Inherited From:

Reset the tracker. Shorthand function for Tracker#deactivate and Tracker#activate.

(async) resetMeshScan() → {Promise}

Inherited From:

Resets mesh scan. Previously scanned mesh is lost.

Returns:

resolved when done.

Type
Promise

(async) saveTrackingMap() → {string}

Saves the currently detected tracking map.

Returns:

The id of the saved tracking map or false if saving failed.

Type
string

setOptions(newOptions)

Set the tracker's (optional) options.

Parameters:
Name Type Description
newOptions SixDegreesOptions

(async) setTrackingTargets(newTargets)

Inherited From:

Update the tracking target config. This will override existing targets and remove already learned targets.

Parameters:
Name Type Description
newTargets Array.<TargetConfig>

(async) startMeshScan() → {Promise}

Inherited From:

Starts mesh scan.

Returns:

resolved when done.

Type
Promise

(async) stopMeshScan() → {Promise}

Inherited From:

Stops mesh scan.

Returns:

resolved when done.

Type
Promise

Type Definitions

SixDegreesOptions

Properties:
Name Type Attributes Description
autoConfirmGroundPosition boolean <nullable>

automatically confirm ground position when target is found.

Options how the tracker should behave.

Type:
  • Object

Events

trackingMapLoadProgress

Emits progress when loading a tracking map.

Parameters:
Name Type Description
progress number

in percent between 0 and 1.

trackingMapSaveProgress

Emits progress when saving a tracking map.

Parameters:
Name Type Description
progress number

in percent between 0 and 1.

trackingStatusChanged

Inherited From:

Fired when a tracking target is found or lost.

Parameters:
Name Type Description
info object
Properties
Name Type Description
target TrackingTarget
trackedTargets Array.<TrackingTarget>
untrackedTargets Array.<TrackingTarget>

trackingTargetNew

Inherited From:

Fired when an unregistered tracking target is found.

Parameters:
Name Type Description
target TrackingTarget

trackingTargetStatusChanged

Overrides:

Fired when a tracking target is found or lost.

Parameters:
Name Type Description
target TrackingTarget