INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

NONFRAMEWORK CODE
Driver Interfaces
Drivers
Libraries
Utilities

FRAMEWORK CODE
Interfaces
Components
Libraries
Utilities

Full Software Listings

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

Deploying components with the IceGrid Node

Note:
Reviewed for release 2.10.0.

In this tutorial we will reproduce the setup of the Quick-Start Guide but now the Laser2d component will be deployed and activated with IceGrid Node. The system diagram is shown below.

doc_tute_icegrid.png

IceGrid is the location and activation service for Ice applications. For more information refer to the IceGrid Chapter of the Ice manual.

Start Up the Infrastructure

IceGrid Registry

Repeat the steps for starting IceGrid Registry (See Quick-Start Guide for instructions).

IceGrid Node

The IceGrid Node will activate our application. We create a separate directory for it to run in, copy a sample config file, create the database directory and start it up. Note that it's possible to run the Node and the Registry in one process but we choose to run them separately.

$ mkdir -p ~/sys/icenode; cd ~/sys/icenode
$ cp [ORCA-SRC]/scripts/ice/icegridnode.cfg .
$ mkdir db
$ icegridnode --Ice.Config=icegridnode.cfg
IceStorm Service

Repeat the steps for starting IceStorm service (See Quick-Start Guide for instructions).

Getting Two Components Talking

First, copy default configuration files for the Laser2d and LaserMon components.

$ mkdir -p ~/sys/tuteicegrid; cd ~/sys/tuteicegrid
$ cp [ORCA-INSTALL]/xml/laser2d.xml .
$ cp [ORCA-INSTALL]/share/orca/cfg/lasermon.cfg .
The Server

Edit the file laser2d.xml to change the value of Laser2d.DriverLib to "libHydroLaserScanner2dFake.so". Also replace platform name 'local' to the hostname of your computer in the string for adapter ID. In the example below, the hostname is 'agave'. (This needs to be done because, unlike the Orca components, IceGrid will not resolve the string 'local' to the honstname).

...
<adapter name="Laser2d" register-process="true" id="agave/laser2d"/>
...
<property name="Laser2d.Config.Driver" value="fake"/>
...

Load the application described in laser2d.xml into the IceGrid Node using icegridadmin utility.

$ icegridadmin --Ice.Default.Locator="IceGrid/Locator:default -p 12000" -e "application add 'laser2d.xml'"

(Any username and password will do, since no access controls are configured).

The Client

Start a new shell, and fire up the LaserMon component (a laser monitor). No modifications are needed for its configuration file.

$ lasermon

You should see the scans scroll by on the screen, just as in the Starting Up the Infrastructure tutorial. To stop the client component, type Ctrl-C in its terminal window. To stop the server you can Ctrl-C the IceGrid Node itself or send a remote command like this.

$ icegridadmin --Ice.Default.Locator="IceGrid/Locator:default -p 12000" -e "application remove OrcaApp"

What's Next

For an example of running IceStorm through IceGrid, see [ORCA-SRC]/scripts/ice/icestorm_laser.xml configuration file.

If everything works, check out more Orca Tutorials.

 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5