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

 

         

Running components inside the IceBox server

Note:
Reviewed for release 2.13.0.

In this tutorial we will reproduce the setup of the Quick-Start Guide but now the Laser2d component will run as a service inside the IceBox application server. The difference is that a single process is used to run the Laser2d component and IceStorm. Later you can run many components within one IceBox which has advantages with respect to performance and deployment.

Compiling Services

Because IceBox services are not used by everyone, their compilation is disabled by default. To turn it on, use ccmake utitilty (or the GUI equivalent). Find the option is ORCA_BUILD_SERVICES, hit Enter to toggle, hit C to configure, then G to generate. Recompile and install.

Start Up the Infrastructure

Make sure the IceGrid Registry is running and the IceStorm server is NOT (See Quick-Start Guide for instructions).

Connect Two Components

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

$ cd ~/sys; mkdir tuteicebox; cd tuteicebox
$ cp [ORCA-INSTALL]/share/orca/cfg/laser2d.cfg .
$ cp [ORCA-INSTALL]/share/orca/cfg/lasermon.cfg .

Also, copy the IceBox configuration files for this tutorial, which are included with your Orca distribution.

$ cp [ORCA-SRC]/scripts/ice/icebox_laser.cfg .
$ cp [ORCA-SRC]/scripts/ice/icestorm.cfg .
$ mkdir stormdb
The IceBox Server

The IceBox configuration file does not need to be modifed. It instructs the IceBox to first load the IceStorm service and then the Laser2d service. Both are configured to share a single instance of Communicator to speed up communication.

The laser config file needs to be changed to fake (simulated) operation (you can skip this step if you're connected to a real SICK laser). Edit laser2d.cfg, and change the name of the driver library to 'libHydroLaserScanner2dFake.so' so it looks like this:

Laser2d.Config.DriverLib=libHydroLaserScanner2dFake.so
Note:
Component service libraries must be in a place where the OS can found them. With standard Orca installation in Linux you have to add Orca library location to the LD_LIBRARY_PATH. For example:
ORCA_INSTALL=/usr/local
export LD_LIBRARY_PATH=$ORCA_INSTALL/lib/orca:$LD_LIBRARY_PATH

Start the IceBox.

$ icebox --Ice.Config=icebox_laser.cfg
The Client

Start a new shell, and fire up the LaserMon component (a laser monitor). No modifications are needed for its configuration file. Note that the name of the configuration file is not specified on the command line and it is assumed to be lasermon.cfg.

$ lasermon

You should see the scans scroll by on the screen, just as in the Starting Up the Infrastructure tutorial. To stop the IceBox or the component, type Ctrl-C in the corresponding terminal window.

What's Next

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