Skip to content

Commit b47beb5

Browse files
authored
add parent and child in urdf joint (RobotWebTools#262)
1 parent e0d67d1 commit b47beb5

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

build/roslib.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3138,7 +3138,7 @@ function UrdfCylinder(options) {
31383138
module.exports = UrdfCylinder;
31393139
},{"./UrdfTypes":36}],30:[function(require,module,exports){
31403140
/**
3141-
* @fileOverview
3141+
* @fileOverview
31423142
* @author David V. Lu!! davidvlu@gmail.com
31433143
*/
31443144

@@ -3152,7 +3152,17 @@ module.exports = UrdfCylinder;
31523152
function UrdfJoint(options) {
31533153
this.name = options.xml.getAttribute('name');
31543154
this.type = options.xml.getAttribute('type');
3155-
3155+
3156+
var parents = options.xml.getElementsByTagName('parent');
3157+
if(parents.length > 0) {
3158+
this.parent = parents[0].getAttribute('link');
3159+
}
3160+
3161+
var children = options.xml.getElementsByTagName('child');
3162+
if(children.length > 0) {
3163+
this.child = children[0].getAttribute('link');
3164+
}
3165+
31563166
var limits = options.xml.getElementsByTagName('limit');
31573167
if (limits.length > 0) {
31583168
this.minval = parseFloat( limits[0].getAttribute('lower') );

0 commit comments

Comments
 (0)