Context menu API reference¶
JavaScript¶
Modules¶
Warning
Some of the values returned by the API are Knockout ko.observable
values.
It is encouraged to react to these changes by using a ko.pureComputed
(check
the corresponding section
for details).
Usage of subscribe
or ko.computed
to listen to changes
in observable values is heavily discouraged and can cause memory leaks and
loss of data. Subscriptions using these methods must always be properly
disposed (see Usage of subscribe and ko.computed with observable values).
DeskAPI¶
sound
Object: contains URLs for sound files, available sounds aresound.attention
sound.confirm
sound.exit
sound.finish
sound.navigate
sound.save
sound.set
sound.error
playSound
Function ( url: String ): takes an URL of a sound filerobotConfiguration
ko.observable( { estimatedForces: Array[Number], estimatedTorques: Array[Number], jointAngles: Array[Number], pose: Array[Number] } ): current robot configurationestimatedForces
: Estimated external wrench (force, torque) acting on stiffness frame, expressed relative to the stiffness frame [N, N, N, Nm, Nm, Nm]estimatedTorques
: External torque [Nm]jointAngles
: Measured joint position [rad]pose
: Measured end effector pose in base frame. Pose is represented as a 4x4 matrix in column-major format.
gripperState
ko.observable( { width: Number, maxWidth: Number } ): current gripper staterelativeGripperWidth
ko.pureComputed() { return Number }: gripper width from 0 (closed) to 1 (open)modbus
Object:configuration
: current modbus configuration valuesdata
: modbus data uploaded in JSON file
adjustPose
Function ({ joint_angles: Array[Number], pose: Array[Number]}, motionType: "cartesian" | "joint"): takes pose and an optional motionType "joint" (default: "cartesian"), then returns a promise that is either resolved with new adjusted pose or rejected. If the user saves Fine-adjustment pose dialog, the resolved value is the adjusted pose.
ElementAPI¶
path
ko.pureComputed({ id: String, indices: Array[Number] }): path to the elementchildren
ko.pureComputed(Array(Element)): direct children of the elementparameter
Function (expression: String) { return ko.observable }: takes an expression and returns an observable with the app's (scoped) parameterhasParentComponent
Function (name: String, stepID: String) { return Boolean }model
Object:id
Stringname
ko.pureComputed(String)color
ko.pureComputed(String)tags
ko.pureComputedArray(Array)image
ko.pureComputed(Object)contextMenu
ko.pureComputed(Array)components
ko.pureComputed(String)hiddenInLibrary
ko.pureComputed(Boolean)extraClientData
ko.pureComputed(Object)
Caution
The following properties are experimental and might have breaking changes in the future:
childAppIds
ko.pureComputed(Array(String)): returns a list of the IDs of child apps in a group
traverse
Function (callback: Function (Element)): takes a callback function that will be called for every descendant element (including current element itself)
StepAPI¶
id
Stringname
ko.observable(String)label
ko.observable(String)pilot
ko.observable(Object): the pilot configurationfocused
ko.observable(Boolean)available
ko.observable(Boolean)configured
ko.observable(Boolean)steps
ko.observableArray(): child stepsfocus
Function ( ): focus the stepdone
Function ( ): mark step as done and focus next stepparent
Object: points to the parent stepnext
Object: points to the next stepprev
Object: points to the previous stepupdate
Function ( Object ): update any of the step's observable properties by passing an Object with the names of the observables to be modified as keys
ParameterAPI¶
reset
Function ( ): reset parameter to the default valueisDirty
Function ( ) { return Boolean }: returns true, if parameter was modifiedaccessPath
Function ( ) { return Array(String) }: returns the access path of the parameterparameter
Function (String): returns a subtree of the parameter by passing an expression