|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lejos.robotics.mapping.NavigationModel
public abstract class NavigationModel
NavigationModel is an abstract class that has two implementations: NXTNavigationModel and PCNavigationModel. It is used to hold all navigation data and transmit updates to the date and other events between a NXT brick and the PC. The abstract NAvigationModel class defines all the events and all data and methods that are common to the NXT and PC implementations. The purpose of NavigationModel and the NXT and PC implementations is to to allow navigation tasks to be split between the NXT and the PC, to allow the PC to show a graphical display of the navigational data and allow the user to interact with it. This allows many different navigation applications to be developed which split processing between the PC and the NXT.
Nested Class Summary | |
---|---|
static class |
NavigationModel.NavEvent
Navigation events that are transmitted between the PC and the NXT (and vice versa). |
Field Summary | |
---|---|
protected Pose |
currentPose
|
protected boolean |
debug
|
protected DataInputStream |
dis
|
protected DataOutputStream |
dos
|
protected RangeFeature |
feature
|
protected Move |
lastMove
|
protected Move |
lastPlannedMove
|
protected LineMap |
map
|
protected MCLPoseProvider |
mcl
|
protected int |
numReadings
|
protected String |
nxtName
|
protected MCLParticleSet |
particles
|
protected Path |
path
|
protected RangeReadings |
readings
|
protected Waypoint |
target
|
Constructor Summary | |
---|---|
NavigationModel()
|
Method Summary | |
---|---|
LineMap |
getMap()
Get the registered map |
MCLParticleSet |
getParticles()
Get the registered particle set |
Path |
getPath()
Get the registered path |
RangeReadings |
getReadings()
Get the current range readings |
Pose |
getRobotPose()
Get the current pose of the robot |
Waypoint |
getTarget()
Get the target waypoint |
boolean |
hasMap()
Test is the model has a map registered |
void |
setDebug(boolean on)
Set debug output on of off |
void |
setNumReadings(int number)
Set the number of readings for MCL |
void |
setParticleSet(MCLParticleSet particles)
Set the MCL Particle set |
void |
setRobotPose(Pose p)
Set the current robot pose |
void |
setTarget(Waypoint target)
Set the target waypoint that the robot is to go to |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected LineMap map
protected String nxtName
protected DataInputStream dis
protected DataOutputStream dos
protected int numReadings
protected Pose currentPose
protected Waypoint target
protected MCLParticleSet particles
protected MCLPoseProvider mcl
protected RangeReadings readings
protected Path path
protected Move lastMove
protected Move lastPlannedMove
protected RangeFeature feature
protected boolean debug
Constructor Detail |
---|
public NavigationModel()
Method Detail |
---|
public boolean hasMap()
public LineMap getMap()
public void setNumReadings(int number)
number
- the number of readingspublic Pose getRobotPose()
public MCLParticleSet getParticles()
public void setRobotPose(Pose p)
p
- the posepublic void setParticleSet(MCLParticleSet particles)
particles
- an MCLParticleSetpublic RangeReadings getReadings()
public void setTarget(Waypoint target)
target
- the target waypointpublic Waypoint getTarget()
public Path getPath()
public void setDebug(boolean on)
on
- true for on, false for off
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |