#!/usr/bin/env python

from duckietown_challenges import wrap_solution, ChallengeSolution, ChallengeInterfaceSolution


class Solver(ChallengeSolution):
    def run(self, cis):
        assert isinstance(cis, ChallengeInterfaceSolution)

        from AidoGuest import AidoGuest
        hostname = "aido-host"
        aidoGuest = AidoGuest(hostname)
        aidoGuest.run()

        cis.set_solution_output_dict({})


if __name__ == '__main__':
    wrap_solution(Solver())
Exemple #2
0
        # release CPU/GPU resources, let's be friendly with other users that may need them
        cis.info('Releasing resources')
        try:
            model.close()
        except:
            msg = 'Could not call model.close():\n%s' % traceback.format_exc()
            cis.error(msg)
    cis.info('Graceful exit of solve()')


class Submission(ChallengeSolution):
    def run(self, cis):
        assert isinstance(
            cis, ChallengeInterfaceSolution
        )  # this is a hack that would help with autocompletion

        # get the configuration parameters for this challenge
        params = cis.get_challenge_parameters()
        cis.info('Parameters: %s' % params)

        cis.info('Starting.')
        solve(params, cis)

        cis.set_solution_output_dict({})
        cis.info('Finished.')


if __name__ == '__main__':
    print('Starting submission')
    wrap_solution(Submission())
Exemple #3
0
def i2_step2_solution(root2, s2):
    set_step(step2_name)
    wrap_solution(s2, root=root2)
Exemple #4
0
def i2_step1_solution(root1, s1):
    set_step(step1_name)
    wrap_solution(s1, root=root1)
 def process_solution():
     wrap_solution(S, root=root)
Exemple #6
0
 def step2_solution():
     set_step(step2_name)
     wrap_solution(S2, root=root2)
Exemple #7
0
 def step1_solution():
     set_step(step1_name)
     wrap_solution(S1, root=root1)