Skip to content

Commit

Permalink
Urdf: add option to set name of Urdf object.
Browse files Browse the repository at this point in the history
  • Loading branch information
achim-k committed Jan 25, 2017
1 parent 229325a commit d7fd301
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/urdf/Urdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ ROS3D.Urdf = function(options) {
var loader = options.loader || ROS3D.COLLADA_LOADER_2;

THREE.Object3D.call(this);
this.name = options.name || '';

// load all models
var links = urdfModel.links;
Expand Down
4 changes: 3 additions & 1 deletion src/urdf/UrdfClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ ROS3D.UrdfClient = function(options) {
this.rootObject = options.rootObject || new THREE.Object3D();
var tfPrefix = options.tfPrefix || '';
var loader = options.loader || ROS3D.COLLADA_LOADER_2;
var name = options.name || '';

// get the URDF value from ROS
var getParam = new ROSLIB.Param({
Expand All @@ -51,7 +52,8 @@ ROS3D.UrdfClient = function(options) {
path : that.path,
tfClient : that.tfClient,
tfPrefix : tfPrefix,
loader : loader
loader : loader,
name : name
}));
});
};

0 comments on commit d7fd301

Please sign in to comment.