urdf-loader 0.10.1 → 0.10.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"urdf-viewer-element.js","sources":["../src/urdf-viewer-element.js"],"sourcesContent":["import * as THREE from 'three';\nimport { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';\nimport URDFLoader from './URDFLoader.js';\n\nconst tempVec2 = new THREE.Vector2();\n\n// urdf-viewer element\n// Loads and displays a 3D view of a URDF-formatted robot\n\n// Events\n// urdf-change: Fires when the URDF has finished loading and getting processed\n// urdf-processed: Fires when the URDF has finished loading and getting processed\n// geometry-loaded: Fires when all the geometry has been fully loaded\n// ignore-limits-change: Fires when the 'ignore-limits' attribute changes\n// angle-change: Fires when an angle changes\nexport default\nclass URDFViewer extends HTMLElement {\n\n static get observedAttributes() {\n\n return ['package', 'urdf', 'up', 'display-shadow', 'ambient-color', 'ignore-limits'];\n\n }\n\n get package() { return this.getAttribute('package') || ''; }\n set package(val) { this.setAttribute('package', val); }\n\n get urdf() { return this.getAttribute('urdf') || ''; }\n set urdf(val) { this.setAttribute('urdf', val); }\n\n get ignoreLimits() { return this.hasAttribute('ignore-limits') || false; }\n set ignoreLimits(val) { val ? this.setAttribute('ignore-limits', val) : this.removeAttribute('ignore-limits'); }\n\n get up() { return this.getAttribute('up') || '+Z'; }\n set up(val) { this.setAttribute('up', val); }\n\n get displayShadow() { return this.hasAttribute('display-shadow') || false; }\n set displayShadow(val) { val ? this.setAttribute('display-shadow', '') : this.removeAttribute('display-shadow'); }\n\n get ambientColor() { return this.getAttribute('ambient-color') || '#455A64'; }\n set ambientColor(val) { val ? this.setAttribute('ambient-color', val) : this.removeAttribute('ambient-color'); }\n\n get autoRedraw() { return this.hasAttribute('auto-redraw') || false; }\n set autoRedraw(val) { val ? this.setAttribute('auto-redraw', true) : this.removeAttribute('auto-redraw'); }\n\n get noAutoRecenter() { return this.hasAttribute('no-auto-recenter') || false; }\n set noAutoRecenter(val) { val ? this.setAttribute('no-auto-recenter', true) : this.removeAttribute('no-auto-recenter'); }\n\n get jointValues() {\n\n const values = {};\n if (this.robot) {\n\n for (const name in this.robot.joints) {\n\n const joint = this.robot.joints[name];\n values[name] = joint.jointValue.length === 1 ? joint.angle : [...joint.jointValue];\n\n }\n\n }\n\n return values;\n\n }\n set jointValues(val) { this.setJointValues(val); }\n\n get angles() {\n\n return this.jointValues;\n\n }\n set angles(v) {\n\n this.jointValues = v;\n\n }\n\n /* Lifecycle Functions */\n constructor() {\n\n super();\n\n this._requestId = 0;\n this._dirty = false;\n this._loadScheduled = false;\n this.robot = null;\n this.loadMeshFunc = null;\n this.urlModifierFunc = null;\n\n // Scene setup\n const scene = new THREE.Scene();\n\n const ambientLight = new THREE.HemisphereLight(this.ambientColor, '#000');\n ambientLight.groundColor.lerp(ambientLight.color, 0.5);\n ambientLight.intensity = 0.5;\n ambientLight.position.set(0, 1, 0);\n scene.add(ambientLight);\n\n // Light setup\n const dirLight = new THREE.DirectionalLight(0xffffff);\n dirLight.position.set(4, 10, 1);\n dirLight.shadow.mapSize.width = 2048;\n dirLight.shadow.mapSize.height = 2048;\n dirLight.shadow.normalBias = 0.001;\n dirLight.castShadow = true;\n scene.add(dirLight);\n scene.add(dirLight.target);\n\n // Renderer setup\n const renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true });\n renderer.setClearColor(0xffffff);\n renderer.setClearAlpha(0);\n renderer.shadowMap.enabled = true;\n renderer.shadowMap.type = THREE.PCFSoftShadowMap;\n renderer.outputEncoding = THREE.sRGBEncoding;\n\n // Camera setup\n const camera = new THREE.PerspectiveCamera(75, 1, 0.1, 1000);\n camera.position.z = -10;\n\n // World setup\n const world = new THREE.Object3D();\n scene.add(world);\n\n const plane = new THREE.Mesh(\n new THREE.PlaneBufferGeometry(40, 40),\n new THREE.ShadowMaterial({ side: THREE.DoubleSide, transparent: true, opacity: 0.5 }),\n );\n plane.rotation.x = -Math.PI / 2;\n plane.position.y = -0.5;\n plane.receiveShadow = true;\n plane.scale.set(10, 10, 10);\n scene.add(plane);\n\n // Controls setup\n const controls = new OrbitControls(camera, renderer.domElement);\n controls.rotateSpeed = 2.0;\n controls.zoomSpeed = 5;\n controls.panSpeed = 2;\n controls.enableZoom = true;\n controls.enableDamping = false;\n controls.maxDistance = 50;\n controls.minDistance = 0.25;\n controls.addEventListener('change', () => this.recenter());\n\n this.scene = scene;\n this.world = world;\n this.renderer = renderer;\n this.camera = camera;\n this.controls = controls;\n this.plane = plane;\n this.directionalLight = dirLight;\n this.ambientLight = ambientLight;\n\n this._setUp(this.up);\n\n const _renderLoop = () => {\n\n if (this.parentNode) {\n\n this.updateSize();\n\n if (this._dirty || this.autoRedraw) {\n\n if (!this.noAutoRecenter) {\n\n this._updateEnvironment();\n }\n\n this.renderer.render(scene, camera);\n this._dirty = false;\n\n }\n\n // update controls after the environment in\n // case the controls are retargeted\n this.controls.update();\n\n }\n this._renderLoopId = requestAnimationFrame(_renderLoop);\n\n };\n _renderLoop();\n\n }\n\n connectedCallback() {\n\n // Add our initialize styles for the element if they haven't\n // been added yet\n if (!this.constructor._styletag) {\n\n const styletag = document.createElement('style');\n styletag.innerHTML =\n `\n ${ this.tagName } { display: block; }\n ${ this.tagName } canvas {\n width: 100%;\n height: 100%;\n }\n `;\n document.head.appendChild(styletag);\n this.constructor._styletag = styletag;\n\n }\n\n // add the renderer\n if (this.childElementCount === 0) {\n\n this.appendChild(this.renderer.domElement);\n\n }\n\n this.updateSize();\n requestAnimationFrame(() => this.updateSize());\n\n }\n\n disconnectedCallback() {\n\n cancelAnimationFrame(this._renderLoopId);\n\n }\n\n attributeChangedCallback(attr, oldval, newval) {\n\n this.recenter();\n\n switch (attr) {\n\n case 'package':\n case 'urdf': {\n\n this._scheduleLoad();\n break;\n\n }\n\n case 'up': {\n\n this._setUp(this.up);\n break;\n\n }\n\n case 'ambient-color': {\n\n this.ambientLight.color.set(this.ambientColor);\n this.ambientLight.groundColor.set('#000').lerp(this.ambientLight.color, 0.5);\n break;\n\n }\n\n case 'ignore-limits': {\n\n this._setIgnoreLimits(this.ignoreLimits, true);\n break;\n\n }\n\n }\n\n }\n\n /* Public API */\n updateSize() {\n\n const r = this.renderer;\n const w = this.clientWidth;\n const h = this.clientHeight;\n const currsize = r.getSize(tempVec2);\n\n if (currsize.width !== w || currsize.height !== h) {\n\n this.recenter();\n\n }\n\n r.setPixelRatio(window.devicePixelRatio);\n r.setSize(w, h, false);\n\n this.camera.aspect = w / h;\n this.camera.updateProjectionMatrix();\n\n }\n\n redraw() {\n\n this._dirty = true;\n }\n\n recenter() {\n\n this._updateEnvironment();\n this.redraw();\n\n }\n\n // Set the joint with jointName to\n // angle in degrees\n setJointValue(jointName, ...values) {\n\n if (!this.robot) return;\n if (!this.robot.joints[jointName]) return;\n\n if (this.robot.joints[jointName].setJointValue(...values)) {\n\n this.redraw();\n this.dispatchEvent(new CustomEvent('angle-change', { bubbles: true, cancelable: true, detail: jointName }));\n\n }\n\n }\n\n setJointValues(values) {\n\n for (const name in values) this.setJointValue(name, values[name]);\n\n }\n\n /* Private Functions */\n // Updates the position of the plane to be at the\n // lowest point below the robot and focuses the\n // camera on the center of the scene\n _updateEnvironment() {\n\n if (!this.robot) return;\n\n this.world.updateMatrixWorld();\n\n const bbox = new THREE.Box3();\n bbox.setFromObject(this.robot);\n\n const center = bbox.getCenter(new THREE.Vector3());\n this.controls.target.y = center.y;\n this.plane.position.y = bbox.min.y - 1e-3;\n\n const dirLight = this.directionalLight;\n dirLight.castShadow = this.displayShadow;\n\n if (this.displayShadow) {\n\n // Update the shadow camera rendering bounds to encapsulate the\n // model. We use the bounding sphere of the bounding box for\n // simplicity -- this could be a tighter fit.\n const sphere = bbox.getBoundingSphere(new THREE.Sphere());\n const minmax = sphere.radius;\n const cam = dirLight.shadow.camera;\n cam.left = cam.bottom = -minmax;\n cam.right = cam.top = minmax;\n\n // Update the camera to focus on the center of the model so the\n // shadow can encapsulate it\n const offset = dirLight.position.clone().sub(dirLight.target.position);\n dirLight.target.position.copy(center);\n dirLight.position.copy(center).add(offset);\n\n cam.updateProjectionMatrix();\n\n }\n\n }\n\n _scheduleLoad() {\n\n // if our current model is already what's being requested\n // or has been loaded then early out\n if (this._prevload === `${ this.package }|${ this.urdf }`) return;\n this._prevload = `${ this.package }|${ this.urdf }`;\n\n // if we're already waiting on a load then early out\n if (this._loadScheduled) return;\n this._loadScheduled = true;\n\n if (this.robot) {\n\n this.robot.traverse(c => c.dispose && c.dispose());\n this.robot.parent.remove(this.robot);\n this.robot = null;\n\n }\n\n requestAnimationFrame(() => {\n\n this._loadUrdf(this.package, this.urdf);\n this._loadScheduled = false;\n\n });\n\n }\n\n // Watch the package and urdf field and load the robot model.\n // This should _only_ be called from _scheduleLoad because that\n // ensures the that current robot has been removed\n _loadUrdf(pkg, urdf) {\n\n this.dispatchEvent(new CustomEvent('urdf-change', { bubbles: true, cancelable: true, composed: true }));\n\n if (urdf) {\n\n // Keep track of this request and make\n // sure it doesn't get overwritten by\n // a subsequent one\n this._requestId++;\n const requestId = this._requestId;\n\n const updateMaterials = mesh => {\n\n mesh.traverse(c => {\n\n if (c.isMesh) {\n\n c.castShadow = true;\n c.receiveShadow = true;\n\n if (c.material) {\n\n const mats =\n (Array.isArray(c.material) ? c.material : [c.material])\n .map(m => {\n\n if (m instanceof THREE.MeshBasicMaterial) {\n\n m = new THREE.MeshPhongMaterial();\n\n }\n\n if (m.map) {\n\n m.map.encoding = THREE.GammaEncoding;\n\n }\n\n return m;\n\n });\n c.material = mats.length === 1 ? mats[0] : mats;\n\n }\n\n }\n\n });\n\n };\n\n if (pkg.includes(':') && (pkg.split(':')[1].substring(0, 2)) !== '//') {\n // E.g. pkg = \"pkg_name: path/to/pkg_name, pk2: path2/to/pk2\"}\n\n // Convert pkg(s) into a map. E.g.\n // { \"pkg_name\": \"path/to/pkg_name\",\n // \"pk2\": \"path2/to/pk2\" }\n\n pkg = pkg.split(',').reduce((map, value) => {\n\n const split = value.split(/:/).filter(x => !!x);\n const pkgName = split.shift().trim();\n const pkgPath = split.join(':').trim();\n map[pkgName] = pkgPath;\n\n return map;\n\n }, {});\n }\n\n let robot = null;\n const manager = new THREE.LoadingManager();\n manager.onLoad = () => {\n\n // If another request has come in to load a new\n // robot, then ignore this one\n if (this._requestId !== requestId) {\n\n robot.traverse(c => c.dispose && c.dispose());\n return;\n\n }\n\n this.robot = robot;\n this.world.add(robot);\n updateMaterials(robot);\n\n this._setIgnoreLimits(this.ignoreLimits);\n\n this.dispatchEvent(new CustomEvent('urdf-processed', { bubbles: true, cancelable: true, composed: true }));\n this.dispatchEvent(new CustomEvent('geometry-loaded', { bubbles: true, cancelable: true, composed: true }));\n\n this.recenter();\n\n };\n\n if (this.urlModifierFunc) {\n\n manager.setURLModifier(this.urlModifierFunc);\n\n }\n\n const loader = new URDFLoader(manager);\n loader.packages = pkg;\n loader.loadMeshCb = this.loadMeshFunc;\n loader.fetchOptions = { mode: 'cors', credentials: 'same-origin' };\n loader.load(urdf, model => robot = model);\n\n }\n\n }\n\n // Watch the coordinate frame and update the\n // rotation of the scene to match\n _setUp(up) {\n\n if (!up) up = '+Z';\n up = up.toUpperCase();\n const sign = up.replace(/[^-+]/g, '')[0] || '+';\n const axis = up.replace(/[^XYZ]/gi, '')[0] || 'Z';\n\n const PI = Math.PI;\n const HALFPI = PI / 2;\n if (axis === 'X') this.world.rotation.set(0, 0, sign === '+' ? HALFPI : -HALFPI);\n if (axis === 'Z') this.world.rotation.set(sign === '+' ? -HALFPI : HALFPI, 0, 0);\n if (axis === 'Y') this.world.rotation.set(sign === '+' ? 0 : PI, 0, 0);\n\n }\n\n // Updates the current robot's angles to ignore\n // joint limits or not\n _setIgnoreLimits(ignore, dispatch = false) {\n\n if (this.robot) {\n\n Object\n .values(this.robot.joints)\n .forEach(joint => {\n\n joint.ignoreLimits = ignore;\n joint.setJointValue(...joint.jointValue);\n\n });\n\n }\n\n if (dispatch) {\n\n this.dispatchEvent(new CustomEvent('ignore-limits-change', { bubbles: true, cancelable: true, composed: true }));\n\n }\n\n }\n\n};\n"],"names":["THREE.Vector2","THREE.Scene","THREE.HemisphereLight","THREE.DirectionalLight","THREE.WebGLRenderer","THREE.PCFSoftShadowMap","THREE.sRGBEncoding","THREE.PerspectiveCamera","THREE.Object3D","THREE.Mesh","THREE.PlaneBufferGeometry","THREE.ShadowMaterial","THREE.DoubleSide","OrbitControls","THREE.Box3","THREE.Vector3","THREE.Sphere","THREE.MeshBasicMaterial","THREE.MeshPhongMaterial","THREE.GammaEncoding","THREE.LoadingManager","URDFLoader"],"mappings":";;;;;;;;;;IAIA,MAAM,QAAQ,GAAG,IAAIA,aAAa,EAAE,CAAC;AACrC;IACA;IACA;AACA;IACA;IACA;IACA;IACA;IACA;IACA;IAEA,MAAM,UAAU,SAAS,WAAW,CAAC;AACrC;IACA,IAAI,WAAW,kBAAkB,GAAG;AACpC;IACA,QAAQ,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,CAAC,CAAC;AAC7F;IACA,KAAK;AACL;IACA,IAAI,IAAI,OAAO,GAAG,EAAE,OAAO,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,EAAE;IAChE,IAAI,IAAI,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,EAAE;AAC3D;IACA,IAAI,IAAI,IAAI,GAAG,EAAE,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE;IAC1D,IAAI,IAAI,IAAI,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE;AACrD;IACA,IAAI,IAAI,YAAY,GAAG,EAAE,OAAO,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,IAAI,KAAK,CAAC,EAAE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AAC,CAAC;AAC7H;IACA,SAAS;AACT;IACA,KAAK;AACL;IACA,CAAC;;;;;;;;"}
1
+ {"version":3,"file":"urdf-viewer-element.js","sources":["../src/urdf-viewer-element.js"],"sourcesContent":["import * as THREE from 'three';\r\nimport { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';\r\nimport URDFLoader from './URDFLoader.js';\r\n\r\nconst tempVec2 = new THREE.Vector2();\r\n\r\n// urdf-viewer element\r\n// Loads and displays a 3D view of a URDF-formatted robot\r\n\r\n// Events\r\n// urdf-change: Fires when the URDF has finished loading and getting processed\r\n// urdf-processed: Fires when the URDF has finished loading and getting processed\r\n// geometry-loaded: Fires when all the geometry has been fully loaded\r\n// ignore-limits-change: Fires when the 'ignore-limits' attribute changes\r\n// angle-change: Fires when an angle changes\r\nexport default\r\nclass URDFViewer extends HTMLElement {\r\n\r\n static get observedAttributes() {\r\n\r\n return ['package', 'urdf', 'up', 'display-shadow', 'ambient-color', 'ignore-limits'];\r\n\r\n }\r\n\r\n get package() { return this.getAttribute('package') || ''; }\r\n set package(val) { this.setAttribute('package', val); }\r\n\r\n get urdf() { return this.getAttribute('urdf') || ''; }\r\n set urdf(val) { this.setAttribute('urdf', val); }\r\n\r\n get ignoreLimits() { return this.hasAttribute('ignore-limits') || false; }\r\n set ignoreLimits(val) { val ? this.setAttribute('ignore-limits', val) : this.removeAttribute('ignore-limits'); }\r\n\r\n get up() { return this.getAttribute('up') || '+Z'; }\r\n set up(val) { this.setAttribute('up', val); }\r\n\r\n get displayShadow() { return this.hasAttribute('display-shadow') || false; }\r\n set displayShadow(val) { val ? this.setAttribute('display-shadow', '') : this.removeAttribute('display-shadow'); }\r\n\r\n get ambientColor() { return this.getAttribute('ambient-color') || '#455A64'; }\r\n set ambientColor(val) { val ? this.setAttribute('ambient-color', val) : this.removeAttribute('ambient-color'); }\r\n\r\n get autoRedraw() { return this.hasAttribute('auto-redraw') || false; }\r\n set autoRedraw(val) { val ? this.setAttribute('auto-redraw', true) : this.removeAttribute('auto-redraw'); }\r\n\r\n get noAutoRecenter() { return this.hasAttribute('no-auto-recenter') || false; }\r\n set noAutoRecenter(val) { val ? this.setAttribute('no-auto-recenter', true) : this.removeAttribute('no-auto-recenter'); }\r\n\r\n get jointValues() {\r\n\r\n const values = {};\r\n if (this.robot) {\r\n\r\n for (const name in this.robot.joints) {\r\n\r\n const joint = this.robot.joints[name];\r\n values[name] = joint.jointValue.length === 1 ? joint.angle : [...joint.jointValue];\r\n\r\n }\r\n\r\n }\r\n\r\n return values;\r\n\r\n }\r\n set jointValues(val) { this.setJointValues(val); }\r\n\r\n get angles() {\r\n\r\n return this.jointValues;\r\n\r\n }\r\n set angles(v) {\r\n\r\n this.jointValues = v;\r\n\r\n }\r\n\r\n /* Lifecycle Functions */\r\n constructor() {\r\n\r\n super();\r\n\r\n this._requestId = 0;\r\n this._dirty = false;\r\n this._loadScheduled = false;\r\n this.robot = null;\r\n this.loadMeshFunc = null;\r\n this.urlModifierFunc = null;\r\n\r\n // Scene setup\r\n const scene = new THREE.Scene();\r\n\r\n const ambientLight = new THREE.HemisphereLight(this.ambientColor, '#000');\r\n ambientLight.groundColor.lerp(ambientLight.color, 0.5);\r\n ambientLight.intensity = 0.5;\r\n ambientLight.position.set(0, 1, 0);\r\n scene.add(ambientLight);\r\n\r\n // Light setup\r\n const dirLight = new THREE.DirectionalLight(0xffffff);\r\n dirLight.position.set(4, 10, 1);\r\n dirLight.shadow.mapSize.width = 2048;\r\n dirLight.shadow.mapSize.height = 2048;\r\n dirLight.shadow.normalBias = 0.001;\r\n dirLight.castShadow = true;\r\n scene.add(dirLight);\r\n scene.add(dirLight.target);\r\n\r\n // Renderer setup\r\n const renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true });\r\n renderer.setClearColor(0xffffff);\r\n renderer.setClearAlpha(0);\r\n renderer.shadowMap.enabled = true;\r\n renderer.shadowMap.type = THREE.PCFSoftShadowMap;\r\n renderer.outputEncoding = THREE.sRGBEncoding;\r\n\r\n // Camera setup\r\n const camera = new THREE.PerspectiveCamera(75, 1, 0.1, 1000);\r\n camera.position.z = -10;\r\n\r\n // World setup\r\n const world = new THREE.Object3D();\r\n scene.add(world);\r\n\r\n const plane = new THREE.Mesh(\r\n new THREE.PlaneBufferGeometry(40, 40),\r\n new THREE.ShadowMaterial({ side: THREE.DoubleSide, transparent: true, opacity: 0.5 }),\r\n );\r\n plane.rotation.x = -Math.PI / 2;\r\n plane.position.y = -0.5;\r\n plane.receiveShadow = true;\r\n plane.scale.set(10, 10, 10);\r\n scene.add(plane);\r\n\r\n // Controls setup\r\n const controls = new OrbitControls(camera, renderer.domElement);\r\n controls.rotateSpeed = 2.0;\r\n controls.zoomSpeed = 5;\r\n controls.panSpeed = 2;\r\n controls.enableZoom = true;\r\n controls.enableDamping = false;\r\n controls.maxDistance = 50;\r\n controls.minDistance = 0.25;\r\n controls.addEventListener('change', () => this.recenter());\r\n\r\n this.scene = scene;\r\n this.world = world;\r\n this.renderer = renderer;\r\n this.camera = camera;\r\n this.controls = controls;\r\n this.plane = plane;\r\n this.directionalLight = dirLight;\r\n this.ambientLight = ambientLight;\r\n\r\n this._setUp(this.up);\r\n\r\n const _renderLoop = () => {\r\n\r\n if (this.parentNode) {\r\n\r\n this.updateSize();\r\n\r\n if (this._dirty || this.autoRedraw) {\r\n\r\n if (!this.noAutoRecenter) {\r\n\r\n this._updateEnvironment();\r\n }\r\n\r\n this.renderer.render(scene, camera);\r\n this._dirty = false;\r\n\r\n }\r\n\r\n // update controls after the environment in\r\n // case the controls are retargeted\r\n this.controls.update();\r\n\r\n }\r\n this._renderLoopId = requestAnimationFrame(_renderLoop);\r\n\r\n };\r\n _renderLoop();\r\n\r\n }\r\n\r\n connectedCallback() {\r\n\r\n // Add our initialize styles for the element if they haven't\r\n // been added yet\r\n if (!this.constructor._styletag) {\r\n\r\n const styletag = document.createElement('style');\r\n styletag.innerHTML =\r\n `\r\n ${ this.tagName } { display: block; }\r\n ${ this.tagName } canvas {\r\n width: 100%;\r\n height: 100%;\r\n }\r\n `;\r\n document.head.appendChild(styletag);\r\n this.constructor._styletag = styletag;\r\n\r\n }\r\n\r\n // add the renderer\r\n if (this.childElementCount === 0) {\r\n\r\n this.appendChild(this.renderer.domElement);\r\n\r\n }\r\n\r\n this.updateSize();\r\n requestAnimationFrame(() => this.updateSize());\r\n\r\n }\r\n\r\n disconnectedCallback() {\r\n\r\n cancelAnimationFrame(this._renderLoopId);\r\n\r\n }\r\n\r\n attributeChangedCallback(attr, oldval, newval) {\r\n\r\n this.recenter();\r\n\r\n switch (attr) {\r\n\r\n case 'package':\r\n case 'urdf': {\r\n\r\n this._scheduleLoad();\r\n break;\r\n\r\n }\r\n\r\n case 'up': {\r\n\r\n this._setUp(this.up);\r\n break;\r\n\r\n }\r\n\r\n case 'ambient-color': {\r\n\r\n this.ambientLight.color.set(this.ambientColor);\r\n this.ambientLight.groundColor.set('#000').lerp(this.ambientLight.color, 0.5);\r\n break;\r\n\r\n }\r\n\r\n case 'ignore-limits': {\r\n\r\n this._setIgnoreLimits(this.ignoreLimits, true);\r\n break;\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n /* Public API */\r\n updateSize() {\r\n\r\n const r = this.renderer;\r\n const w = this.clientWidth;\r\n const h = this.clientHeight;\r\n const currsize = r.getSize(tempVec2);\r\n\r\n if (currsize.width !== w || currsize.height !== h) {\r\n\r\n this.recenter();\r\n\r\n }\r\n\r\n r.setPixelRatio(window.devicePixelRatio);\r\n r.setSize(w, h, false);\r\n\r\n this.camera.aspect = w / h;\r\n this.camera.updateProjectionMatrix();\r\n\r\n }\r\n\r\n redraw() {\r\n\r\n this._dirty = true;\r\n }\r\n\r\n recenter() {\r\n\r\n this._updateEnvironment();\r\n this.redraw();\r\n\r\n }\r\n\r\n // Set the joint with jointName to\r\n // angle in degrees\r\n setJointValue(jointName, ...values) {\r\n\r\n if (!this.robot) return;\r\n if (!this.robot.joints[jointName]) return;\r\n\r\n if (this.robot.joints[jointName].setJointValue(...values)) {\r\n\r\n this.redraw();\r\n this.dispatchEvent(new CustomEvent('angle-change', { bubbles: true, cancelable: true, detail: jointName }));\r\n\r\n }\r\n\r\n }\r\n\r\n setJointValues(values) {\r\n\r\n for (const name in values) this.setJointValue(name, values[name]);\r\n\r\n }\r\n\r\n /* Private Functions */\r\n // Updates the position of the plane to be at the\r\n // lowest point below the robot and focuses the\r\n // camera on the center of the scene\r\n _updateEnvironment() {\r\n\r\n if (!this.robot) return;\r\n\r\n this.world.updateMatrixWorld();\r\n\r\n const bbox = new THREE.Box3();\r\n bbox.setFromObject(this.robot);\r\n\r\n const center = bbox.getCenter(new THREE.Vector3());\r\n this.controls.target.y = center.y;\r\n this.plane.position.y = bbox.min.y - 1e-3;\r\n\r\n const dirLight = this.directionalLight;\r\n dirLight.castShadow = this.displayShadow;\r\n\r\n if (this.displayShadow) {\r\n\r\n // Update the shadow camera rendering bounds to encapsulate the\r\n // model. We use the bounding sphere of the bounding box for\r\n // simplicity -- this could be a tighter fit.\r\n const sphere = bbox.getBoundingSphere(new THREE.Sphere());\r\n const minmax = sphere.radius;\r\n const cam = dirLight.shadow.camera;\r\n cam.left = cam.bottom = -minmax;\r\n cam.right = cam.top = minmax;\r\n\r\n // Update the camera to focus on the center of the model so the\r\n // shadow can encapsulate it\r\n const offset = dirLight.position.clone().sub(dirLight.target.position);\r\n dirLight.target.position.copy(center);\r\n dirLight.position.copy(center).add(offset);\r\n\r\n cam.updateProjectionMatrix();\r\n\r\n }\r\n\r\n }\r\n\r\n _scheduleLoad() {\r\n\r\n // if our current model is already what's being requested\r\n // or has been loaded then early out\r\n if (this._prevload === `${ this.package }|${ this.urdf }`) return;\r\n this._prevload = `${ this.package }|${ this.urdf }`;\r\n\r\n // if we're already waiting on a load then early out\r\n if (this._loadScheduled) return;\r\n this._loadScheduled = true;\r\n\r\n if (this.robot) {\r\n\r\n this.robot.traverse(c => c.dispose && c.dispose());\r\n this.robot.parent.remove(this.robot);\r\n this.robot = null;\r\n\r\n }\r\n\r\n requestAnimationFrame(() => {\r\n\r\n this._loadUrdf(this.package, this.urdf);\r\n this._loadScheduled = false;\r\n\r\n });\r\n\r\n }\r\n\r\n // Watch the package and urdf field and load the robot model.\r\n // This should _only_ be called from _scheduleLoad because that\r\n // ensures the that current robot has been removed\r\n _loadUrdf(pkg, urdf) {\r\n\r\n this.dispatchEvent(new CustomEvent('urdf-change', { bubbles: true, cancelable: true, composed: true }));\r\n\r\n if (urdf) {\r\n\r\n // Keep track of this request and make\r\n // sure it doesn't get overwritten by\r\n // a subsequent one\r\n this._requestId++;\r\n const requestId = this._requestId;\r\n\r\n const updateMaterials = mesh => {\r\n\r\n mesh.traverse(c => {\r\n\r\n if (c.isMesh) {\r\n\r\n c.castShadow = true;\r\n c.receiveShadow = true;\r\n\r\n if (c.material) {\r\n\r\n const mats =\r\n (Array.isArray(c.material) ? c.material : [c.material])\r\n .map(m => {\r\n\r\n if (m instanceof THREE.MeshBasicMaterial) {\r\n\r\n m = new THREE.MeshPhongMaterial();\r\n\r\n }\r\n\r\n if (m.map) {\r\n\r\n m.map.encoding = THREE.GammaEncoding;\r\n\r\n }\r\n\r\n return m;\r\n\r\n });\r\n c.material = mats.length === 1 ? mats[0] : mats;\r\n\r\n }\r\n\r\n }\r\n\r\n });\r\n\r\n };\r\n\r\n if (pkg.includes(':') && (pkg.split(':')[1].substring(0, 2)) !== '//') {\r\n // E.g. pkg = \"pkg_name: path/to/pkg_name, pk2: path2/to/pk2\"}\r\n\r\n // Convert pkg(s) into a map. E.g.\r\n // { \"pkg_name\": \"path/to/pkg_name\",\r\n // \"pk2\": \"path2/to/pk2\" }\r\n\r\n pkg = pkg.split(',').reduce((map, value) => {\r\n\r\n const split = value.split(/:/).filter(x => !!x);\r\n const pkgName = split.shift().trim();\r\n const pkgPath = split.join(':').trim();\r\n map[pkgName] = pkgPath;\r\n\r\n return map;\r\n\r\n }, {});\r\n }\r\n\r\n let robot = null;\r\n const manager = new THREE.LoadingManager();\r\n manager.onLoad = () => {\r\n\r\n // If another request has come in to load a new\r\n // robot, then ignore this one\r\n if (this._requestId !== requestId) {\r\n\r\n robot.traverse(c => c.dispose && c.dispose());\r\n return;\r\n\r\n }\r\n\r\n this.robot = robot;\r\n this.world.add(robot);\r\n updateMaterials(robot);\r\n\r\n this._setIgnoreLimits(this.ignoreLimits);\r\n\r\n this.dispatchEvent(new CustomEvent('urdf-processed', { bubbles: true, cancelable: true, composed: true }));\r\n this.dispatchEvent(new CustomEvent('geometry-loaded', { bubbles: true, cancelable: true, composed: true }));\r\n\r\n this.recenter();\r\n\r\n };\r\n\r\n if (this.urlModifierFunc) {\r\n\r\n manager.setURLModifier(this.urlModifierFunc);\r\n\r\n }\r\n\r\n const loader = new URDFLoader(manager);\r\n loader.packages = pkg;\r\n loader.loadMeshCb = this.loadMeshFunc;\r\n loader.fetchOptions = { mode: 'cors', credentials: 'same-origin' };\r\n loader.load(urdf, model => robot = model);\r\n\r\n }\r\n\r\n }\r\n\r\n // Watch the coordinate frame and update the\r\n // rotation of the scene to match\r\n _setUp(up) {\r\n\r\n if (!up) up = '+Z';\r\n up = up.toUpperCase();\r\n const sign = up.replace(/[^-+]/g, '')[0] || '+';\r\n const axis = up.replace(/[^XYZ]/gi, '')[0] || 'Z';\r\n\r\n const PI = Math.PI;\r\n const HALFPI = PI / 2;\r\n if (axis === 'X') this.world.rotation.set(0, 0, sign === '+' ? HALFPI : -HALFPI);\r\n if (axis === 'Z') this.world.rotation.set(sign === '+' ? -HALFPI : HALFPI, 0, 0);\r\n if (axis === 'Y') this.world.rotation.set(sign === '+' ? 0 : PI, 0, 0);\r\n\r\n }\r\n\r\n // Updates the current robot's angles to ignore\r\n // joint limits or not\r\n _setIgnoreLimits(ignore, dispatch = false) {\r\n\r\n if (this.robot) {\r\n\r\n Object\r\n .values(this.robot.joints)\r\n .forEach(joint => {\r\n\r\n joint.ignoreLimits = ignore;\r\n joint.setJointValue(...joint.jointValue);\r\n\r\n });\r\n\r\n }\r\n\r\n if (dispatch) {\r\n\r\n this.dispatchEvent(new CustomEvent('ignore-limits-change', { bubbles: true, cancelable: true, composed: true }));\r\n\r\n }\r\n\r\n }\r\n\r\n};\r\n"],"names":["THREE","OrbitControls","URDFLoader"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIA,MAAM,QAAQ,GAAG,IAAIA,gBAAK,CAAC,OAAO,EAAE,CAAC;AACrC;IACA;IACA;AACA;IACA;IACA;IACA;IACA;IACA;IACA;IAEA,MAAM,UAAU,SAAS,WAAW,CAAC;AACrC;IACA,IAAI,WAAW,kBAAkB,GAAG;AACpC;IACA,QAAQ,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,CAAC,CAAC;AAC7F;IACA,KAAK;AACL;IACA,IAAI,IAAI,OAAO,GAAG,EAAE,OAAO,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,EAAE;IAChE,IAAI,IAAI,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,EAAE;AAC3D;IACA,IAAI,IAAI,IAAI,GAAG,EAAE,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE;IAC1D,IAAI,IAAI,IAAI,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE;AACrD;IACA,IAAI,IAAI,YAAY,GAAG,EAAE,OAAO,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,IAAI,KAAK,CAAC,EAAE;IAC9E,IAAI,IAAI,YAAY,CAAC,GAAG,EAAE,EAAE,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC,EAAE;AACpH;IACA,IAAI,IAAI,EAAE,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I,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAC7H;IACA,SAAS;AACT;IACA,KAAK;AACL;IACA,CAAC;;;;;;;;"}
package/CHANGELOG.md DELETED
@@ -1,264 +0,0 @@
1
- # Changelog
2
- All notable changes to this project will be documented in this file.
3
-
4
- The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
- and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
-
7
- ## [0.10.1] - 2021-04-16
8
- ### Added
9
- - Reexport URDF Class types from the root file.
10
-
11
- ## [0.10.0] - 2021-04-16
12
- ### Fixed
13
- - `URDFJoint.axis` not correctly defaulting to `1, 0, 0`.
14
-
15
- ### Changed
16
- - Added `"type": "module"` to the package.json and made the main entry file point to the es6 module.
17
- - Export URDF Class types as `interafaces` rather than `classes`.
18
- - Changed URDF Class type definitions to be exported as `interface` rather than `class`.
19
-
20
- ## [0.9.5] - 2021-01-26
21
- ### Added
22
- - Support for "mimic" joints.
23
-
24
- ### Fixed
25
- - Incorrect mouseover and mouseout event firing with the manipulation element.
26
-
27
- ## [0.9.3] - 2021-01-19
28
- ### Fixed
29
- - Unnecessary creation of a new quaternion when setting a joint angle.
30
- - Throw a human readable error when fetch fails.
31
- - The model failing to clone if the object names were changed.
32
-
33
- ### Added
34
- - Ability to set the `packages` option to a function.
35
-
36
- ## [0.9.2] - 2020-10-23
37
- ### Added
38
- - Normal bias to shadows in URDFViewerElement.
39
-
40
- ### Fixed
41
- - Apply the mesh node scale to the parent visual node rather than the loaded mesh.
42
- - URDFViewerElement incorrectly calling setJointValue.
43
- - Incorrectly preserving rotation from loaded meshes.
44
-
45
- ## [0.9.1] - 2020-10-13
46
- ### Fixed
47
- - Fix `URDFRobot.setJointValues` not always setting all joint values.
48
-
49
- ## [0.9.0] - 2020-10-09
50
- ### Added
51
- - `URDFRobot.frames` map.
52
- - `URDFRobot.visual` map.
53
- - `URDFRobot.colliders` map.
54
- - Visual and collider nodes now get the name of the associated urdf node.
55
- - Typescript definitions for URDFVisual and URDFCollider objects.
56
- - `setJointValue` function to `URDFJoint` and `URDFRobot`.
57
- - `getFrame` function to `URDFRobot`.
58
-
59
- ### Changed
60
- - Transparent materials now set `depthWrite` to false.
61
- - Removed `setOffset`, `setAngles`, and `setAngle` functions from `URDFJoint` and `URDFRobot`.
62
-
63
- ### Fixed
64
- - Incorrect use of `worldMatrixNeedsUpdate` to `matrixWorldNeedsUpdate`.
65
-
66
- ## [0.8.2] - 2020-06-08
67
- ### Changed
68
- - License text in README to remove unnecessary copy.
69
-
70
- ## [0.8.1] - 2020-03-12
71
- ### Added
72
- - Support for processing pre-parsed XML documents to the `parse` function. A `Document` or `Element` object as returned from `DOMParser` may be passed in place of the xml string.
73
-
74
- ## [0.8.0] - 2020-01-03
75
- ### Changed
76
- - Moved the URDFLoader options to member variables instead of an object paramter to `parse` and `load` functions.
77
- - Added `onError` and `onProgress` callbacks to `load` function.
78
-
79
- ## [0.7.3] - 2019-11-08
80
- ### Fixed
81
- - Incorrect handling of empty "texture" tags that caused materials to display improperly.
82
-
83
- ## [0.7.2] - 2019-09-29
84
- ### Changed
85
- - Caltech license copy.
86
-
87
- ## [0.7.1] - 2019-06-29
88
- ### Fixed
89
- - Typescript definition file for URDFLoader.
90
-
91
- ## [0.7.0] - 2019-06-28
92
- ### Changed
93
- - Use the jsm versions of the loader modules from three.js.
94
- - Bump three.js peer dependency to 0.105.0.
95
-
96
- ## [0.6.3] - 2019-06-28
97
- ### Added
98
- - Support for parsing collision nodes.
99
-
100
- ## [0.6.2] - 2019-04-18
101
- ### Added
102
- - Typescript definition files
103
-
104
- ## [0.6.1] - 2019-03-06
105
- ### Fixed
106
- - Continuous joints not being able to rotate.
107
- - Always parse joint angles to numbers.
108
-
109
- ## [0.6.0] - 2019-02-23
110
- ### Added
111
- - Added `setAngle` and `setAngles` function to the Robot node
112
- - Added `meshLoadFunc` and `urlModifierFunc` functions to `URDFViewer` component.
113
-
114
- ### Changed
115
- - Changed `loadMeshCb` function API to take `url`, `manager`, and `done`.
116
- - Materials defined as "shared" by name in the URDF are shared among meshes, now.
117
- - The root link is now the same as the URDF Robot object.
118
- - Moved the `packages` parameter to the options object.
119
-
120
- ### Removed
121
- - Removed `urdfLoader` and `loadingManager` fields from `URDFViewer` component.
122
-
123
- ## [0.5.3] - 2018-12-17
124
- ### Added
125
- - `matrixWorldNeedsUpdate` is set to true when the URDFJoints are set.
126
-
127
- ### Fixed
128
- - Scale being overwritten on models that are loaded with pre-set scale values.
129
- - Loader not completing if a mesh could not be loaded.
130
-
131
- ## [0.5.2] - 2018-12-5
132
- ### Added
133
- - URDF XML Node to URDF Joint, Link, and Robot objects
134
- - Add clone functionality
135
-
136
- ### Changed
137
- - OnComplete callback now fires once all meshes have loaded
138
- - Removed unnecessary parent when creating a cylinder visual node
139
-
140
- ## [0.5.1] - 2018-11-14
141
- ### Fixed
142
- - Use buffer variants of Box and Sphere geometry.
143
- - Fix the way that roll, pitch, yaw rotations are applied.
144
-
145
- ## [0.5.0] - 2018-11-01
146
- ### Changed
147
- - The root scripts are now es6 import compatible and require a build process to use
148
-
149
- ### Added
150
- - Backward compatible umd versions of the scripts in `/umd`
151
- - Support for shared, named materials in the URDF
152
-
153
- ## [0.4.3] - 2018-10-10
154
- ### Added
155
- - Add `no-auto-recenter` field to the `urdf-viewer` web component.
156
-
157
- ## [0.4.2] - 2018-08-19
158
- ### Added
159
- - Include `example/styles.css`
160
-
161
- ## [0.4.1] - 2018-08-19
162
- ### Changed
163
- - README update
164
-
165
- ## [0.4.0] - 2018-08-19
166
- ### Changed
167
- - Add "path" variable to parse function signature
168
- - URDF paths are no longer resolved relative to the package path
169
- - `parse` function signature changed
170
- - `parse` returns the robot now
171
- - `meshLoadCb` and `fetchOptions` have been moved into an `options` argument object
172
- - Moved all fields from `Object3D.urdf` to the object itself
173
- - Changed `type` to `jointType`
174
-
175
- ### Added
176
- - Add `isURDFRobot`, `isURDFJoint`, `isURDFLink` fields to the robot, joints, and links
177
- - Set the `type` field of the `Object3D` to `URDFRobot`, `URDFJoint`, and `URDFLink`
178
-
179
- ### Removed
180
- - `node` field from the urdf info on joints, links, and the robot
181
-
182
- ## [0.3.5] - 2018-08-07
183
- ### Added
184
- - Add support for providing multiple package paths
185
-
186
- ### Fixed
187
- - Debounce urdf load so errors are not printed when changing models
188
- - Create mesh primitives immediately instead of waiting a frame
189
-
190
- ## [0.3.4] - 2018-07-31
191
- ### Fixed
192
- - Fixed sphere primitives not being added to the model
193
- - Fixed cylinder primitive rotation
194
-
195
- ## [0.3.3] - 2018-07-28
196
- ### Changed
197
- - Make element auto redraw whenever a texture loads
198
-
199
- ### Fixed
200
- - Fix drag and drop file path cleansing in example files
201
- - Fix console error on drag manipulation in manipulation element
202
-
203
- ## [0.3.2] - 2018-07-03
204
- ### Changed
205
- - Add urdf-manipulator element for demo
206
-
207
- ## [0.3.1] - 2018-07-01
208
- ### Fixed
209
- - Fix the example input fields not converting to radians
210
-
211
- ## [0.3.0] - 2018-06-30
212
- ### Changed
213
- - Model bounding box is used to make better use of shadow map resolution.
214
- - Fix joint controls still being clickable when hidden
215
- - Rename `joint.urdf.limits` to `joint.urdf.limit` so it lines up with the URDF definition
216
- - Full `http://` or `file://` uris are supported (package path is not prepended in this case)
217
-
218
- ## [0.2.6] - 2018-06-28
219
- ### Fixed
220
- - Render meshes double sided in shadows
221
- - Disable shadows casting on model when the shadow display is disabled
222
-
223
- ## [0.2.5] - 2018-06-28
224
- ### Changed
225
- - Do not change the material type provided by the mesh loader to MeshLambertMaterial when setting the colors from the URDF.
226
- - Use a hemisphere light and linear rendering in the element and example
227
- - Enable better shadow rendering
228
-
229
- ## [0.2.4] - 2018-06-22
230
- ### Changed
231
- - Change `urdf-viewer` element `up` attribute to default to +Z so it lines up with the default ROS coordinate frame
232
-
233
- ### Fixed
234
- - Fix the default mesh loader throwing an error because `this` was undefined.
235
-
236
- ## [0.2.3] - 2018-06-22
237
- ### Added
238
- - Add the `auto-redraw` attribute to the urdf-viewer element
239
-
240
- ## [0.2.2] - 2018-06-14
241
- ### Added
242
- - Add `redraw()` function to the viewer element
243
- - Add flipped variants of the ATHLETE URDF models
244
-
245
- ### Changed
246
- - Update example to start at a nicer viewing angle
247
- - Update some underlying example code
248
-
249
- ## [0.2.1] - 2018-06-13
250
- ### Changed
251
- - Optimize rendering in `<urdf-viewer>`
252
- - Keep the robot in the middle of the screen in `<urdf-viewer>`
253
- - Adjust the the `<urdf-viewer>` up attribute to line up with the default ROS coordinate frame
254
-
255
- ### Fixed
256
- - Meshes not scaling the by mesh tags `scale` attribute
257
- - Revolute joints rotating the wrong direction
258
-
259
- ## [0.1.2] - 2018-05-28
260
- ### Added
261
- - Support for prismatic joints
262
-
263
- ### Fixed
264
- - Fix not defaulting revolute joint limits to 0