|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlejos.robotics.localization.MCLParticle
public class MCLParticle
Represents a particle for the particle filtering algorithm. The state of the particle is the pose, which represents a possible pose of the robot. The weight for a particle is set by taking a set of theoretical range readings using a map of the environment, and comparing these ranges with those taken by the robot. The weight represents the relative probability that the robot has this pose. Weights are from 0 to 1.
| Constructor Summary | |
|---|---|
MCLParticle(Pose pose)
Create a particle with a specific pose |
|
| Method Summary | |
|---|---|
void |
applyMove(Movement move,
float distanceNoiseFactor,
float angleNoiseFactor)
Apply the robot's move to the particle with a bit of random noise. |
void |
calculateWeight(RangeReadings rr,
RangeMap map,
float divisor)
Calculate the weight for this particle by comparing its readings with the robot's readings |
Pose |
getPose()
Return the pose of this particle |
float |
getReading(int i,
RangeReadings rr,
RangeMap map)
Get a specific reading |
float |
getWeight()
Return the weight of this particle |
void |
setWeight(float weight)
Set the weight for this particle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MCLParticle(Pose pose)
pose - the pose| Method Detail |
|---|
public void setWeight(float weight)
weight - the weight of this particlepublic float getWeight()
public Pose getPose()
public void calculateWeight(RangeReadings rr,
RangeMap map,
float divisor)
rr - Robot readings
public float getReading(int i,
RangeReadings rr,
RangeMap map)
i - the index of the reading
public void applyMove(Movement move,
float distanceNoiseFactor,
float angleNoiseFactor)
move - the robot's move
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||