mrpt.poses

mrpt-poses Python API.

Package Contents

class mrpt.poses.CPoint2D

C++ API: class mrpt::poses::CPoint2D

CPoint2D(x: float, y: float)

Bases: mrpt.serialization.CSerializable

x: float
y: float
asString() → str
asTPoint() → mrpt.math.TPoint2D

Convert to lightweight mrpt.math.TPoint2D

static fromTPoint(arg0: mrpt.math.TPoint2D) → CPoint2D

Construct CPoint2D from a lightweight mrpt.math.TPoint2D

class mrpt.poses.CPoint3D

C++ API: class mrpt::poses::CPoint3D

CPoint3D(x: float, y: float, z: float)

Bases: mrpt.serialization.CSerializable

x: float
y: float
z: float
asString() → str
asTPoint() → mrpt.math.TPoint3D

Convert to lightweight mrpt.math.TPoint3D

static fromTPoint(arg0: mrpt.math.TPoint3D) → CPoint3D

Construct CPoint3D from a lightweight mrpt.math.TPoint3D

class mrpt.poses.CPose2D

C++ API: class mrpt::poses::CPose2D

CPose2D(x: float, y: float, phi: float) CPose2D(arg0: Any)

Bases: mrpt.serialization.CSerializable

property phi: float

Phi orientation (radians)

property x: float

X coordinate

property y: float

Y coordinate

asString() → str

Returns human-readable string [x y phi]

asTPose() → mrpt.math.TPose2D

Convert to lightweight mrpt.math.TPose2D

fromString(arg0: str) → None

Set value from string

static fromTPose(arg0: mrpt.math.TPose2D) → CPose2D

Construct CPose2D from a lightweight mrpt.math.TPose2D

inverse() → CPose2D

Returns the inverse pose

norm() → float

Returns the norm of the (x,y) vector

normalizePhi() → None

Forces phi to be in [-pi,pi]

class mrpt.poses.CPose2DInterpolator

C++ API: class mrpt::poses::CPose2DInterpolator

Bases: mrpt.serialization.CSerializable

clear() → None
empty() → bool
insert(arg0: datetime.timedelta, arg1: mrpt.math.TPose2D) → None
interpolate(arg0: datetime.timedelta) → tuple

Returns (TPose2D, valid) — interpolated pose at given time

size() → int
class mrpt.poses.CPose3D

C++ API: class mrpt::poses::CPose3D

CPose3D(x: float, y: float, z: float, yaw: float = 0, pitch: float = 0, roll: float = 0) CPose3D(arg0: CPose2D)

Bases: mrpt.serialization.CSerializable

property x: float

X coordinate

property y: float

Y coordinate

property z: float

Z coordinate

pitch: float
roll: float
yaw: float
static FromTranslation(arg0: float, arg1: float, arg2: float) → CPose3D
static FromXYZYawPitchRoll(arg0: float, arg1: float, arg2: float, arg3: float, arg4: float, arg5: float) → CPose3D
static FromYawPitchRoll(arg0: float, arg1: float, arg2: float) → CPose3D
asString() → str
asTPose() → mrpt.math.TPose3D

Convert to lightweight mrpt.math.TPose3D

composePoint(arg0: mrpt.math.TPoint3D) → mrpt.math.TPoint3D
composePoint(arg0: float, arg1: float, arg2: float) → mrpt.math.TPoint3D
static fromTPose(arg0: mrpt.math.TPose3D) → CPose3D

Construct CPose3D from a lightweight mrpt.math.TPose3D

getHomogeneousMatrix() → mrpt.math.CMatrixDouble44

Returns the 4x4 homogeneous transformation matrix

getInverseHomogeneousMatrix() → mrpt.math.CMatrixDouble44
getOppositeScalar() → CPose3D
getRotationMatrix() → mrpt.math.CMatrixDouble33

Returns the 3x3 Rotation Matrix

getYawPitchRoll() → tuple[float, float, float]

Returns (yaw, pitch, roll) as a tuple in radians

inverse() → None

Inverts the pose in place

inverseComposePoint(arg0: mrpt.math.TPoint3D) → mrpt.math.TPoint3D
inverseComposePoint(arg0: float, arg1: float, arg2: float) → mrpt.math.TPoint3D
setFromValues(arg0: float, arg1: float, arg2: float, arg3: float, arg4: float, arg5: float) → None
setRotationMatrix(arg0: mrpt.math.CMatrixDouble33) → None
setYawPitchRoll(arg0: float, arg1: float, arg2: float) → None
class mrpt.poses.CPose3DInterpolator

C++ API: class mrpt::poses::CPose3DInterpolator

Bases: mrpt.serialization.CSerializable

clear() → None
empty() → bool
insert(arg0: datetime.timedelta, arg1: mrpt.math.TPose3D) → None
interpolate(arg0: datetime.timedelta) → tuple

Returns (TPose3D, valid) — interpolated pose at given time

size() → int
class mrpt.poses.CPose3DPDF

C++ API: class mrpt::poses::CPose3DPDF

Bases: mrpt.serialization.CSerializable

getCovariance() → mrpt.math.CMatrixDouble66

Returns the 6x6 covariance matrix

getCovarianceAndMean() → tuple

Returns the tuple (cov: CMatrixDouble66, mean: CPose3D)

getMean() → CPose3D

Returns the mean (expected value) of the distribution

saveToTextFile(file: str) → bool

Saves the distribution to a text file. Returns False on error.

class mrpt.poses.CPose3DPDFGaussian

C++ API: class mrpt::poses::CPose3DPDFGaussian

CPose3DPDFGaussian(arg0: CPose3D) CPose3DPDFGaussian(arg0: CPose3D, arg1: mrpt.math.CMatrixDouble66)

Bases: CPose3DPDF

cov: mrpt.math.CMatrixDouble66
mean: CPose3D
drawSingleSample() → CPose3D

Draws a single sample from the Gaussian distribution and returns it as a CPose3D.

evaluateNormalizedPDF(arg0: CPose3D) → float
evaluatePDF(arg0: CPose3D) → float
saveToTextFile(arg0: str) → bool

Saves the distribution to a text file. Returns False on error.

class mrpt.poses.CPose3DPDFGaussianInf

C++ API: class mrpt::poses::CPose3DPDFGaussianInf

CPose3DPDFGaussianInf(arg0: CPose3D) CPose3DPDFGaussianInf(mean: CPose3D, inf_matrix: mrpt.math.CMatrixDouble66)

Bases: CPose3DPDF

cov_inv: mrpt.math.CMatrixDouble66
mean: CPose3D
drawSingleSample() → CPose3D

Draws a single sample from the distribution and returns it as a CPose3D.

isInfType() → bool
class mrpt.poses.CPose3DPDFParticles(M: int = 1)

C++ API: class mrpt::poses::CPose3DPDFParticles

Bases: CPose3DPDF, mrpt.bayes.CParticleFilterCapable

drawSingleSample() → CPose3D
getMostLikelyParticle() → mrpt.math.TPose3D
getParticlePose(i: int) → mrpt.math.TPose3D
getParticlesAsNumpy() → numpy.ndarray

Returns all particles as an Nx7 array with columns (x, y, z, yaw, pitch, roll, log_weight)

resetDeterministic(location: mrpt.math.TPose3D, particlesCount: int = 0) → None

Sets all particles to the given pose (particlesCount=0 keeps the count)

resetUniform(corner_min: mrpt.math.TPose3D, corner_max: mrpt.math.TPose3D, particlesCount: int = -1) → None

Spreads particles uniformly between two TPose3D corners

size() → int
class mrpt.poses.CPose3DQuat

C++ API: class mrpt::poses::CPose3DQuat

CPose3DQuat(arg0: CPose3D)

