Mapbase: Difference between revisions

From Rsewiki
No edit summary
Line 46: Line 46:
  (H: has time series, L: is logged, R: replay)
  (H: has time series, L: is logged, R: replay)
  </help>
  </help>
===Mapbase load a map===


The mapbase was loaded and configured with this part of the aurobotserver .ini file:
The mapbase was loaded and configured with this part of the aurobotserver .ini file:
Line 54: Line 56:
  mapbase graphload="./apple_cherry_graph.xml"
  mapbase graphload="./apple_cherry_graph.xml"
  ...
  ...


===Map definition===
===Map definition===

Revision as of 09:45, 5 September 2011

The mapbase plugin were created for the masters thesis Mission Management for Mobile Robots by Anders Beck. http://www.elektro.dtu.dk/English/research/publications_elektro.aspx?lg=showcommon&id=246287

Part of the thesis is reproduced here:

Mapbase on-line functions

The on-line commands for mapbase is (with some maps from the Tåstrup environemnt loaded):

>> mapbase help
>> <help subject="Mapbase">
--- available Mapbase options
help             This message
mapload=[file]   Loads data in file into database
graphload=[file] Loads graph data into database
export           Exports the entire map in XML format
mapLines         Export map lines
list          Display current contents of database
status:  has 77 nodes, 486 edges, 25 lines, 0 points
current node = 'taastrup' at (708000.00x, 6174000.00y, 0.0000h)
</help>

In addition some inter-plugin variables and function calls are available.

>> var mapbase
>> <help subject="var list" name="mapbase">
Description:                  Database for maprelated information.
  connMapPose=0 0 0          Return value of Connetor mappose
  edge(ds)                   Get feature value from [s] extracted from the edge id [d]
  edge(ss)                   Get feature value from [s] extracted from the edge name
                             [s]. Syntax: (edgename,featurename)
  node(ds)                   Get feature value from [s] extracted from the node id [d]
  node(ss)                   Get feature value from [s] extracted from the node name
                             [s]. Syntax: (nodename,featurename)
  connector(ds)              Get feature value from [s] extracted from the connector id
                             [d]
  connector(ss)              Get feature value from [s] extracted from the connector
                             name [s]. Syntax: (connname,featurename) (This is not
                             working properly, if unknown connectorname is entered)
  getConnMapPose(s)          Get the mappose of a connector (returns in var
                             connMapPose)
  addMapLine(sdddddd)        Add a mapline to current reference node. Parameters are
                             addMapLine("name", startX, startY, endX, endY, radius,
                             isObstacle). If isObstacle==0, then line is for localizer
                             only. Coordinates are in map coordinates (see graph for
                             position of node).
(H: has time series, L: is logged, R: replay)
</help>

Mapbase load a map

The mapbase was loaded and configured with this part of the aurobotserver .ini file:

...
module load="mapbase.so.0"
mapbase mapload="./apple_cherry_map.xml"
mapbase graphload="./apple_cherry_graph.xml"
...

Map definition

An example map is listed below (the cherry orchard in KU-Life Tåstrup):

<?xml version="1.0" ?>
<map nodename="taastrup">
 <line number="1" perimeter="1.500">
   <start x="-171.049" y="522.576"/>
   <end x="-146.381" y="316.801"/>
 </line>
 <line number="2" perimeter="1.500">
   <start x="-166.177" y="523.663"/>
   <end x="-141.456" y="317.924"/>
 </line>
 <line number="3" perimeter="1.500">
   <start x="-161.306" y="524.751"/>
   <end x="-136.531" y="319.047"/>
 </line>
 <line number="4" perimeter="1.500">
   <start x="-156.434" y="525.838"/>
   <end x="-131.605" y="320.170"/>
 </line>
 <line number="5" perimeter="1.500">
   <start x="-151.562" y="526.926"/>
   <end x="-126.680" y="321.293"/>
 </line>
 <line number="6" perimeter="1.500">
   <start x="-146.691" y="528.013"/>
   <end x="-121.755" y="322.416"/>
 </line>
 <line number="7" perimeter="1.500">
   <start x="-141.819" y="529.101"/>
   <end x="-116.830" y="323.539"/>
 </line>
 <line number="8" perimeter="1.500">
   <start x="-136.947" y="530.188"/>
   <end x="-111.904" y="324.662"/>
 </line>
 <line number="9" perimeter="1.500">
   <start x="-132.076" y="531.276"/>
   <end x="-106.979" y="325.785"/>
 </line>
 <line number="10" perimeter="1.500">
   <start x="-127.204" y="532.363"/>
   <end x="-102.054" y="326.908"/>
 </line>
 <line number="111" perimeter="1.5">
   <start x="144.820" y="391.249"/>
   <end x="156.735" y="259.275"/>
 </line>
 <line number="112" perimeter="1.5">
   <start x="148.456" y="391.686"/>
   <end x="160.292" y="259.670"/>
 </line>
 <line number="113" perimeter="1.5">
   <start x="151.880" y="391.902"/>
   <end x="163.654" y="261.489"/>
 </line>
 <line number="114" perimeter="1.5">
   <start x="155.336" y="392.159"/>
   <end x="167.240" y="260.155"/>
 </line>
 <line number="115" perimeter="1.5">
   <start x="158.810" y="392.547"/>
   <end x="170.822" y="260.477"/>
 </line>
 <line number="116" perimeter="1.5">
   <start x="162.378" y="392.761"/>
   <end x="174.220" y="260.830"/>
 </line>
 <line number="117" perimeter="1.5">
   <start x="166.020" y="390.116"/>
   <end x="177.717" y="261.148"/>
 </line>
 <line number="118" perimeter="1.5">
   <start x="169.469" y="391.844"/>
   <end x="181.187" y="261.472"/>
 </line>
 <line number="119" perimeter="1.5">
   <start x="172.801" y="393.632"/>
   <end x="184.686" y="261.742"/>
 </line>
 <line number="120" perimeter="1.5">
   <start x="176.323" y="394.024"/>
   <end x="188.196" y="262.135"/>
 </line>
 <line number="121" perimeter="1.5">
   <start x="185.746" y="343.686"/>
   <end x="193.214" y="262.447"/>
 </line>
 <line number="122" perimeter="1.5">
   <start x="154.107" y="252.755"/>
   <end x="197.343" y="256.614"/>
 </line>
</map>