Ucamserver
Camera server
Intended for image handling functions.
The following camera-related plug-ins are available:
- Camera control (camget, camset etc)
- Image access (imageget, imageset) access to fresh images.
- Image pool handling (poolget poollist etc.) pool of imege buffers with image handling functionality.
- Guidemark detection (gmkget) giudemark 3D pose and code
- Road outline plugin (pathget) polygon with road outline matching a seed area.
- Sample plugin (center of gravity)
The following cameras are supported:
- all USB cameras supported by the pwc (Philips Web Cam) driver, e.g.
- - Philips 740K, 840K,
- - Logitech Orbit
- A few frame-grapper cards (I have not tried for a long time)
- IEEE1394 DCI-standard
- IEEE1394 DVI - not supported
- palantir streaming video - not supported p.t.
To run the server
./ucamserver
It then shows a command prompt:
>>
To monitor images and results use the monitoring client UCLIENT or AUCLIENT (or the server console directly - or as a last resort TELNET)
See:
>> module list
For heneral help about the server and a list of all available commandes (from all plug-ins) use:
>> help
Each of the listed commands should have an on-line help function, e.g:
>> camset help
Typical configuration SMR
A camera server configuration for the SMR could be:
server dataPath="/vhome/jca/logfiles" server imagepath="/vhome/jca/logfiles/imgorg" module load=var module load=gmk module load=odopose odopose log # camera parameters for GUPPY camera (device 10) camset device=10 focallength=650 camset device=10 posx=0.4 posy=0.0 posz=0.87 rotphi=0.3 module load=path # ballfinder and configuration module load="./aub2.so.0" var b2.redlim="105 127 129 180" var b2.bluelim="115 200 95 132" var b2.ballsize=0.12 var b2.topline=75 var b2.minsize=20 var b2.maxsize=65 # log images from device 10 camset device=10 log # use an image every 1.5 seconds (image is logged and available in image pool) push t=1.5 cmd="imageget img=10" # use the image to find balls every time image 10 is updated poolpush img=10 cmd="ball blue debug='true'"
Logfile for odometry and used images will then be produced in datapath, and the images saved in the imagepata.
These files cam be replayed for repeated function testing.
Make a directory for the replay configuration, e.g. replay/ballfinder:
mkdir ~/replay/ballfinder cd ~/replay/ballfinder
place a copy of the cameraserver configuration file ucamserver.ini in this directory.
Make a subdirectory in this directory, e.g. called log
mkdir log cd log
Place the logfiles (odoPose.log and image.log) in this directory
cp <sourcedir>/*.log .
Make a further subdirectory for the images, this directory MUST be called imgorg
mkdir imgorg cp <imagepath>/*.png imgorg/
The ucamserver.ini need to be modified slightly to enable the replay:
server dataPath="/vhome/jca/logfiles" server imagepath="/vhome/jca/logfiles/imgorg" server replayPath="/vhome/jca/replay/ballfinder" <--- new module load=var module load=gmk module load=odopose odopose replay <--- new # odopose log <--- changed to comment # camera parameters for GUPPY camera (device 10) camset device=10 focallength=650 camset device=10 posx=0.4 posy=0.0 posz=0.87 rotphi=0.3 camset device=10 replay <--- new module load=path # ballfinder and configuration module load="./aub2.so.0" var b2.redlim="105 127 129 180" var b2.bluelim="115 200 95 132" var b2.ballsize=0.12 var b2.topline=75 var b2.minsize=20 var b2.maxsize=65 # log images from device 10 # camset device=10 log=false <--- changed to comment # use an image every 1.5 seconds (image is logged and available in image pool) # push t=1.5 cmd="imageget img=10" <--- changed to comment # use the image to find balls every time image 10 is updated poolpush img=10 cmd="ball blue debug='true'"
Then the replay can commence, first start the camera server in the configuration directory
cd ~/replay/ballfinder ucamserver
When the cameraserver is started, then the stepping can start
>> camset step <camset info="Stepped to 1266588079.109762 line 2 in image.log"/> Ball position x: 4.1385 y: 0.5525 z: 0.2767 >>
This will advance to the next image in the logfile, and some messages may be printed on the console. The image will be loaded into the image-pool with the same image number as the original device number (here 10).
The odometry pose may be stepped too:
>> odopose step <odopose tod="1266588094.529696" time="15:01:34.529" logLine="2"/> >>
This may advance the image.log file too (to the same log-time), and thus trigger another image and any command related to that image.