Ulmsserver

From Rsewiki
(Difference between revisions)
Jump to: navigation, search
(ulmsserver.ini for MRC script)
 
(12 intermediate revisions by one user not shown)
Line 1: Line 1:
 
==Introduction==
 
==Introduction==
  
The laser scanner server (ulmsserver) if pre-configured for operation on laser scanner devices.
+
The laser scanner server (ulmsserver) has a number of statically linked modules for operation as a laser scanner server.
It should be used primarily for plug-ins that uses laser scanner data.
+
It should be used primarily for plug-ins that are related to laser scanner data, but is able to handle any plugin (except some specific camera aware plugins that need the camera server environment).
 
+
The laserscanner server is configured with the laser device plugin (laserpool) and virtual 360 degree scanner (v360) as default.
+
Other plugins must be loaded (e.g. in the ulmsserver.ini file.)
+
  
 
==Configurations==
 
==Configurations==
Line 11: Line 8:
 
Typical configuration could be:
 
Typical configuration could be:
  
====Sensor server for MRC script====
+
====ulmsserver.ini for the SMR====
 +
 
 +
server datapath="/vhome/jca/logfiles"
 +
server port=24919
 +
# for laser devices
 +
module load='laserpool'
 +
# handling of (server-global) configuration values
 +
module load='var'
 +
# load coordinate system plug-in
 +
module load=odoPose
 +
# make logfile for odometry updates (odoPose.log in datapath)
 +
odopose log
 +
# Configure laser scanner devices
 +
scanset devtype='urg' devname="/dev/ttyACM0"
 +
scanset def=urg
 +
scanset x=0.22 y=0.0 z=0.05
 +
scanset width=180
 +
scanset logOpen
 +
scanset log=1
 +
 +
 
 +
This loads the needed modules for laserscanner and odometry support
 +
Logfiles are placed in the path specified by ''datapath''
 +
 
 +
The data from the URG laserscanner is saved in a logfile (the last 2 lines).
 +
The filename will be ''laser_0.log''.
 +
 
 +
On top of this some modules to use the laserscans e.g. a localizer and obstacle generation:
 +
 
 +
module load=v360
 +
module load=mapPose
 +
var mappose.estimateVel=true
 +
# obstacle handling (groups fixed and dynamic obst)
 +
module load="ulmspassable.so.0"
 +
# configure obstacle handling
 +
var pass.minObstDist = 0.05;
 +
var obst.outdoormode=0
 +
var obst.obstGrpMaxDistance=0.025
 +
var obst.obstGrpMaxTime=0.01
 +
var obst.obstmerge=false
 +
var obst.obstCogMerge=true
 +
var obst.cogMergeLimit=2.0
 +
var obst.singleMerge=true
 +
var obst.singleLimit = 0.03
 +
#
 +
# display polygons m.v.
 +
module load="aupoly.so.0"
 +
# mapped lines etc.
 +
module load="mapbase.so.0"
 +
#
 +
# load module to utilize mapped obstacles
 +
module load="aumapobst.so.0"
 +
var mapobst.marginSolidFactor=0.3
 +
var mapobst.marginFluffyFactor = 1.1
 +
var mapobst.front=7
 +
#
 +
# laser based dynamic obstacles
 +
module load="aulobst.so.0"
 +
var lobst.minSplitCnt=2
 +
; splitDist defines minimum opening
 +
var lobst.splitDist=0.15
 +
var lobst.maxLineIterations=25
 +
var lobst.maxSamples=80
 +
var lobst.noobst="0.33 0.17 -0.2 -0.17
 +
var lobst.lineeatdist=0.03
 +
var lobst.maxtolinedist=0.04
 +
#
 +
# localize based on lines and laserdata
 +
module load="aulocalize.so.0"
 +
setInitCov cx=0.09 cy=0.09 cth=0.09
 +
setInitPose x=13.0 y=6.1 th=-1.57
 +
var localize.wheelBase=0.46
 +
var localize.sdmRight=0.11
 +
var localize.sdmLeft=0.11
 +
#;
 +
# processing of laserdata - into 360 degree scanner generation
 +
scanpush i=1 cmd="v360 update"
 +
# make obstacles 360 deg
 +
