Permalink
Browse files

Merge pull request #16 from rctoris/master

r5 roslibjs doc added
  • Loading branch information...
2 parents 6618d2d + 836ee82 commit efe3c208ecfe25aadb2f26cd27570c71a50c7239 @rctoris rctoris committed Apr 9, 2013
Showing with 24,888 additions and 13,645 deletions.
  1. +165 −0 jsdoc/roslibjs/current/ActionClient.js.html
  2. +131 −0 jsdoc/roslibjs/current/Goal.js.html
  3. +67 −0 jsdoc/roslibjs/current/Message.js.html
  4. +111 −0 jsdoc/roslibjs/current/Param.js.html
  5. +89 −0 jsdoc/roslibjs/current/Pose.js.html
  6. +132 −0 jsdoc/roslibjs/current/Quaternion.js.html
  7. +269 −0 jsdoc/roslibjs/current/ROSLIB.ActionClient.html
  8. +372 −0 jsdoc/roslibjs/current/ROSLIB.Goal.html
  9. +190 −0 jsdoc/roslibjs/current/ROSLIB.Message.html
  10. +413 −0 jsdoc/roslibjs/current/ROSLIB.Param.html
  11. +379 −0 jsdoc/roslibjs/current/ROSLIB.Pose.html
  12. +576 −0 jsdoc/roslibjs/current/ROSLIB.Quaternion.html
  13. +984 −0 jsdoc/roslibjs/current/ROSLIB.Ros.html
  14. +278 −0 jsdoc/roslibjs/current/ROSLIB.Service.html
  15. +190 −0 jsdoc/roslibjs/current/ROSLIB.ServiceRequest.html
  16. +190 −0 jsdoc/roslibjs/current/ROSLIB.ServiceResponse.html
  17. +628 −0 jsdoc/roslibjs/current/ROSLIB.TFClient.html
  18. +617 −0 jsdoc/roslibjs/current/ROSLIB.Topic.html
  19. +271 −0 jsdoc/roslibjs/current/ROSLIB.Transform.html
  20. +303 −0 jsdoc/roslibjs/current/ROSLIB.UrdfBox.html
  21. +303 −0 jsdoc/roslibjs/current/ROSLIB.UrdfColor.html
  22. +303 −0 jsdoc/roslibjs/current/ROSLIB.UrdfCylinder.html
  23. +303 −0 jsdoc/roslibjs/current/ROSLIB.UrdfLink.html
  24. +303 −0 jsdoc/roslibjs/current/ROSLIB.UrdfMaterial.html
  25. +303 −0 jsdoc/roslibjs/current/ROSLIB.UrdfMesh.html
  26. +304 −0 jsdoc/roslibjs/current/ROSLIB.UrdfModel.html
  27. +303 −0 jsdoc/roslibjs/current/ROSLIB.UrdfSphere.html
  28. +303 −0 jsdoc/roslibjs/current/ROSLIB.UrdfVisual.html
  29. +596 −0 jsdoc/roslibjs/current/ROSLIB.Vector3.html
  30. +297 −0 jsdoc/roslibjs/current/Ros.js.html
  31. +62 −0 jsdoc/roslibjs/current/RosLib.js.html
  32. +98 −0 jsdoc/roslibjs/current/Service.js.html
  33. +67 −0 jsdoc/roslibjs/current/ServiceRequest.js.html
  34. +67 −0 jsdoc/roslibjs/current/ServiceResponse.js.html
  35. +190 −0 jsdoc/roslibjs/current/TFClient.js.html
  36. +191 −0 jsdoc/roslibjs/current/Topic.js.html
  37. +76 −0 jsdoc/roslibjs/current/Transform.js.html
  38. +88 −0 jsdoc/roslibjs/current/UrdfBox.js.html
  39. +88 −0 jsdoc/roslibjs/current/UrdfColor.js.html
  40. +84 −0 jsdoc/roslibjs/current/UrdfCylinder.js.html
  41. +87 −0 jsdoc/roslibjs/current/UrdfLink.js.html
  42. +96 −0 jsdoc/roslibjs/current/UrdfMaterial.js.html
  43. +95 −0 jsdoc/roslibjs/current/UrdfMesh.js.html
  44. +129 −0 jsdoc/roslibjs/current/UrdfModel.js.html
  45. +82 −0 jsdoc/roslibjs/current/UrdfSphere.js.html
  46. +176 −0 jsdoc/roslibjs/current/UrdfVisual.js.html
  47. +114 −0 jsdoc/roslibjs/current/Vector3.js.html
  48. +0 −538 jsdoc/roslibjs/current/files.html
  49. +173 −0 jsdoc/roslibjs/current/global.html
  50. +38 −370 jsdoc/roslibjs/current/index.html
  51. +202 −0 jsdoc/roslibjs/current/scripts/prettify/Apache-License-2.0.txt
  52. +2 −0 jsdoc/roslibjs/current/scripts/prettify/lang-css.js
  53. +28 −0 jsdoc/roslibjs/current/scripts/prettify/prettify.js
  54. +283 −0 jsdoc/roslibjs/current/styles/jsdoc-default.css
  55. +111 −0 jsdoc/roslibjs/current/styles/prettify-jsdoc.css
  56. +132 −0 jsdoc/roslibjs/current/styles/prettify-tomorrow.css
  57. +0 −423 jsdoc/roslibjs/current/symbols/ROSLIB.ActionClient.html
  58. +0 −463 jsdoc/roslibjs/current/symbols/ROSLIB.Goal.html
  59. +0 −356 jsdoc/roslibjs/current/symbols/ROSLIB.Message.html
  60. +0 −472 jsdoc/roslibjs/current/symbols/ROSLIB.Param.html
  61. +0 −467 jsdoc/roslibjs/current/symbols/ROSLIB.Pose.html
  62. +0 −571 jsdoc/roslibjs/current/symbols/ROSLIB.Quaternion.html
  63. +0 −732 jsdoc/roslibjs/current/symbols/ROSLIB.Ros.html
  64. +0 −431 jsdoc/roslibjs/current/symbols/ROSLIB.Service.html
  65. +0 −356 jsdoc/roslibjs/current/symbols/ROSLIB.ServiceRequest.html
  66. +0 −356 jsdoc/roslibjs/current/symbols/ROSLIB.ServiceResponse.html
  67. +0 −571 jsdoc/roslibjs/current/symbols/ROSLIB.TFClient.html
  68. +0 −584 jsdoc/roslibjs/current/symbols/ROSLIB.Topic.html
  69. +0 −422 jsdoc/roslibjs/current/symbols/ROSLIB.Transform.html
  70. +0 −425 jsdoc/roslibjs/current/symbols/ROSLIB.UrdfBox.html
  71. +0 −425 jsdoc/roslibjs/current/symbols/ROSLIB.UrdfColor.html
  72. +0 −425 jsdoc/roslibjs/current/symbols/ROSLIB.UrdfCylinder.html
  73. +0 −425 jsdoc/roslibjs/current/symbols/ROSLIB.UrdfLink.html
  74. +0 −425 jsdoc/roslibjs/current/symbols/ROSLIB.UrdfMaterial.html
  75. +0 −425 jsdoc/roslibjs/current/symbols/ROSLIB.UrdfMesh.html
  76. +0 −426 jsdoc/roslibjs/current/symbols/ROSLIB.UrdfModel.html
  77. +0 −425 jsdoc/roslibjs/current/symbols/ROSLIB.UrdfSphere.html
  78. +0 −425 jsdoc/roslibjs/current/symbols/ROSLIB.UrdfVisual.html
  79. +0 −558 jsdoc/roslibjs/current/symbols/ROSLIB.Vector3.html
  80. +0 −353 jsdoc/roslibjs/current/symbols/_global_.html
  81. +0 −21 ...urrent/symbols/src/_wg_stor5_rtoris_Documents_WPI_RAIL_ROS_groovy_src_roslibjs_src_RosLib.js.html
  82. +0 −124 ...rc/_wg_stor5_rtoris_Documents_WPI_RAIL_ROS_groovy_src_roslibjs_src_actionlib_ActionClient.js.html
  83. +0 −90 ...ymbols/src/_wg_stor5_rtoris_Documents_WPI_RAIL_ROS_groovy_src_roslibjs_src_actionlib_Goal.js.html
  84. +0 −26 .../symbols/src/_wg_stor5_rtoris_Documents_WPI_RAIL_ROS_groovy_src_roslibjs_src_core_Message.js.html
  85. +0 −70 ...nt/symbols/src/_wg_stor5_rtoris_Documents_WPI_RAIL_ROS_groovy_src_roslibjs_src_core_Param.js.html
  86. +0 −256 ...rent/symbols/src/_wg_stor5_rtoris_Documents_WPI_RAIL_ROS_groovy_src_roslibjs_src_core_Ros.js.html
  87. +0 −57 .../symbols/src/_wg_stor5_rtoris_Documents_WPI_RAIL_ROS_groovy_src_roslibjs_src_core_Service.js.html
  88. +0 −26 ...s/src/_wg_stor5_rtoris_Documents_WPI_RAIL_ROS_groovy_src_roslibjs_src_core_ServiceRequest.js.html
  89. +0 −26 .../src/_wg_stor5_rtoris_Documents_WPI_RAIL_ROS_groovy_src_roslibjs_src_core_ServiceResponse.js.html
  90. +0 −150 ...nt/symbols/src/_wg_stor5_rtoris_Documents_WPI_RAIL_ROS_groovy_src_roslibjs_src_core_Topic.js.html
  91. +0 −48 ...ent/symbols/src/_wg_stor5_rtoris_Documents_WPI_RAIL_ROS_groovy_src_roslibjs_src_math_Pose.js.html
  92. +0 −90 ...mbols/src/_wg_stor5_rtoris_Documents_WPI_RAIL_ROS_groovy_src_roslibjs_src_math_Quaternion.js.html
  93. +0 −35 ...ymbols/src/_wg_stor5_rtoris_Documents_WPI_RAIL_ROS_groovy_src_roslibjs_src_math_Transform.js.html
  94. +0 −73 .../symbols/src/_wg_stor5_rtoris_Documents_WPI_RAIL_ROS_groovy_src_roslibjs_src_math_Vector3.js.html
  95. +0 −148 ...t/symbols/src/_wg_stor5_rtoris_Documents_WPI_RAIL_ROS_groovy_src_roslibjs_src_tf_TFClient.js.html
  96. +0 −47 .../symbols/src/_wg_stor5_rtoris_Documents_WPI_RAIL_ROS_groovy_src_roslibjs_src_urdf_UrdfBox.js.html
  97. +0 −47 ...ymbols/src/_wg_stor5_rtoris_Documents_WPI_RAIL_ROS_groovy_src_roslibjs_src_urdf_UrdfColor.js.html
  98. +0 −42 ...ols/src/_wg_stor5_rtoris_Documents_WPI_RAIL_ROS_groovy_src_roslibjs_src_urdf_UrdfCylinder.js.html
  99. +0 −45 ...symbols/src/_wg_stor5_rtoris_Documents_WPI_RAIL_ROS_groovy_src_roslibjs_src_urdf_UrdfLink.js.html
  100. +0 −55 ...ols/src/_wg_stor5_rtoris_Documents_WPI_RAIL_ROS_groovy_src_roslibjs_src_urdf_UrdfMaterial.js.html
  101. +0 −53 ...symbols/src/_wg_stor5_rtoris_Documents_WPI_RAIL_ROS_groovy_src_roslibjs_src_urdf_UrdfMesh.js.html
  102. +0 −89 ...ymbols/src/_wg_stor5_rtoris_Documents_WPI_RAIL_ROS_groovy_src_roslibjs_src_urdf_UrdfModel.js.html
  103. +0 −40 ...mbols/src/_wg_stor5_rtoris_Documents_WPI_RAIL_ROS_groovy_src_roslibjs_src_urdf_UrdfSphere.js.html
  104. +0 −138 ...mbols/src/_wg_stor5_rtoris_Documents_WPI_RAIL_ROS_groovy_src_roslibjs_src_urdf_UrdfVisual.js.html
  105. +165 −0 jsdoc/roslibjs/r5/ActionClient.js.html
  106. +131 −0 jsdoc/roslibjs/r5/Goal.js.html
  107. +67 −0 jsdoc/roslibjs/r5/Message.js.html
  108. +111 −0 jsdoc/roslibjs/r5/Param.js.html
  109. +89 −0 jsdoc/roslibjs/r5/Pose.js.html
  110. +132 −0 jsdoc/roslibjs/r5/Quaternion.js.html
  111. +269 −0 jsdoc/roslibjs/r5/ROSLIB.ActionClient.html
  112. +372 −0 jsdoc/roslibjs/r5/ROSLIB.Goal.html
  113. +190 −0 jsdoc/roslibjs/r5/ROSLIB.Message.html
  114. +413 −0 jsdoc/roslibjs/r5/ROSLIB.Param.html
  115. +379 −0 jsdoc/roslibjs/r5/ROSLIB.Pose.html
  116. +576 −0 jsdoc/roslibjs/r5/ROSLIB.Quaternion.html
  117. +984 −0 jsdoc/roslibjs/r5/ROSLIB.Ros.html
  118. +278 −0 jsdoc/roslibjs/r5/ROSLIB.Service.html
  119. +190 −0 jsdoc/roslibjs/r5/ROSLIB.ServiceRequest.html
  120. +190 −0 jsdoc/roslibjs/r5/ROSLIB.ServiceResponse.html
  121. +628 −0 jsdoc/roslibjs/r5/ROSLIB.TFClient.html
  122. +617 −0 jsdoc/roslibjs/r5/ROSLIB.Topic.html
  123. +271 −0 jsdoc/roslibjs/r5/ROSLIB.Transform.html
  124. +303 −0 jsdoc/roslibjs/r5/ROSLIB.UrdfBox.html
  125. +303 −0 jsdoc/roslibjs/r5/ROSLIB.UrdfColor.html
  126. +303 −0 jsdoc/roslibjs/r5/ROSLIB.UrdfCylinder.html
  127. +303 −0 jsdoc/roslibjs/r5/ROSLIB.UrdfLink.html
  128. +303 −0 jsdoc/roslibjs/r5/ROSLIB.UrdfMaterial.html
  129. +303 −0 jsdoc/roslibjs/r5/ROSLIB.UrdfMesh.html
  130. +304 −0 jsdoc/roslibjs/r5/ROSLIB.UrdfModel.html
  131. +303 −0 jsdoc/roslibjs/r5/ROSLIB.UrdfSphere.html
  132. +303 −0 jsdoc/roslibjs/r5/ROSLIB.UrdfVisual.html
  133. +596 −0 jsdoc/roslibjs/r5/ROSLIB.Vector3.html
  134. +297 −0 jsdoc/roslibjs/r5/Ros.js.html
  135. +62 −0 jsdoc/roslibjs/r5/RosLib.js.html
  136. +98 −0 jsdoc/roslibjs/r5/Service.js.html
  137. +67 −0 jsdoc/roslibjs/r5/ServiceRequest.js.html
  138. +67 −0 jsdoc/roslibjs/r5/ServiceResponse.js.html
  139. +190 −0 jsdoc/roslibjs/r5/TFClient.js.html
  140. +191 −0 jsdoc/roslibjs/r5/Topic.js.html
  141. +76 −0 jsdoc/roslibjs/r5/Transform.js.html
  142. +88 −0 jsdoc/roslibjs/r5/UrdfBox.js.html
  143. +88 −0 jsdoc/roslibjs/r5/UrdfColor.js.html
  144. +84 −0 jsdoc/roslibjs/r5/UrdfCylinder.js.html
  145. +87 −0 jsdoc/roslibjs/r5/UrdfLink.js.html
  146. +96 −0 jsdoc/roslibjs/r5/UrdfMaterial.js.html
  147. +95 −0 jsdoc/roslibjs/r5/UrdfMesh.js.html
  148. +129 −0 jsdoc/roslibjs/r5/UrdfModel.js.html
  149. +82 −0 jsdoc/roslibjs/r5/UrdfSphere.js.html
  150. +176 −0 jsdoc/roslibjs/r5/UrdfVisual.js.html
  151. +114 −0 jsdoc/roslibjs/r5/Vector3.js.html
  152. +173 −0 jsdoc/roslibjs/r5/global.html
  153. +62 −0 jsdoc/roslibjs/r5/index.html
  154. +202 −0 jsdoc/roslibjs/r5/scripts/prettify/Apache-License-2.0.txt
  155. +2 −0 jsdoc/roslibjs/r5/scripts/prettify/lang-css.js
  156. +28 −0 jsdoc/roslibjs/r5/scripts/prettify/prettify.js
  157. +283 −0 jsdoc/roslibjs/r5/styles/jsdoc-default.css
  158. +111 −0 jsdoc/roslibjs/r5/styles/prettify-jsdoc.css
  159. +132 −0 jsdoc/roslibjs/r5/styles/prettify-tomorrow.css
@@ -0,0 +1,165 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>JSDoc: Source: actionlib/ActionClient.js</title>
+
+ <script src="scripts/prettify/prettify.js"> </script>
+ <script src="scripts/prettify/lang-css.js"> </script>
+ <!--[if lt IE 9]>
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
+</head>
+
+<body>
+
+<div id="main">
+
+ <h1 class="page-title">Source: actionlib/ActionClient.js</h1>
+
+
+
+
+
+ <section>
+ <article>
+ <pre class="prettyprint source"><code>/**
+ * @author Russell Toris - rctoris@wpi.edu
+ */
+
+/**
+ * An actionlib action client.
+ *
+ * Emits the following events:
+ * * 'timeout' - if a timeout occurred while sending a goal
+ * * 'status' - the status messages received from the action server
+ * * 'feedback' - the feedback messages received from the action server
+ * * 'result' - the result returned from the action server
+ *
+ * @constructor
+ * @param options - object with following keys:
+ * * ros - the ROSLIB.Ros connection handle
+ * * serverName - the action server name, like /fibonacci
+ * * actionName - the action message name, like 'actionlib_tutorials/FibonacciAction'
+ * * timeout - the timeout length when connecting to the action server
+ */
+ROSLIB.ActionClient = function(options) {
+ var that = this;
+ options = options || {};
+ this.ros = options.ros;
+ this.serverName = options.serverName;
+ this.actionName = options.actionName;
+ this.timeout = options.timeout;
+ this.goals = {};
+
+ // flag to check if a status has been received
+ var receivedStatus = false;
+
+ // create the topics associated with actionlib
+ var feedbackListener = new ROSLIB.Topic({
+ ros : this.ros,
+ name : this.serverName + '/feedback',
+ messageType : this.actionName + 'Feedback'
+ });
+
+ var statusListener = new ROSLIB.Topic({
+ ros : this.ros,
+ name : this.serverName + '/status',
+ messageType : 'actionlib_msgs/GoalStatusArray'
+ });
+
+ var resultListener = new ROSLIB.Topic({
+ ros : this.ros,
+ name : this.serverName + '/result',
+ messageType : this.actionName + 'Result'
+ });
+
+ this.goalTopic = new ROSLIB.Topic({
+ ros : this.ros,
+ name : this.serverName + '/goal',
+ messageType : this.actionName + 'Goal'
+ });
+
+ this.cancelTopic = new ROSLIB.Topic({
+ ros : this.ros,
+ name : this.serverName + '/cancel',
+ messageType : 'actionlib_msgs/GoalID'
+ });
+
+ // advertise the goal and cancel topics
+ this.goalTopic.advertise();
+ this.cancelTopic.advertise();
+
+ // subscribe to the status topic
+ statusListener.subscribe(function(statusMessage) {
+ receivedStatus = true;
+ statusMessage.status_list.forEach(function(status) {
+ var goal = that.goals[status.goal_id.id];
+ if (goal) {
+ goal.emit('status', status);
+ }
+ });
+ });
+
+ // subscribe the the feedback topic
+ feedbackListener.subscribe(function(feedbackMessage) {
+ var goal = that.goals[feedbackMessage.status.goal_id.id];
+ if (goal) {
+ goal.emit('status', feedbackMessage.status);
+ goal.emit('feedback', feedbackMessage.feedback);
+ }
+ });
+
+ // subscribe to the result topic
+ resultListener.subscribe(function(resultMessage) {
+ var goal = that.goals[resultMessage.status.goal_id.id];
+
+ if (goal) {
+ goal.emit('status', resultMessage.status);
+ goal.emit('result', resultMessage.result);
+ }
+ });
+
+ // If timeout specified, emit a 'timeout' event if the action server does not respond
+ if (this.timeout) {
+ setTimeout(function() {
+ if (!receivedStatus) {
+ that.emit('timeout');
+ }
+ }, this.timeout);
+ }
+};
+ROSLIB.ActionClient.prototype.__proto__ = EventEmitter2.prototype;
+
+/**
+ * Cancel all goals associated with this ActionClient.
+ */
+ROSLIB.ActionClient.prototype.cancel = function() {
+ var cancelMessage = new ROSLIB.Message();
+ this.cancelTopic.publish(cancelMessage);
+};
+
+</code></pre>
+ </article>
+ </section>
+
+
+
+
+</div>
+
+<nav>
+ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="ROSLIB.ActionClient.html">ActionClient</a></li><li><a href="ROSLIB.Goal.html">Goal</a></li><li><a href="ROSLIB.Message.html">Message</a></li><li><a href="ROSLIB.Param.html">Param</a></li><li><a href="ROSLIB.Pose.html">Pose</a></li><li><a href="ROSLIB.Quaternion.html">Quaternion</a></li><li><a href="ROSLIB.Ros.html">Ros</a></li><li><a href="ROSLIB.Service.html">Service</a></li><li><a href="ROSLIB.ServiceRequest.html">ServiceRequest</a></li><li><a href="ROSLIB.ServiceResponse.html">ServiceResponse</a></li><li><a href="ROSLIB.TFClient.html">TFClient</a></li><li><a href="ROSLIB.Topic.html">Topic</a></li><li><a href="ROSLIB.Transform.html">Transform</a></li><li><a href="ROSLIB.UrdfBox.html">UrdfBox</a></li><li><a href="ROSLIB.UrdfColor.html">UrdfColor</a></li><li><a href="ROSLIB.UrdfCylinder.html">UrdfCylinder</a></li><li><a href="ROSLIB.UrdfLink.html">UrdfLink</a></li><li><a href="ROSLIB.UrdfMaterial.html">UrdfMaterial</a></li><li><a href="ROSLIB.UrdfMesh.html">UrdfMesh</a></li><li><a href="ROSLIB.UrdfModel.html">UrdfModel</a></li><li><a href="ROSLIB.UrdfSphere.html">UrdfSphere</a></li><li><a href="ROSLIB.UrdfVisual.html">UrdfVisual</a></li><li><a href="ROSLIB.Vector3.html">Vector3</a></li></ul><h3>Global</h3><ul><li><a href="global.html#ROSLIB">ROSLIB</a></li></ul>
+</nav>
+
+<br clear="both">
+
+<footer>
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Tue Apr 09 2013 11:13:19 GMT-0700 (PDT)
+</footer>
+
+<script> prettyPrint(); </script>
+</body>
+</html>
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>JSDoc: Source: actionlib/Goal.js</title>
+
+ <script src="scripts/prettify/prettify.js"> </script>
+ <script src="scripts/prettify/lang-css.js"> </script>
+ <!--[if lt IE 9]>
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
+</head>
+
+<body>
+
+<div id="main">
+
+ <h1 class="page-title">Source: actionlib/Goal.js</h1>
+
+
+
+
+
+ <section>
+ <article>
+ <pre class="prettyprint source"><code>/**
+ * @author Russell Toris - rctoris@wpi.edu
+ */
+
+/**
+ * An actionlib goal goal is associated with an action server.
+ *
+ * Emits the following events:
+ * * 'timeout' - if a timeout occurred while sending a goal
+ *
+ * @constructor
+ * @param object with following keys:
+ * * actionClient - the ROSLIB.ActionClient to use with this goal
+ * * goalMessage - The JSON object containing the goal for the action server
+ */
+ROSLIB.Goal = function(options) {
+ var that = this;
+ this.actionClient = options.actionClient;
+ this.goalMessage = options.goalMessage;
+ this.isFinished = false;
+
+ // Used to create random IDs
+ var date = new Date();
+
+ // Create a random ID
+ this.goalID = 'goal_' + Math.random() + '_' + date.getTime();
+ // Fill in the goal message
+ this.goalMessage = new ROSLIB.Message({
+ goal_id : {
+ stamp : {
+ secs : 0,
+ nsecs : 0
+ },
+ id : this.goalID
+ },
+ goal : this.goalMessage
+ });
+
+ this.on('status', function(status) {
+ that.status = status;
+ });
+
+ this.on('result', function(result) {
+ that.isFinished = true;
+ that.result = result;
+ });
+
+ this.on('feedback', function(feedback) {
+ that.feedback = feedback;
+ });
+
+ // Add the goal
+ this.actionClient.goals[this.goalID] = this;
+};
+ROSLIB.Goal.prototype.__proto__ = EventEmitter2.prototype;
+
+/**
+ * Send the goal to the action server.
+ *
+ * @param timeout (optional) - a timeout length for the goal's result
+ */
+ROSLIB.Goal.prototype.send = function(timeout) {
+ var that = this;
+ that.actionClient.goalTopic.publish(that.goalMessage);
+ if (timeout) {
+ setTimeout(function() {
+ if (!that.isFinished) {
+ that.emit('timeout');
+ }
+ }, timeout);
+ }
+};
+
+/**
+ * Cancel the current goal.
+ */
+ROSLIB.Goal.prototype.cancel = function() {
+ var cancelMessage = new ROSLIB.Message({
+ id : this.goalID
+ });
+ this.actionClient.cancelTopic.publish(cancelMessage);
+};
+</code></pre>
+ </article>
+ </section>
+
+
+
+
+</div>
+
+<nav>
+ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="ROSLIB.ActionClient.html">ActionClient</a></li><li><a href="ROSLIB.Goal.html">Goal</a></li><li><a href="ROSLIB.Message.html">Message</a></li><li><a href="ROSLIB.Param.html">Param</a></li><li><a href="ROSLIB.Pose.html">Pose</a></li><li><a href="ROSLIB.Quaternion.html">Quaternion</a></li><li><a href="ROSLIB.Ros.html">Ros</a></li><li><a href="ROSLIB.Service.html">Service</a></li><li><a href="ROSLIB.ServiceRequest.html">ServiceRequest</a></li><li><a href="ROSLIB.ServiceResponse.html">ServiceResponse</a></li><li><a href="ROSLIB.TFClient.html">TFClient</a></li><li><a href="ROSLIB.Topic.html">Topic</a></li><li><a href="ROSLIB.Transform.html">Transform</a></li><li><a href="ROSLIB.UrdfBox.html">UrdfBox</a></li><li><a href="ROSLIB.UrdfColor.html">UrdfColor</a></li><li><a href="ROSLIB.UrdfCylinder.html">UrdfCylinder</a></li><li><a href="ROSLIB.UrdfLink.html">UrdfLink</a></li><li><a href="ROSLIB.UrdfMaterial.html">UrdfMaterial</a></li><li><a href="ROSLIB.UrdfMesh.html">UrdfMesh</a></li><li><a href="ROSLIB.UrdfModel.html">UrdfModel</a></li><li><a href="ROSLIB.UrdfSphere.html">UrdfSphere</a></li><li><a href="ROSLIB.UrdfVisual.html">UrdfVisual</a></li><li><a href="ROSLIB.Vector3.html">Vector3</a></li></ul><h3>Global</h3><ul><li><a href="global.html#ROSLIB">ROSLIB</a></li></ul>
+</nav>
+
+<br clear="both">
+
+<footer>
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Tue Apr 09 2013 11:13:19 GMT-0700 (PDT)
+</footer>
+
+<script> prettyPrint(); </script>
+</body>
+</html>
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>JSDoc: Source: core/Message.js</title>
+
+ <script src="scripts/prettify/prettify.js"> </script>
+ <script src="scripts/prettify/lang-css.js"> </script>
+ <!--[if lt IE 9]>
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
+</head>
+
+<body>
+
+<div id="main">
+
+ <h1 class="page-title">Source: core/Message.js</h1>
+
+
+
+
+
+ <section>
+ <article>
+ <pre class="prettyprint source"><code>/**
+ * @author Brandon Alexander - baalexander@gmail.com
+ */
+
+/**
+ * Message objects are used for publishing and subscribing to and from topics.
+ *
+ * @constructor
+ * @param values - object matching the fields defined in the .msg definition file
+ */
+ROSLIB.Message = function(values) {
+ var that = this;
+ values = values || {};
+
+ Object.keys(values).forEach(function(name) {
+ that[name] = values[name];
+ });
+};
+</code></pre>
+ </article>
+ </section>
+
+
+
+
+</div>
+
+<nav>
+ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="ROSLIB.ActionClient.html">ActionClient</a></li><li><a href="ROSLIB.Goal.html">Goal</a></li><li><a href="ROSLIB.Message.html">Message</a></li><li><a href="ROSLIB.Param.html">Param</a></li><li><a href="ROSLIB.Pose.html">Pose</a></li><li><a href="ROSLIB.Quaternion.html">Quaternion</a></li><li><a href="ROSLIB.Ros.html">Ros</a></li><li><a href="ROSLIB.Service.html">Service</a></li><li><a href="ROSLIB.ServiceRequest.html">ServiceRequest</a></li><li><a href="ROSLIB.ServiceResponse.html">ServiceResponse</a></li><li><a href="ROSLIB.TFClient.html">TFClient</a></li><li><a href="ROSLIB.Topic.html">Topic</a></li><li><a href="ROSLIB.Transform.html">Transform</a></li><li><a href="ROSLIB.UrdfBox.html">UrdfBox</a></li><li><a href="ROSLIB.UrdfColor.html">UrdfColor</a></li><li><a href="ROSLIB.UrdfCylinder.html">UrdfCylinder</a></li><li><a href="ROSLIB.UrdfLink.html">UrdfLink</a></li><li><a href="ROSLIB.UrdfMaterial.html">UrdfMaterial</a></li><li><a href="ROSLIB.UrdfMesh.html">UrdfMesh</a></li><li><a href="ROSLIB.UrdfModel.html">UrdfModel</a></li><li><a href="ROSLIB.UrdfSphere.html">UrdfSphere</a></li><li><a href="ROSLIB.UrdfVisual.html">UrdfVisual</a></li><li><a href="ROSLIB.Vector3.html">Vector3</a></li></ul><h3>Global</h3><ul><li><a href="global.html#ROSLIB">ROSLIB</a></li></ul>
+</nav>
+
+<br clear="both">
+
+<footer>
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Tue Apr 09 2013 11:13:19 GMT-0700 (PDT)
+</footer>
+
+<script> prettyPrint(); </script>
+</body>
+</html>
Oops, something went wrong.

0 comments on commit efe3c20

Please sign in to comment.