urdf-loader 0.10.2 → 0.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/umd/URDFLoader.js CHANGED
@@ -4,6 +4,28 @@
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.URDFLoader = factory(global.THREE, global.THREE, global.THREE));
5
5
  }(this, (function (THREE, STLLoader_js, ColladaLoader_js) { 'use strict';
6
6
 
7
+ function _interopNamespace(e) {
8
+ if (e && e.__esModule) return e;
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () {
17
+ return e[k];
18
+ }
19
+ });
20
+ }
21
+ });
22
+ }
23
+ n['default'] = e;
24
+ return Object.freeze(n);
25
+ }
26
+
27
+ var THREE__namespace = /*#__PURE__*/_interopNamespace(THREE);
28
+
7
29
  class URDFBase extends THREE.Object3D {
8
30
 
9
31
  constructor(...args) {
@@ -425,8 +447,8 @@
425
447
 
426
448
  */
427
449
 
428
- const tempQuaternion = new THREE.Quaternion();
429
- const tempEuler = new THREE.Euler();
450
+ const tempQuaternion = new THREE__namespace.Quaternion();
451
+ const tempEuler = new THREE__namespace.Euler();
430
452
 
431
453
  // take a vector "x y z" and process it into
432
454
  // an array [x, y, z]
@@ -457,7 +479,7 @@
457
479
 
458
480
  constructor(manager) {
459
481
 
460
- this.manager = manager || THREE.DefaultLoadingManager;
482
+ this.manager = manager || THREE__namespace.DefaultLoadingManager;
461
483
  this.loadMeshCb = this.defaultMeshLoader.bind(this);
462
484
  this.parseVisual = true;
463
485
  this.parseCollision = false;
@@ -485,7 +507,7 @@
485
507
  // Check if a full URI is specified before
486
508
  // prepending the package info
487
509
  const manager = this.manager;
488
- const workingPath = THREE.LoaderUtils.extractUrlBase(urdf);
510
+ const workingPath = THREE__namespace.LoaderUtils.extractUrlBase(urdf);
489
511
  const urdfPath = this.manager.resolveURL(urdf);
490
512
 
491
513
  manager.itemStart(urdfPath);
@@ -786,7 +808,7 @@
786
808
  if (axisNode) {
787
809
 
788
810
  const axisXYZ = axisNode.getAttribute('xyz').split(/\s+/g).map(num => parseFloat(num));
789
- obj.axis = new THREE.Vector3(axisXYZ[0], axisXYZ[1], axisXYZ[2]);
811
+ obj.axis = new THREE__namespace.Vector3(axisXYZ[0], axisXYZ[1], axisXYZ[2]);
790
812
  obj.axis.normalize();
791
813
 
792
814
  }
@@ -858,7 +880,7 @@
858
880
  function processMaterial(node) {
859
881
 
860
882
  const matNodes = [ ...node.children ];
861
- const material = new THREE.MeshPhongMaterial();
883
+ const material = new THREE__namespace.MeshPhongMaterial();
862
884
 
863
885
  material.name = node.getAttribute('name') || '';
864
886
  matNodes.forEach(n => {
@@ -884,7 +906,7 @@
884
906
  const filename = n.getAttribute('filename');
885
907
  if (filename) {
886
908
 
887
- const loader = new THREE.TextureLoader(manager);
909
+ const loader = new THREE__namespace.TextureLoader(manager);
888
910
  const filePath = resolvePath(filename);
889
911
  material.map = loader.load(filePath);
890
912
 
@@ -921,7 +943,7 @@
921
943
 
922
944
  } else {
923
945
 
924
- material = new THREE.MeshPhongMaterial();
946
+ material = new THREE__namespace.MeshPhongMaterial();
925
947
 
926
948
  }
927
949
 
@@ -958,7 +980,7 @@
958
980
 
959
981
  } else if (obj) {
960
982
 
961
- if (obj instanceof THREE.Mesh) {
983
+ if (obj instanceof THREE__namespace.Mesh) {
962
984
 
963
985
  obj.material = material;
964
986
 
@@ -979,8 +1001,8 @@
979
1001
 
980
1002
  } else if (geoType === 'box') {
981
1003
 
982
- const primitiveModel = new THREE.Mesh();
983
- primitiveModel.geometry = new THREE.BoxBufferGeometry(1, 1, 1);
1004
+ const primitiveModel = new THREE__namespace.Mesh();
1005
+ primitiveModel.geometry = new THREE__namespace.BoxBufferGeometry(1, 1, 1);
984
1006
  primitiveModel.material = material;
985
1007
 
986
1008
  const size = processTuple(n.children[0].getAttribute('size'));
@@ -990,8 +1012,8 @@
990
1012
 
991
1013
  } else if (geoType === 'sphere') {
992
1014
 
993
- const primitiveModel = new THREE.Mesh();
994
- primitiveModel.geometry = new THREE.SphereBufferGeometry(1, 30, 30);
1015
+ const primitiveModel = new THREE__namespace.Mesh();
1016
+ primitiveModel.geometry = new THREE__namespace.SphereBufferGeometry(1, 30, 30);
995
1017
  primitiveModel.material = material;
996
1018
 
997
1019
  const radius = parseFloat(n.children[0].getAttribute('radius')) || 0;
@@ -1001,8 +1023,8 @@
1001
1023
 
1002
1024
  } else if (geoType === 'cylinder') {
1003
1025
 
1004
- const primitiveModel = new THREE.Mesh();
1005
- primitiveModel.geometry = new THREE.CylinderBufferGeometry(1, 1, 1, 30);
1026
+ const primitiveModel = new THREE__namespace.Mesh();
1027
+ primitiveModel.geometry = new THREE__namespace.CylinderBufferGeometry(1, 1, 1, 30);
1006
1028
  primitiveModel.material = material;
1007
1029
 
1008
1030
  const radius = parseFloat(n.children[0].getAttribute('radius')) || 0;
@@ -1042,7 +1064,7 @@
1042
1064
 
1043
1065
  const loader = new STLLoader_js.STLLoader(manager);
1044
1066
  loader.load(path, geom => {
1045
- const mesh = new THREE.Mesh(geom, new THREE.MeshPhongMaterial());
1067
+ const mesh = new THREE__namespace.Mesh(geom, new THREE__namespace.MeshPhongMaterial());
1046
1068
  done(mesh);
1047
1069
  });
1048
1070
 
@@ -1 +1 @@
1
- {"version":3,"file":"URDFLoader.js","sources":["../src/URDFClasses.js","../src/URDFLoader.js"],"sourcesContent":["import { Object3D, Vector3 } from 'three';\r\n\r\nclass URDFBase extends Object3D {\r\n\r\n constructor(...args) {\r\n\r\n super(...args);\r\n this.urdfNode = null;\r\n this.urdfName = '';\r\n\r\n }\r\n\r\n copy(source, recursive) {\r\n\r\n super.copy(source, recursive);\r\n\r\n this.urdfNode = source.urdfNode;\r\n this.urdfName = source.urdfName;\r\n\r\n return this;\r\n\r\n }\r\n\r\n}\r\n\r\nclass URDFCollider extends URDFBase {\r\n\r\n constructor(...args) {\r\n\r\n super(...args);\r\n this.isURDFCollider = true;\r\n this.type = 'URDFCollider';\r\n\r\n }\r\n\r\n}\r\n\r\nclass URDFVisual extends URDFBase {\r\n\r\n constructor(...args) {\r\n\r\n super(...args);\r\n this.isURDFVisual = true;\r\n this.type = 'URDFVisual';\r\n\r\n }\r\n\r\n}\r\n\r\nclass URDFLink extends URDFBase {\r\n\r\n constructor(...args) {\r\n\r\n super(...args);\r\n this.isURDFLink = true;\r\n this.type = 'URDFLink';\r\n\r\n }\r\n\r\n}\r\n\r\nclass URDFJoint extends URDFBase {\r\n\r\n get jointType() {\r\n\r\n return this._jointType;\r\n\r\n }\r\n\r\n set jointType(v) {\r\n\r\n if (this.jointType === v) return;\r\n this._jointType = v;\r\n this.matrixWorldNeedsUpdate = true;\r\n switch (v) {\r\n\r\n case 'fixed':\r\n this.jointValue = [];\r\n break;\r\n\r\n case 'continuous':\r\n case 'revolute':\r\n case 'prismatic':\r\n this.jointValue = new Array(1).fill(0);\r\n break;\r\n\r\n case 'planar':\r\n this.jointValue = new Array(2).fill(0);\r\n break;\r\n\r\n case 'floating':\r\n this.jointValue = new Array(6).fill(0);\r\n break;\r\n\r\n }\r\n\r\n }\r\n\r\n get angle() {\r\n\r\n return this.jointValue[0];\r\n\r\n }\r\n\r\n constructor(...args) {\r\n\r\n super(...args);\r\n\r\n this.isURDFJoint = true;\r\n this.type = 'URDFJoint';\r\n\r\n this.jointValue = null;\r\n this.jointType = 'fixed';\r\n this.axis = new Vector3(1, 0, 0);\r\n this.limit = { lower: 0, upper: 0 };\r\n this.ignoreLimits = false;\r\n\r\n this.origPosition = null;\r\n this.origQuaternion = null;\r\n\r\n this.mimicJoints = [];\r\n\r\n }\r\n\r\n /* Overrides */\r\n copy(source, recursive) {\r\n\r\n super.copy(source, recursive);\r\n\r\n this.jointType = source.jointType;\r\n this.axis = source.axis.clone();\r\n this.limit.lower = source.limit.lower;\r\n this.limit.upper = source.limit.upper;\r\n this.ignoreLimits = false;\r\n\r\n this.jointValue = [...source.jointValue];\r\n\r\n this.origPosition = source.origPosition ? source.origPosition.clone() : null;\r\n this.origQuaternion = source.origQuaternion ? source.origQuaternion.clone() : null;\r\n\r\n this.mimicJoints = [...source.mimicJoints];\r\n\r\n return this;\r\n\r\n }\r\n\r\n /* Public Functions */\r\n setJointValue(...values) {\r\n\r\n values = values.map(v => parseFloat(v));\r\n\r\n if (!this.origPosition || !this.origQuaternion) {\r\n\r\n this.origPosition = this.position.clone();\r\n this.origQuaternion = this.quaternion.clone();\r\n\r\n }\r\n\r\n let didUpdate = false;\r\n\r\n this.mimicJoints.forEach(joint => {\r\n\r\n didUpdate = joint.updateFromMimickedJoint(...values) || didUpdate;\r\n\r\n });\r\n\r\n switch (this.jointType) {\r\n\r\n case 'fixed': {\r\n\r\n return didUpdate;\r\n\r\n }\r\n case 'continuous':\r\n case 'revolute': {\r\n\r\n let angle = values[0];\r\n if (angle == null) return didUpdate;\r\n if (angle === this.jointValue[0]) return didUpdate;\r\n\r\n if (!this.ignoreLimits && this.jointType === 'revolute') {\r\n\r\n angle = Math.min(this.limit.upper, angle);\r\n angle = Math.max(this.limit.lower, angle);\r\n\r\n }\r\n\r\n this.quaternion\r\n .setFromAxisAngle(this.axis, angle)\r\n .premultiply(this.origQuaternion);\r\n\r\n if (this.jointValue[0] !== angle) {\r\n\r\n this.jointValue[0] = angle;\r\n this.matrixWorldNeedsUpdate = true;\r\n return true;\r\n\r\n } else {\r\n\r\n return didUpdate;\r\n\r\n }\r\n\r\n }\r\n\r\n case 'prismatic': {\r\n\r\n let pos = values[0];\r\n if (pos == null) return didUpdate;\r\n if (pos === this.jointValue[0]) return didUpdate;\r\n\r\n if (!this.ignoreLimits) {\r\n\r\n pos = Math.min(this.limit.upper, pos);\r\n pos = Math.max(this.limit.lower, pos);\r\n\r\n }\r\n\r\n this.position.copy(this.origPosition);\r\n this.position.addScaledVector(this.axis, pos);\r\n\r\n if (this.jointValue[0] !== pos) {\r\n\r\n this.jointValue[0] = pos;\r\n this.matrixWorldNeedsUpdate = true;\r\n return true;\r\n\r\n } else {\r\n\r\n return didUpdate;\r\n\r\n }\r\n\r\n }\r\n\r\n case 'floating':\r\n case 'planar':\r\n // TODO: Support these joint types\r\n console.warn(`'${ this.jointType }' joint not yet supported`);\r\n\r\n }\r\n\r\n return didUpdate;\r\n\r\n }\r\n\r\n}\r\n\r\nclass URDFMimicJoint extends URDFJoint {\r\n\r\n constructor(...args) {\r\n\r\n super(...args);\r\n this.type = 'URDFMimicJoint';\r\n this.mimicJoint = null;\r\n this.offset = 0;\r\n this.multiplier = 1;\r\n\r\n }\r\n\r\n updateFromMimickedJoint(...values) {\r\n\r\n const modifiedValues = values.map(x => x * this.multiplier + this.offset);\r\n return super.setJointValue(...modifiedValues);\r\n\r\n }\r\n\r\n /* Overrides */\r\n setJointValue(...values) {\r\n\r\n console.warn(`URDFMimicJoint: Setting the joint value of mimic joint \"${ this.urdfName }\" will cause it to be out of sync.`);\r\n return super.setJointValue(...values);\r\n }\r\n\r\n /* Overrides */\r\n copy(source, recursive) {\r\n\r\n super.copy(source, recursive);\r\n\r\n this.mimicJoint = source.mimicJoint;\r\n this.offset = source.offset;\r\n this.multiplier = source.multiplier;\r\n\r\n return this;\r\n\r\n }\r\n\r\n}\r\n\r\nclass URDFRobot extends URDFLink {\r\n\r\n constructor(...args) {\r\n\r\n super(...args);\r\n this.isURDFRobot = true;\r\n this.urdfNode = null;\r\n\r\n this.urdfRobotNode = null;\r\n this.robotName = null;\r\n\r\n this.links = null;\r\n this.joints = null;\r\n this.colliders = null;\r\n this.visual = null;\r\n this.frames = null;\r\n\r\n }\r\n\r\n copy(source, recursive) {\r\n\r\n super.copy(source, recursive);\r\n\r\n this.urdfRobotNode = source.urdfRobotNode;\r\n this.robotName = source.robotName;\r\n\r\n this.links = {};\r\n this.joints = {};\r\n this.colliders = {};\r\n this.visual = {};\r\n\r\n this.traverse(c => {\r\n\r\n if (c.isURDFJoint && c.urdfName in source.joints) {\r\n\r\n this.joints[c.urdfName] = c;\r\n\r\n }\r\n\r\n if (c.isURDFLink && c.urdfName in source.links) {\r\n\r\n this.links[c.urdfName] = c;\r\n\r\n }\r\n\r\n if (c.isURDFCollider && c.urdfName in source.colliders) {\r\n\r\n this.colliders[c.urdfName] = c;\r\n\r\n }\r\n\r\n if (c.isURDFVisual && c.urdfName in source.visual) {\r\n\r\n this.visual[c.urdfName] = c;\r\n\r\n }\r\n\r\n });\r\n\r\n this.frames = {\r\n ...this.colliders,\r\n ...this.visual,\r\n ...this.links,\r\n ...this.joints,\r\n };\r\n\r\n return this;\r\n\r\n }\r\n\r\n getFrame(name) {\r\n\r\n return this.frames[name];\r\n\r\n }\r\n\r\n setJointValue(jointName, ...angle) {\r\n\r\n const joint = this.joints[jointName];\r\n if (joint) {\r\n\r\n return joint.setJointValue(...angle);\r\n\r\n }\r\n\r\n return false;\r\n }\r\n\r\n setJointValues(values) {\r\n\r\n let didChange = false;\r\n for (const name in values) {\r\n\r\n const value = values[name];\r\n if (Array.isArray(value)) {\r\n\r\n didChange = this.setJointValue(name, ...value) || didChange;\r\n\r\n } else {\r\n\r\n didChange = this.setJointValue(name, value) || didChange;\r\n\r\n }\r\n\r\n }\r\n\r\n return didChange;\r\n\r\n }\r\n\r\n}\r\n\r\nexport { URDFRobot, URDFLink, URDFJoint, URDFMimicJoint, URDFVisual, URDFCollider };\r\n","import * as THREE from 'three';\r\nimport { STLLoader } from 'three/examples/jsm/loaders/STLLoader.js';\r\nimport { ColladaLoader } from 'three/examples/jsm/loaders/ColladaLoader.js';\r\nimport { URDFRobot, URDFJoint, URDFLink, URDFCollider, URDFVisual, URDFMimicJoint } from './URDFClasses.js';\r\n\r\n/*\r\nReference coordinate frames for THREE.js and ROS.\r\nBoth coordinate systems are right handed so the URDF is instantiated without\r\nframe transforms. The resulting model can be rotated to rectify the proper up,\r\nright, and forward directions\r\n\r\nTHREE.js\r\n Y\r\n |\r\n |\r\n .-----X\r\n /\r\nZ\r\n\r\nROS URDf\r\n Z\r\n | X\r\n | /\r\n Y-----.\r\n\r\n*/\r\n\r\nconst tempQuaternion = new THREE.Quaternion();\r\nconst tempEuler = new THREE.Euler();\r\n\r\n// take a vector \"x y z\" and process it into\r\n// an array [x, y, z]\r\nfunction processTuple(val) {\r\n\r\n if (!val) return [0, 0, 0];\r\n return val.trim().split(/\\s+/g).map(num => parseFloat(num));\r\n\r\n}\r\n\r\n// applies a rotation a threejs object in URDF order\r\nfunction applyRotation(obj, rpy, additive = false) {\r\n\r\n // if additive is true the rotation is applied in\r\n // addition to the existing rotation\r\n if (!additive) obj.rotation.set(0, 0, 0);\r\n\r\n tempEuler.set(rpy[0], rpy[1], rpy[2], 'ZYX');\r\n tempQuaternion.setFromEuler(tempEuler);\r\n tempQuaternion.multiply(obj.quaternion);\r\n obj.quaternion.copy(tempQuaternion);\r\n\r\n}\r\n\r\n/* URDFLoader Class */\r\n// Loads and reads a URDF file into a THREEjs Object3D format\r\nexport default\r\nclass URDFLoader {\r\n\r\n constructor(manager) {\r\n\r\n this.manager = manager || THREE.DefaultLoadingManager;\r\n this.loadMeshCb = this.defaultMeshLoader.bind(this);\r\n this.parseVisual = true;\r\n this.parseCollision = false;\r\n this.packages = '';\r\n this.workingPath = '';\r\n this.fetchOptions = {};\r\n\r\n }\r\n\r\n /* Public API */\r\n loadAsync(urdf) {\r\n\r\n return new Promise((resolve, reject) => {\r\n\r\n this.load(urdf, resolve, null, reject);\r\n\r\n });\r\n\r\n }\r\n\r\n // urdf: The path to the URDF within the package OR absolute\r\n // onComplete: Callback that is passed the model once loaded\r\n load(urdf, onComplete, onProgress, onError) {\r\n\r\n // Check if a full URI is specified before\r\n // prepending the package info\r\n const manager = this.manager;\r\n const workingPath = THREE.LoaderUtils.extractUrlBase(urdf);\r\n const urdfPath = this.manager.resolveURL(urdf);\r\n\r\n manager.itemStart(urdfPath);\r\n\r\n fetch(urdfPath, this.fetchOptions)\r\n .then(res => {\r\n\r\n if (res.ok) {\r\n\r\n if (onProgress) {\r\n\r\n onProgress(null);\r\n\r\n }\r\n return res.text();\r\n\r\n } else {\r\n\r\n throw new Error(`URDFLoader: Failed to load url '${ urdfPath }' with error code ${ res.status } : ${ res.statusText }.`);\r\n\r\n }\r\n\r\n })\r\n .then(data => {\r\n\r\n if (this.workingPath === '') {\r\n\r\n this.workingPath = workingPath;\r\n\r\n }\r\n\r\n const model = this.parse(data);\r\n onComplete(model);\r\n manager.itemEnd(urdfPath);\r\n\r\n })\r\n .catch(e => {\r\n\r\n if (onError) {\r\n\r\n onError(e);\r\n\r\n } else {\r\n\r\n console.error('URDFLoader: Error loading file.', e);\r\n\r\n }\r\n manager.itemError(urdfPath);\r\n manager.itemEnd(urdfPath);\r\n\r\n });\r\n\r\n }\r\n\r\n parse(content) {\r\n\r\n const packages = this.packages;\r\n const loadMeshCb = this.loadMeshCb;\r\n const parseVisual = this.parseVisual;\r\n const parseCollision = this.parseCollision;\r\n const workingPath = this.workingPath;\r\n const manager = this.manager;\r\n const linkMap = {};\r\n const jointMap = {};\r\n const materialMap = {};\r\n\r\n // Resolves the path of mesh files\r\n function resolvePath(path) {\r\n\r\n if (!/^package:\\/\\//.test(path)) {\r\n\r\n return workingPath ? workingPath + path : path;\r\n\r\n }\r\n\r\n // Remove \"package://\" keyword and split meshPath at the first slash\r\n const [targetPkg, relPath] = path.replace(/^package:\\/\\//, '').split(/\\/(.+)/);\r\n\r\n if (typeof packages === 'string') {\r\n\r\n // \"pkg\" is one single package\r\n if (packages.endsWith(targetPkg)) {\r\n\r\n // \"pkg\" is the target package\r\n return packages + '/' + relPath;\r\n\r\n } else {\r\n\r\n // Assume \"pkg\" is the target package's parent directory\r\n return packages + '/' + targetPkg + '/' + relPath;\r\n\r\n }\r\n\r\n } else if (packages instanceof Function) {\r\n\r\n return packages(targetPkg) + '/' + relPath;\r\n\r\n } else if (typeof packages === 'object') {\r\n\r\n // \"pkg\" is a map of packages\r\n if (targetPkg in packages) {\r\n\r\n return packages[targetPkg] + '/' + relPath;\r\n\r\n } else {\r\n\r\n console.error(`URDFLoader : ${ targetPkg } not found in provided package list.`);\r\n return null;\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n // Process the URDF text format\r\n function processUrdf(data) {\r\n\r\n let children;\r\n if (data instanceof Document) {\r\n\r\n children = [ ...data.children ];\r\n\r\n } else if (data instanceof Element) {\r\n\r\n children = [ data ];\r\n\r\n } else {\r\n\r\n const parser = new DOMParser();\r\n const urdf = parser.parseFromString(data, 'text/xml');\r\n children = [ ...urdf.children ];\r\n\r\n }\r\n\r\n const robotNode = children.filter(c => c.nodeName === 'robot').pop();\r\n return processRobot(robotNode);\r\n\r\n }\r\n\r\n // Process the <robot> node\r\n function processRobot(robot) {\r\n\r\n const robotNodes = [ ...robot.children ];\r\n const links = robotNodes.filter(c => c.nodeName.toLowerCase() === 'link');\r\n const joints = robotNodes.filter(c => c.nodeName.toLowerCase() === 'joint');\r\n const materials = robotNodes.filter(c => c.nodeName.toLowerCase() === 'material');\r\n const obj = new URDFRobot();\r\n\r\n obj.robotName = robot.getAttribute('name');\r\n obj.urdfRobotNode = robot;\r\n\r\n // Create the <material> map\r\n materials.forEach(m => {\r\n\r\n const name = m.getAttribute('name');\r\n materialMap[name] = processMaterial(m);\r\n\r\n });\r\n\r\n // Create the <link> map\r\n const visualMap = {};\r\n const colliderMap = {};\r\n links.forEach(l => {\r\n\r\n const name = l.getAttribute('name');\r\n const isRoot = robot.querySelector(`child[link=\"${ name }\"]`) === null;\r\n linkMap[name] = processLink(l, visualMap, colliderMap, isRoot ? obj : null);\r\n\r\n });\r\n\r\n // Create the <joint> map\r\n joints.forEach(j => {\r\n\r\n const name = j.getAttribute('name');\r\n jointMap[name] = processJoint(j);\r\n\r\n });\r\n\r\n obj.joints = jointMap;\r\n obj.links = linkMap;\r\n obj.colliders = colliderMap;\r\n obj.visual = visualMap;\r\n\r\n // Link up mimic joints\r\n const jointList = Object.values(jointMap);\r\n jointList.forEach(j => {\r\n\r\n if (j instanceof URDFMimicJoint) {\r\n\r\n jointMap[j.mimicJoint].mimicJoints.push(j);\r\n\r\n }\r\n\r\n });\r\n\r\n // Detect infinite loops of mimic joints\r\n jointList.forEach(j => {\r\n\r\n const uniqueJoints = new Set();\r\n const iterFunction = joint => {\r\n\r\n if (uniqueJoints.has(joint)) {\r\n\r\n throw new Error('URDFLoader: Detected an infinite loop of mimic joints.');\r\n\r\n }\r\n\r\n uniqueJoints.add(joint);\r\n joint.mimicJoints.forEach(j => {\r\n\r\n iterFunction(j);\r\n\r\n });\r\n\r\n };\r\n\r\n iterFunction(j);\r\n });\r\n\r\n obj.frames = {\r\n ...colliderMap,\r\n ...visualMap,\r\n ...linkMap,\r\n ...jointMap,\r\n };\r\n\r\n return obj;\r\n\r\n }\r\n\r\n // Process joint nodes and parent them\r\n function processJoint(joint) {\r\n\r\n const children = [ ...joint.children ];\r\n const jointType = joint.getAttribute('type');\r\n\r\n let obj;\r\n\r\n const mimicTag = children.find(n => n.nodeName.toLowerCase() === 'mimic');\r\n if (mimicTag) {\r\n\r\n obj = new URDFMimicJoint();\r\n obj.mimicJoint = mimicTag.getAttribute('joint');\r\n obj.multiplier = parseFloat(mimicTag.getAttribute('multiplier') || 1.0);\r\n obj.offset = parseFloat(mimicTag.getAttribute('offset') || 0.0);\r\n\r\n } else {\r\n\r\n obj = new URDFJoint();\r\n\r\n }\r\n\r\n obj.urdfNode = joint;\r\n obj.name = joint.getAttribute('name');\r\n obj.urdfName = obj.name;\r\n obj.jointType = jointType;\r\n\r\n let parent = null;\r\n let child = null;\r\n let xyz = [0, 0, 0];\r\n let rpy = [0, 0, 0];\r\n\r\n // Extract the attributes\r\n children.forEach(n => {\r\n\r\n const type = n.nodeName.toLowerCase();\r\n if (type === 'origin') {\r\n\r\n xyz = processTuple(n.getAttribute('xyz'));\r\n rpy = processTuple(n.getAttribute('rpy'));\r\n\r\n } else if (type === 'child') {\r\n\r\n child = linkMap[n.getAttribute('link')];\r\n\r\n } else if (type === 'parent') {\r\n\r\n parent = linkMap[n.getAttribute('link')];\r\n\r\n } else if (type === 'limit') {\r\n\r\n obj.limit.lower = parseFloat(n.getAttribute('lower') || obj.limit.lower);\r\n obj.limit.upper = parseFloat(n.getAttribute('upper') || obj.limit.upper);\r\n\r\n }\r\n });\r\n\r\n // Join the links\r\n parent.add(obj);\r\n obj.add(child);\r\n applyRotation(obj, rpy);\r\n obj.position.set(xyz[0], xyz[1], xyz[2]);\r\n\r\n // Set up the rotate function\r\n const axisNode = children.filter(n => n.nodeName.toLowerCase() === 'axis')[0];\r\n\r\n if (axisNode) {\r\n\r\n const axisXYZ = axisNode.getAttribute('xyz').split(/\\s+/g).map(num => parseFloat(num));\r\n obj.axis = new THREE.Vector3(axisXYZ[0], axisXYZ[1], axisXYZ[2]);\r\n obj.axis.normalize();\r\n\r\n }\r\n\r\n return obj;\r\n\r\n }\r\n\r\n // Process the <link> nodes\r\n function processLink(link, visualMap, colliderMap, target = null) {\r\n\r\n if (target === null) {\r\n\r\n target = new URDFLink();\r\n\r\n }\r\n\r\n const children = [ ...link.children ];\r\n target.name = link.getAttribute('name');\r\n target.urdfName = target.name;\r\n target.urdfNode = link;\r\n\r\n if (parseVisual) {\r\n\r\n const visualNodes = children.filter(n => n.nodeName.toLowerCase() === 'visual');\r\n visualNodes.forEach(vn => {\r\n\r\n const v = processLinkElement(vn, materialMap);\r\n target.add(v);\r\n\r\n if (vn.hasAttribute('name')) {\r\n\r\n const name = vn.getAttribute('name');\r\n v.name = name;\r\n v.urdfName = name;\r\n visualMap[name] = v;\r\n\r\n }\r\n\r\n });\r\n\r\n }\r\n\r\n if (parseCollision) {\r\n\r\n const collisionNodes = children.filter(n => n.nodeName.toLowerCase() === 'collision');\r\n collisionNodes.forEach(cn => {\r\n\r\n const c = processLinkElement(cn);\r\n target.add(c);\r\n\r\n if (cn.hasAttribute('name')) {\r\n\r\n const name = cn.getAttribute('name');\r\n c.name = name;\r\n c.urdfName = name;\r\n colliderMap[name] = c;\r\n\r\n }\r\n\r\n });\r\n\r\n }\r\n\r\n return target;\r\n\r\n }\r\n\r\n function processMaterial(node) {\r\n\r\n const matNodes = [ ...node.children ];\r\n const material = new THREE.MeshPhongMaterial();\r\n\r\n material.name = node.getAttribute('name') || '';\r\n matNodes.forEach(n => {\r\n\r\n const type = n.nodeName.toLowerCase();\r\n if (type === 'color') {\r\n\r\n const rgba =\r\n n\r\n .getAttribute('rgba')\r\n .split(/\\s/g)\r\n .map(v => parseFloat(v));\r\n\r\n material.color.setRGB(rgba[0], rgba[1], rgba[2]);\r\n material.opacity = rgba[3];\r\n material.transparent = rgba[3] < 1;\r\n material.depthWrite = !material.transparent;\r\n\r\n } else if (type === 'texture') {\r\n\r\n // The URDF spec does not require that the <texture/> tag include\r\n // a filename attribute so skip loading the texture if not provided.\r\n const filename = n.getAttribute('filename');\r\n if (filename) {\r\n\r\n const loader = new THREE.TextureLoader(manager);\r\n const filePath = resolvePath(filename);\r\n material.map = loader.load(filePath);\r\n\r\n }\r\n\r\n }\r\n });\r\n\r\n return material;\r\n\r\n }\r\n\r\n // Process the visual and collision nodes into meshes\r\n function processLinkElement(vn, materialMap = {}) {\r\n\r\n const isCollisionNode = vn.nodeName.toLowerCase() === 'collision';\r\n const children = [ ...vn.children ];\r\n let material = null;\r\n\r\n // get the material first\r\n const materialNode = children.filter(n => n.nodeName.toLowerCase() === 'material')[0];\r\n if (materialNode) {\r\n\r\n const name = materialNode.getAttribute('name');\r\n if (name && name in materialMap) {\r\n\r\n material = materialMap[name];\r\n\r\n } else {\r\n\r\n material = processMaterial(materialNode);\r\n\r\n }\r\n\r\n } else {\r\n\r\n material = new THREE.MeshPhongMaterial();\r\n\r\n }\r\n\r\n const group = isCollisionNode ? new URDFCollider() : new URDFVisual();\r\n group.urdfNode = vn;\r\n\r\n children.forEach(n => {\r\n\r\n const type = n.nodeName.toLowerCase();\r\n if (type === 'geometry') {\r\n\r\n const geoType = n.children[0].nodeName.toLowerCase();\r\n if (geoType === 'mesh') {\r\n\r\n const filename = n.children[0].getAttribute('filename');\r\n const filePath = resolvePath(filename);\r\n\r\n // file path is null if a package directory is not provided.\r\n if (filePath !== null) {\r\n\r\n const scaleAttr = n.children[0].getAttribute('scale');\r\n if (scaleAttr) {\r\n\r\n const scale = processTuple(scaleAttr);\r\n group.scale.set(scale[0], scale[1], scale[2]);\r\n\r\n }\r\n\r\n loadMeshCb(filePath, manager, (obj, err) => {\r\n\r\n if (err) {\r\n\r\n console.error('URDFLoader: Error loading mesh.', err);\r\n\r\n } else if (obj) {\r\n\r\n if (obj instanceof THREE.Mesh) {\r\n\r\n obj.material = material;\r\n\r\n }\r\n\r\n // We don't expect non identity rotations or positions. In the case of\r\n // COLLADA files the model might come in with a custom scale for unit\r\n // conversion.\r\n obj.position.set(0, 0, 0);\r\n obj.quaternion.identity();\r\n group.add(obj);\r\n\r\n }\r\n\r\n });\r\n\r\n }\r\n\r\n } else if (geoType === 'box') {\r\n\r\n const primitiveModel = new THREE.Mesh();\r\n primitiveModel.geometry = new THREE.BoxBufferGeometry(1, 1, 1);\r\n primitiveModel.material = material;\r\n\r\n const size = processTuple(n.children[0].getAttribute('size'));\r\n primitiveModel.scale.set(size[0], size[1], size[2]);\r\n\r\n group.add(primitiveModel);\r\n\r\n } else if (geoType === 'sphere') {\r\n\r\n const primitiveModel = new THREE.Mesh();\r\n primitiveModel.geometry = new THREE.SphereBufferGeometry(1, 30, 30);\r\n primitiveModel.material = material;\r\n\r\n const radius = parseFloat(n.children[0].getAttribute('radius')) || 0;\r\n primitiveModel.scale.set(radius, radius, radius);\r\n\r\n group.add(primitiveModel);\r\n\r\n } else if (geoType === 'cylinder') {\r\n\r\n const primitiveModel = new THREE.Mesh();\r\n primitiveModel.geometry = new THREE.CylinderBufferGeometry(1, 1, 1, 30);\r\n primitiveModel.material = material;\r\n\r\n const radius = parseFloat(n.children[0].getAttribute('radius')) || 0;\r\n const length = parseFloat(n.children[0].getAttribute('length')) || 0;\r\n primitiveModel.scale.set(radius, length, radius);\r\n primitiveModel.rotation.set(Math.PI / 2, 0, 0);\r\n\r\n group.add(primitiveModel);\r\n\r\n }\r\n\r\n } else if (type === 'origin') {\r\n\r\n const xyz = processTuple(n.getAttribute('xyz'));\r\n const rpy = processTuple(n.getAttribute('rpy'));\r\n\r\n group.position.set(xyz[0], xyz[1], xyz[2]);\r\n group.rotation.set(0, 0, 0);\r\n applyRotation(group, rpy);\r\n\r\n }\r\n\r\n });\r\n\r\n return group;\r\n\r\n }\r\n\r\n return processUrdf(content);\r\n\r\n }\r\n\r\n // Default mesh loading function\r\n defaultMeshLoader(path, manager, done) {\r\n\r\n if (/\\.stl$/i.test(path)) {\r\n\r\n const loader = new STLLoader(manager);\r\n loader.load(path, geom => {\r\n const mesh = new THREE.Mesh(geom, new THREE.MeshPhongMaterial());\r\n done(mesh);\r\n });\r\n\r\n } else if (/\\.dae$/i.test(path)) {\r\n\r\n const loader = new ColladaLoader(manager);\r\n loader.load(path, dae => done(dae.scene));\r\n\r\n } else {\r\n\r\n console.warn(`URDFLoader: Could not load model at ${ path }.\\nNo loader available`);\r\n\r\n }\r\n\r\n }\r\n\r\n};\r\n"],"names":["Object3D","Vector3","THREE.Quaternion","THREE.Euler","THREE.DefaultLoadingManager","THREE.LoaderUtils","THREE.Vector3","THREE.MeshPhongMaterial","THREE.TextureLoader","THREE.Mesh","THREE.BoxBufferGeometry","THREE.SphereBufferGeometry","THREE.CylinderBufferGeometry","STLLoader","ColladaLoader"],"mappings":";;;;;;IAEA,MAAM,QAAQ,SAASA,cAAQ,CAAC;AAChC;IACA,IAAI,WAAW,CAAC,GAAG,IAAI,EAAE;AACzB;IACA,QAAQ,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;IACvB,QAAQ,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IAC7B,QAAQ,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;AAC3B;IACA,KAAK;AACL;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AAK;AACL;IACA;IACA,IAAI,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE;AAC3C;IACA,QAAQ,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;AAClC;IACA,YAAY,MAAM,MAAM,GAAG,IAAIC,sBAAS,CAAC,OAAO,CAAC,CAAC;IAClD,YAAY,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,IAAI;IACtC,gBAAgB,MAAM,IAAI,GAAG,IAAIJ,UAAU,CAAC,IAAI,EAAE,IAAIF,uBAAuB,EAAE,CAAC,CAAC;IACjF,gBAAgB,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3B,aAAa,CAAC,CAAC;AACf;IACA,SAAS,MAAM,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;AACzC;IACA,YAAY,MAAM,MAAM,GAAG,IAAIO,8BAAa,CAAC,OAAO,CAAC,CAAC;IACtD,YAAY,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;AACtD;IACA,SAAS,MAAM;AACf;IACA,YAAY,OAAO,CAAC,IAAI,CAAC,CAAC,oCAAoC,GAAG,IAAI,EAAE,sBAAsB,CAAC,CAAC,CAAC;AAChG;IACA,SAAS;AACT;IACA,KAAK;AACL;IACA,CAAC;;;;;;;;"}
1
+ {"version":3,"file":"URDFLoader.js","sources":["../src/URDFClasses.js","../src/URDFLoader.js"],"sourcesContent":["import { Object3D, Vector3 } from 'three';\r\n\r\nclass URDFBase extends Object3D {\r\n\r\n constructor(...args) {\r\n\r\n super(...args);\r\n this.urdfNode = null;\r\n this.urdfName = '';\r\n\r\n }\r\n\r\n copy(source, recursive) {\r\n\r\n super.copy(source, recursive);\r\n\r\n this.urdfNode = source.urdfNode;\r\n this.urdfName = source.urdfName;\r\n\r\n return this;\r\n\r\n }\r\n\r\n}\r\n\r\nclass URDFCollider extends URDFBase {\r\n\r\n constructor(...args) {\r\n\r\n super(...args);\r\n this.isURDFCollider = true;\r\n this.type = 'URDFCollider';\r\n\r\n }\r\n\r\n}\r\n\r\nclass URDFVisual extends URDFBase {\r\n\r\n constructor(...args) {\r\n\r\n super(...args);\r\n this.isURDFVisual = true;\r\n this.type = 'URDFVisual';\r\n\r\n }\r\n\r\n}\r\n\r\nclass URDFLink extends URDFBase {\r\n\r\n constructor(...args) {\r\n\r\n super(...args);\r\n this.isURDFLink = true;\r\n this.type = 'URDFLink';\r\n\r\n }\r\n\r\n}\r\n\r\nclass URDFJoint extends URDFBase {\r\n\r\n get jointType() {\r\n\r\n return this._jointType;\r\n\r\n }\r\n\r\n set jointType(v) {\r\n\r\n if (this.jointType === v) return;\r\n this._jointType = v;\r\n this.matrixWorldNeedsUpdate = true;\r\n switch (v) {\r\n\r\n case 'fixed':\r\n this.jointValue = [];\r\n break;\r\n\r\n case 'continuous':\r\n case 'revolute':\r\n case 'prismatic':\r\n this.jointValue = new Array(1).fill(0);\r\n break;\r\n\r\n case 'planar':\r\n this.jointValue = new Array(2).fill(0);\r\n break;\r\n\r\n case 'floating':\r\n this.jointValue = new Array(6).fill(0);\r\n break;\r\n\r\n }\r\n\r\n }\r\n\r\n get angle() {\r\n\r\n return this.jointValue[0];\r\n\r\n }\r\n\r\n constructor(...args) {\r\n\r\n super(...args);\r\n\r\n this.isURDFJoint = true;\r\n this.type = 'URDFJoint';\r\n\r\n this.jointValue = null;\r\n this.jointType = 'fixed';\r\n this.axis = new Vector3(1, 0, 0);\r\n this.limit = { lower: 0, upper: 0 };\r\n this.ignoreLimits = false;\r\n\r\n this.origPosition = null;\r\n this.origQuaternion = null;\r\n\r\n this.mimicJoints = [];\r\n\r\n }\r\n\r\n /* Overrides */\r\n copy(source, recursive) {\r\n\r\n super.copy(source, recursive);\r\n\r\n this.jointType = source.jointType;\r\n this.axis = source.axis.clone();\r\n this.limit.lower = source.limit.lower;\r\n this.limit.upper = source.limit.upper;\r\n this.ignoreLimits = false;\r\n\r\n this.jointValue = [...source.jointValue];\r\n\r\n this.origPosition = source.origPosition ? source.origPosition.clone() : null;\r\n this.origQuaternion = source.origQuaternion ? source.origQuaternion.clone() : null;\r\n\r\n this.mimicJoints = [...source.mimicJoints];\r\n\r\n return this;\r\n\r\n }\r\n\r\n /* Public Functions */\r\n setJointValue(...values) {\r\n\r\n values = values.map(v => parseFloat(v));\r\n\r\n if (!this.origPosition || !this.origQuaternion) {\r\n\r\n this.origPosition = this.position.clone();\r\n this.origQuaternion = this.quaternion.clone();\r\n\r\n }\r\n\r\n let didUpdate = false;\r\n\r\n this.mimicJoints.forEach(joint => {\r\n\r\n didUpdate = joint.updateFromMimickedJoint(...values) || didUpdate;\r\n\r\n });\r\n\r\n switch (this.jointType) {\r\n\r\n case 'fixed': {\r\n\r\n return didUpdate;\r\n\r\n }\r\n case 'continuous':\r\n case 'revolute': {\r\n\r\n let angle = values[0];\r\n if (angle == null) return didUpdate;\r\n if (angle === this.jointValue[0]) return didUpdate;\r\n\r\n if (!this.ignoreLimits && this.jointType === 'revolute') {\r\n\r\n angle = Math.min(this.limit.upper, angle);\r\n angle = Math.max(this.limit.lower, angle);\r\n\r\n }\r\n\r\n this.quaternion\r\n .setFromAxisAngle(this.axis, angle)\r\n .premultiply(this.origQuaternion);\r\n\r\n if (this.jointValue[0] !== angle) {\r\n\r\n this.jointValue[0] = angle;\r\n this.matrixWorldNeedsUpdate = true;\r\n return true;\r\n\r\n } else {\r\n\r\n return didUpdate;\r\n\r\n }\r\n\r\n }\r\n\r\n case 'prismatic': {\r\n\r\n let pos = values[0];\r\n if (pos == null) return didUpdate;\r\n if (pos === this.jointValue[0]) return didUpdate;\r\n\r\n if (!this.ignoreLimits) {\r\n\r\n pos = Math.min(this.limit.upper, pos);\r\n pos = Math.max(this.limit.lower, pos);\r\n\r\n }\r\n\r\n this.position.copy(this.origPosition);\r\n this.position.addScaledVector(this.axis, pos);\r\n\r\n if (this.jointValue[0] !== pos) {\r\n\r\n this.jointValue[0] = pos;\r\n this.matrixWorldNeedsUpdate = true;\r\n return true;\r\n\r\n } else {\r\n\r\n return didUpdate;\r\n\r\n }\r\n\r\n }\r\n\r\n case 'floating':\r\n case 'planar':\r\n // TODO: Support these joint types\r\n console.warn(`'${ this.jointType }' joint not yet supported`);\r\n\r\n }\r\n\r\n return didUpdate;\r\n\r\n }\r\n\r\n}\r\n\r\nclass URDFMimicJoint extends URDFJoint {\r\n\r\n constructor(...args) {\r\n\r\n super(...args);\r\n this.type = 'URDFMimicJoint';\r\n this.mimicJoint = null;\r\n this.offset = 0;\r\n this.multiplier = 1;\r\n\r\n }\r\n\r\n updateFromMimickedJoint(...values) {\r\n\r\n const modifiedValues = values.map(x => x * this.multiplier + this.offset);\r\n return super.setJointValue(...modifiedValues);\r\n\r\n }\r\n\r\n /* Overrides */\r\n setJointValue(...values) {\r\n\r\n console.warn(`URDFMimicJoint: Setting the joint value of mimic joint \"${ this.urdfName }\" will cause it to be out of sync.`);\r\n return super.setJointValue(...values);\r\n }\r\n\r\n /* Overrides */\r\n copy(source, recursive) {\r\n\r\n super.copy(source, recursive);\r\n\r\n this.mimicJoint = source.mimicJoint;\r\n this.offset = source.offset;\r\n this.multiplier = source.multiplier;\r\n\r\n return this;\r\n\r\n }\r\n\r\n}\r\n\r\nclass URDFRobot extends URDFLink {\r\n\r\n constructor(...args) {\r\n\r\n super(...args);\r\n this.isURDFRobot = true;\r\n this.urdfNode = null;\r\n\r\n this.urdfRobotNode = null;\r\n this.robotName = null;\r\n\r\n this.links = null;\r\n this.joints = null;\r\n this.colliders = null;\r\n this.visual = null;\r\n this.frames = null;\r\n\r\n }\r\n\r\n copy(source, recursive) {\r\n\r\n super.copy(source, recursive);\r\n\r\n this.urdfRobotNode = source.urdfRobotNode;\r\n this.robotName = source.robotName;\r\n\r\n this.links = {};\r\n this.joints = {};\r\n this.colliders = {};\r\n this.visual = {};\r\n\r\n this.traverse(c => {\r\n\r\n if (c.isURDFJoint && c.urdfName in source.joints) {\r\n\r\n this.joints[c.urdfName] = c;\r\n\r\n }\r\n\r\n if (c.isURDFLink && c.urdfName in source.links) {\r\n\r\n this.links[c.urdfName] = c;\r\n\r\n }\r\n\r\n if (c.isURDFCollider && c.urdfName in source.colliders) {\r\n\r\n this.colliders[c.urdfName] = c;\r\n\r\n }\r\n\r\n if (c.isURDFVisual && c.urdfName in source.visual) {\r\n\r\n this.visual[c.urdfName] = c;\r\n\r\n }\r\n\r\n });\r\n\r\n this.frames = {\r\n ...this.colliders,\r\n ...this.visual,\r\n ...this.links,\r\n ...this.joints,\r\n };\r\n\r\n return this;\r\n\r\n }\r\n\r\n getFrame(name) {\r\n\r\n return this.frames[name];\r\n\r\n }\r\n\r\n setJointValue(jointName, ...angle) {\r\n\r\n const joint = this.joints[jointName];\r\n if (joint) {\r\n\r\n return joint.setJointValue(...angle);\r\n\r\n }\r\n\r\n return false;\r\n }\r\n\r\n setJointValues(values) {\r\n\r\n let didChange = false;\r\n for (const name in values) {\r\n\r\n const value = values[name];\r\n if (Array.isArray(value)) {\r\n\r\n didChange = this.setJointValue(name, ...value) || didChange;\r\n\r\n } else {\r\n\r\n didChange = this.setJointValue(name, value) || didChange;\r\n\r\n }\r\n\r\n }\r\n\r\n return didChange;\r\n\r\n }\r\n\r\n}\r\n\r\nexport { URDFRobot, URDFLink, URDFJoint, URDFMimicJoint, URDFVisual, URDFCollider };\r\n","import * as THREE from 'three';\r\nimport { STLLoader } from 'three/examples/jsm/loaders/STLLoader.js';\r\nimport { ColladaLoader } from 'three/examples/jsm/loaders/ColladaLoader.js';\r\nimport { URDFRobot, URDFJoint, URDFLink, URDFCollider, URDFVisual, URDFMimicJoint } from './URDFClasses.js';\r\n\r\n/*\r\nReference coordinate frames for THREE.js and ROS.\r\nBoth coordinate systems are right handed so the URDF is instantiated without\r\nframe transforms. The resulting model can be rotated to rectify the proper up,\r\nright, and forward directions\r\n\r\nTHREE.js\r\n Y\r\n |\r\n |\r\n .-----X\r\n /\r\nZ\r\n\r\nROS URDf\r\n Z\r\n | X\r\n | /\r\n Y-----.\r\n\r\n*/\r\n\r\nconst tempQuaternion = new THREE.Quaternion();\r\nconst tempEuler = new THREE.Euler();\r\n\r\n// take a vector \"x y z\" and process it into\r\n// an array [x, y, z]\r\nfunction processTuple(val) {\r\n\r\n if (!val) return [0, 0, 0];\r\n return val.trim().split(/\\s+/g).map(num => parseFloat(num));\r\n\r\n}\r\n\r\n// applies a rotation a threejs object in URDF order\r\nfunction applyRotation(obj, rpy, additive = false) {\r\n\r\n // if additive is true the rotation is applied in\r\n // addition to the existing rotation\r\n if (!additive) obj.rotation.set(0, 0, 0);\r\n\r\n tempEuler.set(rpy[0], rpy[1], rpy[2], 'ZYX');\r\n tempQuaternion.setFromEuler(tempEuler);\r\n tempQuaternion.multiply(obj.quaternion);\r\n obj.quaternion.copy(tempQuaternion);\r\n\r\n}\r\n\r\n/* URDFLoader Class */\r\n// Loads and reads a URDF file into a THREEjs Object3D format\r\nexport default\r\nclass URDFLoader {\r\n\r\n constructor(manager) {\r\n\r\n this.manager = manager || THREE.DefaultLoadingManager;\r\n this.loadMeshCb = this.defaultMeshLoader.bind(this);\r\n this.parseVisual = true;\r\n this.parseCollision = false;\r\n this.packages = '';\r\n this.workingPath = '';\r\n this.fetchOptions = {};\r\n\r\n }\r\n\r\n /* Public API */\r\n loadAsync(urdf) {\r\n\r\n return new Promise((resolve, reject) => {\r\n\r\n this.load(urdf, resolve, null, reject);\r\n\r\n });\r\n\r\n }\r\n\r\n // urdf: The path to the URDF within the package OR absolute\r\n // onComplete: Callback that is passed the model once loaded\r\n load(urdf, onComplete, onProgress, onError) {\r\n\r\n // Check if a full URI is specified before\r\n // prepending the package info\r\n const manager = this.manager;\r\n const workingPath = THREE.LoaderUtils.extractUrlBase(urdf);\r\n const urdfPath = this.manager.resolveURL(urdf);\r\n\r\n manager.itemStart(urdfPath);\r\n\r\n fetch(urdfPath, this.fetchOptions)\r\n .then(res => {\r\n\r\n if (res.ok) {\r\n\r\n if (onProgress) {\r\n\r\n onProgress(null);\r\n\r\n }\r\n return res.text();\r\n\r\n } else {\r\n\r\n throw new Error(`URDFLoader: Failed to load url '${ urdfPath }' with error code ${ res.status } : ${ res.statusText }.`);\r\n\r\n }\r\n\r\n })\r\n .then(data => {\r\n\r\n if (this.workingPath === '') {\r\n\r\n this.workingPath = workingPath;\r\n\r\n }\r\n\r\n const model = this.parse(data);\r\n onComplete(model);\r\n manager.itemEnd(urdfPath);\r\n\r\n })\r\n .catch(e => {\r\n\r\n if (onError) {\r\n\r\n onError(e);\r\n\r\n } else {\r\n\r\n console.error('URDFLoader: Error loading file.', e);\r\n\r\n }\r\n manager.itemError(urdfPath);\r\n manager.itemEnd(urdfPath);\r\n\r\n });\r\n\r\n }\r\n\r\n parse(content) {\r\n\r\n const packages = this.packages;\r\n const loadMeshCb = this.loadMeshCb;\r\n const parseVisual = this.parseVisual;\r\n const parseCollision = this.parseCollision;\r\n const workingPath = this.workingPath;\r\n const manager = this.manager;\r\n const linkMap = {};\r\n const jointMap = {};\r\n const materialMap = {};\r\n\r\n // Resolves the path of mesh files\r\n function resolvePath(path) {\r\n\r\n if (!/^package:\\/\\//.test(path)) {\r\n\r\n return workingPath ? workingPath + path : path;\r\n\r\n }\r\n\r\n // Remove \"package://\" keyword and split meshPath at the first slash\r\n const [targetPkg, relPath] = path.replace(/^package:\\/\\//, '').split(/\\/(.+)/);\r\n\r\n if (typeof packages === 'string') {\r\n\r\n // \"pkg\" is one single package\r\n if (packages.endsWith(targetPkg)) {\r\n\r\n // \"pkg\" is the target package\r\n return packages + '/' + relPath;\r\n\r\n } else {\r\n\r\n // Assume \"pkg\" is the target package's parent directory\r\n return packages + '/' + targetPkg + '/' + relPath;\r\n\r\n }\r\n\r\n } else if (packages instanceof Function) {\r\n\r\n return packages(targetPkg) + '/' + relPath;\r\n\r\n } else if (typeof packages === 'object') {\r\n\r\n // \"pkg\" is a map of packages\r\n if (targetPkg in packages) {\r\n\r\n return packages[targetPkg] + '/' + relPath;\r\n\r\n } else {\r\n\r\n console.error(`URDFLoader : ${ targetPkg } not found in provided package list.`);\r\n return null;\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n // Process the URDF text format\r\n function processUrdf(data) {\r\n\r\n let children;\r\n if (data instanceof Document) {\r\n\r\n children = [ ...data.children ];\r\n\r\n } else if (data instanceof Element) {\r\n\r\n children = [ data ];\r\n\r\n } else {\r\n\r\n const parser = new DOMParser();\r\n const urdf = parser.parseFromString(data, 'text/xml');\r\n children = [ ...urdf.children ];\r\n\r\n }\r\n\r\n const robotNode = children.filter(c => c.nodeName === 'robot').pop();\r\n return processRobot(robotNode);\r\n\r\n }\r\n\r\n // Process the <robot> node\r\n function processRobot(robot) {\r\n\r\n const robotNodes = [ ...robot.children ];\r\n const links = robotNodes.filter(c => c.nodeName.toLowerCase() === 'link');\r\n const joints = robotNodes.filter(c => c.nodeName.toLowerCase() === 'joint');\r\n const materials = robotNodes.filter(c => c.nodeName.toLowerCase() === 'material');\r\n const obj = new URDFRobot();\r\n\r\n obj.robotName = robot.getAttribute('name');\r\n obj.urdfRobotNode = robot;\r\n\r\n // Create the <material> map\r\n materials.forEach(m => {\r\n\r\n const name = m.getAttribute('name');\r\n materialMap[name] = processMaterial(m);\r\n\r\n });\r\n\r\n // Create the <link> map\r\n const visualMap = {};\r\n const colliderMap = {};\r\n links.forEach(l => {\r\n\r\n const name = l.getAttribute('name');\r\n const isRoot = robot.querySelector(`child[link=\"${ name }\"]`) === null;\r\n linkMap[name] = processLink(l, visualMap, colliderMap, isRoot ? obj : null);\r\n\r\n });\r\n\r\n // Create the <joint> map\r\n joints.forEach(j => {\r\n\r\n const name = j.getAttribute('name');\r\n jointMap[name] = processJoint(j);\r\n\r\n });\r\n\r\n obj.joints = jointMap;\r\n obj.links = linkMap;\r\n obj.colliders = colliderMap;\r\n obj.visual = visualMap;\r\n\r\n // Link up mimic joints\r\n const jointList = Object.values(jointMap);\r\n jointList.forEach(j => {\r\n\r\n if (j instanceof URDFMimicJoint) {\r\n\r\n jointMap[j.mimicJoint].mimicJoints.push(j);\r\n\r\n }\r\n\r\n });\r\n\r\n // Detect infinite loops of mimic joints\r\n jointList.forEach(j => {\r\n\r\n const uniqueJoints = new Set();\r\n const iterFunction = joint => {\r\n\r\n if (uniqueJoints.has(joint)) {\r\n\r\n throw new Error('URDFLoader: Detected an infinite loop of mimic joints.');\r\n\r\n }\r\n\r\n uniqueJoints.add(joint);\r\n joint.mimicJoints.forEach(j => {\r\n\r\n iterFunction(j);\r\n\r\n });\r\n\r\n };\r\n\r\n iterFunction(j);\r\n });\r\n\r\n obj.frames = {\r\n ...colliderMap,\r\n ...visualMap,\r\n ...linkMap,\r\n ...jointMap,\r\n };\r\n\r\n return obj;\r\n\r\n }\r\n\r\n // Process joint nodes and parent them\r\n function processJoint(joint) {\r\n\r\n const children = [ ...joint.children ];\r\n const jointType = joint.getAttribute('type');\r\n\r\n let obj;\r\n\r\n const mimicTag = children.find(n => n.nodeName.toLowerCase() === 'mimic');\r\n if (mimicTag) {\r\n\r\n obj = new URDFMimicJoint();\r\n obj.mimicJoint = mimicTag.getAttribute('joint');\r\n obj.multiplier = parseFloat(mimicTag.getAttribute('multiplier') || 1.0);\r\n obj.offset = parseFloat(mimicTag.getAttribute('offset') || 0.0);\r\n\r\n } else {\r\n\r\n obj = new URDFJoint();\r\n\r\n }\r\n\r\n obj.urdfNode = joint;\r\n obj.name = joint.getAttribute('name');\r\n obj.urdfName = obj.name;\r\n obj.jointType = jointType;\r\n\r\n let parent = null;\r\n let child = null;\r\n let xyz = [0, 0, 0];\r\n let rpy = [0, 0, 0];\r\n\r\n // Extract the attributes\r\n children.forEach(n => {\r\n\r\n const type = n.nodeName.toLowerCase();\r\n if (type === 'origin') {\r\n\r\n xyz = processTuple(n.getAttribute('xyz'));\r\n rpy = processTuple(n.getAttribute('rpy'));\r\n\r\n } else if (type === 'child') {\r\n\r\n child = linkMap[n.getAttribute('link')];\r\n\r\n } else if (type === 'parent') {\r\n\r\n parent = linkMap[n.getAttribute('link')];\r\n\r\n } else if (type === 'limit') {\r\n\r\n obj.limit.lower = parseFloat(n.getAttribute('lower') || obj.limit.lower);\r\n obj.limit.upper = parseFloat(n.getAttribute('upper') || obj.limit.upper);\r\n\r\n }\r\n });\r\n\r\n // Join the links\r\n parent.add(obj);\r\n obj.add(child);\r\n applyRotation(obj, rpy);\r\n obj.position.set(xyz[0], xyz[1], xyz[2]);\r\n\r\n // Set up the rotate function\r\n const axisNode = children.filter(n => n.nodeName.toLowerCase() === 'axis')[0];\r\n\r\n if (axisNode) {\r\n\r\n const axisXYZ = axisNode.getAttribute('xyz').split(/\\s+/g).map(num => parseFloat(num));\r\n obj.axis = new THREE.Vector3(axisXYZ[0], axisXYZ[1], axisXYZ[2]);\r\n obj.axis.normalize();\r\n\r\n }\r\n\r\n return obj;\r\n\r\n }\r\n\r\n // Process the <link> nodes\r\n function processLink(link, visualMap, colliderMap, target = null) {\r\n\r\n if (target === null) {\r\n\r\n target = new URDFLink();\r\n\r\n }\r\n\r\n const children = [ ...link.children ];\r\n target.name = link.getAttribute('name');\r\n target.urdfName = target.name;\r\n target.urdfNode = link;\r\n\r\n if (parseVisual) {\r\n\r\n const visualNodes = children.filter(n => n.nodeName.toLowerCase() === 'visual');\r\n visualNodes.forEach(vn => {\r\n\r\n const v = processLinkElement(vn, materialMap);\r\n target.add(v);\r\n\r\n if (vn.hasAttribute('name')) {\r\n\r\n const name = vn.getAttribute('name');\r\n v.name = name;\r\n v.urdfName = name;\r\n visualMap[name] = v;\r\n\r\n }\r\n\r\n });\r\n\r\n }\r\n\r\n if (parseCollision) {\r\n\r\n const collisionNodes = children.filter(n => n.nodeName.toLowerCase() === 'collision');\r\n collisionNodes.forEach(cn => {\r\n\r\n const c = processLinkElement(cn);\r\n target.add(c);\r\n\r\n if (cn.hasAttribute('name')) {\r\n\r\n const name = cn.getAttribute('name');\r\n c.name = name;\r\n c.urdfName = name;\r\n colliderMap[name] = c;\r\n\r\n }\r\n\r\n });\r\n\r\n }\r\n\r\n return target;\r\n\r\n }\r\n\r\n function processMaterial(node) {\r\n\r\n const matNodes = [ ...node.children ];\r\n const material = new THREE.MeshPhongMaterial();\r\n\r\n material.name = node.getAttribute('name') || '';\r\n matNodes.forEach(n => {\r\n\r\n const type = n.nodeName.toLowerCase();\r\n if (type === 'color') {\r\n\r\n const rgba =\r\n n\r\n .getAttribute('rgba')\r\n .split(/\\s/g)\r\n .map(v => parseFloat(v));\r\n\r\n material.color.setRGB(rgba[0], rgba[1], rgba[2]);\r\n material.opacity = rgba[3];\r\n material.transparent = rgba[3] < 1;\r\n material.depthWrite = !material.transparent;\r\n\r\n } else if (type === 'texture') {\r\n\r\n // The URDF spec does not require that the <texture/> tag include\r\n // a filename attribute so skip loading the texture if not provided.\r\n const filename = n.getAttribute('filename');\r\n if (filename) {\r\n\r\n const loader = new THREE.TextureLoader(manager);\r\n const filePath = resolvePath(filename);\r\n material.map = loader.load(filePath);\r\n\r\n }\r\n\r\n }\r\n });\r\n\r\n return material;\r\n\r\n }\r\n\r\n // Process the visual and collision nodes into meshes\r\n function processLinkElement(vn, materialMap = {}) {\r\n\r\n const isCollisionNode = vn.nodeName.toLowerCase() === 'collision';\r\n const children = [ ...vn.children ];\r\n let material = null;\r\n\r\n // get the material first\r\n const materialNode = children.filter(n => n.nodeName.toLowerCase() === 'material')[0];\r\n if (materialNode) {\r\n\r\n const name = materialNode.getAttribute('name');\r\n if (name && name in materialMap) {\r\n\r\n material = materialMap[name];\r\n\r\n } else {\r\n\r\n material = processMaterial(materialNode);\r\n\r\n }\r\n\r\n } else {\r\n\r\n material = new THREE.MeshPhongMaterial();\r\n\r\n }\r\n\r\n const group = isCollisionNode ? new URDFCollider() : new URDFVisual();\r\n group.urdfNode = vn;\r\n\r\n children.forEach(n => {\r\n\r\n const type = n.nodeName.toLowerCase();\r\n if (type === 'geometry') {\r\n\r\n const geoType = n.children[0].nodeName.toLowerCase();\r\n if (geoType === 'mesh') {\r\n\r\n const filename = n.children[0].getAttribute('filename');\r\n const filePath = resolvePath(filename);\r\n\r\n // file path is null if a package directory is not provided.\r\n if (filePath !== null) {\r\n\r\n const scaleAttr = n.children[0].getAttribute('scale');\r\n if (scaleAttr) {\r\n\r\n const scale = processTuple(scaleAttr);\r\n group.scale.set(scale[0], scale[1], scale[2]);\r\n\r\n }\r\n\r\n loadMeshCb(filePath, manager, (obj, err) => {\r\n\r\n if (err) {\r\n\r\n console.error('URDFLoader: Error loading mesh.', err);\r\n\r\n } else if (obj) {\r\n\r\n if (obj instanceof THREE.Mesh) {\r\n\r\n obj.material = material;\r\n\r\n }\r\n\r\n // We don't expect non identity rotations or positions. In the case of\r\n // COLLADA files the model might come in with a custom scale for unit\r\n // conversion.\r\n obj.position.set(0, 0, 0);\r\n obj.quaternion.identity();\r\n group.add(obj);\r\n\r\n }\r\n\r\n });\r\n\r\n }\r\n\r\n } else if (geoType === 'box') {\r\n\r\n const primitiveModel = new THREE.Mesh();\r\n primitiveModel.geometry = new THREE.BoxBufferGeometry(1, 1, 1);\r\n primitiveModel.material = material;\r\n\r\n const size = processTuple(n.children[0].getAttribute('size'));\r\n primitiveModel.scale.set(size[0], size[1], size[2]);\r\n\r\n group.add(primitiveModel);\r\n\r\n } else if (geoType === 'sphere') {\r\n\r\n const primitiveModel = new THREE.Mesh();\r\n primitiveModel.geometry = new THREE.SphereBufferGeometry(1, 30, 30);\r\n primitiveModel.material = material;\r\n\r\n const radius = parseFloat(n.children[0].getAttribute('radius')) || 0;\r\n primitiveModel.scale.set(radius, radius, radius);\r\n\r\n group.add(primitiveModel);\r\n\r\n } else if (geoType === 'cylinder') {\r\n\r\n const primitiveModel = new THREE.Mesh();\r\n primitiveModel.geometry = new THREE.CylinderBufferGeometry(1, 1, 1, 30);\r\n primitiveModel.material = material;\r\n\r\n const radius = parseFloat(n.children[0].getAttribute('radius')) || 0;\r\n const length = parseFloat(n.children[0].getAttribute('length')) || 0;\r\n primitiveModel.scale.set(radius, length, radius);\r\n primitiveModel.rotation.set(Math.PI / 2, 0, 0);\r\n\r\n group.add(primitiveModel);\r\n\r\n }\r\n\r\n } else if (type === 'origin') {\r\n\r\n const xyz = processTuple(n.getAttribute('xyz'));\r\n const rpy = processTuple(n.getAttribute('rpy'));\r\n\r\n group.position.set(xyz[0], xyz[1], xyz[2]);\r\n group.rotation.set(0, 0, 0);\r\n applyRotation(group, rpy);\r\n\r\n }\r\n\r\n });\r\n\r\n return group;\r\n\r\n }\r\n\r\n return processUrdf(content);\r\n\r\n }\r\n\r\n // Default mesh loading function\r\n defaultMeshLoader(path, manager, done) {\r\n\r\n if (/\\.stl$/i.test(path)) {\r\n\r\n const loader = new STLLoader(manager);\r\n loader.load(path, geom => {\r\n const mesh = new THREE.Mesh(geom, new THREE.MeshPhongMaterial());\r\n done(mesh);\r\n });\r\n\r\n } else if (/\\.dae$/i.test(path)) {\r\n\r\n const loader = new ColladaLoader(manager);\r\n loader.load(path, dae => done(dae.scene));\r\n\r\n } else {\r\n\r\n console.warn(`URDFLoader: Could not load model at ${ path }.\\nNo loader available`);\r\n\r\n }\r\n\r\n }\r\n\r\n};\r\n"],"names":["Object3D","Vector3","THREE","STLLoader","ColladaLoader"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEA,MAAM,QAAQ,SAASA,cAAQ,CAAC;AAChC;IACA,IAAI,WAAW,CAAC,GAAG,IAAI,EAAE;AACzB;IACA,QAAQ,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;IACvB,QAAQ,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IAC7B,QAAQ,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;AAC3B;IACA,KAAK;AACL;IACA,IAAI,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE;AAC5B;IACA,QAAQ,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AACtC;IACA,QAAQ,IAAI,CAAC,QAAQ,GAAG,MAAM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,CAAC,CAAC;AACpC;IACA,KAAK;AACL;IACA;IACA,IAAI,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE;AAC3C;IACA,QAAQ,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;AAClC;IACA,YAAY,MAAM,MAAM,GAAG,IAAIC,sBAAS,CAAC,OAAO,CAAC,CAAC;IAClD,YAAY,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,IAAI;IACtC,gBAAgB,MAAM,IAAI,GAAG,IAAID,gBAAK,CAAC,IAAI,CAAC,IAAI,EAAE,IAAIA,gBAAK,CAAC,iBAAiB,EAAE,CAAC,CAAC;IACjF,gBAAgB,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3B,aAAa,CAAC,CAAC;AACf;IACA,SAAS,MAAM,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;AACzC;IACA,YAAY,MAAM,MAAM,GAAG,IAAIE,8BAAa,CAAC,OAAO,CAAC,CAAC;IACtD,YAAY,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;AACtD;IACA,SAAS,MAAM;AACf;IACA,YAAY,OAAO,CAAC,IAAI,CAAC,CAAC,oCAAoC,GAAG,IAAI,EAAE,sBAAsB,CAAC,CAAC,CAAC;AAChG;IACA,SAAS;AACT;IACA,KAAK;AACL;IACA,CAAC;;;;;;;;"}
@@ -1,11 +1,32 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('three'), require('./urdf-viewer-element.js')) :
3
- typeof define === 'function' && define.amd ? define(['three', './urdf-viewer-element.js'], factory) :
3
+ typeof define === 'function' && define.amd ? define(['three', './urdf-viewer-element'], factory) :
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.URDFManipulator = factory(global.THREE, global.URDFViewer));
5
5
  }(this, (function (THREE, URDFViewer) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
9
+ function _interopNamespace(e) {
10
+ if (e && e.__esModule) return e;
11
+ var n = Object.create(null);
12
+ if (e) {
13
+ Object.keys(e).forEach(function (k) {
14
+ if (k !== 'default') {
15
+ var d = Object.getOwnPropertyDescriptor(e, k);
16
+ Object.defineProperty(n, k, d.get ? d : {
17
+ enumerable: true,
18
+ get: function () {
19
+ return e[k];
20
+ }
21
+ });
22
+ }
23
+ });
24
+ }
25
+ n['default'] = e;
26
+ return Object.freeze(n);
27
+ }
28
+
29
+ var THREE__namespace = /*#__PURE__*/_interopNamespace(THREE);
9
30
  var URDFViewer__default = /*#__PURE__*/_interopDefaultLegacy(URDFViewer);
10
31
 
11
32
  // Find the nearest parent that is a joint
@@ -364,7 +385,7 @@
364
385
 
365
386
  // The highlight material
366
387
  this.highlightMaterial =
367
- new THREE.MeshPhongMaterial({
388
+ new THREE__namespace.MeshPhongMaterial({
368
389
  shininess: 10,
369
390
  color: this.highlightColor,
370
391
  emissive: this.highlightColor,
@@ -1 +1 @@
1
- {"version":3,"file":"urdf-manipulator-element.js","sources":["../src/URDFDragControls.js","../src/urdf-manipulator-element.js"],"sourcesContent":["import { Raycaster, Vector3, Plane, Vector2 } from 'three';\r\n\r\n// Find the nearest parent that is a joint\r\nfunction isJoint(j) {\r\n\r\n return j.isURDFJoint && j.jointType !== 'fixed';\r\n\r\n};\r\n\r\nfunction findNearestJoint(child) {\r\n\r\n let curr = child;\r\n while (curr) {\r\n\r\n if (isJoint(curr)) {\r\n\r\n return curr;\r\n\r\n }\r\n\r\n curr = curr.parent;\r\n\r\n }\r\n\r\n return curr;\r\n\r\n};\r\n\r\nconst prevHitPoint = new Vector3();\r\nconst newHitPoint = new Vector3();\r\nconst pivotPoint = new Vector3();\r\nconst tempVector = new Vector3();\r\nconst tempVector2 = new Vector3();\r\nconst projectedStartPoint = new Vector3();\r\nconst projectedEndPoint = new Vector3();\r\nconst plane = new Plane();\r\nexport class URDFDragControls {\r\n\r\n constructor(scene) {\r\n\r\n this.enabled = true;\r\n this.scene = scene;\r\n this.raycaster = new Raycaster();\r\n this.initialGrabPoint = new Vector3();\r\n\r\n this.hitDistance = -1;\r\n this.hovered = null;\r\n this.manipulating = null;\r\n\r\n }\r\n\r\n update() {\r\n\r\n const {\r\n raycaster,\r\n hovered,\r\n manipulating,\r\n scene,\r\n } = this;\r\n\r\n if (manipulating) {\r\n\r\n return;\r\n\r\n }\r\n\r\n let hoveredJoint = null;\r\n const intersections = raycaster.intersectObject(scene, true);\r\n if (intersections.length !== 0) {\r\n\r\n const hit = intersections[0];\r\n this.hitDistance = hit.distance;\r\n hoveredJoint = findNearestJoint(hit.object);\r\n this.initialGrabPoint.copy(hit.point);\r\n\r\n }\r\n\r\n if (hoveredJoint !== hovered) {\r\n\r\n if (hovered) {\r\n\r\n this.onUnhover(hovered);\r\n\r\n }\r\n\r\n this.hovered = hoveredJoint;\r\n\r\n if (hoveredJoint) {\r\n\r\n this.onHover(hoveredJoint);\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n updateJoint(joint, angle) {\r\n\r\n joint.setJointValue(angle);\r\n\r\n }\r\n\r\n onDragStart(joint) {\r\n\r\n }\r\n\r\n onDragEnd(joint) {\r\n\r\n }\r\n\r\n onHover(joint) {\r\n\r\n }\r\n\r\n onUnhover(joint) {\r\n\r\n }\r\n\r\n getRevoluteDelta(joint, startPoint, endPoint) {\r\n\r\n // set up the plane\r\n tempVector\r\n .copy(joint.axis)\r\n .transformDirection(joint.matrixWorld)\r\n .normalize();\r\n pivotPoint\r\n .set(0, 0, 0)\r\n .applyMatrix4(joint.matrixWorld);\r\n plane\r\n .setFromNormalAndCoplanarPoint(tempVector, pivotPoint);\r\n\r\n // project the drag points onto the plane\r\n plane.projectPoint(startPoint, projectedStartPoint);\r\n plane.projectPoint(endPoint, projectedEndPoint);\r\n\r\n // get the directions relative to the pivot\r\n projectedStartPoint.sub(pivotPoint);\r\n projectedEndPoint.sub(pivotPoint);\r\n\r\n tempVector.crossVectors(projectedStartPoint, projectedEndPoint);\r\n\r\n const direction = Math.sign(tempVector.dot(plane.normal));\r\n return direction * projectedEndPoint.angleTo(projectedStartPoint);\r\n\r\n }\r\n\r\n getPrismaticDelta(joint, startPoint, endPoint) {\r\n\r\n tempVector.subVectors(endPoint, startPoint);\r\n plane\r\n .normal\r\n .copy(joint.axis)\r\n .transformDirection(joint.parent.matrixWorld)\r\n .normalize();\r\n\r\n return tempVector.dot(plane.normal);\r\n\r\n }\r\n\r\n moveRay(toRay) {\r\n\r\n const { raycaster, hitDistance, manipulating } = this;\r\n const { ray } = raycaster;\r\n\r\n if (manipulating) {\r\n\r\n ray.at(hitDistance, prevHitPoint);\r\n toRay.at(hitDistance, newHitPoint);\r\n\r\n let delta = 0;\r\n if (manipulating.jointType === 'revolute' || manipulating.jointType === 'continuous') {\r\n\r\n delta = this.getRevoluteDelta(manipulating, prevHitPoint, newHitPoint);\r\n\r\n } else if (manipulating.jointType === 'prismatic') {\r\n\r\n delta = this.getPrismaticDelta(manipulating, prevHitPoint, newHitPoint);\r\n\r\n }\r\n\r\n if (delta) {\r\n\r\n this.updateJoint(manipulating, manipulating.angle + delta);\r\n\r\n }\r\n\r\n }\r\n\r\n this.raycaster.ray.copy(toRay);\r\n this.update();\r\n\r\n }\r\n\r\n setGrabbed(grabbed) {\r\n\r\n const { hovered, manipulating } = this;\r\n\r\n if (grabbed) {\r\n\r\n if (manipulating !== null || hovered === null) {\r\n\r\n return;\r\n\r\n }\r\n\r\n this.manipulating = hovered;\r\n this.onDragStart(hovered);\r\n\r\n } else {\r\n\r\n if (this.manipulating === null) {\r\n return;\r\n }\r\n\r\n this.onDragEnd(this.manipulating);\r\n this.manipulating = null;\r\n this.update();\r\n\r\n }\r\n\r\n }\r\n\r\n}\r\n\r\nexport class PointerURDFDragControls extends URDFDragControls {\r\n\r\n constructor(scene, camera, domElement) {\r\n\r\n super(scene);\r\n this.camera = camera;\r\n this.domElement = domElement;\r\n\r\n const raycaster = new Raycaster();\r\n const mouse = new Vector2();\r\n\r\n function updateMouse(e) {\r\n\r\n mouse.x = ((e.pageX - domElement.offsetLeft) / domElement.offsetWidth) * 2 - 1;\r\n mouse.y = -((e.pageY - domElement.offsetTop) / domElement.offsetHeight) * 2 + 1;\r\n\r\n }\r\n\r\n this._mouseDown = e => {\r\n\r\n updateMouse(e);\r\n raycaster.setFromCamera(mouse, this.camera);\r\n this.moveRay(raycaster.ray);\r\n this.setGrabbed(true);\r\n\r\n };\r\n\r\n this._mouseMove = e => {\r\n\r\n updateMouse(e);\r\n raycaster.setFromCamera(mouse, this.camera);\r\n this.moveRay(raycaster.ray);\r\n\r\n };\r\n\r\n this._mouseUp = e => {\r\n\r\n updateMouse(e);\r\n raycaster.setFromCamera(mouse, this.camera);\r\n this.moveRay(raycaster.ray);\r\n this.setGrabbed(false);\r\n\r\n };\r\n\r\n domElement.addEventListener('mousedown', this._mouseDown);\r\n domElement.addEventListener('mousemove', this._mouseMove);\r\n domElement.addEventListener('mouseup', this._mouseUp);\r\n\r\n }\r\n\r\n getRevoluteDelta(joint, startPoint, endPoint) {\r\n\r\n const { camera, initialGrabPoint } = this;\r\n\r\n // set up the plane\r\n tempVector\r\n .copy(joint.axis)\r\n .transformDirection(joint.matrixWorld)\r\n .normalize();\r\n pivotPoint\r\n .set(0, 0, 0)\r\n .applyMatrix4(joint.matrixWorld);\r\n plane\r\n .setFromNormalAndCoplanarPoint(tempVector, pivotPoint);\r\n\r\n tempVector\r\n .copy(camera.position)\r\n .sub(initialGrabPoint)\r\n .normalize();\r\n\r\n // if looking into the plane of rotation\r\n if (Math.abs(tempVector.dot(plane.normal)) > 0.3) {\r\n\r\n return super.getRevoluteDelta(joint, startPoint, endPoint);\r\n\r\n } else {\r\n\r\n // get the up direction\r\n tempVector.set(0, 1, 0).transformDirection(camera.matrixWorld);\r\n\r\n // get points projected onto the plane of rotation\r\n plane.projectPoint(startPoint, projectedStartPoint);\r\n plane.projectPoint(endPoint, projectedEndPoint);\r\n\r\n tempVector.set(0, 0, -1).transformDirection(camera.matrixWorld);\r\n tempVector.cross(plane.normal);\r\n tempVector2.subVectors(endPoint, startPoint);\r\n\r\n return tempVector.dot(tempVector2);\r\n\r\n }\r\n\r\n }\r\n\r\n dispose() {\r\n\r\n const { domElement } = this;\r\n domElement.removeEventListener('mousedown', this._mouseDown);\r\n domElement.removeEventListener('mousemove', this._mouseMove);\r\n domElement.removeEventListener('mouseup', this._mouseUp);\r\n\r\n }\r\n\r\n}\r\n","import * as THREE from 'three';\r\nimport URDFViewer from './urdf-viewer-element.js';\r\nimport { PointerURDFDragControls } from './URDFDragControls.js';\r\n\r\n// urdf-manipulator element\r\n// Displays a URDF model that can be manipulated with the mouse\r\n\r\n// Events\r\n// joint-mouseover: Fired when a joint is hovered over\r\n// joint-mouseout: Fired when a joint is no longer hovered over\r\n// manipulate-start: Fires when a joint is manipulated\r\n// manipulate-end: Fires when a joint is done being manipulated\r\nexport default\r\nclass URDFManipulator extends URDFViewer {\r\n\r\n static get observedAttributes() {\r\n\r\n return ['highlight-color', ...super.observedAttributes];\r\n\r\n }\r\n\r\n get disableDragging() { return this.hasAttribute('disable-dragging'); }\r\n set disableDragging(val) { val ? this.setAttribute('disable-dragging', !!val) : this.removeAttribute('disable-dragging'); }\r\n\r\n get highlightColor() { return this.getAttribute('highlight-color') || '#FFFFFF'; }\r\n set highlightColor(val) { val ? this.setAttribute('highlight-color', val) : this.removeAttribute('highlight-color'); }\r\n\r\n constructor(...args) {\r\n\r\n super(...args);\r\n\r\n // The highlight material\r\n this.highlightMaterial =\r\n new THREE.MeshPhongMaterial({\r\n shininess: 10,\r\n color: this.highlightColor,\r\n emissive: this.highlightColor,\r\n emissiveIntensity: 0.25,\r\n });\r\n\r\n const isJoint = j => {\r\n\r\n return j.isURDFJoint && j.jointType !== 'fixed';\r\n\r\n };\r\n\r\n // Highlight the link geometry under a joint\r\n const highlightLinkGeometry = (m, revert) => {\r\n\r\n const traverse = c => {\r\n\r\n // Set or revert the highlight color\r\n if (c.type === 'Mesh') {\r\n\r\n if (revert) {\r\n\r\n c.material = c.__origMaterial;\r\n delete c.__origMaterial;\r\n\r\n } else {\r\n\r\n c.__origMaterial = c.material;\r\n c.material = this.highlightMaterial;\r\n\r\n }\r\n\r\n }\r\n\r\n // Look into the children and stop if the next child is\r\n // another joint\r\n if (c === m || !isJoint(c)) {\r\n\r\n for (let i = 0; i < c.children.length; i++) {\r\n\r\n traverse(c.children[i]);\r\n\r\n }\r\n\r\n }\r\n\r\n };\r\n\r\n traverse(m);\r\n\r\n };\r\n\r\n const el = this.renderer.domElement;\r\n\r\n const dragControls = new PointerURDFDragControls(this.scene, this.camera, el);\r\n dragControls.onDragStart = joint => {\r\n\r\n this.dispatchEvent(new CustomEvent('manipulate-start', { bubbles: true, cancelable: true, detail: joint.name }));\r\n this.controls.enabled = false;\r\n this.redraw();\r\n\r\n };\r\n dragControls.onDragEnd = joint => {\r\n\r\n this.dispatchEvent(new CustomEvent('manipulate-end', { bubbles: true, cancelable: true, detail: joint.name }));\r\n this.controls.enabled = true;\r\n this.redraw();\r\n\r\n };\r\n dragControls.updateJoint = (joint, angle) => {\r\n\r\n this.setJointValue(joint.name, angle);\r\n\r\n };\r\n dragControls.onHover = joint => {\r\n\r\n highlightLinkGeometry(joint, false);\r\n this.dispatchEvent(new CustomEvent('joint-mouseover', { bubbles: true, cancelable: true, detail: joint.name }));\r\n this.redraw();\r\n\r\n };\r\n dragControls.onUnhover = joint => {\r\n\r\n highlightLinkGeometry(joint, true);\r\n this.dispatchEvent(new CustomEvent('joint-mouseout', { bubbles: true, cancelable: true, detail: joint.name }));\r\n this.redraw();\r\n\r\n };\r\n\r\n this.dragControls = dragControls;\r\n\r\n }\r\n\r\n disconnectedCallback() {\r\n\r\n super.disconnectedCallback();\r\n this.dragControls.dispose();\r\n\r\n }\r\n\r\n attributeChangedCallback(attr, oldval, newval) {\r\n\r\n super.attributeChangedCallback(attr, oldval, newval);\r\n\r\n switch (attr) {\r\n\r\n case 'highlight-color':\r\n this.highlightMaterial.color.set(this.highlightColor);\r\n this.highlightMaterial.emissive.set(this.highlightColor);\r\n break;\r\n\r\n }\r\n\r\n }\r\n\r\n};\r\n"],"names":["Vector3","Plane","Raycaster","Vector2","URDFViewer","THREE.MeshPhongMaterial"],"mappings":";;;;;;;;;;IAEA;IACA,SAAS,OAAO,CAAC,CAAC,EAAE;AACpB;IACA,IAAI,OAAO,CAAC,CAAC,WAAW,IAAI,CAAC,CAAC,SAAS,KAAK,OAAO,CAAC;AACpD;IACA,CAAC,CAAC;AACF;IACA,SAAS,gBAAgB,CAAC,KAAK,EAAE;AACjC;IACA,IAAI,IAAI,IAAI,GAAG,KAAK,CAAC;IACrB,IAAI,OAAO,IAAI,EAAE;AACjB;IACA,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,EAAE;AAC3B;IACA,YAAY,OAAO,IAAI,CAAC;AACxB;IACA,SAAS;AACT;IACA,QAAQ,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC;AAC3B;IACA,KAAK;AACL;IACA,IAAI,OAAO,IAAI,CAAC;AAChB;IACA,CAAC,CAAC;AACF;IACA,MAAM,YAAY,GAAG,IAAIA,aAAO,EAAE,CAAC;IACnC,MAAM,WAAW,GAAG,IAAIA,aAAO,EAAE,CAAC;IAClC,MAAM,UAAU,GAAG,IAAIA,aAAO,EAAE,CAAC;IACjC,MAAM,UAAU,GAAG,IAAIA,aAAO,EAAE,CAAC;IACjC,MAAM,WAAW,GAAG,IAAIA,aAAO,EAAE,CAAC;IAClC,MAAM,mBAAmB,GAAG,IAAIA,aAAO,EAAE,CAAC;IAC1C,MAAM,iBAAiB,GAAG,IAAIA,aAAO,EAAE,CAAC;IACxC,MAAM,KAAK,GAAG,IAAIC,WAAK,EAAE,CAAC;IACnB,MAAM,gBAAgB,CAAC;AAC9B;IACA,IAAI,WAA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G,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACzE,gBAAgB,MAAM;AACtB;IACA,SAAS;AACT;IACA,KAAK;AACL;IACA,CAAC;;;;;;;;"}
1
+ {"version":3,"file":"urdf-manipulator-element.js","sources":["../src/URDFDragControls.js","../src/urdf-manipulator-element.js"],"sourcesContent":["import { Raycaster, Vector3, Plane, Vector2 } from 'three';\r\n\r\n// Find the nearest parent that is a joint\r\nfunction isJoint(j) {\r\n\r\n return j.isURDFJoint && j.jointType !== 'fixed';\r\n\r\n};\r\n\r\nfunction findNearestJoint(child) {\r\n\r\n let curr = child;\r\n while (curr) {\r\n\r\n if (isJoint(curr)) {\r\n\r\n return curr;\r\n\r\n }\r\n\r\n curr = curr.parent;\r\n\r\n }\r\n\r\n return curr;\r\n\r\n};\r\n\r\nconst prevHitPoint = new Vector3();\r\nconst newHitPoint = new Vector3();\r\nconst pivotPoint = new Vector3();\r\nconst tempVector = new Vector3();\r\nconst tempVector2 = new Vector3();\r\nconst projectedStartPoint = new Vector3();\r\nconst projectedEndPoint = new Vector3();\r\nconst plane = new Plane();\r\nexport class URDFDragControls {\r\n\r\n constructor(scene) {\r\n\r\n this.enabled = true;\r\n this.scene = scene;\r\n this.raycaster = new Raycaster();\r\n this.initialGrabPoint = new Vector3();\r\n\r\n this.hitDistance = -1;\r\n this.hovered = null;\r\n this.manipulating = null;\r\n\r\n }\r\n\r\n update() {\r\n\r\n const {\r\n raycaster,\r\n hovered,\r\n manipulating,\r\n scene,\r\n } = this;\r\n\r\n if (manipulating) {\r\n\r\n return;\r\n\r\n }\r\n\r\n let hoveredJoint = null;\r\n const intersections = raycaster.intersectObject(scene, true);\r\n if (intersections.length !== 0) {\r\n\r\n const hit = intersections[0];\r\n this.hitDistance = hit.distance;\r\n hoveredJoint = findNearestJoint(hit.object);\r\n this.initialGrabPoint.copy(hit.point);\r\n\r\n }\r\n\r\n if (hoveredJoint !== hovered) {\r\n\r\n if (hovered) {\r\n\r\n this.onUnhover(hovered);\r\n\r\n }\r\n\r\n this.hovered = hoveredJoint;\r\n\r\n if (hoveredJoint) {\r\n\r\n this.onHover(hoveredJoint);\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n updateJoint(joint, angle) {\r\n\r\n joint.setJointValue(angle);\r\n\r\n }\r\n\r\n onDragStart(joint) {\r\n\r\n }\r\n\r\n onDragEnd(joint) {\r\n\r\n }\r\n\r\n onHover(joint) {\r\n\r\n }\r\n\r\n onUnhover(joint) {\r\n\r\n }\r\n\r\n getRevoluteDelta(joint, startPoint, endPoint) {\r\n\r\n // set up the plane\r\n tempVector\r\n .copy(joint.axis)\r\n .transformDirection(joint.matrixWorld)\r\n .normalize();\r\n pivotPoint\r\n .set(0, 0, 0)\r\n .applyMatrix4(joint.matrixWorld);\r\n plane\r\n .setFromNormalAndCoplanarPoint(tempVector, pivotPoint);\r\n\r\n // project the drag points onto the plane\r\n plane.projectPoint(startPoint, projectedStartPoint);\r\n plane.projectPoint(endPoint, projectedEndPoint);\r\n\r\n // get the directions relative to the pivot\r\n projectedStartPoint.sub(pivotPoint);\r\n projectedEndPoint.sub(pivotPoint);\r\n\r\n tempVector.crossVectors(projectedStartPoint, projectedEndPoint);\r\n\r\n const direction = Math.sign(tempVector.dot(plane.normal));\r\n return direction * projectedEndPoint.angleTo(projectedStartPoint);\r\n\r\n }\r\n\r\n getPrismaticDelta(joint, startPoint, endPoint) {\r\n\r\n tempVector.subVectors(endPoint, startPoint);\r\n plane\r\n .normal\r\n .copy(joint.axis)\r\n .transformDirection(joint.parent.matrixWorld)\r\n .normalize();\r\n\r\n return tempVector.dot(plane.normal);\r\n\r\n }\r\n\r\n moveRay(toRay) {\r\n\r\n const { raycaster, hitDistance, manipulating } = this;\r\n const { ray } = raycaster;\r\n\r\n if (manipulating) {\r\n\r\n ray.at(hitDistance, prevHitPoint);\r\n toRay.at(hitDistance, newHitPoint);\r\n\r\n let delta = 0;\r\n if (manipulating.jointType === 'revolute' || manipulating.jointType === 'continuous') {\r\n\r\n delta = this.getRevoluteDelta(manipulating, prevHitPoint, newHitPoint);\r\n\r\n } else if (manipulating.jointType === 'prismatic') {\r\n\r\n delta = this.getPrismaticDelta(manipulating, prevHitPoint, newHitPoint);\r\n\r\n }\r\n\r\n if (delta) {\r\n\r\n this.updateJoint(manipulating, manipulating.angle + delta);\r\n\r\n }\r\n\r\n }\r\n\r\n this.raycaster.ray.copy(toRay);\r\n this.update();\r\n\r\n }\r\n\r\n setGrabbed(grabbed) {\r\n\r\n const { hovered, manipulating } = this;\r\n\r\n if (grabbed) {\r\n\r\n if (manipulating !== null || hovered === null) {\r\n\r\n return;\r\n\r\n }\r\n\r\n this.manipulating = hovered;\r\n this.onDragStart(hovered);\r\n\r\n } else {\r\n\r\n if (this.manipulating === null) {\r\n return;\r\n }\r\n\r\n this.onDragEnd(this.manipulating);\r\n this.manipulating = null;\r\n this.update();\r\n\r\n }\r\n\r\n }\r\n\r\n}\r\n\r\nexport class PointerURDFDragControls extends URDFDragControls {\r\n\r\n constructor(scene, camera, domElement) {\r\n\r\n super(scene);\r\n this.camera = camera;\r\n this.domElement = domElement;\r\n\r\n const raycaster = new Raycaster();\r\n const mouse = new Vector2();\r\n\r\n function updateMouse(e) {\r\n\r\n mouse.x = ((e.pageX - domElement.offsetLeft) / domElement.offsetWidth) * 2 - 1;\r\n mouse.y = -((e.pageY - domElement.offsetTop) / domElement.offsetHeight) * 2 + 1;\r\n\r\n }\r\n\r\n this._mouseDown = e => {\r\n\r\n updateMouse(e);\r\n raycaster.setFromCamera(mouse, this.camera);\r\n this.moveRay(raycaster.ray);\r\n this.setGrabbed(true);\r\n\r\n };\r\n\r\n this._mouseMove = e => {\r\n\r\n updateMouse(e);\r\n raycaster.setFromCamera(mouse, this.camera);\r\n this.moveRay(raycaster.ray);\r\n\r\n };\r\n\r\n this._mouseUp = e => {\r\n\r\n updateMouse(e);\r\n raycaster.setFromCamera(mouse, this.camera);\r\n this.moveRay(raycaster.ray);\r\n this.setGrabbed(false);\r\n\r\n };\r\n\r\n domElement.addEventListener('mousedown', this._mouseDown);\r\n domElement.addEventListener('mousemove', this._mouseMove);\r\n domElement.addEventListener('mouseup', this._mouseUp);\r\n\r\n }\r\n\r\n getRevoluteDelta(joint, startPoint, endPoint) {\r\n\r\n const { camera, initialGrabPoint } = this;\r\n\r\n // set up the plane\r\n tempVector\r\n .copy(joint.axis)\r\n .transformDirection(joint.matrixWorld)\r\n .normalize();\r\n pivotPoint\r\n .set(0, 0, 0)\r\n .applyMatrix4(joint.matrixWorld);\r\n plane\r\n .setFromNormalAndCoplanarPoint(tempVector, pivotPoint);\r\n\r\n tempVector\r\n .copy(camera.position)\r\n .sub(initialGrabPoint)\r\n .normalize();\r\n\r\n // if looking into the plane of rotation\r\n if (Math.abs(tempVector.dot(plane.normal)) > 0.3) {\r\n\r\n return super.getRevoluteDelta(joint, startPoint, endPoint);\r\n\r\n } else {\r\n\r\n // get the up direction\r\n tempVector.set(0, 1, 0).transformDirection(camera.matrixWorld);\r\n\r\n // get points projected onto the plane of rotation\r\n plane.projectPoint(startPoint, projectedStartPoint);\r\n plane.projectPoint(endPoint, projectedEndPoint);\r\n\r\n tempVector.set(0, 0, -1).transformDirection(camera.matrixWorld);\r\n tempVector.cross(plane.normal);\r\n tempVector2.subVectors(endPoint, startPoint);\r\n\r\n return tempVector.dot(tempVector2);\r\n\r\n }\r\n\r\n }\r\n\r\n dispose() {\r\n\r\n const { domElement } = this;\r\n domElement.removeEventListener('mousedown', this._mouseDown);\r\n domElement.removeEventListener('mousemove', this._mouseMove);\r\n domElement.removeEventListener('mouseup', this._mouseUp);\r\n\r\n }\r\n\r\n}\r\n","import * as THREE from 'three';\r\nimport URDFViewer from './urdf-viewer-element.js';\r\nimport { PointerURDFDragControls } from './URDFDragControls.js';\r\n\r\n// urdf-manipulator element\r\n// Displays a URDF model that can be manipulated with the mouse\r\n\r\n// Events\r\n// joint-mouseover: Fired when a joint is hovered over\r\n// joint-mouseout: Fired when a joint is no longer hovered over\r\n// manipulate-start: Fires when a joint is manipulated\r\n// manipulate-end: Fires when a joint is done being manipulated\r\nexport default\r\nclass URDFManipulator extends URDFViewer {\r\n\r\n static get observedAttributes() {\r\n\r\n return ['highlight-color', ...super.observedAttributes];\r\n\r\n }\r\n\r\n get disableDragging() { return this.hasAttribute('disable-dragging'); }\r\n set disableDragging(val) { val ? this.setAttribute('disable-dragging', !!val) : this.removeAttribute('disable-dragging'); }\r\n\r\n get highlightColor() { return this.getAttribute('highlight-color') || '#FFFFFF'; }\r\n set highlightColor(val) { val ? this.setAttribute('highlight-color', val) : this.removeAttribute('highlight-color'); }\r\n\r\n constructor(...args) {\r\n\r\n super(...args);\r\n\r\n // The highlight material\r\n this.highlightMaterial =\r\n new THREE.MeshPhongMaterial({\r\n shininess: 10,\r\n color: this.highlightColor,\r\n emissive: this.highlightColor,\r\n emissiveIntensity: 0.25,\r\n });\r\n\r\n const isJoint = j => {\r\n\r\n return j.isURDFJoint && j.jointType !== 'fixed';\r\n\r\n };\r\n\r\n // Highlight the link geometry under a joint\r\n const highlightLinkGeometry = (m, revert) => {\r\n\r\n const traverse = c => {\r\n\r\n // Set or revert the highlight color\r\n if (c.type === 'Mesh') {\r\n\r\n if (revert) {\r\n\r\n c.material = c.__origMaterial;\r\n delete c.__origMaterial;\r\n\r\n } else {\r\n\r\n c.__origMaterial = c.material;\r\n c.material = this.highlightMaterial;\r\n\r\n }\r\n\r\n }\r\n\r\n // Look into the children and stop if the next child is\r\n // another joint\r\n if (c === m || !isJoint(c)) {\r\n\r\n for (let i = 0; i < c.children.length; i++) {\r\n\r\n traverse(c.children[i]);\r\n\r\n }\r\n\r\n }\r\n\r\n };\r\n\r\n traverse(m);\r\n\r\n };\r\n\r\n const el = this.renderer.domElement;\r\n\r\n const dragControls = new PointerURDFDragControls(this.scene, this.camera, el);\r\n dragControls.onDragStart = joint => {\r\n\r\n this.dispatchEvent(new CustomEvent('manipulate-start', { bubbles: true, cancelable: true, detail: joint.name }));\r\n this.controls.enabled = false;\r\n this.redraw();\r\n\r\n };\r\n dragControls.onDragEnd = joint => {\r\n\r\n this.dispatchEvent(new CustomEvent('manipulate-end', { bubbles: true, cancelable: true, detail: joint.name }));\r\n this.controls.enabled = true;\r\n this.redraw();\r\n\r\n };\r\n dragControls.updateJoint = (joint, angle) => {\r\n\r\n this.setJointValue(joint.name, angle);\r\n\r\n };\r\n dragControls.onHover = joint => {\r\n\r\n highlightLinkGeometry(joint, false);\r\n this.dispatchEvent(new CustomEvent('joint-mouseover', { bubbles: true, cancelable: true, detail: joint.name }));\r\n this.redraw();\r\n\r\n };\r\n dragControls.onUnhover = joint => {\r\n\r\n highlightLinkGeometry(joint, true);\r\n this.dispatchEvent(new CustomEvent('joint-mouseout', { bubbles: true, cancelable: true, detail: joint.name }));\r\n this.redraw();\r\n\r\n };\r\n\r\n this.dragControls = dragControls;\r\n\r\n }\r\n\r\n disconnectedCallback() {\r\n\r\n super.disconnectedCallback();\r\n this.dragControls.dispose();\r\n\r\n }\r\n\r\n attributeChangedCallback(attr, oldval, newval) {\r\n\r\n super.attributeChangedCallback(attr, oldval, newval);\r\n\r\n switch (attr) {\r\n\r\n case 'highlight-color':\r\n this.highlightMaterial.color.set(this.highlightColor);\r\n this.highlightMaterial.emissive.set(this.highlightColor);\r\n break;\r\n\r\n }\r\n\r\n }\r\n\r\n};\r\n"],"names":["Vector3","Plane","Raycaster","Vector2","URDFViewer","THREE"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEA;IACA,SAAS,OAAO,CAAC,CAAC,EAAE;AACpB;IACA,IAAI,OAAO,CAAC,CAAC,WAAW,IAAI,CAAC,CAAC,SAAS,KAAK,OAAO,CAAC;AACpD;IACA,CAAC,CAAC;AACF;IACA,SAAS,gBAAgB,CAAC,KAAK,EAAE;AACjC;IACA,IAAI,IAAI,IAAI,GAAG,KAAK,CAAC;IACrB,IAAI,OAAO,IAAI,EAAE;AACjB;IACA,QAAQ,IAAI,OAAO,CAAC,IAAI,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