Skip to content

Commit

Permalink
SceneNode: use prototype's transformPose to update transforms from th…
Browse files Browse the repository at this point in the history
…e tf client; avoid code duplication
  • Loading branch information
Viktor Kunovski committed Jan 26, 2017
1 parent 2c73084 commit a1317ca
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 20 deletions.
11 changes: 2 additions & 9 deletions build/ros3d.js
Original file line number Diff line number Diff line change
Expand Up @@ -4183,15 +4183,7 @@ ROS3D.SceneNode = function(options) {

// save the TF handler so we can remove it later
this.tfUpdate = 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);
that.visible = true;
that.transformPose(msg);
};

// listen for TF updates
Expand Down Expand Up @@ -4231,6 +4223,7 @@ ROS3D.SceneNode.prototype.transformPose = function(transform) {

// update the world
this.updatePose(poseTransformed);
that.visible = true;
};

/**
Expand Down
Loading

0 comments on commit a1317ca

Please sign in to comment.