public class Pose2D extends java.lang.Object implements IPose2D
Modifier and Type | Field and Description |
---|---|
Angle |
angle
The horizontal angle.
|
double |
x
The x-position value
|
double |
y
The y-position value
|
Constructor and Description |
---|
Pose2D()
Default constructor initiating all values with zero.
|
Pose2D(double x,
double y) |
Pose2D(double x,
double y,
Angle angle) |
Pose2D(Pose2D other)
The copy constructor.
|
Pose2D(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position,
Angle angle) |
Modifier and Type | Method and Description |
---|---|
Pose2D |
applyInverseTo(IPose2D other)
Apply this pose inversely as a rigid transformation to another pose.
|
org.apache.commons.math3.geometry.euclidean.threed.Vector3D |
applyInverseTo(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position)
Apply this pose inversely as a rigid transformation to the given position
vector.
|
Pose2D |
applyTo(IPose2D other)
Apply this pose as a rigid transformation to another pose.
|
org.apache.commons.math3.geometry.euclidean.threed.Vector3D |
applyTo(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position)
Apply this pose as a rigid transformation to the given position vector.
|
static Pose2D |
average(Pose2D[] input)
Calculate the average of a list of Pose2D.
|
boolean |
equals(java.lang.Object other) |
Angle |
getAngle()
Retrieve the horizontal angle
|
Angle |
getAngleTo(IPose2D other)
Returns the difference of this angle to connection of this and other
position
|
Angle |
getDeltaAngle(IPose2D other)
Returns the difference of this angle to the passed angle
|
double |
getDistanceTo(IPose2D other)
Returns the Euclidean distance of this position to the other position
|
org.apache.commons.math3.geometry.euclidean.threed.Vector3D |
getPosition()
Retrieve the position.
|
org.apache.commons.math3.geometry.euclidean.threed.Vector3D |
getUnitVector() |
double |
getX()
Retrieve the x-position value.
|
double |
getY()
Retrieve the y-position value.
|
void |
set(Pose2D other) |
void |
setPosition(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position) |
java.lang.String |
toString() |
public double x
public double y
public Angle angle
public Pose2D()
public Pose2D(double x, double y)
x
- the x-position valuey
- the y-position valuepublic Pose2D(double x, double y, Angle angle)
x
- the x-position valuey
- the y-position valueangle
- the horizontal anglepublic Pose2D(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position, Angle angle)
position
- the positionangle
- the horizontal anglepublic Pose2D(Pose2D other)
other
- the other posepublic void set(Pose2D other)
public double getX()
IPose2D
public double getY()
IPose2D
public org.apache.commons.math3.geometry.euclidean.threed.Vector3D getPosition()
IPose2D
getPosition
in interface IPose2D
public Angle getAngle()
IPose2D
public void setPosition(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position)
position:
- the position to setpublic static Pose2D average(Pose2D[] input)
input:
- array of input valuespublic Pose2D applyTo(IPose2D other)
IPose2D
public Pose2D applyInverseTo(IPose2D other)
IPose2D
applyInverseTo
in interface IPose2D
other
- the pose to transformpublic org.apache.commons.math3.geometry.euclidean.threed.Vector3D applyTo(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position)
IPose2D
public org.apache.commons.math3.geometry.euclidean.threed.Vector3D applyInverseTo(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position)
IPose2D
applyInverseTo
in interface IPose2D
position
- the position vector to transformpublic double getDistanceTo(IPose2D other)
IPose2D
getDistanceTo
in interface IPose2D
other
- the pose to which to calculate the distance topublic Angle getDeltaAngle(IPose2D other)
IPose2D
getDeltaAngle
in interface IPose2D
other
- the pose from which to calculate the delta anglepublic Angle getAngleTo(IPose2D other)
IPose2D
getAngleTo
in interface IPose2D
other
- the pose from which to calculate the angle topublic org.apache.commons.math3.geometry.euclidean.threed.Vector3D getUnitVector()
getUnitVector
in interface IPose2D
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object