Skip to content

Commit

Permalink
autofocus as first thing in imaging_node
Browse files Browse the repository at this point in the history
  • Loading branch information
EricPedley committed Jun 11, 2024
1 parent 2fb02cd commit e2695f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/imaging_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,11 @@ def get_image_down(self, request, response: list[TargetDetection]) -> list[Targe
We want to take photo when the attitude is down only.
'''
self.log("Received Down Image Request")
self.camera.request_autofocus()
self.pose_provider.wait_for_data()

if abs(self.camera.getAttitude()[1] - -90) > 5: # Allow 5 degrees of error (Arbitrary)
self.point_camera_down()
self.camera.request_autofocus()

#TODO: Figure out a way to detect when the gimbal is having an aneurism and figure out how to fix it or send msg to groundstation.

Expand Down

0 comments on commit e2695f4

Please sign in to comment.