| Camera | Index |
Overview
The Garcia API supports a subobject type named "camera". Only one instance of a "camera" object can be created. It is called "camera-boom". A camera boom with a pan-tilt head may be mounted on a Garcia as an optional accessory. The pan-tilt unit will use up two servo outputs on the Garcia robot, #2 for pan and #3 for tilt.
Placing the following line of code in the garcia.config file will make the Garcia API allocate a Camera suboject and make the Servo subobjects for outputs #2 and #3 unavailabe:
camera-boom = yes
Accessing the Camera Boom Subobject
The camera boom suboject has the following name:
camera-boom
If the Garcia API object is named garcia then placing the following line of code in an application will retrieve a pointer to the camera boom subobject:
acpObject* pObj = garcia.getSubObject("camera", "camera-boom");
Property Inheritance
Camera inherits Object properties.
| Properties |
| pan tilt |
pan (float) The pan position represented as a float scaled from -1.0 to 1.0. |
tilt (float) The tilt position represented as a float scaled from -1.0 to 1.0. |