コード例 #1
0
ファイル: map_classes.py プロジェクト: mouhandiaye/coupe18
 def __init__(self, initdict):
     LoadingHelpers.checkKeysExist(initdict, "position", "marker")
     super(Waypoint, self).__init__({
         "position":
         Position2D(initdict["position"]),
         "marker":
         MarkerRViz(initdict["marker"])
     })
コード例 #2
0
ファイル: map_classes.py プロジェクト: mouhandiaye/coupe18
 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"])
     })
コード例 #3
0
ファイル: map_classes.py プロジェクト: mouhandiaye/coupe18
    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"]),
        })
コード例 #4
0
ファイル: map_classes.py プロジェクト: mouhandiaye/coupe18
 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"])
     })
コード例 #5
0
ファイル: map_classes.py プロジェクト: mouhandiaye/coupe18
 def __init__(self, initdict):
     LoadingHelpers.checkKeysExist(initdict, "position", "shape")
     super(Wall, self).__init__({
         "position": Position2D(initdict["position"]),
         "shape": Shape2D(initdict["shape"])
     })
コード例 #6
0
ファイル: map_attributes.py プロジェクト: mouhandiaye/coupe18
 def __init__(self, initdict):
     LoadingHelpers.checkKeysExist(initdict, "frame_id", "x", "y", "type")
     super(Position2D, self).__init__(initdict)
コード例 #7
0
ファイル: map_attributes.py プロジェクト: mouhandiaye/coupe18
 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)
コード例 #8
0
ファイル: map_attributes.py プロジェクト: mouhandiaye/coupe18
 def __init__(self, initdict):
     LoadingHelpers.checkKeysExist(initdict, "type")
     # TODO : validate for each shape type
     super(Shape2D, self).__init__(initdict)