Beispiel #1
0
    def setUpClass(cls):
        config = Config()
        config.set_param('logger', 'lidapy.ConsoleLogger')
        config.set_param('ipc', 'lidapy.LocalCommunicationProxy')
        config.set_param('rate_in_hz', '10')

        lidapy.init(config=config, process_name='test')
    def setUpClass(cls):

        config = Config()
        config.set_param('logger', 'lidapy.ConsoleLogger')
        config.set_param('ipc', 'lidapy.LocalCommunicationProxy')
        config.set_param('rate_in_hz', 10)

        lidapy.init(config=config, process_name='test')
Beispiel #3
0
    def test_config_no_file_path(self):
        config = Config()

        config.set_param(name='p1', value='gv1')
        config.set_param(name='p1', value='s1v1', section='section_1')
        config.set_param(name='p2', value='s1v2', section='section_1')
        config.set_param(name='p1', value='s2v1', section='section_2')
        config.set_param(name='p2', value='s2v2', section='section_2')

        self._check_values(config)
Beispiel #4
0
    def setUp(self):
        config = Config()
        config.set_param('logger', 'lidapy.ConsoleLogger')
        config.set_param('ipc_proxy', 'lidapy.RosCommunicationProxy')

        self._var = lidapy.init(process_name='test')
Beispiel #5
0
    def setUpClass(cls):
        config = Config()
        config.set_param('logger', 'lidapy.ConsoleLogger')
        config.set_param('ipc_proxy', 'lidapy.RosCommunicationProxy')

        lidapy.init(process_name='test')
Beispiel #6
0
        return 0 <= move < 9 and self._board.is_blank(move)

    def update(self):
        if self._is_end():
            pain_topics[self._board.looser].send(PAIN)
            self._turn = self._board.winner
            self._board.reset()

        if self._turn == PLAYER1:
            move = self._player1(), PLAYER1
        else:
            move = self._player2(
            ), PLAYER2  # receive_action should be bound to an instance

        if self.move_possible(move[0]) and self._turn == move[1]:
            if self._make_move(move[0]):
                self._turn = PLAYER2 if self._turn == PLAYER1 else PLAYER1

        lidapy.loginfo(self.board_string())
        print('running')


if __name__ == '__main__':

    agent_config = Config()
    agent_config.set_param('rate_in_hz', 1)
    lidapy.init(config=agent_config)

    ox_env = OXPlayerEnvironment()
    ox_env.start()
    def setUp(self):
        config = Config()
        config.set_param('logger', 'lidapy.ConsoleLogger')
        config.set_param('ipc_proxy', 'lidapy.RosCommunicationProxy')

        self._var = lidapy.init(process_name='test')
    def setUpClass(cls):
        config = Config()
        config.set_param('logger', 'lidapy.ConsoleLogger')
        config.set_param('ipc_proxy', 'lidapy.RosCommunicationProxy')

        lidapy.init(process_name='test')
Beispiel #9
0
    def setUpClass(cls):
        config = Config()
        config.set_param('logger', 'lidapy.ConsoleLogger')
        config.set_param('ipc', 'lidapy.LocalCommunicationProxy')

        lidapy.init(config=config)