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¶
soundObject: contains URLs for sound files, available sounds aresound.attentionsound.confirmsound.exitsound.finishsound.navigatesound.savesound.setsound.error
playSoundFunction ( url: String ): takes an URL of a sound filerobotConfigurationko.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.
gripperStateko.observable( { width: Number, maxWidth: Number } ): current gripper staterelativeGripperWidthko.pureComputed() { return Number }: gripper width from 0 (closed) to 1 (open)modbusObject:configuration: current modbus configuration valuesdata: modbus data uploaded in JSON file
adjustPoseFunction ({ 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¶
pathko.pureComputed({ id: String, indices: Array[Number] }): path to the elementchildrenko.pureComputed(Array(Element)): direct children of the elementparameterFunction (expression: String) { return ko.observable }: takes an expression and returns an observable with the app's (scoped) parameterhasParentComponentFunction (name: String, stepID: String) { return Boolean }modelObject:idStringnameko.pureComputed(String)colorko.pureComputed(String)tagsko.pureComputedArray(Array)imageko.pureComputed(Object)contextMenuko.pureComputed(Array)componentsko.pureComputed(String)hiddenInLibraryko.pureComputed(Boolean)extraClientDatako.pureComputed(Object)
Caution
The following properties are experimental and might have breaking changes in the future:
childAppIdsko.pureComputed(Array(String)): returns a list of the IDs of child apps in a group
traverseFunction (callback: Function (Element)): takes a callback function that will be called for every descendant element (including current element itself)
StepAPI¶
idStringnameko.observable(String)labelko.observable(String)pilotko.observable(Object): the pilot configurationfocusedko.observable(Boolean)availableko.observable(Boolean)configuredko.observable(Boolean)stepsko.observableArray(): child stepsfocusFunction ( ): focus the stepdoneFunction ( ): mark step as done and focus next stepparentObject: points to the parent stepnextObject: points to the next stepprevObject: points to the previous stepupdateFunction ( 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¶
resetFunction ( ): reset parameter to the default valueisDirtyFunction ( ) { return Boolean }: returns true, if parameter was modifiedaccessPathFunction ( ) { return Array(String) }: returns the access path of the parameterparameterFunction (String): returns a subtree of the parameter by passing an expression