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)
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)