Beispiel #1
0
 def __init__(self, name, size=1, weight=2, fuel=100):
     update(self, name=name, pos=Struct(x=0.0, y=0.0, z=0.0), simulator=Morse(), type="robot", size = size, weight=weight, fuel=fuel)
     q = "pose_"
     q += self.name
     inst = getattr(self.simulator, self.name)
     pose = getattr(inst, q)
     pose.subscribe(self.setpos)
Beispiel #2
0
 def __init__(self, name, type, pos, color, size):
     update(self, name=name, type = type, pos=pos, color=color, size = size,simulator=Morse())
def updated(d, *maps, **entries):
    """A "functional" version of update...
    """
    dd = dict(**d) if isinstance(d, dict) else Struct(d)
    return update(dd, *maps, **entries)
Beispiel #4
0
 def __init__(self, **entries):
     """Constructor. It needs the __type__, __typesystem__ and __value__ 
     keys be present in **entries.
     """
     # We want entries passed in to override those in self.
     update(self, **entries)
 def __init__(self, **entries):
     """Constructor. It needs the __type__, __typesystem__ and __value__ 
     keys be present in **entries.
     """        
     # We want entries passed in to override those in self.
     update(self, **entries)
Beispiel #6
0
def updated(d, *maps, **entries):
    """A "functional" version of update...
    """
    dd = dict(**d) if isinstance(d, dict) else Struct(d)
    return update(dd, *maps, **entries)