コード例 #1
0
 def __init__(self, params={}):
     #TODO
     self._goal_speed = 2.
     self._goal_heading = 0.
     self._obstacles = []
     self._setup_object_paths()
     SquareEnv.__init__(self, params=params)
コード例 #2
0
    def __init__(self, params={}):
        params.setdefault(
            'model_path',
            os.path.join(os.path.dirname(os.path.abspath(__file__)),
                         'models/square_cluttered.egg'))

        SquareEnv.__init__(self, params=params)
コード例 #3
0
 def _setup_collision_object(self,
                             path,
                             pos=(0.0, 0.0, 0.0),
                             hpr=(0.0, 0.0, 0.0),
                             scale=1,
                             is_obstacle=False):
     SquareEnv._setup_collision_object(self, path, pos, hpr, scale)
     if is_obstacle:
         self._obstacles.append((path, pos, hpr))
コード例 #4
0
ファイル: room_cluttered_env.py プロジェクト: gkahn13/gcg-old
    def __init__(self, params={}):
        #TODO
        self._goal_speed = 2.
        self._goal_heading = 0.
        self._base_dir = os.path.join(
            os.path.dirname(os.path.abspath(__file__)), 'models')
        params.setdefault('model_path', os.path.join(self._base_dir,
                                                     'room.egg'))
        params.setdefault('obj_paths', [
            'bookcase.egg', 'chair.egg', 'coffee_table.egg', 'desk.egg',
            'stool.egg', 'table.egg'
        ])
        self._obj_paths = [
            os.path.join(self._base_dir, x) for x in params['obj_paths']
        ]

        self._obstacles = []
        SquareEnv.__init__(self, params=params)
コード例 #5
0
 def _setup_spec(self):
     SquareEnv._setup_spec(self)
     self.goal_spec['speed'] = Box(low=-4.0, high=4.0)
     self.goal_spec['heading'] = Box(low=0, high=2 * 3.14)
コード例 #6
0
 def _get_info(self):
     info = SquareEnv._get_info(self)
     info['goal_h'] = self._goal_heading
     info['goal_s'] = self._goal_speed
     info['obstacles'] = self._obstacles
     return info
コード例 #7
0
 def __init__(self, params={}):
     self.positions = None
     SquareEnv.__init__(self, params=params)