xvsdk  3.2.0
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
xv::PoseF Struct Reference

Class representing a 6dof pose at a timestamp with a linear model for prediction. More...

#include <xv-types.h>

Public Member Functions

 PoseF (Vector3f const &translation, Matrix3f const &rotation, double hostTimestamp=std::numeric_limits< double >::infinity(), std::int64_t edgeTimestamp=(std::numeric_limits< std::int64_t >::min)(), double c=0.)
 Construct a pose with a translation, rotation, timestamps and confidence.
 
PoseF prediction (double dt) const
 Prediction of the pose based on angular and linear velocity and acceleration. More...
 
Transform_< float > const & transform () const
 
Vector3< float > const & linearVelocity () const
 Get the linear velocity (in m/s) of the pose.
 
Vector3< float > const & angularVelocity () const
 Get the angular velocity (x,y,z) in rad/s.
 
void setLinearVelocity (Vector3< float > const &v)
 Set the linear velocity (in m/s)
 
void setLinearVelocity (floatconst *v)
 Set the angular velocity (x,y,z) in rad/s.
 
void setAngularVelocity (Vector3< float > const &v)
 Set an estimation of instantaneous angular velocity of the pose. More...
 
void setAngularVelocity (floatconst *v)
 Set an estimation of instantaneous angular velocity of the pose. More...
 
Vector3< float > const & linearAcceleration () const
 Get the linear acceleration (in m/s/s) of the pose.
 
Vector3< float > const & angularAcceleration () const
 Get the angular acceleration (x,y,z) in rad/s/s.
 
void setLinearAcceleration (Vector3< float > const &v)
 Set the linear acceleration (in m/s)
 
void setLinearAcceleration (floatconst *v)
 Set the angular acceleration (x,y,z) in rad/s/s.
 
void setAngularAcceleration (Vector3< float > const &v)
 Set an estimation of instantaneous angular acceleration of the pose. More...
 
void setAngularAcceleration (floatconst *v)
 Set an estimation of instantaneous angular acceleration of the pose. More...
 
double confidence () const
 Get the confidence of the pose. Value in [0,1], 0 means lost.
 
void setConfidence (double c)
 Set the confidence of the pose. Value in [0,1], 0 means lost.
 
Vector4< float > const & quaternion () const
 Get the quaternion of the rotation.
 
void setQuaternion (Vector4< float > const &v)
 Set the quaternion of the rotation.
 
void setQuaternion (floatconst *v)
 Set the quaternion of the rotation using pointer of 4D array.
 
void setRotation (Matrix3< float > const &v)
 
void setRotation (floatconst *v)
 Set the quaternion of the rotation using pointer of 4D array.
 
std::int64_t edgeTimestampUs () const
 Get the edge timestamp of the pose (in microseconds).
 
void setEdgeTimestampUs (std::int64_t t)
 Set the edge timestamp of the pose (in microseconds).
 
double hostTimestamp () const
 Get the host timestamp of the pose (in s).
 
void setHostTimestamp (double t)
 Set the host timestamp of the pose (in s).
 
Transform_ & operator*= (Transform_ const &q)
 Composition operator for transformations.
 
Vector3< float > const & translation () const
 Get the translation part of the transformation. More...
 
void setTranslation (Vector3< float > const &v)
 Set the translation part of the transformation.
 
void setTranslation (floatconst *v)
 Set the translation part of the transformation using pointer to 3D array.
 
Matrix3< float > const & rotation () const
 Get the rotation matrix part of the transformation. More...
 
float x () const
 X coordinate of the translation.
 
float y () const
 Y coordinate of the translation.
 
float z () const
 Z coordinate of the translation.
 
Transform_< float > inverse () const
 Compute the inverse transformation. More...
 

Static Public Member Functions

static Pose Identity ()
 

Protected Attributes

Vector3< float > m_linearVelocity
 
Vector3< float > m_angularVelocity
 
Vector3< float > m_linearAcceleration
 
Vector3< float > m_angularAcceleration
 
Vector3< float > m_translation
 
Matrix3< float > m_rotation
 

Detailed Description

Class representing a 6dof pose at a timestamp with a linear model for prediction.

This class has both quaternion and rotation matrix to represent the 3D rotation.

Member Function Documentation

Transform_<float > xv::details::Transform_< float >::inverse ( ) const
inherited

Compute the inverse transformation.

Returns
Return the inverse transformation
PoseF xv::PoseF::prediction ( double  dt) const

Prediction of the pose based on angular and linear velocity and acceleration.

Parameters
dtamount of prediction (in s)
Returns
The predicted (2nd order extrapolation) of the orientation.
Matrix3<float > const& xv::details::Transform_< float >::rotation ( ) const
inlineinherited

Get the rotation matrix part of the transformation.

Returns
row major 3x3 matrix
void xv::details::PosePred_< float >::setAngularAcceleration ( Vector3< float > const &  v)
inlineinherited

Set an estimation of instantaneous angular acceleration of the pose.

Parameters
v[ax,ay,az] angular acceleration
void xv::details::PosePred_< float >::setAngularAcceleration ( float const *  v)
inlineinherited

Set an estimation of instantaneous angular acceleration of the pose.

Parameters
v[ax,ay,az] angular acceleration
void xv::details::PosePred_< float >::setAngularVelocity ( Vector3< float > const &  v)
inlineinherited

Set an estimation of instantaneous angular velocity of the pose.

Parameters
v[wx,wy,wz] angular velocity
void xv::details::PosePred_< float >::setAngularVelocity ( float const *  v)
inlineinherited

Set an estimation of instantaneous angular velocity of the pose.

Parameters
v[wx,wy,wz] angular velocity
Vector3<float > const& xv::details::Transform_< float >::translation ( ) const
inlineinherited

Get the translation part of the transformation.

Returns
[x,y,z] vector

The documentation for this struct was generated from the following file: