Pose2D¶
python_motion_planning.utils.environment.pose2d.Pose2D
¶
Bases: object
Class for searching and manipulating 2-dimensional poses.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x
|
float
|
x-coordinate of the 2d pose |
required |
y
|
float
|
y-coordinate of the 2d pose |
required |
theta
|
float
|
orientation of the 2d pose in radians |
0
|
eps
|
float
|
tolerance for float comparison |
1e-06
|
Examples:
Python Console Session
>>> from python_motion_planning import Pose2D
>>> p1 = Pose2D(1, 2)
>>> p2 = Pose2D(3, 4, 1)
...
>>> p1
>>> Pose2D(1, 2, 0)
...
>>> p2
>>> Pose2D(3, 4, 1)
...
>>> p1 + p2
>>> Pose2D(4, 6, 1)
...
>>> p1 - p2
>>> Pose2D(-2, -2, -1)
...
>>> p1 == p2
>>> False
...
>>> p1!= p2
>>> True