(Difference between revisions)
 Revision as of 18:12, 19 November 2009 (view source)Rogergla (Talk | contribs) (→Level 1 Basic classes and interfaces)← Older edit Revision as of 18:13, 19 November 2009 (view source)Rogergla (Talk | contribs) (→Level 2 update of pose)Newer edit → Line 57: Line 57: ===Level 2 update of pose === ===Level 2 update of pose === - Pose + Pose (now known as UpdateablePose) *Skills: *Skills: **update x,y, and heading  using  distance traveled and heading change **update x,y, and heading  using  distance traveled and heading change

## Navigation names, definitions, and classes as agents, their skills and dependencies

Roger 19 November

### First, some thoughts about the names of classes.

• Pilot was probably not the best choice. MovmentController might be better; shorter versions include MovementControl, MoveController, MoveControl, Controller . Any of these would be better than PoseController because pose is the dynamic state of a navigating robot and it changes as the result of a movement. It cannot be controlled directly.

While there is a couple of years of code written by many users that would be broken if we abandon Pilot, if we ever going to do it, release 1.0 is the time.

• I don’t care for Qualified as the QualifiedCoordinates in microedition.location, but prefer Probabilistic

Definitions of terms

• Navigation: control of movement in the plane.
• Directions in a the plane are relative to the direction of the X axis ; the direction of the Y axis is 90 degrees.
• Heading: the direction the robot travels while moving forward. (if it moves backwards, the direction of motion is the heading + 180 degrees)
• Pose: the current coordinates of the robot and its heading

In probabilistic robotics, the pose is a random variable, the value of which is never known exactly. But decisions are based on a belief about the pose. This belief is represented as a probability distribution, the two most popular representations being the multi-variate normal and particle set. In this context, I use the term pose to mean “belief about the pose”

• Elemental movements are :
• travel in a straight line – change coordinates but not heading
• rotate in place – change heading but not coordinates
• trace a circular arc

While it is true that a straight line is an arc with infinite radius, and rotation in place is an arc with zero radius, these special cases are the most commonly used and each deserves its own method. This allows the amount of movement to be specified by a single parameter.

The various tasks involved in navigation can usefully be classified by their complexity.

1. Execute elemental movements. At present, the Pilot classes do this.
2. Update the robot pose after each elemental movement, assuming an initial pose is known. This is dead reckoning navigation and the errors of pose estimation increases with each move. The current classes do this in various ways. SimpleNavigator updates a Pose after a move but not during a move. The automatic update of pose now uses a DifferentialPilot, UpdateablePose, Movement, MovementListener interface, MovementProvider interface. I think this is more complex than it needs to be.
3. Improve the accuracy of the estimated pose by using sensor data and external landmarks, using algorithms such Kalman filter and extensions, and Monte Carlo Localization based on particle sets.
4. More complex tasks such as global localization, path planning, obstacle avoidance and combinations of these. I have not thought much about these, so will not discuss them.

My view is that the navigation tasks at each level should be built on the level below, so the architecture of the navigation classes and interfaces should do likewise. I think some simplifications of the existing structure are possible. The automatic update of pose can be done without the Movement class, the MovementProvider and the MovementListener interfaces. The only class that can provide a movement is the one the executes it ( a Pilot) , and the only class that can be updated by a Movement is a pose. In the following, I use the language of agents that have skills of their own, and use other agents as helpers. I hope this focuses on concepts and not on the details of the API.

### Level 1 Basic classes and interfaces

BasicPilot interface

• Skills: travel in a straight line : forward or backward) ( I don’t think this is necessary in a Navigation package since a robot *that cannot change direction cannot it cannot navigate in a plane and is hardly worth building)

Arc Pilot interface

• Skills:
• Executes two of the elementary movements in a plane: straight line and arc move, forward and backward . Movement can be interrupted by a client.

Provide estimate, at any time, of distance traveled and heading change since start of the current movement.

• Uses:
• Motor

Pilot interface

• Skills:
• Executes two of the elementary movements in a plane: straight line and arc move, forward and backward . Movement can be **interrupted by a client.
• Provide estimate, at any time, of distance traveled and heading change since start of the current movement
• Uses: Motor

TachoPilot class implements Pilot

