File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -579,6 +579,9 @@ def __post_init__(self):
579
579
580
580
:raise: DataValueError if a valid FixedCamera could not be initialized
581
581
"""
582
+ if self .image_pair is None :
583
+ raise DataValueError ('Please provide valid image pair.' )
584
+
582
585
img = self .image_pair .qry
583
586
if self .snapshot .terrain_altitude .amsl is not None and self .snapshot .terrain_altitude .ellipsoid is None or \
584
587
self .snapshot .terrain_altitude .amsl is not None and self .snapshot .terrain_altitude .ellipsoid is None :
Original file line number Diff line number Diff line change @@ -677,6 +677,9 @@ def _map_update_timer_callback(self) -> None:
677
677
if map_update_altitude is None :
678
678
self .get_logger ().warn ('Cannot determine altitude AGL, skipping map update.' )
679
679
return None
680
+ if map_update_altitude <= 0 :
681
+ self .get_logger ().warn (f'Map update altitude { map_update_altitude } should be > 0, skipping map update.' )
682
+ return None
680
683
map_radius = self ._get_dynamic_map_radius (map_update_altitude )
681
684
map_candidate = GeoSquare (projected_center if projected_center is not None else self ._vehicle_position .xy ,
682
685
map_radius )
@@ -1124,6 +1127,9 @@ def _mock_map_data(self, origin: Position) -> Optional[MapData]:
1124
1127
if altitude is None :
1125
1128
self .get_logger ().warn ('Cannot determine altitude AGL, skipping mock map data.' )
1126
1129
return
1130
+ if altitude < 0 :
1131
+ self .get_logger ().warn (f'Altitude AGL { altitude } was negative, skipping mock map data.' )
1132
+ return
1127
1133
radius = scaling * altitude
1128
1134
1129
1135
assert_type (origin .xy , GeoPoint )
You can’t perform that action at this time.
0 commit comments