|
| 1 | +package aima.core.robotics; |
| 2 | + |
| 3 | +import aima.core.robotics.datatypes.IMclMove; |
| 4 | +import aima.core.robotics.datatypes.IMclPose; |
| 5 | +import aima.core.robotics.datatypes.IMclRangeReading; |
| 6 | +import aima.core.robotics.datatypes.IMclVector; |
| 7 | + |
| 8 | +/** |
| 9 | + * This interface defines functionality for a map of an environment for a robot (agent) to perform Monte-Carlo-Localization in. |
| 10 | + * |
| 11 | + * @author Arno von Borries |
| 12 | + * @author Jan Phillip Kretzschmar |
| 13 | + * @author Andreas Walscheid |
| 14 | + * |
| 15 | + * @param <P> a pose implementing {@link IMclPose}. |
| 16 | + * @param <V> an n-1-dimensional vector implementing {@link IMclVector}, where n is the dimensionality of the environment. |
| 17 | + * @param <M> a movement (or sequence of movements) of the robot, implementing {@link IMclMove}. |
| 18 | + * @param <R> a range measurement, implementing {@link IMclRangeReading}. |
| 19 | + */ |
| 20 | +public interface IMclMap<P extends IMclPose<P,V,M>, V extends IMclVector, M extends IMclMove<M>, R extends IMclRangeReading<R,V>> { |
| 21 | +/** |
| 22 | + * Generates a random valid pose on the map. |
| 23 | + * @return a random valid pose on the map. |
| 24 | + */ |
| 25 | +P randomPose(); |
| 26 | +/** |
| 27 | + * Calculates the length of a ray in a direction defined by a pose. |
| 28 | + * @param pose the pose from which the ray is to be cast. |
| 29 | + * @return the length of the ray as a range reading. |
| 30 | + */ |
| 31 | +R rayCast(P pose); |
| 32 | +/** |
| 33 | + * Verifies whether a pose is valid, that is inside the map boundaries and not within an obstacle. |
| 34 | + * @param pose the pose which is to be evaluated. |
| 35 | + * @return true if the pose is valid. |
| 36 | + */ |
| 37 | +boolean isPoseValid(P pose); |
| 38 | +} |
0 commit comments