def start_test(self, challenge): m = self.RX.match(challenge) if m is None: raise CourseraException( "Unknown challenge format. Please contact developers for assistance." ) try: v = float(m.group('v')) w = float(m.group('w')) except ValueError: raise CourseraException( "Unknown challenge format. Please contact developers for assistance." ) from supervisors.week2 import QuickBotSupervisor from robots.quickbot import QuickBot from pose import Pose info = QuickBot(Pose()).get_info() info.color = 0 s = QuickBotSupervisor(Pose(), info) vl, vr = s.uni2diff((v, w)) self.testsuite.respond("{:0.3f},{:0.3f}".format( vr, vl)) # Note the inverse order
def start_test(self,challenge): vals = self.parseChallenge(challenge) if 'v' not in vals or 'w' not in vals: raise CourseraException("Unknown challenge format. Please contact developers for assistance.") v = vals['v'] w = vals['w'] from supervisors.week2 import QuickBotSupervisor from robots.quickbot import QuickBot from pose import Pose info = QuickBot(Pose()).get_info() info.color = 0 s = QuickBotSupervisor(Pose(),info) vl, vr = s.uni2diff((v,w)) self.testsuite.respond("{:0.3f},{:0.3f}".format(vr,vl)) # Note the inverse order
def start_test(self,challenge): m = self.RX.match(challenge) if m is None: raise CourseraException("Unknown challenge format. Please contact developers for assistance.") try: v = float(m.group('v')) w = float(m.group('w')) except ValueError: raise CourseraException("Unknown challenge format. Please contact developers for assistance.") from supervisors.week2 import QuickBotSupervisor from robots.quickbot import QuickBot from pose import Pose info = QuickBot(Pose()).get_info() info.color = 0 s = QuickBotSupervisor(Pose(),info) vl, vr = s.uni2diff((v,w)) self.testsuite.respond("{:0.3f},{:0.3f}".format(vr,vl)) # Note the inverse order
def start_test(self, challenge): vals = self.parseChallenge(challenge) if 'v' not in vals or 'w' not in vals: raise CourseraException( "Unknown challenge format. Please contact developers for assistance." ) v = vals['v'] w = vals['w'] from supervisors.week2 import QuickBotSupervisor from robots.quickbot import QuickBot from pose import Pose info = QuickBot(Pose()).get_info() info.color = 0 s = QuickBotSupervisor(Pose(), info) vl, vr = s.uni2diff((v, w)) self.testsuite.respond("{:0.3f},{:0.3f}".format( vr, vl)) # Note the inverse order