Exemplo n.º 1
0
 def __init__(self, initdict):
     LoadingHelpers.checkKeysExist(initdict, "position", "marker")
     super(Waypoint, self).__init__({
         "position":
         Position2D(initdict["position"]),
         "marker":
         MarkerRViz(initdict["marker"])
     })
Exemplo n.º 2
0
 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"])
     })
Exemplo n.º 3
0
    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"]),
        })
Exemplo n.º 4
0
 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"])
     })
Exemplo n.º 5
0
 def __init__(self, initdict):
     LoadingHelpers.checkKeysExist(initdict, "position", "shape")
     super(Wall, self).__init__({
         "position": Position2D(initdict["position"]),
         "shape": Shape2D(initdict["shape"])
     })
Exemplo n.º 6
0
 def __init__(self, initdict):
     LoadingHelpers.checkKeysExist(initdict, "frame_id", "x", "y", "type")
     super(Position2D, self).__init__(initdict)
Exemplo n.º 7
0
 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)
Exemplo n.º 8
0
 def __init__(self, initdict):
     LoadingHelpers.checkKeysExist(initdict, "type")
     # TODO : validate for each shape type
     super(Shape2D, self).__init__(initdict)