Fawkes API  Fawkes Development Version
pantilt.cpp
1 
2 /***************************************************************************
3  * pantilt.cpp - Abstract class defining a pan/tilt camera controller
4  *
5  * Created: Tue Apr 21 22:39:20 2009
6  * Copyright 2009 Tobias Kellner
7  * 2005-2009 Tim Niemueller [www.niemueller.de]
8  *
9  ****************************************************************************/
10 
11 /* This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version. A runtime exception applies to
15  * this software (see LICENSE.GPL_WRE file mentioned below for details).
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU Library General Public License for more details.
21  *
22  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
23  */
24 
25 #include <fvcams/control/pantilt.h>
26 
27 namespace firevision {
28 #if 0 /* just to make Emacs auto-indent happy */
29 }
30 #endif
31 
32 /** @class CameraControlPanTilt <fvcams/control/pantilt.h>
33  * Camera pan/tilt control interface.
34  * Some cameras feature an actuator to allow for panning and tilting the
35  * camera.
36  *
37  * This interface shall be implemented by such cameras or for other external
38  * units for panning and tilting.
39  *
40  * @author Tim Niemueller
41  * @author Tobias Kellner
42  *
43  * @fn void CameraControlPanTilt::process_pantilt() = 0
44  * Process pan/tilt information.
45  * Some operations allow for asynchronous usage (like fetching pan/tilt data).
46  * This is because some cameras need some time to retrieve the information and
47  * thus it is a good idea to let that run besides the image processing loop. With
48  * process_control the incoming information is processed.
49  *
50  * @fn bool CameraControlPanTilt::supports_pan() = 0
51  * Check whether this controller supports panning.
52  * @return true if panning is supported
53  *
54  * @fn bool CameraControlPanTilt::supports_tilt() = 0
55  * Check whether this controller supports tilting.
56  * @return true if tilting is supported
57  *
58  * @fn void CameraControlPanTilt::set_pan(int pan) = 0
59  * Set pan value.
60  * The pan value is dependent on the camera control. See the implementations
61  * documentation for details.
62  * @param pan new pan value
63  *
64  * @fn void CameraControlPanTilt::set_tilt(int tilt) = 0
65  * Set tilt value.
66  * The tilt value is dependent on the camera control. See the implementations
67  * documentation for details.
68  * @param tilt new tilt value
69  *
70  * @fn void CameraControlPanTilt::set_pan_tilt(int pan, int tilt) = 0
71  * Set pan and tilt in one go.
72  * Sometimes camera controls have a command for setting pan and tilt at the
73  * same time. If possible this should be preferred since is minimizes the
74  * number of required operations and communication acts. See the
75  * implementations documentation for details.
76  * @param pan new pan value
77  * @param tilt new tilt value
78  *
79  * @fn void CameraControlPanTilt::set_pan_tilt_rad(float pan, float tilt) = 0
80  * Set pan and tilt as float value.
81  * You give a radiant value where the camera should head relative to the basic
82  * camera position. Implementations shall look forward (center the camera) for
83  * if pan equals zero, look right if the pan is positive and left is the pan is
84  * negative, they shall look forward (vertically centered) if tilt is zero,
85  * upwards if tilt is negative and downwards if tilt is positive.
86  * @param pan new pan value in radiant
87  * @param tilt new tilt value in radiant
88  *
89  * @fn int CameraControlPanTilt::pan() = 0
90  * Get pan value
91  * @return camera control specific pan value
92  *
93  * @fn int CameraControlPanTilt::tilt() = 0
94  * Get tilt value
95  * @return camera control specific tilt value
96  *
97  * @fn void CameraControlPanTilt::start_get_pan_tilt() = 0
98  * Start asynchronous fetch operation for pan and tilt values.
99  * This will initiate fetching the pan and tilt values but will not wait until
100  * the values have been received but will return immediately (non-blocking).
101  *
102  * @fn void CameraControlPanTilt::pan_tilt(int &pan, int &tilt) = 0
103  * Get pan and tilt at the same time.
104  * This will store the current pan and tilt values in the given arguments.
105  * @param pan contains current pan after call
106  * @param tilt contains current tilt after call
107  *
108  * @fn void CameraControlPanTilt::pan_tilt_rad(float &pan, float &tilt) = 0
109  * Get pan and tilt at the same time in radiant.
110  * This will store the current pan and tilt values in the given arguments.
111  * @param pan contains current pan after call
112  * @param tilt contains current tilt after call
113  * @see set_pan_tilt_rad()
114  *
115  * @fn int CameraControlPanTilt::min_pan()
116  * Get minimum pan value.
117  * @return minimum camera-specific pan value
118  *
119  * @fn int CameraControlPanTilt::max_pan()
120  * Get maximum pan value.
121  * @return maximum camera-specific pan value
122  *
123  * @fn int CameraControlPanTilt::min_tilt()
124  * Get minimum tilt value.
125  * @return minimum camera-specific tilt value
126  *
127  * @fn int CameraControlPanTilt::max_tilt()
128  * Get maximum tilt value.
129  * @return maximum camera-specific tilt value
130  *
131  * @fn void CameraControlPanTilt::reset_pan_tilt()
132  * Bring camera into home position.
133  * After the reset the camera shall look forward (horizontally and
134  * vertically centered "home" position).
135  *
136  * @fn void CameraControlPanTilt::set_pan_tilt_limit(int pan_left, int pan_right, int tilt_up, int tilt_down) = 0
137  * Set pan/tilt limits.
138  * Some camera controls allow for extra constraints to the min and max pan/tilt
139  * values.
140  * @param pan_left new minimum pan limit
141  * @param pan_right new maximum pan limit
142  * @param tilt_up new minimum tilt limit
143  * @param tilt_down new maximum tilt limit
144  *
145  * @fn void CameraControlPanTilt::reset_pan_tilt_limit() = 0
146  * Reset pan/tilt limits.
147  * This removes all limits from the pan/tilt methods thus the only constraints
148  * are hardware induced.
149  */
150 
151 /** Empty virtual destructor. */
153 {
154 }
155 
156 
157 } // end namespace firevision
virtual ~CameraControlPanTilt()
Empty virtual destructor.
Definition: pantilt.cpp:152