v360push i=2 cmd="lobst make obst silent"
 +
# localize about once a second
 +
v360push i=10 cmd="localize silent=1"
 +
# update fixed obstacles regularly
 +
push t=3 n=10 cmd="obst getfrommap makeonly"
 +
# load map lines into localizer
 +
# mapobst map2localize - moved to bygn326.rule
 +
 
 +
====ulmsserver.ini for HAKO tractor====
 +
 
 +
server datapath="/rhome/demo/log_laser"
 +
server serverlog
 +
#
 +
module load='laserpool'
 +
module load='var'
 +
module load='imagepool'
 +
module load='v360'
 +
module load=odoPose
 +
module load=utmPose
 +
module load=mapPose
 +
var mappose.estimateVel=true
 +
mapPose log
 +
#
 +
scanset devtype='sick' devname="/dev/ttyUSB0"
 +
scanset def=sick
 +
scanset res=0.5
 +
# set scanner position in robot coordinates
 +
scanset x=2.07 y=0.0 z=0.52
 +
scanset mirror=false
 +
scanset logOpen
 +
scanset log=4
 +
 
 +
plus a number of functional plugins and settings (from 6 oct 2010)
 +
 
 +
# interface to nav server (for odometry and utmpose)
 +
module load=if alias=nav
 +
nav add=var
 +
navOnConnect cmd="nav odoPosePush flush"
 +
navOnConnect cmd="nav odoPosePush cmd='odopose pose'"
 +
navOnConnect cmd="nav utmPosePush flush"
 +
navOnConnect cmd="nav utmPosePush cmd='utmpose pose'"
 +
nav connect=localhost:24922
 +
;
 +
module load="./ulmspassable.so.0"
 +
var obst.outdoormode=false
 +
var obst.obstGrpMaxDistance=0.025
 +
var obst.obstGrpMaxTime=0.01
 +
var obst.obstmerge=false
 +
var obst.obstCogMerge=false
 +
var obst.cogMergeLimit=2.0
 +
var obst.singleMerge=true
 +
var obst.singleLimit = 0.03
 +
;scanpush i=3 cmd="pass obstonly makeonly"
 +
;
 +
module load="./aupoly.so.0"
 +
module load="./aurule.so.0"
 +
rule step=0
 +
rule load="./mapPose.rule"
 +
rule load="./building97.rule"
 +
rule load="./buildingChimney.rule"
 +
rule load="./buildingFuel.rule"
 +
rule load="./buildingHans.rule"
 +
rule load="./buildingGreenhouseSouth.rule"
 +
rule load="./buildingSouthSmall.rule"
 +
rule load="./agrovejEastFence.rule"
 +
rule load="./alleNorth.rule"
 +
rule load="./alleSouth.rule"
 +
#
 +
module load="./mapbase.so.0"
 +
#mapbase mapload="./apple_cherry_map.xml"
 +
mapbase graphload="./apple_cherry_graph.xml"
 +
mapbase mapload="./apple_cherry_map.xml"
 +
# load module to utilize mapped obstacles
 +
module load="./aumapobst.so.0"
 +
var mapobst.marginSolidFactor=0.3
 +
var mapobst.marginFluffyFactor=1.4
 +
# and locater relative to mapped lines
 +
module load="./locater.so.0"
 +
var locater.useRowEnd = 1
 +
var locater.rowEndIn1 = 5.0
 +
var locater.rowEndIn2 = 2.5
 +
var locater.keepMapPose = 1.0
 +
var locater.rowEndMaxGap=3.3
 +
var locater.useAvgUpdate=1
 +
var locater.rowToRobotMaxDist = 4.0
 +
var locater.rowEndMaxDist=10.0
 +
var locater.odoDistScale=1.0
 +
locater openlog
 +
var call="locater.resetstate()"
 +
#scanpush cmd="locater locate"
 +
scanpush device=sick i=4 cmd="v360 update"
 +
;v360push cmd="locater locate"
 +
;v360push cmd="pass obstonly makeonly"
 +
;
 +
;utmposepush cmd="locater utmtomap"
 +
;scanget
 +
rule log
 +
rule resume
 +
 
 +
===Replay configuration===
 +
 
 +