Bases: mrpt.serialization.CSerializable

quat: Any
x: float
y: float
z: float
asString() → str
asTPose() → mrpt.math.TPose3DQuat

Convert to lightweight mrpt.math.TPose3DQuat

static fromTPose(arg0: mrpt.math.TPose3DQuat) → CPose3DQuat

Construct CPose3DQuat from a lightweight mrpt.math.TPose3DQuat

norm() → float
class mrpt.poses.CPosePDF

C++ API: class mrpt::poses::CPosePDF

Bases: mrpt.serialization.CSerializable

getCovariance() → mrpt.math.CMatrixDouble33

Returns the 3x3 covariance matrix

getCovarianceAndMean() → tuple

Returns the tuple (cov: CMatrixDouble33, mean: CPose2D)

getMean() → CPose2D

Returns the mean (expected value) of the distribution

saveToTextFile(file: str) → bool

Saves the distribution to a text file. Returns False on error.

class mrpt.poses.CPosePDFGaussian

C++ API: class mrpt::poses::CPosePDFGaussian

CPosePDFGaussian(arg0: CPose2D) CPosePDFGaussian(arg0: CPose2D, arg1: mrpt.math.CMatrixDouble33)

Bases: CPosePDF

cov: mrpt.math.CMatrixDouble33
mean: CPose2D
drawSingleSample() → CPose2D

Draw a single sample from the Gaussian distribution

evaluateNormalizedPDF(arg0: CPose2D) → float
evaluatePDF(arg0: CPose2D) → float
class mrpt.poses.CPosePDFGaussianInf

C++ API: class mrpt::poses::CPosePDFGaussianInf

CPosePDFGaussianInf(arg0: CPose2D) CPosePDFGaussianInf(mean: CPose2D, inf_matrix: mrpt.math.CMatrixDouble33)

Bases: CPosePDF

cov_inv: mrpt.math.CMatrixDouble33
mean: CPose2D
drawSingleSample() → CPose2D
class mrpt.poses.CPosePDFParticles(M: int = 1)

C++ API: class mrpt::poses::CPosePDFParticles

Bases: CPosePDF, mrpt.bayes.CParticleFilterCapable

clear() → None
drawSingleSample() → CPose2D
getMostLikelyParticle() → mrpt.math.TPose2D
getParticlePose(i: int) → mrpt.math.TPose2D
getParticlesAsNumpy() → numpy.ndarray

Returns all particles as an Nx4 array with columns (x, y, phi, log_weight)

resetAroundSetOfPoses(list_poses: list[mrpt.math.TPose2D], num_particles_per_pose: int, spread_x: float, spread_y: float, spread_phi_rad: float) → None
resetDeterministic(location: mrpt.math.TPose2D, particlesCount: int = 0) → None

Sets all particles to the given pose (particlesCount=0 keeps the count)

resetUniform(x_min: float, x_max: float, y_min: float, y_max: float, phi_min: float = -3.141592653589793, phi_max: float = 3.141592653589793, particlesCount: int = -1) → None

Spreads particles uniformly in [x_min,x_max]x[y_min,y_max]x[phi_min,phi_max]

size() → int
class mrpt.poses.CPoseRandomSampler

C++ API: class mrpt::poses::CPoseRandomSampler

drawSample2D() → CPose2D

Draw a 2D pose sample

drawSample3D() → CPose3D

Draw a 3D pose sample

setPosePDF(arg0: CPosePDF) → None
setPosePDF(arg0: CPose3DPDF) → None
class mrpt.poses.SE_average2
append(arg0: CPose2D) → None
append(arg0: CPose2D, arg1: float) → None
clear() → None
get_average() → CPose2D

Returns the calculated average pose.

class mrpt.poses.SE_average3
append(arg0: CPose3D) → None
append(arg0: CPose3D, arg1: float) → None
clear() → None
get_average() → CPose3D

Returns the calculated average pose.