public class MCLParticle
extends java.lang.Object
| Constructor and Description |
|---|
MCLParticle(Pose pose)
Create a particle with a specific pose
|
| Modifier and Type | Method and Description |
|---|---|
void |
applyMove(Move 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
|
RangeReadings |
getReadings(RangeReadings rr,
RangeMap map) |
float |
getWeight()
Return the weight of this particle
|
static void |
setDebug(boolean yes) |
void |
setWeight(float weight)
Set the weight for this particle
|
public MCLParticle(Pose pose)
pose - the posepublic static void setDebug(boolean yes)
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 readingspublic float getReading(int i,
RangeReadings rr,
RangeMap map)
i - the index of the readingpublic RangeReadings getReadings(RangeReadings rr, RangeMap map)
public void applyMove(Move move, float distanceNoiseFactor, float angleNoiseFactor)
move - the robot's move