Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

r5-devel started #30

Merged
merged 7 commits into from
Apr 15, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.project
.settings
.svn
node_modules
.vagrant
node_modules
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ Contributors
* Xueqiao Xu ([email protected])
* Mr.doob - (http://mrdoob.com)
* AlteredQualia - (http://alteredqualia.com)

9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
DEVEL - **r4**
DEVEL - **r5**

2013-04-15 - **r4**
* Initial pose now set in SceneNode [(rctoris)](https://github.com/rctoris/)
* Texture method for OccupancyGrid changed to canvas to allow for very large maps [(rctoris)](https://github.com/rctoris/)
* OccupancyGrid origin now in corner instead of center of image [(rctoris)](https://github.com/rctoris/)
* Optional TF client added to occupancy grid client [(rctoris)](https://github.com/rctoris/)
* Interactive markers now removed correctly [(rctoris)](https://github.com/rctoris/)
* Viewer now takes an optional initial camera position [(rctoris)](https://github.com/rctoris/)
* Orbit controls fixed to prevent flicker during camera pan [(rctoris)](https://github.c
* Scale (units) now work in Collada files [(rctoris)](https://github.com/rctoris/)om/rctoris/)
* Orbit controls fixed to prevent flicker during camera pan [(rctoris)](https://github.com/rctoris/)
* Scale (units) now work in Collada files [(rctoris)](https://github.com/rctoris/)
* Grunt files added and code cleanup for linter [(rctoris)](https://github.com/rctoris/)

2013-04-03 - **r3**
Expand All @@ -23,3 +25,4 @@ DEVEL - **r4**

2013-03-17 - **r1**
* Initial development of ROS3D [(rctoris)](https://github.com/rctoris/)

14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,18 @@ This project is released as part of the [Robot Web Tools](http://robotwebtools.o
### Usage
Pre-built files can be found in either [ros3d.js](build/ros3d.js) or [ros3d.min.js](build/ros3d.min.js).

Alternatively, you can use the current release via the Robot Web Tools CDN ([full](http://cdn.robotwebtools.org/ros3djs/current/ros3d.js)) | ([min](http://cdn.robotwebtools.org/ros3djs/current/ros3d.min.js))
Alternatively, you can use the current release via the Robot Web Tools CDN: ([full](http://cdn.robotwebtools.org/ros3djs/current/ros3d.js)) | ([min](http://cdn.robotwebtools.org/ros3djs/current/ros3d.min.js))

### Dependencies
ros3djs depends on:

[EventEmitter2](https://github.com/hij1nx/EventEmitter2). The current supported version is 0.4.11.
The current supported version can be found [in this project](include/EventEmitter2/eventemitter2.js) or on the Robot Web Tools CDN ([full](http://cdn.robotwebtools.org/EventEmitter2/0.4.11/eventemitter2.js)) | ([min](http://cdn.robotwebtools.org/EventEmitter2/0.4.11/eventemitter2.min.js))
[EventEmitter2](https://github.com/hij1nx/EventEmitter2). The current supported version is 0.4.11. The current supported version can be found [in this project](include/EventEmitter2/eventemitter2.js) or on the Robot Web Tools CDN: ([full](http://cdn.robotwebtools.org/EventEmitter2/0.4.11/eventemitter2.js)) | ([min](http://cdn.robotwebtools.org/EventEmitter2/0.4.11/eventemitter2.min.js))

[three.js](https://github.com/mrdoob/three.js/). The current supported version is r56.
The current supported version can be found [in this project](include/threejs/three.js) or on the Robot Web Tools CDN ([full](http://cdn.robotwebtools.org/threejs/r56/three.js)) | ([min](http://cdn.robotwebtools.org/threejs/r56/three.min.js)).
[three.js](https://github.com/mrdoob/three.js/). The current supported version is r56. The current supported version can be found [in this project](include/threejs/three.js) or on the Robot Web Tools CDN: ([full](http://cdn.robotwebtools.org/threejs/r56/three.js)) | ([min](http://cdn.robotwebtools.org/threejs/r56/three.min.js))

[ColladaLoader2](https://github.com/crobi/ColladaAnimationCompress). The current supported version is 0.0.1.
The current supported version can be found [in this project](include/ColladaAnimationCompress/ColladaLoader2.js) or on the Robot Web Tools CDN ([full](http://cdn.robotwebtools.org/ColladaAnimationCompress/0.0.1/ColladaLoader2.js)) | ([min](http://cdn.robotwebtools.org/ColladaAnimationCompress/0.0.1/ColladaLoader2.min.js)).
[ColladaLoader2](https://github.com/crobi/ColladaAnimationCompress). The current supported version is 0.0.1. The current supported version can be found [in this project](include/ColladaAnimationCompress/ColladaLoader2.js) or on the Robot Web Tools CDN: ([full](http://cdn.robotwebtools.org/ColladaAnimationCompress/0.0.1/ColladaLoader2.js)) | ([min](http://cdn.robotwebtools.org/ColladaAnimationCompress/0.0.1/ColladaLoader2.min.js))

[roslibjs](https://github.com/RobotWebTools/roslibjs). The current supported version is r5.
The current supported version can be found [in this project](include/roslibjs/roslib.js) or on the Robot Web Tools CDN ([full](http://cdn.robotwebtools.org/roslibjs/r4/roslib.js)) | ([min](http://cdn.robotwebtools.org/roslibjs/r5/roslib.min.js)).
[roslibjs](https://github.com/RobotWebTools/roslibjs). The current supported version is r5. The current supported version can be found [in this project](include/roslibjs/roslib.js) or on the Robot Web Tools CDN: ([full](http://cdn.robotwebtools.org/roslibjs/r4/roslib.js)) | ([min](http://cdn.robotwebtools.org/roslibjs/r5/roslib.min.js))

### Build
Checkout [utils/README.md](utils/README.md) for details on building.
Expand Down
2 changes: 1 addition & 1 deletion build/ros3d.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

var ROS3D = ROS3D || {
REVISION : '4-devel'
REVISION : '4'
};

// Marker types
Expand Down
2 changes: 1 addition & 1 deletion build/ros3d.min.js

Large diffs are not rendered by default.

130 changes: 130 additions & 0 deletions doc/Arrow.js.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: models/Arrow.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: models/Arrow.js</h1>





<section>
<article>
<pre class="prettyprint source"><code>/**
* @author David Gossow - [email protected]
*/

/**
* A Arrow is a THREE object that can be used to display an arrow model.
*
* @constructor
* @param options - object with following keys:
* * origin (optional) - the origin of the arrow
* * direction (optional) - the direction vector of the arrow
* * length (optional) - the length of the arrow
* * headLength (optional) - the head length of the arrow
* * shaftDiameter (optional) - the shaft diameter of the arrow
* * headDiameter (optional) - the head diameter of the arrow
* * material (optional) - the material to use for this arrow
*/
ROS3D.Arrow = function(options) {
options = options || {};
var origin = options.origin || new THREE.Vector3(0, 0, 0);
var direction = options.direction || new THREE.Vector3(1, 0, 0);
var length = options.length || 1;
var headLength = options.headLength || 0.2;
var shaftDiameter = options.shaftDiameter || 0.05;
var headDiameter = options.headDiameter || 0.1;
var material = options.material || new THREE.MeshBasicMaterial();

var shaftLength = length - headLength;

// create and merge geometry
var geometry = new THREE.CylinderGeometry(shaftDiameter * 0.5, shaftDiameter * 0.5, shaftLength,
12, 1);
var m = new THREE.Matrix4();
m.setPosition(new THREE.Vector3(0, shaftLength * 0.5, 0));
geometry.applyMatrix(m);

// create the head
var coneGeometry = new THREE.CylinderGeometry(0, headDiameter * 0.5, headLength, 12, 1);
m.setPosition(new THREE.Vector3(0, shaftLength + (headLength * 0.5), 0));
coneGeometry.applyMatrix(m);

// put the arrow together
THREE.GeometryUtils.merge(geometry, coneGeometry);

THREE.Mesh.call(this, geometry, material);

this.position = origin;
this.setDirection(direction);
};
ROS3D.Arrow.prototype.__proto__ = THREE.Mesh.prototype;

/**
* Set the direction of this arrow to that of the given vector.
*
* @param direction - the direction to set this arrow
*/
ROS3D.Arrow.prototype.setDirection = function(direction) {
var axis = new THREE.Vector3(0, 1, 0).cross(direction);
var radians = Math.acos(new THREE.Vector3(0, 1, 0).dot(direction.clone().normalize()));
this.matrix = new THREE.Matrix4().makeRotationAxis(axis.normalize(), radians);
this.rotation.setEulerFromRotationMatrix(this.matrix, this.eulerOrder);
};

/**
* Set this arrow to be the given length.
*
* @param length - the new length of the arrow
*/
ROS3D.Arrow.prototype.setLength = function(length) {
this.scale.set(length, length, length);
};

/**
* Set the color of this arrow to the given hex value.
*
* @param hex - the hex value of the color to use
*/
ROS3D.Arrow.prototype.setColor = function(hex) {
this.line.material.color.setHex(hex);
this.cone.material.color.setHex(hex);
};
</code></pre>
</article>
</section>




</div>

<nav>
<h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="ROS3D.Arrow.html">Arrow</a></li><li><a href="ROS3D.Axes.html">Axes</a></li><li><a href="ROS3D.Grid.html">Grid</a></li><li><a href="ROS3D.Highlighter.html">Highlighter</a></li><li><a href="ROS3D.InteractiveMarker.html">InteractiveMarker</a></li><li><a href="ROS3D.InteractiveMarkerClient.html">InteractiveMarkerClient</a></li><li><a href="ROS3D.InteractiveMarkerControl.html">InteractiveMarkerControl</a></li><li><a href="ROS3D.InteractiveMarkerHandle.html">InteractiveMarkerHandle</a></li><li><a href="ROS3D.InteractiveMarkerMenu.html">InteractiveMarkerMenu</a></li><li><a href="ROS3D.Marker.html">Marker</a></li><li><a href="ROS3D.MarkerClient.html">MarkerClient</a></li><li><a href="ROS3D.MeshResource.html">MeshResource</a></li><li><a href="ROS3D.MouseHandler.html">MouseHandler</a></li><li><a href="ROS3D.OccupancyGrid.html">OccupancyGrid</a></li><li><a href="ROS3D.OccupancyGridClient.html">OccupancyGridClient</a></li><li><a href="ROS3D.OrbitControls.html">OrbitControls</a></li><li><a href="ROS3D.SceneNode.html">SceneNode</a></li><li><a href="ROS3D.TriangleList.html">TriangleList</a></li><li><a href="ROS3D.Urdf.html">Urdf</a></li><li><a href="ROS3D.UrdfClient.html">UrdfClient</a></li><li><a href="ROS3D.Viewer.html">Viewer</a></li></ul><h3>Global</h3><ul><li><a href="global.html#ROS3D">ROS3D</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 Mon Apr 15 2013 09:10:16 GMT-0700 (PDT)
</footer>

<script> prettyPrint(); </script>
</body>
</html>
119 changes: 119 additions & 0 deletions doc/Axes.js.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: models/Axes.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: models/Axes.js</h1>





<section>
<article>
<pre class="prettyprint source"><code>/**
* @author David Gossow - [email protected]
*/

/**
* An Axes object can be used to display the axis of a particular coordinate frame.
*
* @constructor
* @param options - object with following keys:
* * shaftRadius (optional) - the radius of the shaft to render
* * headRadius (optional) - the radius of the head to render
* * headLength (optional) - the length of the head to render
*/
ROS3D.Axes = function(options) {
var that = this;
options = options || {};
var shaftRadius = options.shaftRadius || 0.008;
var headRadius = options.headRadius || 0.023;
var headLength = options.headLength || 0.1;

THREE.Object3D.call(this);

// create the cylinders for the objects
this.lineGeom = new THREE.CylinderGeometry(shaftRadius, shaftRadius, 1.0 - headLength);
this.headGeom = new THREE.CylinderGeometry(0, headRadius, headLength);

/**
* Adds an axis marker to this axes object.
*
* @param axis - the 3D vector representing the axis to add
*/
function addAxis(axis) {
// set the color of the axis
var color = new THREE.Color();
color.setRGB(axis.x, axis.y, axis.z);
var material = new THREE.MeshBasicMaterial({
color : color.getHex()
});

// setup the rotation information
var rotAxis = new THREE.Vector3();
rotAxis.crossVectors(axis, new THREE.Vector3(0, -1, 0));
var rot = new THREE.Quaternion();
rot.setFromAxisAngle(rotAxis, 0.5 * Math.PI);

// create the arrow
var arrow = new THREE.Mesh(that.headGeom, material);
arrow.position = axis.clone();
arrow.position.multiplyScalar(0.95);
arrow.useQuaternion = true;
arrow.quaternion = rot;
arrow.updateMatrix();
that.add(arrow);

// create the line
var line = new THREE.Mesh(that.lineGeom, material);
line.position = axis.clone();
line.position.multiplyScalar(0.45);
line.useQuaternion = true;
line.quaternion = rot;
line.updateMatrix();
that.add(line);
}

// add the three markers to the axes
addAxis(new THREE.Vector3(1, 0, 0));
addAxis(new THREE.Vector3(0, 1, 0));
addAxis(new THREE.Vector3(0, 0, 1));
};
ROS3D.Axes.prototype.__proto__ = THREE.Object3D.prototype;
</code></pre>
</article>
</section>




</div>

<nav>
<h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="ROS3D.Arrow.html">Arrow</a></li><li><a href="ROS3D.Axes.html">Axes</a></li><li><a href="ROS3D.Grid.html">Grid</a></li><li><a href="ROS3D.Highlighter.html">Highlighter</a></li><li><a href="ROS3D.InteractiveMarker.html">InteractiveMarker</a></li><li><a href="ROS3D.InteractiveMarkerClient.html">InteractiveMarkerClient</a></li><li><a href="ROS3D.InteractiveMarkerControl.html">InteractiveMarkerControl</a></li><li><a href="ROS3D.InteractiveMarkerHandle.html">InteractiveMarkerHandle</a></li><li><a href="ROS3D.InteractiveMarkerMenu.html">InteractiveMarkerMenu</a></li><li><a href="ROS3D.Marker.html">Marker</a></li><li><a href="ROS3D.MarkerClient.html">MarkerClient</a></li><li><a href="ROS3D.MeshResource.html">MeshResource</a></li><li><a href="ROS3D.MouseHandler.html">MouseHandler</a></li><li><a href="ROS3D.OccupancyGrid.html">OccupancyGrid</a></li><li><a href="ROS3D.OccupancyGridClient.html">OccupancyGridClient</a></li><li><a href="ROS3D.OrbitControls.html">OrbitControls</a></li><li><a href="ROS3D.SceneNode.html">SceneNode</a></li><li><a href="ROS3D.TriangleList.html">TriangleList</a></li><li><a href="ROS3D.Urdf.html">Urdf</a></li><li><a href="ROS3D.UrdfClient.html">UrdfClient</a></li><li><a href="ROS3D.Viewer.html">Viewer</a></li></ul><h3>Global</h3><ul><li><a href="global.html#ROS3D">ROS3D</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 Mon Apr 15 2013 09:10:16 GMT-0700 (PDT)
</footer>

<script> prettyPrint(); </script>
</body>
</html>
Loading