Auclient
Introduction
A client capable of connecting to the main servers (laser scanner, camera server and other servers) to get data, and to display data graphically.
The client implements a command line interface, and a module to display images using openCV X-interface.
The program is started with the command in a directory with a auclient.ini configuration file:
auclient
A command to a laser server running on smr16 could be:
laser connect=smr16:24919 laser cmd="scanget"
If the laser scanner is running on (smr16 (the mmr)), then the laser scanner data should be displayed in a navigation window.
The camera server can be accessed like (if it is connected):
cam cmd="imageget all"
Camera image analysis
Once an image is shown by the client, a new window can be opened with colour analysis information.
The color analysis can either be shown in UV color coordinates or as cromaticity. The following disp comands are available (from on-line help)
------ Image colour analysis options ---------- uvimg=N Do UV analysis for this image number croma=N Do cromaticity analysis on this image number intensMin Minimum intensity to display colour intensMax Maximum intensity to display colour
This means that a command like:
>> disp uvimg=0
will show an image analysis (UV format) of image 0 in image pool. See poollist for available images in image pool.
A number of features can be shown in the navigation window. Which data actually shown is controlled by a number of disp commands
------ top-view (laser) image options ---------- scale=height Scale image for image height in meter (is 68.3648m) pos=X[,Y] Place robot relative to bottom-center of image (is 175.008x, -397.222y) bold[=false] Paint navigation image using bold lines (for presentations) curves[=false] Paint laser line-fit variance curves (is false) gridSys=0 | 1 | 2 Paint grid based on 0=odometry, 1=UTM, 2=Map coordinates (is 2) odoPose[=false] Show odometry pose at bottom of display (is true) utmPose[=false] Show UTM (GPS) pose at bottom of display (is true) mapPose[=false] Show map pose at bottom of display (is true) hereNow Synchronoze all coordinate systems to here now grid[=M] Paint coordinate grid every M meter (is 1m) rangeRings[=M] Paint M range rings around laser scanner (is 8m) pass[=false] Paint passable lines from laser scanner (is false) poly[=false] Paint poly items - planned mission lines etc. (is true) polyNameCnt=N Paint polygon name, max N characters (last), N=5 polyHide="name" Hide selected poly items - accept wildchards (is ) polyShow="name" Show among hidden poly items - accept wildchards (is )
robot=[smr | mmr | hako] Paint robot outline as SMR, MMR or Hako
obst=N Paint N obstacle groups (is 1) poseHist=N Paint N pose history positions for robot (is 300) poseHistVecCnt=N Paint every N pose hist cnt a heading vector (is -1) poseHistVecLng=N Paint pose hist heading vector N pixels long (is 50) path=[0 | 1 | N] Paint navigation path plan 0=no, 1=best, N=all (is 1) pathMid[=false] Paint mid-poses used in path calculation (requires path > 0) is true road[=N] Paint Road lines (if n > 0) and N road line updates (is 100) roadAll Paint all available road lines (not just current best road) (is false) scan=N Paint laserscan and history - up to N scans (is 1) var[=false] Paint variables in struct list varAdd=struct Paint all variables in this struct varDel=struct Hide all variables in this struct visPoly=N Paint N polygons from vision road detection (is 1)
Typical configuration
A auclient.ini configuratuin that will try and keep connection to laser and camera server could be:
# AU Client initiation script (most modules in client is linked statically - see module help) module load=var module load=odopose module load=utmpose module load=mappose module load=imagepool module load=display module load=poly # create and configure interface (to camera server) module load=if alias=cam # add handler of data coming from camera server module load=camdata camdata add=gmk camdata add=path camdata add=img camdata add=cam # request some images from the camera server, when they gets updated camonconnect cmd="cam poolpush img=0 flush; camOnConnect cmd="cam poolpush img=0 cmd='poolget all'" camonconnect cmd="cam poolpush img=10 flush; camOnConnect cmd="cam poolpush img=10 cmd='poolget all'" camonconnect cmd="cam poolpush img=32 flush; camOnConnect cmd="cam poolpush img=32 cmd='poolget all'" camonconnect cmd="cam poolpush img=33 flush; camOnConnect cmd="cam poolpush img=33 cmd='poolget all'" camonconnect cmd="imageget" # # add interface to laser scanner server module load=if alias=laser laser add=var # add handler of laser scanner data module load=laserdata laserdata add=obst laserdata add=road laserdata add=sf laserdata add=man module load=laserscan #laser add=sf #connect to moduletester laserOnConnect cmd="laser varpush struct=obst flush" laserOnConnect cmd="laser varpush struct=obst cmd='obst update fixed'" laserOnConnect cmd="laser mapposepush flush" laserOnConnect cmd="laser mapposepush cmd='mappose pose'" laserOnConnect cmd="laser odoposepush flush" laserOnConnect cmd="laser odoposepush cmd='odopose pose'" laserOnConnect cmd="laser scanpush flush" laserOnConnect cmd="laser scanpush cmd='scanget pose'" laserOnConnect cmd="laser scanget" # # configure navigation display (see 'disp help' for more options) # if you don't need navigation display, then remove these 'disp' lines disp gridsys=0 disp robot=smr disp scale=5 disp pos=0.8 disp posehist=300 disp scan=1 disp obst=1 # connect to laserscanner laser connect=smr12:24919 # connect to camera server cam connect=localhost:24920