[frames] | no frames]

# Class Pose

Represent the x, y, theta pose of an object in 2D space

Instance Methods

 __init__(self, x, y, theta)

 point(self) Return just the x, y parts represented as a `util.Point`

 transform(self) Return a transformation matrix that corresponds to rotating by theta and then translating by x,y (in the original coordinate frame).

 transformPoint(self, point) Applies the pose.transform to point and returns new point.

 transformDelta(self, point) Does the rotation by theta of the pose but does not add the x,y offset.

 transformPose(self, pose) Make self into a transformation matrix and apply it to pose.

 isNear(self, pose, distEps, angleEps) Returns: True if pose is within distEps and angleEps of self

 diff(self, pose) Returns: a pose that is the difference between self and pose (in x, y, and theta)

 distance(self, pose) Returns: the distance between the x,y part of self and the x,y part of pose.

 inverse(self) Return a pose corresponding to the transformation matrix that is the inverse of the transform associated with this pose.

 xytTuple(self) Returns: a representation of this pose as a tuple of x, y, theta values

 __repr__(self)
 Instance Variables x = `0.0` x coordinate y = `0.0` y coordinate theta = `0.0` rotation in radians
 Method Details

### transformPoint(self, point)

Applies the pose.transform to point and returns new point.

Parameters:
• `point` - an instance of `util.Point`

### transformDelta(self, point)

Does the rotation by theta of the pose but does not add the x,y offset. This is useful in transforming the difference(delta) between two points.

Parameters:
• `point` - an instance of `util.Point`
Returns:
a `util.Point`.

### transformPose(self, pose)

Make self into a transformation matrix and apply it to pose.

Returns:
Af new `util.pose`.

### isNear(self, pose, distEps, angleEps)

Returns:
True if pose is within distEps and angleEps of self

### diff(self, pose)

Parameters:
• `pose` - an instance of `util.Pose`
Returns:
a pose that is the difference between self and pose (in x, y, and theta)

### distance(self, pose)

Parameters:
• `pose` - an instance of `util.Pose`
Returns:
the distance between the x,y part of self and the x,y part of pose.

### inverse(self)

Return a pose corresponding to the transformation matrix that is the inverse of the transform associated with this pose. If this pose's transformation maps points from frame X to frame Y, the inverse maps points from frame Y to frame X.

### xytTuple(self)

Returns:
a representation of this pose as a tuple of x, y, theta values

 Generated by Epydoc 3.0.1 on Tue Apr 26 17:51:17 2011 http://epydoc.sourceforge.net