old_contents: /**
   * @author Jihoon Lee - jihoonlee.in@gmail.com
   * @author Russell Toris - rctoris@wpi.edu
   */
  
  /**
   * A SceneNode can be used to keep track of a 3D object with respect to a ROS frame within a scene.
   *
   * @constructor
   * @param options - object with following keys:
   *
   *  * tfClient - a handle to the TF client
   *  * frameID - the frame ID this object belongs to
   *  * pose (optional) - the pose associated with this object
   *  * object - the THREE 3D object to be rendered
   */
  ROS3D.SceneNode = function(options) {
    options = options || {};
    var that = this;
    var tfClient = options.tfClient;
    var frameID = options.frameID;
    var object = options.object;
    this.pose = options.pose || new ROSLIB.Pose();
  
    THREE.Object3D.call(this);
  
    // add the model
    this.add(object);
  
    // set the inital pose
    this.updatePose(this.pose);
  
    // listen for TF updates
    tfClient.subscribe(frameID, function(msg) {
  
      // apply the transform
      var tf = new ROSLIB.Transform(msg);
      var poseTransformed = new ROSLIB.Pose(that.pose);
      poseTransformed.applyTransform(tf);
  
      // update the world
      that.updatePose(poseTransformed);
    });
  };
  ROS3D.SceneNode.prototype.__proto__ = THREE.Object3D.prototype;
  
  /**
   * Set the pose of the associated model.
   *
   * @param pose - the pose to update with
   */
  ROS3D.SceneNode.prototype.updatePose = function(pose) {
    this.position.x = pose.position.x;
    this.position.y = pose.position.y;
    this.position.z = pose.position.z;
    this.quaternion = new THREE.Quaternion(pose.orientation.x, pose.orientation.y,
        pose.orientation.z, pose.orientation.w);
    this.updateMatrixWorld(true);
  };
  
new_contents: /**
   * @author Jihoon Lee - jihoonlee.in@gmail.com
   * @author Russell Toris - rctoris@wpi.edu
   */
  
  /**
   * A SceneNode can be used to keep track of a 3D object with respect to a ROS frame within a scene.
   *
   * @constructor
   * @param options - object with following keys:
   *
   *  * tfClient - a handle to the TF client
   *  * frameID - the frame ID this object belongs to
   *  * pose (optional) - the pose associated with this object
   *  * object - the THREE 3D object to be rendered
   */
  ROS3D.SceneNode = function(options) {
    options = options || {};
    var that = this;
    var tfClient = options.tfClient;
    var frameID = options.frameID;
    var object = options.object;
    this.pose = options.pose || new ROSLIB.Pose();
  
    THREE.Object3D.call(this);
  
    // add the model
    this.add(object);
  
    // set the inital pose
    this.updatePose(this.pose);
  
    // listen for TF updates
    tfClient.subscribe(frameID, function(msg) {
  
      // apply the transform
      var tf = new ROSLIB.Transform(msg);
      var poseTransformed = new ROSLIB.Pose(that.pose);
      poseTransformed.applyTransform(tf);
  
      // update the world
      that.updatePose(poseTransformed);
    });
  };
  ROS3D.SceneNode.prototype.__proto__ = THREE.Object3D.prototype;
  
  /**
   * Set the pose of the associated model.
   *
   * @param pose - the pose to update with
   */
  ROS3D.SceneNode.prototype.updatePose = function(pose) {
    this.position.set( pose.position.x, pose.position.y, pose.position.z );
    this.quaternion.set(pose.orientation.x, pose.orientation.y,
        pose.orientation.z, pose.orientation.w);
    this.updateMatrixWorld(true);
  };
  
subject: fix rotation of SceneNodes