orca-robotics INTRODUCTION Overview Download and Install Quick Start Documentation Publications REPOSITORY Interfaces Components Libraries Utilities Software Map DEVELOPER Tutorials Examples Dev Guide Dashboard Wiki login/pass: orca/orca PEOPLE Contributors Users Project Download Mailing lists
|
Running a super-simple component
Starting OrcaStart IceGrid Registry and IceStorm server as described in the Quick-Start Guide.Create a new system directory and copy Orca sample files. $ mkdir -p ~/sys/tutebrick; cd ~/sys/tutebrick $ cp [ORCA-INSTALL]/share/orca/cfg/brick.cfg . Starting Brick ComponentThebrick.cfg file is already configured the way we want it here, so simply run the component:
tutebrick$ brick You'll see a few lines of feedback in the terminal window.
tutebrick$ brick orca: Versions: Ice=3.2.1 Orca=2.9.0 orca: Brick: Loaded command line properties orca: Brick: Loaded component properties from 'brick.cfg' orca: Brick: Loaded global properties from '/home/makara/.orcarc' orca: Brick: Loaded factory default properties orca: Brick: Created object adapter orca: Brick: Initialized trace handler. orca: Brick: Status connected to status/*@jamaica/brick orca: Brick: Initialized status handler orca: Set property to default value: Orca.PropertyServerProxyString= orca: Brick: Initialized Home interface orca: Brick: Application initialized [ 12/23/07 03:26:34.980 jamaica/brick: info: LocalStatus: MainThread is ok : 'Initialized' ] We'll go through them line-by-line and explain what they mean.
tutebrick$ brick orca: Versions: Ice=3.2.1 Orca=2.9.0
orca: Brick: Loaded command line properties --Orca .Config=brick.cfg. See the complete guide to Orca Configuration Files for more details.
orca: Brick: Loaded component properties from 'brick.cfg'
orca: Brick: Loaded global properties from '/home/makara/.orcarc'
orca: Brick: Loaded factory default properties
orca: Brick: Created object adapter
orca: Brick: Initialized trace handler.
orca: Brick: Status connected to status/*@jamaica/brick
orca: Brick: Initialized status handler
orca: Set property to default value: Orca.PropertyServerProxyString=
orca: Brick: Initialized Home interface
orca: Brick: Application initialized
[ 12/23/07 03:26:34.980 jamaica/brick: info: LocalStatus: MainThread is ok : 'Initialized' ] If you are using default configuration files, you don't see any more statements even though we are printing debug statements inside the main loop. This is because the debug statements are not displayed on the screen by default. Stopping Brick ComponentWe'll modify this behaviour but first we'll stop the component by pressing Ctrl-C. Here's what gets printed out.
orca: Brick: Communicator is destroyed. Stopping component orca: Brick: Component stopped orca: Brick: Adapter deactivated orca: Brick: Application quitting. Orca out. Let's look at it line-by-line.
orca: Brick: Communicator is destroyed. Stopping Component
orca: Brick: Component stopped
orca: Brick: Adapter deactivated orca: Brick: Application quitting. Orca out. Modifying TracingLet's add this line to the config filebrick.cfg . (Remember that the debug level of the statements inside the main loop is 5).
Orca.Tracer.DebugToDisplay=5 Run the component again
tutebrick$ brick orca: Versions: Ice=3.2.1 Orca=2.7.0+ Project=2.7.0+ orca: Brick: Loaded command line properties orca: Brick: Loaded component properties from 'brick.cfg' orca: Brick: Loaded global properties from '/home/makara/.orcarc' orca: Brick: Loaded factory default properties orca: Brick: Created object adapter orca: Brick: Initialized trace handler. orca: Brick: Status connected to status/*@jamaica/brick orca: Brick: Initialized status handler orca: Brick: Initialized Home interface orca: Brick: Application initialized [ 12/23/07 03:33:16.818 jamaica/brick: debug: LocalStatus::setMaxHeartbeatInterval(): Adding new subsystem: 'MainThread' ] [ 12/02/07 01:13:51.429 jamaica/brick: debug: Adapter activated ] [ 12/23/07 03:33:16.887 jamaica/brick: info: LocalStatus: MainThread is ok : 'Initialized' ] [ 12/02/07 01:13:51.430 jamaica/brick: debug: Running main loop ] [ 12/02/07 01:13:52.430 jamaica/brick: debug: Running main loop ] [ 12/02/07 01:13:53.431 jamaica/brick: debug: Running main loop ] [ 12/02/07 01:13:54.431 jamaica/brick: debug: Running main loop ] In addition to the debug traces from the main loop we got a few more from the component initialization sequence. Notice that the time stamps of the main-loop traces correspond to the 1Hz frequency of the main loop. A bit more info is displayed on shutdown as well. Press Ctrl-C.
orca: Brick: Communicator is destroyed. Stopping component [ 12/02/07 01:16:01.308 jamaica/brick: debug: orcaice::Component: stopping ComponentThread.... ] [ 12/23/07 03:33:22.889 jamaica/brick: debug: Running main loop ] [ 12/23/07 03:33:22.891 jamaica/brick: debug: dropping out from run() ] [ 12/02/07 01:16:01.452 jamaica/brick: debug: orcaice::Component: ComponentThread stopped. ] orca: Brick: Component stopped orca: Brick: Adapter deactivated orca: Brick: Application quitting. Orca out. Exercise for the UserWhen the system is as simple as this one, it's easier to observe what happens when something goes wrong. So here are a few thing to try:
|
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)