Example #1
0
    def _from_xml(cls, node, path, device):
        kwargs = cls._parse(node, path)
        kwargs['joint_type'] = str(node.attrib['type'])
        kwargs['parent'] = node.find('parent').attrib['link']
        kwargs['child'] = node.find('child').attrib['link']
        axis = node.find('axis')
        if axis is not None:
            axis = torch.tensor(np.fromstring(axis.attrib['xyz'], sep=' '))
        kwargs['axis'] = axis
        kwargs['origin'] = torch.tensor(parse_origin(node))
        kwargs['device'] = device

        return TorchJoint(**kwargs)
Example #2
0
 def _from_xml(cls, node, path, device):
     kwargs = cls._parse(node, path)
     kwargs['origin'] = parse_origin(node)
     return TorchCollision(**kwargs)
Example #3
0
 def _from_xml(cls, node, path, device):
     kwargs = cls._parse(node, path)
     kwargs['origin'] = torch.tensor(parse_origin(node))
     kwargs['device'] = device
     return TorchVisual(**kwargs)