Esempio n. 1
0
 def setUp(self):
     """Create a base evaluation to save redefining it."""
     self.eval = interop_admin_api_pb2.MissionEvaluation()
     self.eval.team.username = '******'
     feedback = self.eval.feedback
     feedback.uas_telemetry_time_max_sec = 1.0
     feedback.uas_telemetry_time_avg_sec = 1.0
     wpt = feedback.waypoints.add()
     wpt.score_ratio = 0.5
     wpt = feedback.waypoints.add()
     wpt.score_ratio = 0.2
     obs = feedback.stationary_obstacles.add()
     obs.hit = True
     obs = feedback.stationary_obstacles.add()
     obs.hit = False
     odlcs = feedback.odlc
     odlcs.score_ratio = 0.46
     odlcs.extra_object_penalty_ratio = 0.1
     m = feedback.map
     m.quality = interop_admin_api_pb2.MapEvaluation.MapQuality.MEDIUM
     t = odlcs.odlcs.add()
     t.score_ratio = 0.96
     t.classifications_score_ratio = 0.6
     t.geolocation_score_ratio = 0.2
     t.actionable_score_ratio = 1.0
     t.autonomous_score_ratio = 1.0
     t = odlcs.odlcs.add()
     t.score_ratio = 0.16
     t.classifications_score_ratio = 0.2
     t.geolocation_score_ratio = 0.6
     t.actionable_score_ratio = 0.0
     t.autonomous_score_ratio = 0.0
     judge = feedback.judge
     judge.flight_time_sec = 60 * 6
     judge.post_process_time_sec = 60 * 4
     judge.used_timeout = True
     judge.min_auto_flight_time = True
     judge.safety_pilot_takeovers = 2
     judge.out_of_bounds = 2
     judge.unsafe_out_of_bounds = 1
     judge.things_fell_off_uas = False
     judge.crashed = False
     judge.air_drop_accuracy = interop_admin_api_pb2.MissionJudgeFeedback.WITHIN_40_FT
     judge.ugv_drove_to_location = False
     judge.operational_excellence_percent = 90
Esempio n. 2
0
    def test_non_negative(self):
        """Test that total score doesn't go negative."""
        self.eval = interop_admin_api_pb2.MissionEvaluation()
        self.eval.team = 'team'
        feedback = self.eval.feedback
        feedback.uas_telemetry_time_max_sec = 100.0
        feedback.uas_telemetry_time_avg_sec = 100.0
        wpt = feedback.waypoints.add()
        wpt.score_ratio = 0
        wpt = feedback.waypoints.add()
        wpt.score_ratio = 0
        obs = feedback.stationary_obstacles.add()
        obs.hit = True
        obs = feedback.stationary_obstacles.add()
        obs.hit = True
        odlcs = feedback.odlc
        odlcs.score_ratio = 0
        odlcs.extra_object_penalty_ratio = 1.0
        t = odlcs.odlcs.add()
        t.score_ratio = 0
        t.classifications_score_ratio = 0
        t.geolocation_score_ratio = 0
        t.actionable_score_ratio = 0
        t.autonomous_score_ratio = 0
        judge = feedback.judge
        judge.flight_time_sec = 60 * 100
        judge.post_process_time_sec = 60 * 100
        judge.used_timeout = True
        judge.min_auto_flight_time = True
        judge.safety_pilot_takeovers = 10
        judge.waypoints_captured = 0
        judge.out_of_bounds = 10
        judge.unsafe_out_of_bounds = 5
        judge.things_fell_off_uas = True
        judge.crashed = False
        judge.air_drop_accuracy = interop_admin_api_pb2.MissionJudgeFeedback.INSUFFICIENT_ACCURACY
        judge.ugv_drove_to_location = False
        judge.operational_excellence_percent = 0

        mission_evaluation.score_team(self.eval)
        self.assertAlmostEqual(0, self.eval.score.score_ratio)