Auclient

From Rsewiki
(Difference between revisions)
Jump to: navigation, search
(New page: ''' AU Client ''' A client capable of connecting to the main servers (laser scanner, camera server and other servers) to get data, and to display this data. Image:auclient.png The c...)
 
(Typical configuration)
 
(6 intermediate revisions by one user not shown)
Line 1: Line 1:
''' AU Client '''
+
===Introduction===
  
A client capable of connecting to the main servers (laser scanner, camera server and other servers) to get data, and to display this data.
+
A client capable of connecting to the main servers (laser scanner, camera server and other servers) to get data, and to display data graphically.
 
+
[[Image:auclient.png]]
+
  
 
The client implements a command line interface, and a module to display images using openCV X-interface.
 
The client implements a command line interface, and a module to display images using openCV X-interface.
  
The program is started with the command (from the bin directory):
+
The program is started with the command in a directory with a ''auclient.ini'' configuration file:
  
  ./auclient
+
  auclient
  
 
A command to a laser server running on smr16 could be:
 
A command to a laser server running on smr16 could be:
Line 15: Line 13:
 
  laser connect=smr16:24919
 
  laser connect=smr16:24919
 
  laser cmd="scanget"
 
  laser cmd="scanget"
laser cmd="module load="./ulmspassable.so.0"
 
laser cmd="pass"
 
  
If the laser scanner is running, then the laser scanner data should be displayed.
+
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:
+
The camera server can be accessed like (if it is connected):
  
 
  cam cmd="imageget all"
 
  cam cmd="imageget all"
  
Some display options are available as shown by the help command
+
===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.
 +
 
 +
===Navigation window===
 +
 
 +
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 ----------                                   
 +
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)                     
 +
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)
 +
 
 +
Among the display options are pose history for the three coordinate systems.
 +
As default the current pose in all coordinate systems are shown at robot position.
 +
Robot position is always at a fixed position on the screen and forward is always up.
 +
 
 +
====Zoom and pan====
 +
 
 +
The display can be zoomed and panned using the disp commands (see below) or by
 +
 
 +
* ctrl left mouse click: to put the clicked position at the center of the screen.
 +
* shift-ctrl left mouse click: to zoom out and center at the clicked position
 +
* ctrl left mouse drag a rectangle: to zoom in to show the dragged rectangle.
 +
 
 +
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)
 +
hereNow                  Synchronoze all coordinate systems at robot pose
 +
grid[=M]                  Paint coordinate grid every M meter (is 1m)
 +
rangeRings[=M]            Paint M range rings around laser scanner (is 8m)             
 +
 
 +
(note, scale grid will be shown around the robot only (on the @todo list))
  
disp help
+
===Typical configuration===
  
NB! the client is implemented as modules in the standard server frame, and thus the modules must be loaded before use. (they are most likely loaded from the ini-file (auclient.ini) if this exist in the directory where the AUCLIENT were started.
+
A ''auclient.ini'' configuratuin that will try and keep connection to laser and camera server could be:
  
The AUCLIENT is converted from the old UCLIENT and all future development is added here.
+
# 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=18 cmd='poolget all'"
 +
camOnConnect cmd="cam poolpush img=19 cmd='poolget all'"
 +
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 cmd='obst update fixed'"
 +
laserOnConnect cmd="laser mapposepush cmd='mappose pose'"
 +
laserOnConnect cmd="laser odoposepush cmd='odopose pose'"
 +
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

Latest revision as of 09:07, 29 August 2012

Contents

[edit] 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"

[edit] 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.

[edit] Navigation window

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 ----------                                     
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)                       
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)

Among the display options are pose history for the three coordinate systems. As default the current pose in all coordinate systems are shown at robot position. Robot position is always at a fixed position on the screen and forward is always up.

[edit] Zoom and pan

The display can be zoomed and panned using the disp commands (see below) or by

  • ctrl left mouse click: to put the clicked position at the center of the screen.
  • shift-ctrl left mouse click: to zoom out and center at the clicked position
  • ctrl left mouse drag a rectangle: to zoom in to show the dragged rectangle.
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)
hereNow                   Synchronoze all coordinate systems at robot pose
grid[=M]                  Paint coordinate grid every M meter (is 1m)
rangeRings[=M]            Paint M range rings around laser scanner (is 8m)               

(note, scale grid will be shown around the robot only (on the @todo list))

[edit] 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=18 cmd='poolget all'"
camOnConnect cmd="cam poolpush img=19 cmd='poolget all'"
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 cmd='obst update fixed'"
laserOnConnect cmd="laser mapposepush cmd='mappose pose'"
laserOnConnect cmd="laser odoposepush cmd='odopose pose'"
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
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox