def __init__(self, initdict): LoadingHelpers.checkKeysExist(initdict, "position", "marker") super(Waypoint, self).__init__({ "position": Position2D(initdict["position"]), "marker": MarkerRViz(initdict["marker"]) })
def __init__(self, initdict): LoadingHelpers.checkKeysExist(initdict, "position", "shape", "marker", "properties") super(Zone, self).__init__({ "position": Position2D(initdict["position"]), "shape": Shape2D(initdict["shape"]), "marker": MarkerRViz(initdict["marker"]), "properties": DictManager(initdict["properties"]) })
def __init__(self, initdict): LoadingHelpers.checkKeysExist(initdict, "shape", "marker", "walls") # Instantiate the walls before creating the dict for layer in initdict["walls"]: for wall in initdict["walls"][layer]: initdict["walls"][layer][wall] = Wall( initdict["walls"][layer][wall]) initdict["walls"][layer] = DictManager(initdict["walls"][layer]) super(Terrain, self).__init__({ "shape": Shape2D(initdict["shape"]), "marker": MarkerRViz(initdict["marker"]), "walls": DictManager(initdict["walls"]), })
def __init__(self, initdict): LoadingHelpers.checkKeysExist(initdict, "position", "shape", "marker", "chest", "trajectory") super(Entity, self).__init__({ "position": Position2D(initdict["position"]), "shape": Shape2D(initdict["shape"]), "marker": MarkerRViz(initdict["marker"]), "chest": None, # TODO Implement "trajectory": Trajectory(initdict["trajectory"]) })
def __init__(self, initdict): LoadingHelpers.checkKeysExist(initdict, "position", "shape") super(Wall, self).__init__({ "position": Position2D(initdict["position"]), "shape": Shape2D(initdict["shape"]) })
def __init__(self, initdict): LoadingHelpers.checkKeysExist(initdict, "frame_id", "x", "y", "type") super(Position2D, self).__init__(initdict)
def __init__(self, initdict): LoadingHelpers.checkKeysExist(initdict, "ns", "id", "type", "scale", "z", "orientation", "color") # TODO let some arguments be optional (orientation not given -> 0, 0, 0) super(MarkerRViz, self).__init__(initdict)
def __init__(self, initdict): LoadingHelpers.checkKeysExist(initdict, "type") # TODO : validate for each shape type super(Shape2D, self).__init__(initdict)