View Javadoc
1   package org.opentrafficsim.core.perception;
2   
3   import java.io.Serializable;
4   
5   import org.djunits.value.vdouble.scalar.Length;
6   import org.djunits.value.vdouble.scalar.Speed;
7   import org.opentrafficsim.core.geometry.OTSPoint3D;
8   import org.opentrafficsim.core.math.Rotation3D;
9   import org.opentrafficsim.core.math.Speed3D;
10  
11  /**
12   * Information about a perceived object, which can be a GTU, a road sign, a traffic light, or an obstacle.
13   * <p>
14   * Copyright (c) 2013-2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
15   * BSD-style license. See <a href="http://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>.
16   * </p>
17   * $LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $,
18   * initial version Dec 10, 2015 <br>
19   * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a>
20   * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a>
21   */
22  public interface PerceivedObject extends Serializable
23  {
24      /**
25       * Get the object type.
26       * @return the type of the perceived object
27       */
28      PerceivedObjectType getPerceivedObjectType();
29  
30      /**
31       * Get the perceived distance to the object. When we combine relative distance and angle with our own location, the object's
32       * location can be calculated.
33       * @return the perceived distance to the object
34       */
35      Length.Rel getPerceivedDistance();
36  
37      /**
38       * Get the perceived 3D-angle from our reference point and own direction to the object. When we combine relative distance
39       * and angle with our own location, the object's location can be calculated.
40       * @return the perceived 3D-angle to the object
41       */
42      Rotation3D.Rel getPerceivedRelativeAngle();
43  
44      /**
45       * Get the perceived location of the object. The perceived location of the object is providing the same information as the
46       * combination of perceived distance and relative angle, combined with our own location and RPY direction.
47       * @return the perceived XYZ-location of the object
48       */
49      OTSPoint3D getPerceivedLocation();
50  
51      /**
52       * Get the perceived 3D moving angle from our reference point to the object.
53       * @return the perceived 3D-angle of movement of the object
54       */
55      Rotation3D.Rel getPerceivedRelativeMovingDirection();
56  
57      /**
58       * Get the perceived absolute 3D moving angle.
59       * @return the perceived 3D-angle of movement of the object
60       */
61      Rotation3D.Abs getPerceivedMovingDirection();
62  
63      /**
64       * Get the perceived speed of the object.
65       * @return the perceived speed of the object, in the RPY-direction it is facing
66       */
67      Speed getPerceivedSpeed();
68  
69      /**
70       * Get the perceived speed of the object, split into movement in the X, Y, and Z direction.
71       * @return a speed vector in 3 dimensions.
72       */
73      Speed3D getPerceivedSpeed3D();
74  }