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