Skip to content

Commit

Permalink
manual control debug
Browse files Browse the repository at this point in the history
  • Loading branch information
robotastic committed Mar 3, 2024
1 parent 8aa86e2 commit 7087257
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions axis-ptz-controller.env
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ORIENTATION_TOPIC=/${PROJECT_NAME}/${HOSTNAME}/Orientation/edgetech-auto-oriente
OBJECT_TOPIC=/${PROJECT_NAME}/${HOSTNAME}/Object/edgetech-c2/JSON
IMAGE_FILENAME_TOPIC=/${PROJECT_NAME}/${HOSTNAME}/Image_Filename/edgetech-axis-ptz-controller/JSON
IMAGE_CAPTURE_TOPIC=/${PROJECT_NAME}/${HOSTNAME}/Image_Capture/edgetech-axis-ptz-controller/JSON
MANUAL_CONTROL_TOPIC=/${PROJECT_NAME}/${HOSTNAME}/Manual_Control/edgetech-axis-ptz-controller/JSON
LOGGER_TOPIC=/${PROJECT_NAME}/${HOSTNAME}/Logger/edgetech-axis-ptz-controller/JSON

TRIPOD_LATITUDE=<CAMERA_LAT>
Expand Down
3 changes: 2 additions & 1 deletion axis-ptz-controller/axis_ptz_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ def _manual_control_callback(self, _client: Union[mqtt.Client, None],
logging.info(f"Setting zoom to: {self.zoom}")
# Get camera pan and tilt
self.rho_c, self.tau_c, _zoom, _focus = self.camera_control.get_ptz()
logging.debug(f"Camera pan and tilt: {self.rho_c}, {self.tau_c} [deg]")
logging.info(f"Camera pan and tilt: {self.rho_c}, {self.tau_c} [deg]")
logging.info(
f"Absolute move to pan: {self.rho_o}, and tilt: {self.tau_o}, with zoom: {self.zoom}"
)
Expand All @@ -990,6 +990,7 @@ def _manual_control_callback(self, _client: Union[mqtt.Client, None],
)
except Exception as e:
logging.error(f"Error: {e}")
logging.info(f"rho_c: {self.rho_c}, rho_o: {pan}, tau_c: {self.tau_c}, tau_o: {tilt}, pan_rate_max: {self.pan_rate_max}, tilt_rate_max: {self.tilt_rate_max}")
duration = max(
math.fabs(self._compute_angle_delta(self.rho_c, pan))
/ (self.pan_rate_max / 2),
Expand Down

0 comments on commit 7087257

Please sign in to comment.