Exemple #1
0
 def get_urdf_element(self):
     attributes = {'joint': self.joint}
     if self.multiplier != 1.0:
         attributes['multiplier'] = self.multiplier
     if self.offset != 0.0:
         attributes['offset'] = self.offset
     return URDFElement('mimic', attributes)
Exemple #2
0
 def get_urdf_element(self):
     attributes = {'name': self.name}
     if self.type is not None:
         attributes['type'] = self.type
     attributes.update(self.attr)
     elements = self.visual + self.collision + [self.inertial]
     return URDFElement('link', attributes, elements)
Exemple #3
0
 def get_urdf_element(self):
     attributes = {
         'damping': self.damping,
         'friction': self.friction,
     }
     attributes.update(self.attr)
     return URDFElement('dynamics', attributes)
Exemple #4
0
 def get_urdf_element(self):
     attributes = {}
     if self.name is not None:
         attributes['name'] = self.name
     attributes.update(self.attr)
     elements = [self.origin, self.geometry]
     return URDFElement('collision', attributes, elements)
Exemple #5
0
 def get_urdf_element(self):
     attributes = {}
     if self.name is not None:
         attributes['name'] = self.name
     attributes.update(self.attr)
     elements = [self.origin, self.geometry, self.material]
     return URDFElement('visual', attributes, elements)
Exemple #6
0
 def get_urdf_element(self):
     attributes = {
         'rising': self.rising,
         'falling': self.falling,
         'reference_position': self.reference_position,
     }
     attributes = dict(filter(lambda x: x[1], attributes.items()))
     return URDFElement('calibration', attributes)
Exemple #7
0
 def get_urdf_element(self):
     attributes = {
         'k_position': self.k_position,
         'soft_lower_limit': self.soft_lower_limit,
         'soft_upper_limit': self.soft_upper_limit,
     }
     attributes = dict(filter(lambda x: x[1], attributes.items()))
     attributes['k_velocity'] = self.k_velocity
     return URDFElement('safety_controller', attributes)
Exemple #8
0
 def get_urdf_element(self):
     attributes = {
         'lower': self.lower,
         'upper': self.upper,
     }
     attributes = dict(filter(lambda x: x[1], attributes.items()))
     attributes['effort'] = self.effort
     attributes['velocity'] = self.velocity
     return URDFElement('limit', attributes)
Exemple #9
0
 def get_urdf_element(self):
     attributes = {
         'name': self.name,
         'type': self.SUPPORTED_TYPES[self.type]
     }
     attributes.update(self.attr)
     elements = [self.parent, self.child, self.axis, self.calibration, self.dynamics,
                 self.limit, self.safety_controller, self.mimic, self.origin]
     return URDFElement('joint', attributes, elements)
Exemple #10
0
 def get_urdf_element(self):
     attributes = {
         'ixx': self.ixx,
         'ixy': self.ixy,
         'ixz': self.ixz,
         'iyy': self.iyy,
         'iyz': self.iyz,
         'izz': self.izz,
     }
     return URDFElement('inertia', attributes)
Exemple #11
0
 def get_urdf_element(self):
     attributes = {'name': self.name}
     attributes.update(self.attr)
     elements = self.links + self.joints + self.materials
     return URDFElement('robot', attributes, elements)
Exemple #12
0
 def get_urdf_element(self):
     return URDFElement('child', {'link': self.link})
Exemple #13
0
 def get_urdf_element(self):
     return URDFElement('parent', {'link': self.link})
Exemple #14
0
 def get_urdf_element(self):
     attributes = {'xyz': "{} {} {}".format(self.x, self.y, self.z)}
     attributes.update(self.attr)
     return URDFElement('axis', attributes)
Exemple #15
0
 def get_urdf_element(self):
     attributes = {'value': self.value}
     return URDFElement('mass', attributes)
Exemple #16
0
 def get_urdf_element(self):
     elements = [self.origin, self.mass, self.inertia]
     return URDFElement('inertial', elements=elements)