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

SourceForge.net Logo
Project
Download
Mailing lists

 

         

Logging interface data in text format

Note:
Reviewed for release 2.10.0.
In this tutorial we will demonstrate the use of the Orca data logging utility. The system diagram is shown below (IceGrid Registry and IceStorm are not shown).

doc_tute_logtxt.png

Start up Orca and Player/Stage

Repeat the start up instructions of Driving a robot simulated with Player/Stage -- but this time IceStorm is not optional, it has to run.

Create a new system directory and copy Orca sample files.

$ mkdir -p ~/sys/tutelogtxt; cd ~/sys/tutelogtxt
$ cp [ORCA-INSTALL]/share/orca/cfg/robot2d.cfg .
$ cp [ORCA-INSTALL]/share/orca/cfg/teleop.cfg .
$ cp [ORCA-INSTALL]/share/orca/cfg/logger.cfg .

Robot component

Run the Robot2d component.

$ robot2d

Make sure that you can move the robot with Teleop (same as described in Driving a robot simulated with Player/Stage).

Odometry logger

The sample config file for the Logger contains a sample line for each supported interface. Most of them need to be deleted because we will log a single interface: orca::Odometry2d. The resulting config file is shown below.
# Component
Logger.Platform=local
Logger.Component=logger

# Required Interfaces
Logger.Requires.Odometry2d0.Proxy=odometry2d@local/robot2d

# Configuration Options
# Valid values: {'auto', 'local', 'remote'}
Logger.Config.Driver=auto
Logger.Config.FactoryLibNames=libOrcaLogFactory.so
Logger.Config.FilenameTimestamp=0
Logger.Config.Odometry2d0.Format=ascii

A couple of things to note about this configuration:

  • We are using the 'ascii' format which is human-readable.
  • We've changed the FilenameTimestamp property to 0 for convenience. This way the timestamp will not be pre-pended to the filenames. In real-world usage enabling this option (by setting it to 1) is very useful because it reduces the chances of accidental deletion of log files.

Run the logger.

$ logger

Command the robot to move around. After a few seconds stop the logger and list the newly created log files.

$ ls *.log
master.log  odometry2d0.log

Examining log files

Lets examine the log files and compare their contents with the log file format described in the documentation of the Logger component.

Master file
The data section contains the list of data messages from all interfaces (in our case there's only one with ID=0). The time stamps here are the time when the message was received.
#data
1185086269 26512 0 0
1185086269 234753 0 1
1185086269 541920 0 2

Interface log file
The data section consists of 2-line segments, one for each data message. A typical one is shown below:
601 899999
1.3562 -0.236412 -34.8 0.25 0 -12
To understand it, we have to examine the documentation for orcalogfactory::Odometry2dLogger (there is a link to it from Logger documentation under the heading "Details for specific interfaces").

Now we can interpret the segment above. This data point was collected at the time 601 seconds and 899999 microseconds (this is Stage simulation time, not processor time). At that time, the odometric position of the robot was x=1.3562m, y=-0.236412m, theta=-34.8deg. The robot was moving with speed vx=0.25m/s, no cross speed, and turnrate=-12deg/s.

Parsing in Matlab
As noted in the Logger documentation, there's a simple Matlab parsing function for this interface in [ORCA_SRC]/scripts/matlab/logutils/parseodometry2ddata.m.
 

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


Generated for Orca Robotics by  doxygen 1.4.5