base
|
#include <RigidBodyState.hpp>
Static Public Member Functions | |
static RigidBodyState | unknown () |
static RigidBodyState | invalid () |
static bool | isValidValue (base::Vector3d const &vec) |
static bool | isValidValue (base::Orientation const &ori) |
static bool | isKnownValue (base::Matrix3d const &cov) |
static bool | isValidCovariance (base::Matrix3d const &cov) |
static bool | isValidValue (base::Vector3d const &vec, int dim) |
static bool | isValidCovariance (base::Matrix3d const &cov, int dim) |
static bool | isKnownValue (base::Matrix3d const &cov, int dim) |
static base::Vector3d | invalidValue () |
static base::Orientation | invalidOrientation () |
static base::Matrix3d | setValueUnknown () |
static base::Matrix3d | invalidCovariance () |
Public Attributes | |
base::Time | time |
std::string | sourceFrame |
std::string | targetFrame |
Position | position |
base::Matrix3d | cov_position |
Orientation | orientation |
base::Matrix3d | cov_orientation |
base::Vector3d | velocity |
base::Matrix3d | cov_velocity |
base::Vector3d | angular_velocity |
base::Matrix3d | cov_angular_velocity |
Representation of the state of a rigid body
This is among other things used to express frame transformations by Rock's transformer
Given a source and target frame, this structure expresses the frame change between these two frames. In effect, it represents the state of the source frame expressed in the target frame.
Per Rock's conventions, you should use a X-forward, right handed coordinate system when assigning frames to bodies (i.e. X=forward, Y=left, Z=up). In addition, world-fixed frames should be aligned to North (North-West-Up, aka NWU)
For instance, if sourceFrame is "body" and targetFrame is "world", then the RigidBodyState object is the state of body in the world frame (usually, the world frame has an arbitrary origin and a North-West-Up orientation).
base::samples::RigidBodyState::RigidBodyState | ( | bool | doInvalidation = true | ) |
double base::samples::RigidBodyState::getPitch | ( | ) | const |
Pose base::samples::RigidBodyState::getPose | ( | ) | const |
double base::samples::RigidBodyState::getRoll | ( | ) | const |
Eigen::Affine3d base::samples::RigidBodyState::getTransform | ( | ) | const |
double base::samples::RigidBodyState::getYaw | ( | ) | const |
bool base::samples::RigidBodyState::hasValidAngularVelocity | ( | ) | const |
bool base::samples::RigidBodyState::hasValidAngularVelocity | ( | int | idx | ) | const |
bool base::samples::RigidBodyState::hasValidAngularVelocityCovariance | ( | ) | const |
bool base::samples::RigidBodyState::hasValidOrientation | ( | ) | const |
bool base::samples::RigidBodyState::hasValidOrientationCovariance | ( | ) | const |
bool base::samples::RigidBodyState::hasValidPosition | ( | ) | const |
bool base::samples::RigidBodyState::hasValidPosition | ( | int | idx | ) | const |
bool base::samples::RigidBodyState::hasValidPositionCovariance | ( | ) | const |
bool base::samples::RigidBodyState::hasValidVelocity | ( | ) | const |
bool base::samples::RigidBodyState::hasValidVelocity | ( | int | idx | ) | const |
bool base::samples::RigidBodyState::hasValidVelocityCovariance | ( | ) | const |
void base::samples::RigidBodyState::initSane | ( | ) |
For backward compatibility only. Use invalidate()
void base::samples::RigidBodyState::initUnknown | ( | ) |
Initializes the rigid body state unknown with Zero for the position, velocity and angular velocity, Identity for the orientation and infinity for all covariances.
|
static |
void base::samples::RigidBodyState::invalidate | ( | ) |
Initializes the rigid body state with NaN for the position, velocity, orientation and angular velocity.
void base::samples::RigidBodyState::invalidateAngularVelocity | ( | ) |
void base::samples::RigidBodyState::invalidateAngularVelocityCovariance | ( | ) |
void base::samples::RigidBodyState::invalidateCovariances | ( | bool | invPos = true , |
bool | invOri = true , |
||
bool | invVel = true , |
||
bool | invAngVel = true |
||
) |
void base::samples::RigidBodyState::invalidateOrientation | ( | ) |
void base::samples::RigidBodyState::invalidateOrientationCovariance | ( | ) |
void base::samples::RigidBodyState::invalidatePosition | ( | ) |
void base::samples::RigidBodyState::invalidatePositionCovariance | ( | ) |
void base::samples::RigidBodyState::invalidateValues | ( | bool | invPos, |
bool | invOri, | ||
bool | invVel = true , |
||
bool | invAngVel = true |
||
) |
void base::samples::RigidBodyState::invalidateVelocity | ( | ) |
void base::samples::RigidBodyState::invalidateVelocityCovariance | ( | ) |
|
static |
|
static |
|
static |
|
static |
Helper method that checks if the value whose covariance is represented by the given matrix is a known value (not Inf in the diagonal).
|
static |
Checks if the dimension of a vector given by a covariance is known.
|
static |
Helper method that checks if the covariance represented by the given matrix is valid
|
static |
Checks if a given dimension of a covariance matrix is valid.
|
static |
Helper method that checks if a value is valid (not NaN anywhere).
|
static |
Helper method that checks if an orientation is valid (not NaN anywhere) and that the orientation is an unit quaternion.
|
static |
Checks if a given dimension of a vector is valid.
|
inline |
void base::samples::RigidBodyState::setPose | ( | const base::Pose & | pose | ) |
void base::samples::RigidBodyState::setTransform | ( | const Eigen::Affine3d & | transform | ) |
|
static |
|
static |
base::Vector3d base::samples::RigidBodyState::angular_velocity |
Angular Velocity of sourceFrame relative to targetFrame, expressed in sourceFrame, as an axis-angle representation
The direction of the vector is the axis, its length the speed
base::Matrix3d base::samples::RigidBodyState::cov_angular_velocity |
Covariance of the angular velocity
base::Matrix3d base::samples::RigidBodyState::cov_orientation |
Covariance matrix of the orientation as an axis/angle manifold in body coordinates
base::Matrix3d base::samples::RigidBodyState::cov_position |
Covariance matrix of the position
base::Matrix3d base::samples::RigidBodyState::cov_velocity |
Covariance of the velocity
Orientation base::samples::RigidBodyState::orientation |
Orientation of targetFrame expressed in sourceFrame
Position base::samples::RigidBodyState::position |
Position in m of sourceFrame's origin expressed in targetFrame
std::string base::samples::RigidBodyState::sourceFrame |
Name of the source reference frame
std::string base::samples::RigidBodyState::targetFrame |
Name of the target reference frame
base::Time base::samples::RigidBodyState::time |
base::Vector3d base::samples::RigidBodyState::velocity |
Velocity in m/s of sourceFrame relative to targetFrame, expressed in targetFrame