• Skills: See Pilot
• Uses: two TachoMotors for differential steering;

CompassPilot class extends TachoPilot

• Skills see Pilot
• uses Compass sensor to control straight line movement and correct heading after turning

### Level 2 update of pose

Pose (now known as UpdateablePose)

• Skills:
• provide x,y and heading at any time
• Calculate distance and heading to a point
• register as a listener to a MoveController
• request update from a MoveController
• Uses:
• lejos.geom.Point, Math

MoveController interface extends Pilot implements MovementProvider

• Skills:
• updates a Pose at the end of every elemental movement and when requested by a Pose
• See Pilot

DifferntialMoveControl implements MoveController extends TachoPilot

• Skills:
• updates a Pose at the end of every elemental movement and when requested by a Pose
• see TachoPilot

CompassMoveControl implements Movecontroller extends CompassPilot

• updates a Pose at the end of every elemental movement and when requested by a Pose
• see CompassPilot

SimpleNavigator (stripped down version of current class only has goTo(x,y)

• Skills: moves the robot to a desired Point.
• Uses:
• Compass to control straight line movement and correct headingD
• DifferentialMoveControl , Pose

RCNavigator extends SimpleNavigator

• Uses: communicator to get commands from a remote controller.

ProbabisticMovement class extends Movement *( could be called QualifiedMovement if you really want to)

• Skills: carries three variable Normal distribution representation of a movement;

ProbabilisticMovementProvider interface extends MovementProvider

• Uses: ProbabilisticMovement

ProbabilisticPilot interface extends UpdatingPilot implements ProbabilisticMovementProvider

• Skills: ProbabilisticMovementProvider, UpdatingPilot

Uses: ProbabilisticMovement

ProbabilisticDifferentialPilot extends UpdatingDifferentialPilot implements ProbabilisticMovementProvider Skills: see ProbabilisticMovementProvider ,UpdatingDifferentialPilot Uses: ProbabilisticMovement

NormalPose extends UpdateablePose

• Skills:
• uses a three variable normal distribution to represent pose.
• Returns x,y and heading with mean and variance.

ParticleSetPose extends UpdateablePose

• Skills: uses a particle set to represent a pose. Can return mean and variance of x,y and heading.

KalmanPoseProvider (probably an abstract class with sub classes for different sensor models)

• Skills:
• Update a NormalPose using data from external sensors;
• Uses:
• Pose
• various sensors and motors to direct the sensors;
• Navigator (to aim the robot if sensors are fixed)
• Updating algorithm using Kalman filter
• Map (to determine where to point sensors)

MonteCarloPoseProvider (probably an abstract class with sub classes for different sensor models)

• Uses:
• ParticleSetPose
• various sensors and motors to direct the sensors;
• Navigator (to aim the robot if sensors are fixed)
• Uses Monte Carlo update.
• Map (to determine where to point sensors)

KalmanNavigator extends SimpleNavigator

• Skills: moves the robot to a desired destination Point as accurately as possible
• Uses: ProbabilisticPilot, NormalPose, KalmanPoseProvider

MonteCarloNavigator

• Skills: moves the robot to a desired destination Point as accurately as possible
• Uses: ProbabilisticPilot, ParticleSetPose, MonteCarloPoseProvider

### Higher levels of complexity - ideas gleaned form other posts as I understand them.

GlobalLocalizer

• Skills: uses a Map to determine the robot position with minimum initial information
• Uses: Navigator, ProbabilisticPilot, ParticleSetPose, MonteCarlotPoseProvider

`

PathPlanner (tentative not sure of a good collaboration with Obstacle avoider)

• Skills: determine and follow the best route (a series of waypoints ) to get to a specified destination.
• Uses: Map
• Navigator ( goTo( next waypoint)
• Pose

Obstacle avoider (tentative – not sure of a good relationship with Path Planner)

• Skills:
• go to specified destination despite obstacles
• detect and avoid obstacles.
• Uses:
• Navigator (for maneuvering around obstacle)
• PathPlanner (for next waypoint to avoid the obstacle ?)
• Map (update with representation of obstacle?)

Map

• Represents things in a plane, such as walls and landmarks
• Skills
• Distance to nearest thing (in a specified direction) from (x,y)
• Direction to the closest point in a wall from (x,y)
• Others??