|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lejos.robotics.objectdetection.RangeFeature
public class RangeFeature
This class is a basic data container for information retrieved about an object detected by
sensors. The RangeFeature contains only the most basic range information of a detected object, which
is RangeReading
. The RangeReading contains range and angle data relative to the robot.
It can be extended to include more information, such as color. For example, a ColorFeature would rely on a ColorFeatureDetector to supply color information and range. The ColorFeatureDetector could extend FeatureDetector and accept a camera in the constructor to identify color of a detected object. This type of class would be useful to allow soccer robots to identify team-mates, the soccer ball, and the different goals.
Constructor Summary | |
---|---|
RangeFeature(RangeReading rr)
Creates a RangeFeature containing a single RangeReading. |
|
RangeFeature(RangeReadings rrs)
Creates a RangeFeature containing multiple RangeReadings. |
|
RangeFeature(RangeReadings rrs,
Pose pose)
Creates a RangeFeature containing multiple RangeReadings. |
Method Summary | |
---|---|
void |
dumpObject(java.io.DataOutputStream dos)
|
Pose |
getPose()
|
RangeReading |
getRangeReading()
Returns the RangeReading for this particular detected feature. |
RangeReadings |
getRangeReadings()
Returns a set of RangeReadings for a number of detected objects. |
long |
getTimeStamp()
The time-stamp is the recorded system time when the range reading was taken. |
void |
loadObject(java.io.DataInputStream dis)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RangeFeature(RangeReading rr)
getRangeReadings()
method is subsequently called, it will return a RangeReadings set containing only one RangeReading (rr).
rr
- The RangeReading.public RangeFeature(RangeReadings rrs)
getRangeReading()
method
will return the RangeReading with the smallest range.
rrs
- A (@link RangeReadings} object containing a set of RangeReading
values.public RangeFeature(RangeReadings rrs, Pose pose)
getRangeReading()
method
will return the RangeReading with the smallest range.
rrs
- A (@link RangeReadings} object containing a set of RangeReading
values.pose
- the pose of the robot when the reading was takenMethod Detail |
---|
public RangeReading getRangeReading()
Feature
getRangeReading
in interface Feature
public long getTimeStamp()
Feature
getTimeStamp
in interface Feature
public RangeReadings getRangeReadings()
Feature
getRangeReadings
in interface Feature
public Pose getPose()
public void dumpObject(java.io.DataOutputStream dos) throws java.io.IOException
dumpObject
in interface Transmittable
java.io.IOException
public void loadObject(java.io.DataInputStream dis) throws java.io.IOException
loadObject
in interface Transmittable
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |