Esempio n. 1
0
	def look_to(self, done_cb, yaw=None, pitch=None, zoom=1):
		if not yaw:
			yaw = Params().axis_pan
		if not pitch:
			pitch = Params().axis_tilt
		goal = CameraGoal()
		goal.command = 1
		goal.pan = yaw
		goal.tilt = pitch
		self.cancel_all_actions()
		self._action = ActionWrapper(action_client=self.camera_ptz_client, goal=goal, done_cb=done_cb)
Esempio n. 2
0
	def camera_sweep(self, done_cb, delta_yaw=None, duration=None, zoom=1):
		if not delta_yaw:
			delta_yaw = Params().axis_sweep_angle
		if not duration:
			duration = Params().axis_sweep_duration
		goal = CameraGoal()
		goal.command = 2 #sweep
		goal.tilt = Params().axis_tilt
		goal.sweep_step = delta_yaw
		goal.sweep_hold_time = duration
		self.cancel_all_actions()
		self._action = ActionWrapper(action_client=self.camera_ptz_client, goal=goal, done_cb=done_cb)
Esempio n. 3
0
 def look_to(self, done_cb, yaw=None, pitch=None, zoom=1):
     if not yaw:
         yaw = Params().axis_pan
     if not pitch:
         pitch = Params().axis_tilt
     goal = CameraGoal()
     goal.command = 1
     goal.pan = yaw
     goal.tilt = pitch
     self.cancel_all_actions()
     self._action = ActionWrapper(action_client=self.camera_ptz_client,
                                  goal=goal,
                                  done_cb=done_cb)
Esempio n. 4
0
 def camera_sweep(self, done_cb, delta_yaw=None, duration=None, zoom=1):
     if not delta_yaw:
         delta_yaw = Params().axis_sweep_angle
     if not duration:
         duration = Params().axis_sweep_duration
     goal = CameraGoal()
     goal.command = 2  #sweep
     goal.tilt = Params().axis_tilt
     goal.sweep_step = delta_yaw
     goal.sweep_hold_time = duration
     self.cancel_all_actions()
     self._action = ActionWrapper(action_client=self.camera_ptz_client,
                                  goal=goal,
                                  done_cb=done_cb)