-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroslib.min.js
1 lines (1 loc) · 53.5 KB
/
roslib.min.js
1
!function(){function e(t,i,s){function n(o,a){if(!i[o]){if(!t[o]){var c="function"==typeof require&&require;if(!a&&c)return c(o,!0);if(r)return r(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var h=i[o]={exports:{}};t[o][0].call(h.exports,function(e){return n(t[o][1][e]||e)},h,h.exports,e,t,i,s)}return i[o].exports}for(var r="function"==typeof require&&require,o=0;o<s.length;o++)n(s[o]);return n}return e}()({1:[function(e,t,i){!function(e,i){"use strict";var s=Math.pow(2,-24),n=Math.pow(2,32),r=Math.pow(2,53),o={encode:function(e){function t(e){for(var t=v.byteLength,i=y+e;t<i;)t*=2;if(t!==v.byteLength){var s=d;v=new ArrayBuffer(t),d=new DataView(v);for(var n=y+3>>2,r=0;r<n;++r)d.setUint32(4*r,s.getUint32(4*r))}return m=e,d}function s(){y+=m}function o(e){s(t(8).setFloat64(y,e))}function a(e){s(t(1).setUint8(y,e))}function c(e){for(var i=t(e.length),n=0;n<e.length;++n)i.setUint8(y+n,e[n]);s()}function l(e){s(t(2).setUint16(y,e))}function h(e){s(t(4).setUint32(y,e))}function u(e){var i=e%n,r=(e-i)/n,o=t(8);o.setUint32(y,r),o.setUint32(y+4,i),s()}function f(e,t){t<24?a(e<<5|t):t<256?(a(e<<5|24),a(t)):t<65536?(a(e<<5|25),l(t)):t<4294967296?(a(e<<5|26),h(t)):(a(e<<5|27),u(t))}function p(e){var t;if(!1===e)return a(244);if(!0===e)return a(245);if(null===e)return a(246);if(e===i)return a(247);switch(typeof e){case"number":if(Math.floor(e)===e){if(0<=e&&e<=r)return f(0,e);if(-r<=e&&e<0)return f(1,-(e+1))}return a(251),o(e);case"string":var s=[];for(t=0;t<e.length;++t){var n=e.charCodeAt(t);n<128?s.push(n):n<2048?(s.push(192|n>>6),s.push(128|63&n)):n<55296?(s.push(224|n>>12),s.push(128|n>>6&63),s.push(128|63&n)):(n=(1023&n)<<10,n|=1023&e.charCodeAt(++t),n+=65536,s.push(240|n>>18),s.push(128|n>>12&63),s.push(128|n>>6&63),s.push(128|63&n))}return f(3,s.length),c(s);default:var l;if(Array.isArray(e))for(f(4,l=e.length),t=0;t<l;++t)p(e[t]);else if(e instanceof Uint8Array)f(2,e.length),c(e);else{var h=Object.keys(e);for(f(5,l=h.length),t=0;t<l;++t){var u=h[t];p(u),p(e[u])}}}}var m,v=new ArrayBuffer(256),d=new DataView(v),y=0;if(p(e),"slice"in v)return v.slice(0,y);for(var g=new ArrayBuffer(y),b=new DataView(g),w=0;w<y;++w)b.setUint8(w,d.getUint8(w));return g},decode:function(e,t,r){function o(e,t){return _+=t,e}function a(t){return o(new Uint8Array(e,_,t),t)}function c(){var e=new ArrayBuffer(4),t=new DataView(e),i=f(),n=32768&i,r=31744&i,o=1023&i;if(31744===r)r=261120;else if(0!==r)r+=114688;else if(0!==o)return o*s;return t.setUint32(0,n<<16|r<<13|o<<13),t.getFloat32(0)}function l(){return o(w.getFloat32(_),4)}function h(){return o(w.getFloat64(_),8)}function u(){return o(w.getUint8(_),1)}function f(){return o(w.getUint16(_),2)}function p(){return o(w.getUint32(_),4)}function m(){return p()*n+p()}function v(){return 255===w.getUint8(_)&&(_+=1,!0)}function d(e){if(e<24)return e;if(24===e)return u();if(25===e)return f();if(26===e)return p();if(27===e)return m();if(31===e)return-1;throw"Invalid length encoding"}function y(e){var t=u();if(255===t)return-1;var i=d(31&t);if(i<0||t>>5!==e)throw"Invalid indefinite length element";return i}function g(e,t){for(var i=0;i<t;++i){var s=u();128&s&&(s<224?(s=(31&s)<<6|63&u(),t-=1):s<240?(s=(15&s)<<12|(63&u())<<6|63&u(),t-=2):(s=(15&s)<<18|(63&u())<<12|(63&u())<<6|63&u(),t-=3)),s<65536?e.push(s):(s-=65536,e.push(55296|s>>10),e.push(56320|1023&s))}}function b(){var e,s,n=u(),o=n>>5,f=31&n;if(7===o)switch(f){case 25:return c();case 26:return l();case 27:return h()}if((s=d(f))<0&&(o<2||6<o))throw"Invalid length";switch(o){case 0:return s;case 1:return-1-s;case 2:if(s<0){for(var p=[],m=0;(s=y(o))>=0;)m+=s,p.push(a(s));var w=new Uint8Array(m),_=0;for(e=0;e<p.length;++e)w.set(p[e],_),_+=p[e].length;return w}return a(s);case 3:var x=[];if(s<0)for(;(s=y(o))>=0;)g(x,s);else g(x,s);return String.fromCharCode.apply(null,x);case 4:var T;if(s<0)for(T=[];!v();)T.push(b());else for(T=new Array(s),e=0;e<s;++e)T[e]=b();return T;case 5:var S={};for(e=0;e<s||s<0&&!v();++e)S[b()]=b();return S;case 6:return t(b(),s);case 7:switch(s){case 20:return!1;case 21:return!0;case 22:return null;case 23:return i;default:return r(s)}}}var w=new DataView(e),_=0;"function"!=typeof t&&(t=function(e){return e}),"function"!=typeof r&&(r=function(){return i});var x=b();if(_!==e.byteLength)throw"Remaining bytes";return x}};"function"==typeof define&&define.amd?define("cbor/cbor",o):void 0!==t&&t.exports?t.exports=o:e.CBOR||(e.CBOR=o)}(this)},{}],2:[function(e,t,i){(function(e){(function(){!function(s){function n(){this._events={},this._conf&&r.call(this,this._conf)}function r(e){e?(this._conf=e,e.delimiter&&(this.delimiter=e.delimiter),this._maxListeners=e.maxListeners!==s?e.maxListeners:u,e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this.newListener=e.newListener),e.verboseMemoryLeak&&(this.verboseMemoryLeak=e.verboseMemoryLeak),this.wildcard&&(this.listenerTree={})):this._maxListeners=u}function o(t,i){var s="(node) warning: possible EventEmitter memory leak detected. "+t+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(s+=" Event name: "+i+"."),void 0!==e&&e.emitWarning){var n=new Error(s);n.name="MaxListenersExceededWarning",n.emitter=this,n.count=t,e.emitWarning(n)}else console.error(s),console.trace&&console.trace()}function a(e){this._events={},this.newListener=!1,this.verboseMemoryLeak=!1,r.call(this,e)}function c(e,t,i,s){if(!i)return[];var n,r,o,a,l,h,u,f=[],p=t.length,m=t[s],v=t[s+1];if(s===p&&i._listeners){if("function"==typeof i._listeners)return e&&e.push(i._listeners),[i];for(n=0,r=i._listeners.length;n<r;n++)e&&e.push(i._listeners[n]);return[i]}if("*"===m||"**"===m||i[m]){if("*"===m){for(o in i)"_listeners"!==o&&i.hasOwnProperty(o)&&(f=f.concat(c(e,t,i[o],s+1)));return f}if("**"===m){(u=s+1===p||s+2===p&&"*"===v)&&i._listeners&&(f=f.concat(c(e,t,i,p)));for(o in i)"_listeners"!==o&&i.hasOwnProperty(o)&&("*"===o||"**"===o?(i[o]._listeners&&!u&&(f=f.concat(c(e,t,i[o],p))),f=f.concat(c(e,t,i[o],s))):f=o===v?f.concat(c(e,t,i[o],s+2)):f.concat(c(e,t,i[o],s)));return f}f=f.concat(c(e,t,i[m],s+1))}if((a=i["*"])&&c(e,t,a,s+1),l=i["**"])if(s<p){l._listeners&&c(e,t,l,p);for(o in l)"_listeners"!==o&&l.hasOwnProperty(o)&&(o===v?c(e,t,l[o],s+2):o===m?c(e,t,l[o],s+1):((h={})[o]=l[o],c(e,t,{"**":h},s+1)))}else l._listeners?c(e,t,l,p):l["*"]&&l["*"]._listeners&&c(e,t,l["*"],p);return f}function l(e,t){for(var i=0,n=(e="string"==typeof e?e.split(this.delimiter):e.slice()).length;i+1<n;i++)if("**"===e[i]&&"**"===e[i+1])return;for(var r=this.listenerTree,a=e.shift();a!==s;){if(r[a]||(r[a]={}),r=r[a],0===e.length)return r._listeners?("function"==typeof r._listeners&&(r._listeners=[r._listeners]),r._listeners.push(t),!r._listeners.warned&&this._maxListeners>0&&r._listeners.length>this._maxListeners&&(r._listeners.warned=!0,o.call(this,r._listeners.length,a))):r._listeners=t,!0;a=e.shift()}return!0}var h=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},u=10;a.EventEmitter2=a,a.prototype.delimiter=".",a.prototype.setMaxListeners=function(e){e!==s&&(this._maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e)},a.prototype.event="",a.prototype.once=function(e,t){return this._once(e,t,!1)},a.prototype.prependOnceListener=function(e,t){return this._once(e,t,!0)},a.prototype._once=function(e,t,i){return this._many(e,1,t,i),this},a.prototype.many=function(e,t,i){return this._many(e,t,i,!1)},a.prototype.prependMany=function(e,t,i){return this._many(e,t,i,!0)},a.prototype._many=function(e,t,i,s){function n(){return 0==--t&&r.off(e,n),i.apply(this,arguments)}var r=this;if("function"!=typeof i)throw new Error("many only accepts instances of Function");return n._origin=i,this._on(e,n,s),r},a.prototype.emit=function(){this._events||n.call(this);var e=arguments[0];if("newListener"===e&&!this.newListener&&!this._events.newListener)return!1;var t,i,s,r,o,a=arguments.length;if(this._all&&this._all.length){if(o=this._all.slice(),a>3)for(t=new Array(a),r=0;r<a;r++)t[r]=arguments[r];for(s=0,i=o.length;s<i;s++)switch(this.event=e,a){case 1:o[s].call(this,e);break;case 2:o[s].call(this,e,arguments[1]);break;case 3:o[s].call(this,e,arguments[1],arguments[2]);break;default:o[s].apply(this,t)}}if(this.wildcard){o=[];var l="string"==typeof e?e.split(this.delimiter):e.slice();c.call(this,o,l,this.listenerTree,0)}else{if("function"==typeof(o=this._events[e])){switch(this.event=e,a){case 1:o.call(this);break;case 2:o.call(this,arguments[1]);break;case 3:o.call(this,arguments[1],arguments[2]);break;default:for(t=new Array(a-1),r=1;r<a;r++)t[r-1]=arguments[r];o.apply(this,t)}return!0}o&&(o=o.slice())}if(o&&o.length){if(a>3)for(t=new Array(a-1),r=1;r<a;r++)t[r-1]=arguments[r];for(s=0,i=o.length;s<i;s++)switch(this.event=e,a){case 1:o[s].call(this);break;case 2:o[s].call(this,arguments[1]);break;case 3:o[s].call(this,arguments[1],arguments[2]);break;default:o[s].apply(this,t)}return!0}if(!this._all&&"error"===e)throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");return!!this._all},a.prototype.emitAsync=function(){this._events||n.call(this);var e=arguments[0];if("newListener"===e&&!this.newListener&&!this._events.newListener)return Promise.resolve([!1]);var t,i,s,r,o,a=[],l=arguments.length;if(this._all){if(l>3)for(t=new Array(l),r=1;r<l;r++)t[r]=arguments[r];for(s=0,i=this._all.length;s<i;s++)switch(this.event=e,l){case 1:a.push(this._all[s].call(this,e));break;case 2:a.push(this._all[s].call(this,e,arguments[1]));break;case 3:a.push(this._all[s].call(this,e,arguments[1],arguments[2]));break;default:a.push(this._all[s].apply(this,t))}}if(this.wildcard){o=[];var h="string"==typeof e?e.split(this.delimiter):e.slice();c.call(this,o,h,this.listenerTree,0)}else o=this._events[e];if("function"==typeof o)switch(this.event=e,l){case 1:a.push(o.call(this));break;case 2:a.push(o.call(this,arguments[1]));break;case 3:a.push(o.call(this,arguments[1],arguments[2]));break;default:for(t=new Array(l-1),r=1;r<l;r++)t[r-1]=arguments[r];a.push(o.apply(this,t))}else if(o&&o.length){if(o=o.slice(),l>3)for(t=new Array(l-1),r=1;r<l;r++)t[r-1]=arguments[r];for(s=0,i=o.length;s<i;s++)switch(this.event=e,l){case 1:a.push(o[s].call(this));break;case 2:a.push(o[s].call(this,arguments[1]));break;case 3:a.push(o[s].call(this,arguments[1],arguments[2]));break;default:a.push(o[s].apply(this,t))}}else if(!this._all&&"error"===e)return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(a)},a.prototype.on=function(e,t){return this._on(e,t,!1)},a.prototype.prependListener=function(e,t){return this._on(e,t,!0)},a.prototype.onAny=function(e){return this._onAny(e,!1)},a.prototype.prependAny=function(e){return this._onAny(e,!0)},a.prototype.addListener=a.prototype.on,a.prototype._onAny=function(e,t){if("function"!=typeof e)throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),t?this._all.unshift(e):this._all.push(e),this},a.prototype._on=function(e,t,i){if("function"==typeof e)return this._onAny(e,t),this;if("function"!=typeof t)throw new Error("on only accepts instances of Function");return this._events||n.call(this),this.emit("newListener",e,t),this.wildcard?(l.call(this,e,t),this):(this._events[e]?("function"==typeof this._events[e]&&(this._events[e]=[this._events[e]]),i?this._events[e].unshift(t):this._events[e].push(t),!this._events[e].warned&&this._maxListeners>0&&this._events[e].length>this._maxListeners&&(this._events[e].warned=!0,o.call(this,this._events[e].length,e))):this._events[e]=t,this)},a.prototype.off=function(e,t){function i(e){if(e!==s){var t=Object.keys(e);for(var n in t){var r=t[n],o=e[r];o instanceof Function||"object"!=typeof o||null===o||(Object.keys(o).length>0&&i(e[r]),0===Object.keys(o).length&&delete e[r])}}}if("function"!=typeof t)throw new Error("removeListener only takes instances of Function");var n,r=[];if(this.wildcard){var o="string"==typeof e?e.split(this.delimiter):e.slice();r=c.call(this,null,o,this.listenerTree,0)}else{if(!this._events[e])return this;n=this._events[e],r.push({_listeners:n})}for(var a=0;a<r.length;a++){var l=r[a];if(n=l._listeners,h(n)){for(var u=-1,f=0,p=n.length;f<p;f++)if(n[f]===t||n[f].listener&&n[f].listener===t||n[f]._origin&&n[f]._origin===t){u=f;break}if(u<0)continue;return this.wildcard?l._listeners.splice(u,1):this._events[e].splice(u,1),0===n.length&&(this.wildcard?delete l._listeners:delete this._events[e]),this.emit("removeListener",e,t),this}(n===t||n.listener&&n.listener===t||n._origin&&n._origin===t)&&(this.wildcard?delete l._listeners:delete this._events[e],this.emit("removeListener",e,t))}return i(this.listenerTree),this},a.prototype.offAny=function(e){var t,i=0,s=0;if(e&&this._all&&this._all.length>0){for(i=0,s=(t=this._all).length;i<s;i++)if(e===t[i])return t.splice(i,1),this.emit("removeListenerAny",e),this}else{for(i=0,s=(t=this._all).length;i<s;i++)this.emit("removeListenerAny",t[i]);this._all=[]}return this},a.prototype.removeListener=a.prototype.off,a.prototype.removeAllListeners=function(e){if(0===arguments.length)return!this._events||n.call(this),this;if(this.wildcard)for(var t="string"==typeof e?e.split(this.delimiter):e.slice(),i=c.call(this,null,t,this.listenerTree,0),s=0;s<i.length;s++)i[s]._listeners=null;else this._events&&(this._events[e]=null);return this},a.prototype.listeners=function(e){if(this.wildcard){var t=[],i="string"==typeof e?e.split(this.delimiter):e.slice();return c.call(this,t,i,this.listenerTree,0),t}return this._events||n.call(this),this._events[e]||(this._events[e]=[]),h(this._events[e])||(this._events[e]=[this._events[e]]),this._events[e]},a.prototype.eventNames=function(){return Object.keys(this._events)},a.prototype.listenerCount=function(e){return this.listeners(e).length},a.prototype.listenersAny=function(){return this._all?this._all:[]},"function"==typeof define&&define.amd?define(function(){return a}):"object"==typeof i?t.exports=a:window.EventEmitter2=a}()}).call(this)}).call(this,e("_process"))},{_process:4}],3:[function(e,t,i){"use strict";function s(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var s={};return"abcdefghijklmnopqrst".split("").forEach(function(e){s[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},s)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var i,a,c=s(e),l=1;l<arguments.length;l++){i=Object(arguments[l]);for(var h in i)r.call(i,h)&&(c[h]=i[h]);if(n){a=n(i);for(var u=0;u<a.length;u++)o.call(i,a[u])&&(c[a[u]]=i[a[u]])}}return c}},{}],4:[function(e,t,i){function s(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function r(e){if(u===setTimeout)return setTimeout(e,0);if((u===s||!u)&&setTimeout)return u=setTimeout,setTimeout(e,0);try{return u(e,0)}catch(t){try{return u.call(null,e,0)}catch(t){return u.call(this,e,0)}}}function o(e){if(f===clearTimeout)return clearTimeout(e);if((f===n||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function a(){d&&m&&(d=!1,m.length?v=m.concat(v):y=-1,v.length&&c())}function c(){if(!d){var e=r(a);d=!0;for(var t=v.length;t;){for(m=v,v=[];++y<t;)m&&m[y].run();y=-1,t=v.length}m=null,d=!1,o(e)}}function l(e,t){this.fun=e,this.array=t}function h(){}var u,f,p=t.exports={};!function(){try{u="function"==typeof setTimeout?setTimeout:s}catch(e){u=s}try{f="function"==typeof clearTimeout?clearTimeout:n}catch(e){f=n}}();var m,v=[],d=!1,y=-1;p.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];v.push(new l(e,t)),1!==v.length||d||r(c)},l.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=h,p.addListener=h,p.once=h,p.off=h,p.removeListener=h,p.removeAllListeners=h,p.emit=h,p.prependListener=h,p.prependOnceListener=h,p.listeners=function(e){return[]},p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},{}],5:[function(e,t,i){var s=this&&this.ROSLIB||{REVISION:"1.0.1"},n=e("object-assign");n(s,e("./core")),n(s,e("./actionlib")),n(s,e("./math")),n(s,e("./tf")),n(s,e("./urdf")),t.exports=s},{"./actionlib":11,"./core":20,"./math":25,"./tf":28,"./urdf":40,"object-assign":3}],6:[function(e,t,i){(function(t){(function(){t.ROSLIB=e("./RosLib")}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./RosLib":5}],7:[function(e,t,i){function s(e){var t=this;e=e||{},this.ros=e.ros,this.serverName=e.serverName,this.actionName=e.actionName,this.timeout=e.timeout,this.omitFeedback=e.omitFeedback,this.omitStatus=e.omitStatus,this.omitResult=e.omitResult,this.goals={};var i=!1;this.feedbackListener=new n({ros:this.ros,name:this.serverName+"/feedback",messageType:this.actionName+"Feedback"}),this.statusListener=new n({ros:this.ros,name:this.serverName+"/status",messageType:"actionlib_msgs/GoalStatusArray"}),this.resultListener=new n({ros:this.ros,name:this.serverName+"/result",messageType:this.actionName+"Result"}),this.goalTopic=new n({ros:this.ros,name:this.serverName+"/goal",messageType:this.actionName+"Goal"}),this.cancelTopic=new n({ros:this.ros,name:this.serverName+"/cancel",messageType:"actionlib_msgs/GoalID"}),this.goalTopic.advertise(),this.cancelTopic.advertise(),this.omitStatus||this.statusListener.subscribe(function(e){i=!0,e.status_list.forEach(function(e){var i=t.goals[e.goal_id.id];i&&i.emit("status",e)})}),this.omitFeedback||this.feedbackListener.subscribe(function(e){var i=t.goals[e.status.goal_id.id];i&&(i.emit("status",e.status),i.emit("feedback",e.feedback))}),this.omitResult||this.resultListener.subscribe(function(e){var i=t.goals[e.status.goal_id.id];i&&(i.emit("status",e.status),i.emit("result",e.result))}),this.timeout&&setTimeout(function(){i||t.emit("timeout")},this.timeout)}var n=e("../core/Topic"),r=e("../core/Message"),o=e("eventemitter2").EventEmitter2;s.prototype.__proto__=o.prototype,s.prototype.cancel=function(){var e=new Date,t=new r({stamp:{secs:Math.floor(.001*e),nsecs:e%1e3*1e6}});this.cancelTopic.publish(t)},s.prototype.dispose=function(){this.goalTopic.unadvertise(),this.cancelTopic.unadvertise(),this.omitStatus||this.statusListener.unsubscribe(),this.omitFeedback||this.feedbackListener.unsubscribe(),this.omitResult||this.resultListener.unsubscribe()},t.exports=s},{"../core/Message":12,"../core/Topic":19,eventemitter2:2}],8:[function(e,t,i){function s(e){var t=this;e=e||{},this.ros=e.ros,this.serverName=e.serverName,this.actionName=e.actionName,this.timeout=e.timeout,this.omitFeedback=e.omitFeedback,this.omitStatus=e.omitStatus,this.omitResult=e.omitResult;var i=new n({ros:this.ros,name:this.serverName+"/goal",messageType:this.actionName+"Goal"}),s=new n({ros:this.ros,name:this.serverName+"/feedback",messageType:this.actionName+"Feedback"}),r=new n({ros:this.ros,name:this.serverName+"/status",messageType:"actionlib_msgs/GoalStatusArray"}),o=new n({ros:this.ros,name:this.serverName+"/result",messageType:this.actionName+"Result"});i.subscribe(function(e){t.emit("goal",e)}),r.subscribe(function(e){e.status_list.forEach(function(e){t.emit("status",e)})}),s.subscribe(function(e){t.emit("status",e.status),t.emit("feedback",e.feedback)}),o.subscribe(function(e){t.emit("status",e.status),t.emit("result",e.result)})}var n=e("../core/Topic"),r=(e("../core/Message"),e("eventemitter2").EventEmitter2);s.prototype.__proto__=r.prototype,t.exports=s},{"../core/Message":12,"../core/Topic":19,eventemitter2:2}],9:[function(e,t,i){function s(e){var t=this;this.actionClient=e.actionClient,this.goalMessage=e.goalMessage,this.isFinished=!1;var i=new Date;this.goalID=e.goalID||"goal_"+Math.random()+"_"+i.getTime(),this.goalMessage=new n({goal_id:{stamp:{secs:Math.floor(.001*i),nsecs:i%1e3*1e6},id:this.goalID},goal:this.goalMessage}),this.on("status",function(e){t.status=e}),this.on("result",function(e){t.isFinished=!0,t.result=e}),this.on("feedback",function(e){t.feedback=e}),this.actionClient.goals[this.goalID]=this}var n=e("../core/Message"),r=e("eventemitter2").EventEmitter2;s.prototype.__proto__=r.prototype,s.prototype.send=function(e){var t=this;t.actionClient.goalTopic.publish(t.goalMessage),e&&setTimeout(function(){t.isFinished||t.emit("timeout")},e)},s.prototype.cancel=function(){var e=new Date,t=new n({stamp:{secs:Math.floor(.001*e),nsecs:e%1e3*1e6},id:this.goalID});this.actionClient.cancelTopic.publish(t)},t.exports=s},{"../core/Message":12,eventemitter2:2}],10:[function(e,t,i){function s(e){var t=this;e=e||{},this.ros=e.ros,this.serverName=e.serverName,this.actionName=e.actionName,this.feedbackPublisher=new n({ros:this.ros,name:this.serverName+"/feedback",messageType:this.actionName+"Feedback"}),this.feedbackPublisher.advertise();var i=new n({ros:this.ros,name:this.serverName+"/status",messageType:"actionlib_msgs/GoalStatusArray"});i.advertise(),this.resultPublisher=new n({ros:this.ros,name:this.serverName+"/result",messageType:this.actionName+"Result"}),this.resultPublisher.advertise();var s=new n({ros:this.ros,name:this.serverName+"/goal",messageType:this.actionName+"Goal"}),o=new n({ros:this.ros,name:this.serverName+"/cancel",messageType:"actionlib_msgs/GoalID"});this.statusMessage=new r({header:{stamp:{secs:0,nsecs:100},frame_id:""},status_list:[]}),this.currentGoal=null,this.nextGoal=null,s.subscribe(function(e){t.currentGoal?(t.nextGoal=e,t.emit("cancel")):(t.statusMessage.status_list=[{goal_id:e.goal_id,status:1}],t.currentGoal=e,t.emit("goal",e.goal))});var a=function(e,t){return!(e.secs>t.secs)&&(e.secs<t.secs||e.nsecs<t.nsecs)};o.subscribe(function(e){0===e.stamp.secs&&0===e.stamp.secs&&""===e.id?(t.nextGoal=null,t.currentGoal&&t.emit("cancel")):(t.currentGoal&&e.id===t.currentGoal.goal_id.id?t.emit("cancel"):t.nextGoal&&e.id===t.nextGoal.goal_id.id&&(t.nextGoal=null),t.nextGoal&&a(t.nextGoal.goal_id.stamp,e.stamp)&&(t.nextGoal=null),t.currentGoal&&a(t.currentGoal.goal_id.stamp,e.stamp)&&t.emit("cancel"))}),setInterval(function(){var e=new Date,s=Math.floor(e.getTime()/1e3),n=Math.round(1e9*(e.getTime()/1e3-s));t.statusMessage.header.stamp.secs=s,t.statusMessage.header.stamp.nsecs=n,i.publish(t.statusMessage)},500).unref()}var n=e("../core/Topic"),r=e("../core/Message"),o=e("eventemitter2").EventEmitter2;s.prototype.__proto__=o.prototype,s.prototype.setSucceeded=function(e){var t=new r({status:{goal_id:this.currentGoal.goal_id,status:3},result:e});this.resultPublisher.publish(t),this.statusMessage.status_list=[],this.nextGoal?(this.currentGoal=this.nextGoal,this.nextGoal=null,this.emit("goal",this.currentGoal.goal)):this.currentGoal=null},s.prototype.sendFeedback=function(e){var t=new r({status:{goal_id:this.currentGoal.goal_id,status:1},feedback:e});this.feedbackPublisher.publish(t)},s.prototype.setAborted=function(e){var t=new r({status:{goal_id:this.currentGoal.goal_id,status:4},result:e});this.resultPublisher.publish(t),this.statusMessage.status_list=[],this.nextGoal?(this.currentGoal=this.nextGoal,this.nextGoal=null,this.emit("goal",this.currentGoal.goal)):this.currentGoal=null},s.prototype.setPreempted=function(){this.statusMessage.status_list=[];var e=new r({status:{goal_id:this.currentGoal.goal_id,status:2}});this.resultPublisher.publish(e),this.nextGoal?(this.currentGoal=this.nextGoal,this.nextGoal=null,this.emit("goal",this.currentGoal.goal)):this.currentGoal=null},t.exports=s},{"../core/Message":12,"../core/Topic":19,eventemitter2:2}],11:[function(e,t,i){var s=e("../core/Ros");e("../mixin")(s,["ActionClient","SimpleActionServer"],t.exports={ActionClient:e("./ActionClient"),ActionListener:e("./ActionListener"),Goal:e("./Goal"),SimpleActionServer:e("./SimpleActionServer")})},{"../core/Ros":14,"../mixin":26,"./ActionClient":7,"./ActionListener":8,"./Goal":9,"./SimpleActionServer":10}],12:[function(e,t,i){var s=e("object-assign");t.exports=function(e){s(this,e)}},{"object-assign":3}],13:[function(e,t,i){function s(e){e=e||{},this.ros=e.ros,this.name=e.name}var n=e("./Service"),r=e("./ServiceRequest");s.prototype.get=function(e){var t=new n({ros:this.ros,name:"/rosapi/get_param",serviceType:"rosapi/GetParam"}),i=new r({name:this.name});t.callService(i,function(t){var i=JSON.parse(t.value);e(i)})},s.prototype.set=function(e,t){var i=new n({ros:this.ros,name:"/rosapi/set_param",serviceType:"rosapi/SetParam"}),s=new r({name:this.name,value:JSON.stringify(e)});i.callService(s,t)},s.prototype.delete=function(e){var t=new n({ros:this.ros,name:"/rosapi/delete_param",serviceType:"rosapi/DeleteParam"}),i=new r({name:this.name});t.callService(i,e)},t.exports=s},{"./Service":15,"./ServiceRequest":16}],14:[function(e,t,i){function s(e){e=e||{},this.socket=null,this.idCounter=0,this.isConnected=!1,this.transportLibrary=e.transportLibrary||"websocket",this.transportOptions=e.transportOptions||{},void 0===e.groovyCompatibility?this.groovyCompatibility=!0:this.groovyCompatibility=e.groovyCompatibility,this.setMaxListeners(0),e.url&&this.connect(e.url)}var n=e("ws"),r=e("../util/workerSocket"),o=e("./SocketAdapter.js"),a=e("./Service"),c=e("./ServiceRequest"),l=e("object-assign"),h=e("eventemitter2").EventEmitter2;s.prototype.__proto__=h.prototype,s.prototype.connect=function(e){if("socket.io"===this.transportLibrary)this.socket=l(io(e,{"force new connection":!0}),o(this)),this.socket.on("connect",this.socket.onopen),this.socket.on("data",this.socket.onmessage),this.socket.on("close",this.socket.onclose),this.socket.on("error",this.socket.onerror);else if("RTCPeerConnection"===this.transportLibrary.constructor.name)this.socket=l(this.transportLibrary.createDataChannel(e,this.transportOptions),o(this));else if("websocket"===this.transportLibrary){if(!this.socket||this.socket.readyState===n.CLOSED){var t=new n(e);t.binaryType="arraybuffer",this.socket=l(t,o(this))}}else{if("workersocket"!==this.transportLibrary)throw"Unknown transportLibrary: "+this.transportLibrary.toString();this.socket=l(new r(e),o(this))}},s.prototype.close=function(){this.socket&&this.socket.close()},s.prototype.authenticate=function(e,t,i,s,n,r,o){var a={op:"auth",mac:e,client:t,dest:i,rand:s,t:n,level:r,end:o};this.callOnConnection(a)},s.prototype.callOnConnection=function(e){var t=this,i=JSON.stringify(e),s=null;s="socket.io"===this.transportLibrary?function(e){t.socket.emit("operation",e)}:function(e){t.socket.send(e)},this.isConnected?s(i):t.once("connection",function(){s(i)})},s.prototype.setStatusLevel=function(e,t){var i={op:"set_level",level:e,id:t};this.callOnConnection(i)},s.prototype.getActionServers=function(e,t){var i=new a({ros:this,name:"/rosapi/action_servers",serviceType:"rosapi/GetActionServers"}),s=new c({});"function"==typeof t?i.callService(s,function(t){e(t.action_servers)},function(e){t(e)}):i.callService(s,function(t){e(t.action_servers)})},s.prototype.getTopics=function(e,t){var i=new a({ros:this,name:"/rosapi/topics",serviceType:"rosapi/Topics"}),s=new c;"function"==typeof t?i.callService(s,function(t){e(t)},function(e){t(e)}):i.callService(s,function(t){e(t)})},s.prototype.getTopicsForType=function(e,t,i){var s=new a({ros:this,name:"/rosapi/topics_for_type",serviceType:"rosapi/TopicsForType"}),n=new c({type:e});"function"==typeof i?s.callService(n,function(e){t(e.topics)},function(e){i(e)}):s.callService(n,function(e){t(e.topics)})},s.prototype.getServices=function(e,t){var i=new a({ros:this,name:"/rosapi/services",serviceType:"rosapi/Services"}),s=new c;"function"==typeof t?i.callService(s,function(t){e(t.services)},function(e){t(e)}):i.callService(s,function(t){e(t.services)})},s.prototype.getServicesForType=function(e,t,i){var s=new a({ros:this,name:"/rosapi/services_for_type",serviceType:"rosapi/ServicesForType"}),n=new c({type:e});"function"==typeof i?s.callService(n,function(e){t(e.services)},function(e){i(e)}):s.callService(n,function(e){t(e.services)})},s.prototype.getServiceRequestDetails=function(e,t,i){var s=new a({ros:this,name:"/rosapi/service_request_details",serviceType:"rosapi/ServiceRequestDetails"}),n=new c({type:e});"function"==typeof i?s.callService(n,function(e){t(e)},function(e){i(e)}):s.callService(n,function(e){t(e)})},s.prototype.getServiceResponseDetails=function(e,t,i){var s=new a({ros:this,name:"/rosapi/service_response_details",serviceType:"rosapi/ServiceResponseDetails"}),n=new c({type:e});"function"==typeof i?s.callService(n,function(e){t(e)},function(e){i(e)}):s.callService(n,function(e){t(e)})},s.prototype.getNodes=function(e,t){var i=new a({ros:this,name:"/rosapi/nodes",serviceType:"rosapi/Nodes"}),s=new c;"function"==typeof t?i.callService(s,function(t){e(t.nodes)},function(e){t(e)}):i.callService(s,function(t){e(t.nodes)})},s.prototype.getNodeDetails=function(e,t,i){var s=new a({ros:this,name:"/rosapi/node_details",serviceType:"rosapi/NodeDetails"}),n=new c({node:e});"function"==typeof i?s.callService(n,function(e){t(e.subscribing,e.publishing,e.services)},function(e){i(e)}):s.callService(n,function(e){t(e)})},s.prototype.getParams=function(e,t){var i=new a({ros:this,name:"/rosapi/get_param_names",serviceType:"rosapi/GetParamNames"}),s=new c;"function"==typeof t?i.callService(s,function(t){e(t.names)},function(e){t(e)}):i.callService(s,function(t){e(t.names)})},s.prototype.getTopicType=function(e,t,i){var s=new a({ros:this,name:"/rosapi/topic_type",serviceType:"rosapi/TopicType"}),n=new c({topic:e});"function"==typeof i?s.callService(n,function(e){t(e.type)},function(e){i(e)}):s.callService(n,function(e){t(e.type)})},s.prototype.getServiceType=function(e,t,i){var s=new a({ros:this,name:"/rosapi/service_type",serviceType:"rosapi/ServiceType"}),n=new c({service:e});"function"==typeof i?s.callService(n,function(e){t(e.type)},function(e){i(e)}):s.callService(n,function(e){t(e.type)})},s.prototype.getMessageDetails=function(e,t,i){var s=new a({ros:this,name:"/rosapi/message_details",serviceType:"rosapi/MessageDetails"}),n=new c({type:e});"function"==typeof i?s.callService(n,function(e){t(e.typedefs)},function(e){i(e)}):s.callService(n,function(e){t(e.typedefs)})},s.prototype.decodeTypeDefs=function(e){var t=this,i=function(e,s){for(var n={},r=0;r<e.fieldnames.length;r++){var o=e.fieldarraylen[r],a=e.fieldnames[r],c=e.fieldtypes[r];if(-1===c.indexOf("/"))n[a]=-1===o?c:[c];else{for(var l=!1,h=0;h<s.length;h++)if(s[h].type.toString()===c.toString()){l=s[h];break}if(l){var u=i(l,s);-1===o||(n[a]=[u])}else t.emit("error","Cannot find "+c+" in decodeTypeDefs")}}return n};return i(e[0],e)},t.exports=s},{"../util/workerSocket":47,"./Service":15,"./ServiceRequest":16,"./SocketAdapter.js":18,eventemitter2:2,"object-assign":3,ws:42}],15:[function(e,t,i){function s(e){e=e||{},this.ros=e.ros,this.name=e.name,this.serviceType=e.serviceType,this.isAdvertised=!1,this._serviceCallback=null}var n=e("./ServiceResponse"),r=(e("./ServiceRequest"),e("eventemitter2").EventEmitter2);s.prototype.__proto__=r.prototype,s.prototype.callService=function(e,t,i){if(!this.isAdvertised){var s="call_service:"+this.name+":"+ ++this.ros.idCounter;(t||i)&&this.ros.once(s,function(e){void 0!==e.result&&!1===e.result?"function"==typeof i&&i(e.values):"function"==typeof t&&t(new n(e.values))});var r={op:"call_service",id:s,service:this.name,type:this.serviceType,args:e};this.ros.callOnConnection(r)}},s.prototype.advertise=function(e){this.isAdvertised||"function"!=typeof e||(this._serviceCallback=e,this.ros.on(this.name,this._serviceResponse.bind(this)),this.ros.callOnConnection({op:"advertise_service",type:this.serviceType,service:this.name}),this.isAdvertised=!0)},s.prototype.unadvertise=function(){this.isAdvertised&&(this.ros.callOnConnection({op:"unadvertise_service",service:this.name}),this.isAdvertised=!1)},s.prototype._serviceResponse=function(e){var t={},i=this._serviceCallback(e.args,t),s={op:"service_response",service:this.name,values:new n(t),result:i};e.id&&(s.id=e.id),this.ros.callOnConnection(s)},t.exports=s},{"./ServiceRequest":16,"./ServiceResponse":17,eventemitter2:2}],16:[function(e,t,i){var s=e("object-assign");t.exports=function(e){s(this,e)}},{"object-assign":3}],17:[function(e,t,i){var s=e("object-assign");t.exports=function(e){s(this,e)}},{"object-assign":3}],18:[function(e,t,i){"use strict";var s=e("../util/decompressPng"),n=e("cbor-js"),r=e("../util/cborTypedArrayTags"),o=null;"undefined"!=typeof bson&&(o=bson().BSON),t.exports=function(e){function t(t){"publish"===t.op?e.emit(t.topic,t.msg):"service_response"===t.op?e.emit(t.id,t):"call_service"===t.op?e.emit(t.service,t):"status"===t.op&&(t.id?e.emit("status:"+t.id,t):e.emit("status",t))}function i(e,t){"png"===e.op?s(e.data,t):t(e)}function a(e,t){if(!o)throw"Cannot process BSON encoded message without BSON header.";var i=new FileReader;i.onload=function(){var e=new Uint8Array(this.result),i=o.deserialize(e);t(i)},i.readAsArrayBuffer(e)}return{onopen:function(t){e.isConnected=!0,e.emit("connection",t)},onclose:function(t){e.isConnected=!1,e.emit("close",t)},onerror:function(t){e.emit("error",t)},onmessage:function(e){"undefined"!=typeof Blob&&e.data instanceof Blob?a(e.data,function(e){i(e,t)}):e.data instanceof ArrayBuffer?t(n.decode(e.data,r)):i(JSON.parse("string"==typeof e?e:e.data),t)}}}},{"../util/cborTypedArrayTags":41,"../util/decompressPng":44,"cbor-js":1}],19:[function(e,t,i){function s(e){e=e||{},this.ros=e.ros,this.name=e.name,this.messageType=e.messageType,this.isAdvertised=!1,this.compression=e.compression||"none",this.throttle_rate=e.throttle_rate||0,this.latch=e.latch||!1,this.queue_size=e.queue_size||100,this.queue_length=e.queue_length||0,this.reconnect_on_close=void 0===e.reconnect_on_close||e.reconnect_on_close;var t=this;this.ros.on("connection",function(){t.wasRosConnected=!0}),this.wasRosConnected=this.ros.isConnected,this.ros.on("close",function(){t.wasRosConnected&&(t.isAdvertised&&(t.advertiseId="advertise:"+t.name+":"+ ++t.ros.idCounter,t.ros.callOnConnection({op:"advertise",id:t.advertiseId,type:t.messageType,topic:t.name,latch:t.latch,queue_size:t.queue_size}),t.lastPublishedMessage&&(t.ros.idCounter++,t.ros.callOnConnection({op:"publish",id:"publish:"+t.name+":"+t.ros.idCounter,topic:t.name,msg:t.lastPublishedMessage,latch:t.latch}))),t.subscribeId&&(t.subscribeId="subscribe:"+t.name+":"+ ++t.ros.idCounter,t.ros.callOnConnection({op:"subscribe",id:t.subscribeId,type:t.messageType,topic:t.name,compression:t.compression,throttle_rate:t.throttle_rate,queue_length:t.queue_length}))),t.wasRosConnected=!1}),this.compression&&"png"!==this.compression&&"cbor"!==this.compression&&"none"!==this.compression&&(this.emit("warning",this.compression+" compression is not supported. No compression will be used."),this.compression="none"),this.throttle_rate<0&&(this.emit("warning",this.throttle_rate+" is not allowed. Set to 0"),this.throttle_rate=0),this.reconnect_on_close?this.callForSubscribeAndAdvertise=function(e){t.ros.callOnConnection(e),t.waitForReconnect=!1,t.reconnectFunc=function(){t.waitForReconnect||(t.waitForReconnect=!0,t.ros.callOnConnection(e),t.ros.once("connection",function(){t.waitForReconnect=!1}))},t.ros.on("close",t.reconnectFunc)}:this.callForSubscribeAndAdvertise=this.ros.callOnConnection,this._messageCallback=function(e){t.emit("message",new r(e))}}var n=e("eventemitter2").EventEmitter2,r=e("./Message");s.prototype.__proto__=n.prototype,s.prototype.subscribe=function(e){"function"==typeof e&&this.on("message",e),this.subscribeId||(this.ros.on(this.name,this._messageCallback),this.subscribeId="subscribe:"+this.name+":"+ ++this.ros.idCounter,this.callForSubscribeAndAdvertise({op:"subscribe",id:this.subscribeId,type:this.messageType,topic:this.name,compression:this.compression,throttle_rate:this.throttle_rate,queue_length:this.queue_length}))},s.prototype.unsubscribe=function(e){e&&(this.off("message",e),this.listeners("message").length)||this.subscribeId&&(this.ros.off(this.name,this._messageCallback),this.reconnect_on_close&&this.ros.off("close",this.reconnectFunc),this.emit("unsubscribe"),this.ros.callOnConnection({op:"unsubscribe",id:this.subscribeId,topic:this.name}),this.subscribeId=null)},s.prototype.advertise=function(){if(!this.isAdvertised&&(this.advertiseId="advertise:"+this.name+":"+ ++this.ros.idCounter,this.callForSubscribeAndAdvertise({op:"advertise",id:this.advertiseId,type:this.messageType,topic:this.name,latch:this.latch,queue_size:this.queue_size}),this.isAdvertised=!0,!this.reconnect_on_close)){var e=this;this.ros.on("close",function(){e.isAdvertised=!1})}},s.prototype.unadvertise=function(){this.isAdvertised&&(this.reconnect_on_close&&this.ros.off("close",this.reconnectFunc),this.emit("unadvertise"),this.ros.callOnConnection({op:"unadvertise",id:this.advertiseId,topic:this.name}),this.isAdvertised=!1)},s.prototype.publish=function(e){this.isAdvertised||this.advertise(),this.ros.idCounter++;var t={op:"publish",id:"publish:"+this.name+":"+this.ros.idCounter,topic:this.name,msg:e,latch:this.latch};this.ros.callOnConnection(t),this.latch&&(this.lastPublishedMessage=e)},t.exports=s},{"./Message":12,eventemitter2:2}],20:[function(e,t,i){var s=e("../mixin"),n=t.exports={Ros:e("./Ros"),Topic:e("./Topic"),Message:e("./Message"),Param:e("./Param"),Service:e("./Service"),ServiceRequest:e("./ServiceRequest"),ServiceResponse:e("./ServiceResponse")};s(n.Ros,["Param","Service","Topic"],n)},{"../mixin":26,"./Message":12,"./Param":13,"./Ros":14,"./Service":15,"./ServiceRequest":16,"./ServiceResponse":17,"./Topic":19}],21:[function(e,t,i){function s(e){e=e||{},this.position=new n(e.position),this.orientation=new r(e.orientation)}var n=e("./Vector3"),r=e("./Quaternion");s.prototype.applyTransform=function(e){this.position.multiplyQuaternion(e.rotation),this.position.add(e.translation);var t=e.rotation.clone();t.multiply(this.orientation),this.orientation=t},s.prototype.clone=function(){return new s(this)},s.prototype.multiply=function(e){var t=e.clone();return t.applyTransform({rotation:this.orientation,translation:this.position}),t},s.prototype.getInverse=function(){var e=this.clone();return e.orientation.invert(),e.position.multiplyQuaternion(e.orientation),e.position.x*=-1,e.position.y*=-1,e.position.z*=-1,e},t.exports=s},{"./Quaternion":22,"./Vector3":24}],22:[function(e,t,i){function s(e){e=e||{},this.x=e.x||0,this.y=e.y||0,this.z=e.z||0,this.w="number"==typeof e.w?e.w:1}s.prototype.conjugate=function(){this.x*=-1,this.y*=-1,this.z*=-1},s.prototype.norm=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},s.prototype.normalize=function(){var e=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);0===e?(this.x=0,this.y=0,this.z=0,this.w=1):(e=1/e,this.x=this.x*e,this.y=this.y*e,this.z=this.z*e,this.w=this.w*e)},s.prototype.invert=function(){this.conjugate(),this.normalize()},s.prototype.multiply=function(e){var t=this.x*e.w+this.y*e.z-this.z*e.y+this.w*e.x,i=-this.x*e.z+this.y*e.w+this.z*e.x+this.w*e.y,s=this.x*e.y-this.y*e.x+this.z*e.w+this.w*e.z,n=-this.x*e.x-this.y*e.y-this.z*e.z+this.w*e.w;this.x=t,this.y=i,this.z=s,this.w=n},s.prototype.clone=function(){return new s(this)},t.exports=s},{}],23:[function(e,t,i){function s(e){e=e||{},this.translation=new n(e.translation),this.rotation=new r(e.rotation)}var n=e("./Vector3"),r=e("./Quaternion");s.prototype.clone=function(){return new s(this)},t.exports=s},{"./Quaternion":22,"./Vector3":24}],24:[function(e,t,i){function s(e){e=e||{},this.x=e.x||0,this.y=e.y||0,this.z=e.z||0}s.prototype.add=function(e){this.x+=e.x,this.y+=e.y,this.z+=e.z},s.prototype.subtract=function(e){this.x-=e.x,this.y-=e.y,this.z-=e.z},s.prototype.multiplyQuaternion=function(e){var t=e.w*this.x+e.y*this.z-e.z*this.y,i=e.w*this.y+e.z*this.x-e.x*this.z,s=e.w*this.z+e.x*this.y-e.y*this.x,n=-e.x*this.x-e.y*this.y-e.z*this.z;this.x=t*e.w+n*-e.x+i*-e.z-s*-e.y,this.y=i*e.w+n*-e.y+s*-e.x-t*-e.z,this.z=s*e.w+n*-e.z+t*-e.y-i*-e.x},s.prototype.clone=function(){return new s(this)},t.exports=s},{}],25:[function(e,t,i){t.exports={Pose:e("./Pose"),Quaternion:e("./Quaternion"),Transform:e("./Transform"),Vector3:e("./Vector3")}},{"./Pose":21,"./Quaternion":22,"./Transform":23,"./Vector3":24}],26:[function(e,t,i){t.exports=function(e,t,i){t.forEach(function(t){var s=i[t];e.prototype[t]=function(e){return e.ros=this,new s(e)}})}},{}],27:[function(e,t,i){function s(e){e=e||{},this.ros=e.ros,this.fixedFrame=e.fixedFrame||"/base_link",this.angularThres=e.angularThres||2,this.transThres=e.transThres||.01,this.rate=e.rate||10,this.updateDelay=e.updateDelay||50;var t=e.topicTimeout||2,i=Math.floor(t),s=Math.floor(1e9*(t-i));this.topicTimeout={secs:i,nsecs:s},this.serverName=e.serverName||"/tf2_web_republisher",this.repubServiceName=e.repubServiceName||"/republish_tfs",this.currentGoal=!1,this.currentTopic=!1,this.frameInfos={},this.republisherUpdateRequested=!1,this.actionClient=this.ros.ActionClient({serverName:this.serverName,actionName:"tf2_web_republisher/TFSubscriptionAction",omitStatus:!0,omitResult:!0}),this.serviceClient=this.ros.Service({name:this.repubServiceName,serviceType:"tf2_web_republisher/RepublishTFs"})}e("../actionlib/ActionClient");var n=e("../actionlib/Goal"),r=(e("../core/Service.js"),e("../core/ServiceRequest.js")),o=e("../math/Transform");s.prototype.processTFArray=function(e){e.transforms.forEach(function(e){var t=e.child_frame_id;"/"===t[0]&&(t=t.substring(1));var i=this.frameInfos[t];i&&(i.transform=new o({translation:e.transform.translation,rotation:e.transform.rotation}),i.cbs.forEach(function(e){e(i.transform)}))},this)},s.prototype.updateGoal=function(){var e={source_frames:Object.keys(this.frameInfos),target_frame:this.fixedFrame,angular_thres:this.angularThres,trans_thres:this.transThres,rate:this.rate};if(this.ros.groovyCompatibility)this.currentGoal&&this.currentGoal.cancel(),this.currentGoal=new n({actionClient:this.actionClient,goalMessage:e}),this.currentGoal.on("feedback",this.processTFArray.bind(this)),this.currentGoal.send();else{e.timeout=this.topicTimeout;var t=new r(e);this.serviceClient.callService(t,this.processResponse.bind(this))}this.republisherUpdateRequested=!1},s.prototype.processResponse=function(e){this.currentTopic&&this.currentTopic.unsubscribe(),this.currentTopic=this.ros.Topic({name:e.topic_name,messageType:"tf2_web_republisher/TFArray"}),this.currentTopic.subscribe(this.processTFArray.bind(this))},s.prototype.subscribe=function(e,t){"/"===e[0]&&(e=e.substring(1)),this.frameInfos[e]?this.frameInfos[e].transform&&t(this.frameInfos[e].transform):(this.frameInfos[e]={cbs:[]},this.republisherUpdateRequested||(setTimeout(this.updateGoal.bind(this),this.updateDelay),this.republisherUpdateRequested=!0)),this.frameInfos[e].cbs.push(t)},s.prototype.unsubscribe=function(e,t){"/"===e[0]&&(e=e.substring(1));for(var i=this.frameInfos[e],s=i&&i.cbs||[],n=s.length;n--;)s[n]===t&&s.splice(n,1);t&&0!==s.length||delete this.frameInfos[e]},s.prototype.dispose=function(){this.actionClient.dispose(),this.currentTopic&&this.currentTopic.unsubscribe()},t.exports=s},{"../actionlib/ActionClient":7,"../actionlib/Goal":9,"../core/Service.js":15,"../core/ServiceRequest.js":16,"../math/Transform":23}],28:[function(e,t,i){var s=e("../core/Ros");e("../mixin")(s,["TFClient"],t.exports={TFClient:e("./TFClient")})},{"../core/Ros":14,"../mixin":26,"./TFClient":27}],29:[function(e,t,i){var s=e("../math/Vector3"),n=e("./UrdfTypes");t.exports=function(e){this.dimension=null,this.type=n.URDF_BOX;var t=e.xml.getAttribute("size").split(" ");this.dimension=new s({x:parseFloat(t[0]),y:parseFloat(t[1]),z:parseFloat(t[2])})}},{"../math/Vector3":24,"./UrdfTypes":38}],30:[function(e,t,i){t.exports=function(e){var t=e.xml.getAttribute("rgba").split(" ");this.r=parseFloat(t[0]),this.g=parseFloat(t[1]),this.b=parseFloat(t[2]),this.a=parseFloat(t[3])}},{}],31:[function(e,t,i){var s=e("./UrdfTypes");t.exports=function(e){this.type=s.URDF_CYLINDER,this.length=parseFloat(e.xml.getAttribute("length")),this.radius=parseFloat(e.xml.getAttribute("radius"))}},{"./UrdfTypes":38}],32:[function(e,t,i){var s=e("../math/Pose"),n=e("../math/Vector3"),r=e("../math/Quaternion");t.exports=function(e){this.name=e.xml.getAttribute("name"),this.type=e.xml.getAttribute("type");var t=e.xml.getElementsByTagName("parent");t.length>0&&(this.parent=t[0].getAttribute("link"));var i=e.xml.getElementsByTagName("child");i.length>0&&(this.child=i[0].getAttribute("link"));var o=e.xml.getElementsByTagName("limit");o.length>0&&(this.minval=parseFloat(o[0].getAttribute("lower")),this.maxval=parseFloat(o[0].getAttribute("upper")));var a=e.xml.getElementsByTagName("origin");if(0===a.length)this.origin=new s;else{var c=a[0].getAttribute("xyz"),l=new n;c&&(c=c.split(" "),l=new n({x:parseFloat(c[0]),y:parseFloat(c[1]),z:parseFloat(c[2])}));var h=a[0].getAttribute("rpy"),u=new r;if(h){h=h.split(" ");var f=parseFloat(h[0])/2,p=parseFloat(h[1])/2,m=parseFloat(h[2])/2,v=Math.sin(f)*Math.cos(p)*Math.cos(m)-Math.cos(f)*Math.sin(p)*Math.sin(m),d=Math.cos(f)*Math.sin(p)*Math.cos(m)+Math.sin(f)*Math.cos(p)*Math.sin(m),y=Math.cos(f)*Math.cos(p)*Math.sin(m)-Math.sin(f)*Math.sin(p)*Math.cos(m),g=Math.cos(f)*Math.cos(p)*Math.cos(m)+Math.sin(f)*Math.sin(p)*Math.sin(m);(u=new r({x:v,y:d,z:y,w:g})).normalize()}this.origin=new s({position:l,orientation:u})}}},{"../math/Pose":21,"../math/Quaternion":22,"../math/Vector3":24}],33:[function(e,t,i){var s=e("./UrdfVisual");t.exports=function(e){this.name=e.xml.getAttribute("name"),this.visuals=[];for(var t=e.xml.getElementsByTagName("visual"),i=0;i<t.length;i++)this.visuals.push(new s({xml:t[i]}))}},{"./UrdfVisual":39}],34:[function(e,t,i){function s(e){this.textureFilename=null,this.color=null,this.name=e.xml.getAttribute("name");var t=e.xml.getElementsByTagName("texture");t.length>0&&(this.textureFilename=t[0].getAttribute("filename"));var i=e.xml.getElementsByTagName("color");i.length>0&&(this.color=new n({xml:i[0]}))}var n=e("./UrdfColor");s.prototype.isLink=function(){return null===this.color&&null===this.textureFilename};var r=e("object-assign");s.prototype.assign=function(e){return r(this,e)},t.exports=s},{"./UrdfColor":30,"object-assign":3}],35:[function(e,t,i){var s=e("../math/Vector3"),n=e("./UrdfTypes");t.exports=function(e){this.scale=null,this.type=n.URDF_MESH,this.filename=e.xml.getAttribute("filename");var t=e.xml.getAttribute("scale");if(t){var i=t.split(" ");this.scale=new s({x:parseFloat(i[0]),y:parseFloat(i[1]),z:parseFloat(i[2])})}}},{"../math/Vector3":24,"./UrdfTypes":38}],36:[function(e,t,i){var s=e("./UrdfMaterial"),n=e("./UrdfLink"),r=e("./UrdfJoint"),o=e("xmldom").DOMParser;t.exports=function(e){var t=(e=e||{}).xml,i=e.string;this.materials={},this.links={},this.joints={},i&&(t=(new o).parseFromString(i,"text/xml"));var a=t.documentElement;this.name=a.getAttribute("name");for(var c=a.childNodes,l=0;l<c.length;l++){var h=c[l];if("material"===h.tagName){var u=new s({xml:h});void 0!==this.materials[u.name]?this.materials[u.name].isLink()?this.materials[u.name].assign(u):console.warn("Material "+u.name+"is not unique."):this.materials[u.name]=u}else if("link"===h.tagName){var f=new n({xml:h});if(void 0!==this.links[f.name])console.warn("Link "+f.name+" is not unique.");else{for(var p=0;p<f.visuals.length;p++){var m=f.visuals[p].material;null!==m&&(void 0!==this.materials[m.name]?f.visuals[p].material=this.materials[m.name]:this.materials[m.name]=m)}this.links[f.name]=f}}else if("joint"===h.tagName){var v=new r({xml:h});this.joints[v.name]=v}}}},{"./UrdfJoint":32,"./UrdfLink":33,"./UrdfMaterial":34,xmldom:45}],37:[function(e,t,i){var s=e("./UrdfTypes");t.exports=function(e){this.type=s.URDF_SPHERE,this.radius=parseFloat(e.xml.getAttribute("radius"))}},{"./UrdfTypes":38}],38:[function(e,t,i){t.exports={URDF_SPHERE:0,URDF_BOX:1,URDF_CYLINDER:2,URDF_MESH:3}},{}],39:[function(e,t,i){var s=e("../math/Pose"),n=e("../math/Vector3"),r=e("../math/Quaternion"),o=e("./UrdfCylinder"),a=e("./UrdfBox"),c=e("./UrdfMaterial"),l=e("./UrdfMesh"),h=e("./UrdfSphere");t.exports=function(e){var t=e.xml;this.origin=null,this.geometry=null,this.material=null;var i=t.getElementsByTagName("origin");if(0===i.length)this.origin=new s;else{var u=i[0].getAttribute("xyz"),f=new n;u&&(u=u.split(" "),f=new n({x:parseFloat(u[0]),y:parseFloat(u[1]),z:parseFloat(u[2])}));var p=i[0].getAttribute("rpy"),m=new r;if(p){p=p.split(" ");var v=parseFloat(p[0])/2,d=parseFloat(p[1])/2,y=parseFloat(p[2])/2,g=Math.sin(v)*Math.cos(d)*Math.cos(y)-Math.cos(v)*Math.sin(d)*Math.sin(y),b=Math.cos(v)*Math.sin(d)*Math.cos(y)+Math.sin(v)*Math.cos(d)*Math.sin(y),w=Math.cos(v)*Math.cos(d)*Math.sin(y)-Math.sin(v)*Math.sin(d)*Math.cos(y),_=Math.cos(v)*Math.cos(d)*Math.cos(y)+Math.sin(v)*Math.sin(d)*Math.sin(y);(m=new r({x:g,y:b,z:w,w:_})).normalize()}this.origin=new s({position:f,orientation:m})}var x=t.getElementsByTagName("geometry");if(x.length>0){for(var T=x[0],S=null,k=0;k<T.childNodes.length;k++){var M=T.childNodes[k];if(1===M.nodeType){S=M;break}}var A=S.nodeName;"sphere"===A?this.geometry=new h({xml:S}):"box"===A?this.geometry=new a({xml:S}):"cylinder"===A?this.geometry=new o({xml:S}):"mesh"===A?this.geometry=new l({xml:S}):console.warn("Unknown geometry type "+A)}var U=t.getElementsByTagName("material");U.length>0&&(this.material=new c({xml:U[0]}))}},{"../math/Pose":21,"../math/Quaternion":22,"../math/Vector3":24,"./UrdfBox":29,"./UrdfCylinder":31,"./UrdfMaterial":34,"./UrdfMesh":35,"./UrdfSphere":37}],40:[function(e,t,i){t.exports=e("object-assign")({UrdfBox:e("./UrdfBox"),UrdfColor:e("./UrdfColor"),UrdfCylinder:e("./UrdfCylinder"),UrdfLink:e("./UrdfLink"),UrdfMaterial:e("./UrdfMaterial"),UrdfMesh:e("./UrdfMesh"),UrdfModel:e("./UrdfModel"),UrdfSphere:e("./UrdfSphere"),UrdfVisual:e("./UrdfVisual")},e("./UrdfTypes"))},{"./UrdfBox":29,"./UrdfColor":30,"./UrdfCylinder":31,"./UrdfLink":33,"./UrdfMaterial":34,"./UrdfMesh":35,"./UrdfModel":36,"./UrdfSphere":37,"./UrdfTypes":38,"./UrdfVisual":39,"object-assign":3}],41:[function(e,t,i){"use strict";function s(){o||(o=!0,console.warn("CBOR 64-bit integer array values may lose precision. No further warnings."))}function n(e,t){var i=e.byteLength,s=e.byteOffset;return new t(e.buffer.slice(s,s+i))}var r=Math.pow(2,32),o=!1,a={64:Uint8Array,69:Uint16Array,70:Uint32Array,72:Int8Array,77:Int16Array,78:Int32Array,85:Float32Array,86:Float64Array},c={71:function(e){s();for(var t=e.byteLength,i=e.byteOffset,n=t/8,o=e.buffer.slice(i,i+t),a=new Uint32Array(o),c=new Array(n),l=0;l<n;l++){var h=2*l,u=a[h],f=a[h+1];c[l]=u+r*f}return c},79:function(e){s();for(var t=e.byteLength,i=e.byteOffset,n=t/8,o=e.buffer.slice(i,i+t),a=new Uint32Array(o),c=new Int32Array(o),l=new Array(n),h=0;h<n;h++){var u=2*h,f=a[u],p=c[u+1];l[h]=f+r*p}return l}};void 0!==t&&t.exports&&(t.exports=function(e,t){return t in a?n(e,a[t]):t in c?c[t](e):e})},{}],42:[function(e,t,i){t.exports="undefined"!=typeof window&&void 0!==window.WebSocket?window.WebSocket:WebSocket},{}],43:[function(e,t,i){t.exports=function(){return document.createElement("canvas")}},{}],44:[function(e,t,i){"use strict";var s,n=e("canvas");void 0!==n&&void 0!==n.Image?s=n.Image:"undefined"!=typeof window&&"undefined"!==window.Image&&(s=window.Image),t.exports=function(e,t){s||t("Cannot decompress PNGs in this environment");var i=new s;i.onload=function(){var e=new n,s=e.getContext("2d");e.width=i.width,e.height=i.height,s.imageSmoothingEnabled=!1,s.webkitImageSmoothingEnabled=!1,s.mozImageSmoothingEnabled=!1,s.drawImage(i,0,0);for(var r=s.getImageData(0,0,i.width,i.height).data,o="",a=0;a<r.length;a+=4)o+=String.fromCharCode(r[a],r[a+1],r[a+2]);t(JSON.parse(o))},i.src="data:image/png;base64,"+e}},{canvas:43}],45:[function(e,t,i){i.DOMImplementation="undefined"!=typeof window&&window.DOMImplementation,i.XMLSerializer="undefined"!=typeof window&&window.XMLSerializer,i.DOMParser="undefined"!=typeof window&&window.DOMParser},{}],46:[function(e,t,i){var s=JSON.stringify;t.exports=function(e,t){function i(e){d[e]=!0;for(var t in o[e][1]){var s=o[e][1][t];d[s]||i(s)}}for(var n,r=arguments[3],o=arguments[4],a=arguments[5],c=Object.keys(a),l=0,h=c.length;l<h;l++){var u=a[p=c[l]].exports;if(u===e||u&&u.default===e){n=p;break}}if(!n){n=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var f={},l=0,h=c.length;l<h;l++){var p=c[l];f[p]=p}o[n]=["function(require,module,exports){"+e+"(self); }",f]}var m=Math.floor(Math.pow(16,8)*Math.random()).toString(16),v={};v[n]=n,o[m]=["function(require,module,exports){var f = require("+s(n)+");(f.default ? f.default : f)(self);}",v];var d={};i(m);var y="("+r+")({"+Object.keys(d).map(function(e){return s(e)+":["+o[e][0]+","+s(o[e][1])+"]"}).join(",")+"},{},["+s(m)+"])",g=window.URL||window.webkitURL||window.mozURL||window.msURL,b=new Blob([y],{type:"text/javascript"});if(t&&t.bare)return b;var w=g.createObjectURL(b),_=new Worker(w);return _.objectURL=w,_}},{}],47:[function(e,t,i){function s(e){this.socket_=n(r),this.socket_.addEventListener("message",this.handleWorkerMessage_.bind(this)),this.socket_.postMessage({uri:e})}var n=e("./webworkify"),r=e("./workerSocketImpl");s.prototype.handleWorkerMessage_=function(e){var t=e.data;if(t instanceof ArrayBuffer||"string"==typeof t)this.onmessage(e);else{var i=t.type;if("close"===i)this.onclose(null);else if("open"===i)this.onopen(null);else{if("error"!==i)throw"Unknown message from workersocket";this.onerror(null)}}},s.prototype.send=function(e){this.socket_.postMessage(e)},s.prototype.close=function(){this.socket_.postMessage({close:!0})},t.exports=s},{"./webworkify":46,"./workerSocketImpl":48}],48:[function(e,t,i){var s=s||e("ws");t.exports=function(e){function t(t){var i=t.data;i instanceof ArrayBuffer?e.postMessage(i,[i]):e.postMessage(i)}function i(t){e.postMessage({type:t.type})}var n=null;e.addEventListener("message",function(e){var r=e.data;if("string"==typeof r)n.send(r);else if(r.hasOwnProperty("close"))n.close(),n=null;else{if(!r.hasOwnProperty("uri"))throw"Unknown message to WorkerSocket";var o=r.uri;(n=new s(o)).binaryType="arraybuffer",n.onmessage=t,n.onclose=i,n.onopen=i,n.onerror=i}})}},{ws:42}]},{},[6]);