Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

BlueRockDetector

Overview

The BlueRockDetector module was created to support the IS milestone, in particular simulations involving serendipitous science missions. The detector detects specially marked rocks that fall into its detection range.

Model Description

The model computes the distance and angle of specially marked rocks relative to the rover. If the location of a rock falls within specified angular and distal limits, the rock is "detected". The special rocks are defined in a file, whose name is a command line parameter.

Usage

SpecialtyRockDetector RobotName RockListFileName DistanceThreshold AngularThreshold [--Detector_Physical] DetectorPhysicalName

Parameters

RobotName:		Name of the rover.

RockListFileName:	A file that contains data with rocks that have utility
and material properties.

DistanceThreshold: 	Distance between rock and rover in meters.

AngularThreshold:	Angle between the forward direction of the rover and the line from the rover to the rock.

DetectorPhysicalName:	The name of the physical of the detector, e.g. K9:GPS_Mount:Physical 
                        (the detector uses its location).

Environment Variables

SIMSCAPE_LOCAL_CACHE_PATH: This variable specifies the path to SimScape and is used only if the BlueRockDetector has been compiled for use with SimScape (MSF_USE_SIMSCAPE).

API

The BlueRockDetector publishes the following object classes and interactions:

The BlueRockDetector subscribes to the following object classes and interactions:

In order for the BlueRockDetector federate to run successfully in a simulation, it has to discover the following object instances:

where robotName is the name entered at the command line.

or

if K9_DETECTOR_PHYSICAL is a defined environmental variable.

A federate that wants to use the BlueRockDetector must discover the following object instances:

where robotName is the name entered at the command line.

GUI

This component does not have a graphical user interface.

COMPILATION FLAGS

MSF_USE_SIMSCAPE: If this environment variable is defined during compilation, the SpecialtyRockDetector will get the rocklist from SimScpe.

Test Program

For testing, run an RTI and the following three components:

MSF/components/BlueRockDetector  K9 RockList_Test1.xml 3.0 150
MSF/components/test_BlueRockDetector  K9
MSF/components/manager/SimManager  3
The test program creates a PhysicalInstance and a shell for discovering a SpecialtyRockDetector instance published by the BlueRockDetector. The test program sets the location of the Physical instance at <-4.0, 0.0, 0.0> and moves it along the X-axis in 0.5 m increments. The output includes the location of the PhysicalInstance and the data of a rock if it is detected.

Files

Code and data of the BlueRockDetector model reside in the MSF/component/detector directory and include the following files:

SpecialtyRockDetector.cpp       // Details of the rock detector
BlueRockDetector.cpp		// main program
testBlueRockDetector.cpp       	// test program
RockList.txt			// rock list for testing
BlueRockDetector.dox		// component documentation in doxygen format.

Generated on Thu Apr 7 18:21:15 2005 for MST API by  doxygen 1.4.1