Skip to content

Commit

Permalink
Fixes logger bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasweihing committed Nov 25, 2024
1 parent 67e1569 commit 5d46b3f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions camera_preprocessing/transformation/birds_eyed_view.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Copyright (c) 2024 Smart Rollerz e.V. All rights reserved.
import cv2
from rclpy.logging import get_logger
Expand All @@ -14,7 +13,7 @@ class BirdseyedviewTransformation:

def __init__(self, **kwargs):
"""Initialize the BirdseyedviewTransformation class."""
self.logger = get_logger("birdseyedview_transformation_logger")
self.logger = get_logger("birdseyedview_transformation")
self.logger.warn("Deprecated class. Use Birdseye instead.")
self.calibration = Calibration(debug=DEBUG)
self.calibration.setup()
Expand Down Expand Up @@ -58,11 +57,13 @@ def __init__(
self._calibration = calibration
self._debug = debug

self.logger = get_logger("birdseye")

def recalibrate(self):
"""Recalibrate the camera."""
if not self.calibration.all_calibrated:
self.calibration.setup()
if self.calibration.all_calibrated:
if not self._calibration.all_calibrated:
self._calibration.setup()
if self._calibration.all_calibrated:
self.logger.warn("Camera is already calibrated.")

self._calibration.calibrate_birds_eye()
Expand Down

0 comments on commit 5d46b3f

Please sign in to comment.