GarciaIndex

Overview

These are the properties for the Garcia object.

Defined values that may be used as parameters can be found in the aGarciaDefs.tea file in the aSystem subfolder of the brainstem directory tree.

Property Inheritance

Garcia inherits Object properties.

Properties
active
angle-units
angle-units-string
app-object
battery-level
battery-voltage
damped-speed-left
damped-speed-right
distance-left
distance-right
distance-units
distance-units-string
down-ranger-enable
down-ranger-left
down-ranger-right
error-stream
front-ranger-enable
front-ranger-left
front-ranger-right
front-ranger-threshold
heartbeat-callback
heartbeat-status
idle
ir-receive
ir-transmit
rear-ranger-enable
rear-ranger-left
rear-ranger-right
rear-ranger-threshold
relay-byte
relay-index
relay-status
side-ranger-enable
side-ranger-left
side-ranger-right
side-ranger-threshold
speed
stall-threshold
stall-queue-size
status
status-stream
user-button
user-flags
user-led

active (bool)

True if there is an active link with the robot.  False otherwise. (READ-ONLY.)


angle-units (int)

The current unit type for measuring angles.  The default units are radians.  A user may specify radians or degrees using the defined values aGARCIA_ANGLE_RADIANS or aGARCIA_ANGLE_DEGREES .


angle-units-string (char*)

The current unit type for measuring angles.  The default units are radians.  A user may specify "radians" or "degrees" by using the appropriate string.


app-object (void*)

Reference to a user application.


battery-level (float)

The current amount of battery life remaining based on a 0.2C discharge curve for a 6-cell NiMH battery pack.  The value ranges from 1 to 0 where 1 is full and 0 is depleted. (READ-ONLY.)


battery-voltage (float)

The current battery voltage. (READ-ONLY.)


damped-speed-left (float)

The speed for the left wheel in current distance units per second.  This property provides access to wheel speed while the null primitive is running.  If this primitive is not running, writing this property will have no effect. (WRITE-ONLY.)


damped-speed-right (float)

The speed for the right wheel in current distance units per second.  This property provides access to wheel speed while the null primitive is running.  If this primitive is not running, writing this property will have no effect. (WRITE-ONLY.)


distance-left (float)

The value of the left wheel odometer in current distance units.


distance-right (float)

The value of the right wheel odometer in current distance units.


distance-units (int)

The current unit type for measuring distance.  The default units are meters.  A user may specify meters, feet, or inches using the defined values aGARCIA_DISTANCE_METERS , aGARCIA_DISTANCE_FEET , or aGARCIA_DISTANCE_INCHES .


distance-units-string (char*)

The current unit type for measuring distance.  The default units are meters.  A user may specify "meters", "feet", or "inches" by using the appropriate string.


down-ranger-enable (int)

The enable state for the downward-looking IR proximity sensors.  Writing a 0 disables the sensors.  Writing a 1 enables the sensors.


down-ranger-left (int)

The reading of the left downward-looking proximity sensor. (READ-ONLY.)


down-ranger-right (int)

The reading of the right downward-looking proximity sensor. (READ-ONLY.)


error-stream (void*)

A pointer to a stream for error messages.  This property may only be used in compiled programs.  It is not used in XML scripts since there is no notion of a stream pointer in an XML script file.


front-ranger-enable (int)

The enable state for the front-looking IR range finders.  Writing a 0 disables the sensors.  Writing a 1 enables the sensors.


front-ranger-left (float)

The reading of the left-front range finder given in current distance units. (READ-ONLY.)


front-ranger-right (float)

The reading of the right-front range finder given in current distance units. (READ-ONLY.)


front-ranger-threshold (float)

The threshold in current distance units for triggering a front ranger detection when executing a primitive.


heartbeat-callback (acpCallback*)

Pointer to an acpCallback object.  A user may define a custom heartbeat handler in a Garcia application.


heartbeat-status (bool)

Current state of the heartbeat.


idle (bool)

True if there is no behavior in progress and there are no other behaviors queued for execution.  False otherwise. (READ-ONLY.)


ir-receive (int)

The contents of the 2-byte IR communication reception register.  This property may be polled to check for incoming IR messages.  It may be written to clear or reset the contents.


ir-transmit (int)

The 2-byte IR communication transmission register.  Writing to this register transmits a byte using the NEC protocol. (WRITE-ONLY.)


rear-ranger-enable (int)

The enable state for the rear-looking IR range finders.  A 0 disables the sensors.  A 1 enables the sensors.


rear-ranger-left (float)

The reading of the left-rear range finder given in current distance units. (READ-ONLY.)


rear-ranger-right (float)

The reading of the right-rear range finder given in current distance units. (READ-ONLY.)


rear-ranger-threshold (float)

The threshold in current distance units for triggering a rear ranger detection when executing a primitive.


relay-byte (int)

(Available in Build 23.) Returns a byte from a serial relay stream.  The serial relay stream must be selected by writing a value to the relay-index property.  The relay-status property must be polled to determine if the last read was successful.  If so, then the return value is a valid data byte otherwise the return value must be ignored. (READ-ONLY.)


relay-index (int)

(Available in Build 23.) Selects a networked BrainStem module as a serial relay or returns the index of the current serial relay.  A return value of -1 indicates that no serial relay has been assigned.  When a specific address is first written to this property, a serial relay stream associated with that address is created.  Multiple serial relay sources may be selected by writing a new address to this property.  Any existing serial relay streams will be destroyed when an application using the API closes.  Once a relay stream has been selected, bytes may be read from the stream and validated by reading the relay-byte and relay-status properties.


relay-status (int)

(Available in Build 23.) The result of the last read of the relay-byte property.  A value equal to the defined constant aErrNone indicates that the last read operation retrieved a byte from the selected serial relay stream.  Other values indicate that the stream has no data available or is not initialized.  Reading bytes from a serial stream usually requires a polling loop with a relay-byte access followed by a relay-status check.  The user must buffer incoming relay bytes when the status result is aErrNone and determine when to exit the polling loop.


side-ranger-enable (int)

The enable state for the side-looking IR range finders.  Writing a 0 disables the sensors.  Writing a 1 enables the sensors.


side-ranger-left (float)

The reading of the left-side range finder given in current distance units. (READ-ONLY.)


side-ranger-right (float)

The reading of the right-side range finder given in current distance units. (READ-ONLY.)


side-ranger-threshold (float)

The threshold in current distance units for triggering a side ranger detection when executing a primitive.


speed (float)

The speed setting for the robot in units per second.  This property sets the default speed.  The align , dock , move , pivot , and turn primitives use this property as a speed limit.


stall-threshold (float)

The threshold for detecting a stall condition.  Increase value to make stall detection less sensitive.  Default value is 3.  Units are encoder ticks per PID interval.


stall-queue-size (float)

The number of consecutive stall conditions that must take place before a stall error occurs.  Value may range from 1 to 16.  Default is 7.


status (int)

Provides access to the status value for a primitive that is running.  When no primitives are running, this property provides access to the return status for the last primitive that completed its operation.  Writing the defined value aGARCIA_ERRFLAG_ABORT while a primitive is running will cause the primitive to halt.  The primitive will return the same value as its error code.


status-stream (void*)

A pointer to a stream for output messages.  This property may only be used in compiled programs.  It can not be used in XML scripts since there is no notion of a stream in an XML script file.


user-button (int)

The state of the user button. (READ-ONLY.)


user-flags (int)

Provides access to control bits that enable or disable various functions.  Bit masks provide access to individual bits.  The defined bit mask aGARCIA_EXECTRL_IRCHK provides access to the bit that determines whether IR reception is a termination condition for a primitive.  The defined bit mask aGARCIA_EXECTRL_EDGECHK provides access to the bit that determines whether loss of detection from a downward-looking ranger is a termination condition for a primitive.  The defined bit mask aGARCIA_EXECTRL_STALLCHK provides access to the bit that determines whether a stall is a termination condition for a primitive.


user-led (int)

The state of the user LED.  A 0 turns the LED off.  A 1 turns the LED on.


version: 1.0, build 91231
© Copyright 1994-2010 Acroname, Inc., Boulder, Colorado.  All rights reserved.