Download Print this page

Ptz With Saphira; Ptz With Colbert - Pioneer 2 Manual

Ptz robotic camera

Advertisement

These are the Linux/Unix files when extracted relative to the Saphira top-level path ($SAPHIRA):
$SAPHIRA/path
colbert/ptzsys.so
/ptzdemo.act
devices/ptzsys/ptzdoc.c
/makefile

PTZ with Saphira

The Saphira C-language-based application development environment automatically manages Pioneer
communications and P2OS command packets. The PTZ System software includes Saphira functions and
related arguments to create Saphira-mediated client applications for control of the PTZ Robotic Camera
(Table 3-1). Inspect the $(SAPHIRA)/
Table of Saphira PTZ System Functions
void sfPTZCamInit(void)
void sfPTZCamPan(int deg)
void sfPTZCamTilt(int deg)
void sfPTZCamPanTilt(int pan, int tilt)
void sfPTZCamZoom(int val)

PTZ with Colbert

To use the PTZ System software with your Saphira clients and interactively through the Colbert
command window, load the shared PTZ System object library into the Colbert interpreter that comes with
Saphira versions 6.1 and later. With Linux/Unix systems, the shared library is called
for use with Windows95/98 and WindowsNT. They are kept in the
ptzsys.dll
directory of Saphira.
To use the Saphira commands listed in the Table above from the Colbert command line or from within a
Saphira client program, first start up the Saphira client. Then, either draw down the Saphira File menu and
select to load the shared library, or give the Colbert direct command:
> load ptzsys.dll
or
> load ptzsys.so
The following is ptzdemo.act example Colbert program that exercises the PTZ camera. To run it, simply
load it from the Saphira colbert/ directory. It automatically loads the ptzsys.so (or .dll) library of commands
and starts itself.
/* First load the basic PTZ functions */
load ptzsys;
act PTZDemo()
{
if (!sfIsConnected){
sfMessage("Connect with Pioneer. I'll do the rest...");
waitfor(sfIsConnected);
}
sfMessage("Starting up the camera ...");
sfPTZCamInit();
wait 20;
sfMessage("Pan clockwise ...");
sfPTZCamPan(95);
wait 20;
sfMessage("Pan counter-clockwise ...");
6
Description
Shared object library for Saphira/Colbert
Colbert demo of PTZ software
Shared library source file
Library makefile
devices/ptzsys/ptzsys.c
/* Are we connected? */
source file for details.
Initialize the camera and reset to center
Pan to an absolute position +-95 degrees
Tilt to an absolute position +-20 degrees
Pan and tilt to an absolute position
Zoom to 0 (longest) - 1023 (closest)
ptzsys.so
$(SAPHIRA)/colbert
; it's called

Advertisement

loading