Laser scanner logfiles can be replayed, but a replay device must be added to the configuration file, e.g.
 +
 
 +
server datapath="/vhome/jca/logfiles"
 +
server replaypath="/vhome/jca/replay/laser1/log"      <--- new line
 +
server port=24919
 +
# for laser devices
 +
module load='laserpool'
 +
# handling of (server-global) configuration values
 +
module load='var'
 +
# load coordinate system plug-in
 +
module load=odoPose
 +
# make logfile for odometry updates (odoPose.log in datapath)
 +
# odopose log                                          <--- changed to a comment
 +
odopose replay                                        <--- new line
 +
#
 +
scanset devtype='urg' devname="/dev/ttyACM0"
 +
scanset def=urg
 +
scanset devtype='replay' devname="laser_0.log"        <--- new device
 +
scanset def=replay                                    <--- new line
 +
scanset x=0.22 y=0.0 z=0.05
 +
scanset width=180
 +
#scanset mirror=true                                  <--- changed to comment
 +
#scanset logOpen                                      <--- changed to comment
 +
#scanset log=1                                        <--- changed to comment
 +
...
 +
# the rest of the configuration is unchanged - i.e. the functional modules that should be tested against the recorded laserscans.
 +
 
 +
This configuration should be saved in in a specific replay directory (here assumed to be ''~/replay/laser1''
 +
In this directory make a subdirectory, e.g. called ''log''
 +
 
 +
Place the logfiles in this directory.
 +
 
 +
cd ~/replay/laser1/
 +
mkdir log
 +
cp ~/logfiles/*.log log/
 +
 
 +
Start the laser server
 +
 
 +
ulmsserver
 +
 
 +
And start stepping through the recorded laserscans:
 +
 
 +
>> scanset step
 +
<scanset tod="1266588146.403597" time="15:02:26.403" logLine="3"/>
 +
>>
 +
 
 +
If the ''auclient'' is running (and configured), then the scan should be visible in the navigation window.
 +
 
 +
The odometry pose can be stepped too:
 +
 
 +
>> odopose step
 +
<odopose tod="1266588154.579142" time="15:02:34.579" logLine="10"/>
 +
>>
 +
 
 +
Once opened the two datasets are synchronized using the timestamp in the logfiles.
  
@todo
+
====Replay synchronized across servers====
--[[User:Jca|Jca]] 06:13, 25 April 2010 (UTC)
+
  
====Sensor server for HAKO tractor====
+
If a connection is established to e.g. the camera server, then this interface can be used to synchronize any replay on that server, an interface should then be included in the configuration file like:
  
@todo
+
# part of ulmsserver.ini
--[[User:Jca|Jca]] 06:13, 25 April 2010 (UTC)
+
module load=if alias=cam
 +
cam connect=localhost:24920
 +
cam replay
  
 +
And the other way if the image log-file is stepped, then an interface in the camera server must be established to the laser server, like:
  
 +
# part of ucamserver.ini
 +
module load=if alias=laser
 +
laser connect=localhost:24919
 +
laser replay
  
 +
The the two servers should now stay synchronized regardless of which interface is stepped.
  
 
==laser scan logfile==
 
==laser scan logfile==

Latest revision as of 16:17, 20 October 2010

Contents

[edit] Introduction

The laser scanner server (ulmsserver) has a number of statically linked modules for operation as a laser scanner server. It should be used primarily for plug-ins that are related to laser scanner data, but is able to handle any plugin (except some specific camera aware plugins that need the camera server environment).

[edit] Configurations

Typical configuration could be:

[edit] ulmsserver.ini for the SMR

server datapath="/vhome/jca/logfiles"
server port=24919
# for laser devices
module load='laserpool'
# handling of (server-global) configuration values
module load='var'
# load coordinate system plug-in
module load=odoPose
# make logfile for odometry updates (odoPose.log in datapath)
odopose log
# Configure laser scanner devices
scanset devtype='urg' devname="/dev/ttyACM0"
scanset def=urg
scanset x=0.22 y=0.0 z=0.05
scanset width=180
scanset logOpen
scanset log=1

This loads the needed modules for laserscanner and odometry support Logfiles are placed in the path specified by datapath

The data from the URG laserscanner is saved in a logfile (the last 2 lines). The filename will be laser_0.log.

On top of this some modules to use the laserscans e.g. a localizer and obstacle generation:

module load=v360
module load=mapPose
var mappose.estimateVel=true
# obstacle handling (groups fixed and dynamic obst)
module load="ulmspassable.so.0"
# configure obstacle handling
var pass.minObstDist = 0.05;
var obst.outdoormode=0
var obst.obstGrpMaxDistance=0.025
var obst.obstGrpMaxTime=0.01
var obst.obstmerge=false
var obst.obstCogMerge=true
var obst.cogMergeLimit=2.0
var obst.singleMerge=true
var obst.singleLimit = 0.03
#
# display polygons m.v.
module load="aupoly.so.0"
# mapped lines etc.
module load="mapbase.so.0"
#
# load module to utilize mapped obstacles
module load="aumapobst.so.0"
var mapobst.marginSolidFactor=0.3
var mapobst.marginFluffyFactor = 1.1
var mapobst.front=7
#
# laser based dynamic obstacles
module load="aulobst.so.0"
var lobst.minSplitCnt=2
; splitDist defines minimum opening
var lobst.splitDist=0.15
var lobst.maxLineIterations=25
var lobst.maxSamples=80
var lobst.noobst="0.33 0.17 -0.2 -0.17
var lobst.lineeatdist=0.03
var lobst.maxtolinedist=0.04
#
# localize based on lines and laserdata
module load="aulocalize.so.0"
setInitCov cx=0.09 cy=0.09 cth=0.09
setInitPose x=13.0 y=6.1 th=-1.57
var localize.wheelBase=0.46
var localize.sdmRight=0.11
var localize.sdmLeft=0.11
#;
# processing of laserdata - into 360 degree scanner generation
scanpush i=1 cmd="v360 update"
# make obstacles 360 deg
v360push i=2 cmd="lobst make obst silent"
# localize about once a second
v360push i=10 cmd="localize silent=1"
# update fixed obstacles regularly
push t=3 n=10 cmd="obst getfrommap makeonly"
# load map lines into localizer
# mapobst map2localize - moved to bygn326.rule

[edit] ulmsserver.ini for HAKO tractor

server datapath="/rhome/demo/log_laser"
server serverlog
# 
module load='laserpool'
module load='var'
module load='imagepool'
module load='v360'
module load=odoPose
module load=utmPose
module load=mapPose
var mappose.estimateVel=true
mapPose log
#
scanset devtype='sick' devname="/dev/ttyUSB0"
scanset def=sick
scanset res=0.5
# set scanner position in robot coordinates
scanset x=2.07 y=0.0 z=0.52
scanset mirror=false
scanset logOpen
scanset log=4

plus a number of functional plugins and settings (from 6 oct 2010)

# interface to nav server (for odometry and utmpose)
module load=if alias=nav
nav add=var
navOnConnect cmd="nav odoPosePush flush"
navOnConnect cmd="nav odoPosePush cmd='odopose pose'"
navOnConnect cmd="nav utmPosePush flush"
navOnConnect cmd="nav utmPosePush cmd='utmpose pose'"
nav connect=localhost:24922
;
module load="./ulmspassable.so.0"
var obst.outdoormode=false
var obst.obstGrpMaxDistance=0.025
var obst.obstGrpMaxTime=0.01
var obst.obstmerge=false
var obst.obstCogMerge=false
var obst.cogMergeLimit=2.0
var obst.singleMerge=true
var obst.singleLimit = 0.03
;scanpush i=3 cmd="pass obstonly makeonly"
;
module load="./aupoly.so.0"
module load="./aurule.so.0"
rule step=0
rule load="./mapPose.rule"
rule load="./building97.rule"
rule load="./buildingChimney.rule"
rule load="./buildingFuel.rule"
rule load="./buildingHans.rule"
rule load="./buildingGreenhouseSouth.rule"
rule load="./buildingSouthSmall.rule"
rule load="./agrovejEastFence.rule"
rule load="./alleNorth.rule"
rule load="./alleSouth.rule"
#
module load="./mapbase.so.0"
#mapbase mapload="./apple_cherry_map.xml"
mapbase graphload="./apple_cherry_graph.xml"
mapbase mapload="./apple_cherry_map.xml"
# load module to utilize mapped obstacles
module load="./aumapobst.so.0"
var mapobst.marginSolidFactor=0.3
var mapobst.marginFluffyFactor=1.4
# and locater relative to mapped lines
module load="./locater.so.0"
var locater.useRowEnd = 1
var locater.rowEndIn1 = 5.0
var locater.rowEndIn2 = 2.5
var locater.keepMapPose = 1.0
var locater.rowEndMaxGap=3.3
var locater.useAvgUpdate=1
var locater.rowToRobotMaxDist = 4.0
var locater.rowEndMaxDist=10.0
var locater.odoDistScale=1.0
locater openlog
var call="locater.resetstate()"
#scanpush cmd="locater locate"
scanpush device=sick i=4 cmd="v360 update"
;v360push cmd="locater locate"
;v360push cmd="pass obstonly makeonly"
;
;utmposepush cmd="locater utmtomap"
;scanget
rule log
rule resume

[edit] Replay configuration

Laser scanner logfiles can be replayed, but a replay device must be added to the configuration file, e.g.

server datapath="/vhome/jca/logfiles"
server replaypath="/vhome/jca/replay/laser1/log"       <--- new line
server port=24919
# for laser devices
module load='laserpool'
# handling of (server-global) configuration values
module load='var'
# load coordinate system plug-in
module load=odoPose
# make logfile for odometry updates (odoPose.log in datapath)
# odopose log                                          <--- changed to a comment
odopose replay                                         <--- new line
#
scanset devtype='urg' devname="/dev/ttyACM0"
scanset def=urg
scanset devtype='replay' devname="laser_0.log"         <--- new device
scanset def=replay                                     <--- new line
scanset x=0.22 y=0.0 z=0.05
scanset width=180
#scanset mirror=true                                   <--- changed to comment
#scanset logOpen                                       <--- changed to comment
#scanset log=1                                         <--- changed to comment
...
# the rest of the configuration is unchanged - i.e. the functional modules that should be tested against the recorded laserscans.

This configuration should be saved in in a specific replay directory (here assumed to be ~/replay/laser1 In this directory make a subdirectory, e.g. called log

Place the logfiles in this directory.

cd ~/replay/laser1/
mkdir log
cp ~/logfiles/*.log log/

Start the laser server

ulmsserver

And start stepping through the recorded laserscans:

>> scanset step
<scanset tod="1266588146.403597" time="15:02:26.403" logLine="3"/>
>>

If the auclient is running (and configured), then the scan should be visible in the navigation window.

The odometry pose can be stepped too:

>> odopose step
<odopose tod="1266588154.579142" time="15:02:34.579" logLine="10"/>
>>

Once opened the two datasets are synchronized using the timestamp in the logfiles.

[edit] Replay synchronized across servers

If a connection is established to e.g. the camera server, then this interface can be used to synchronize any replay on that server, an interface should then be included in the configuration file like:

# part of ulmsserver.ini
module load=if alias=cam
cam connect=localhost:24920
cam replay

And the other way if the image log-file is stepped, then an interface in the camera server must be established to the laser server, like:

# part of ucamserver.ini
module load=if alias=laser
laser connect=localhost:24919
laser replay

The the two servers should now stay synchronized regardless of which interface is stepped.

[edit] laser scan logfile

Filename for laser 0 is

laser_0.log

The file looks like this

1216815130.160302 25905 0.5 -90 361 5.789 5.782 5.806 5.776 7.619 7.810 7.931 5.803 5.793 ...
1216815130.213813 25907 0.5 -90 361 5.751 5.767 5.777 5.774 5.785 5.784 7.854 7.370 5.795 ...
1216815130.267325 25909 0.5 -90 361 7.628 8.130 5.770 5.780 5.755 5.787 5.802 5.793 7.828 ...

The fields are:

1 Timestamp (linux timestamp, valid to about 20ms)
2 scan number (e.g. 25909), 
3 resolution (here 0.5 degree), 
4 first angle (e.g. -90 degree), 
5 number of measurements (e.g. 361), 
6 first range (5.789 in meters), 
7 second range (5.782) 
8 ... and so forth.
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox