|
base
|
#include <BodyState.hpp>
Static Public Member Functions | |
| static BodyState | Unknown () |
| static BodyState | Invalid () |
Public Attributes | |
| base::Time | time |
| base::TransformWithCovariance | pose |
| base::TwistWithCovariance | velocity |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const TransformWithCovariance &trans) |
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-East-Up)
For instance, if sourceFrame is "body" and targetFrame is "world", then the BodyState object is the state of body in the world frame (usually, the world frame has an arbitrary origin and a North-East-Up orientation).
| base::samples::BodyState::BodyState | ( | bool | doInvalidation = true | ) |
|
inline |
| const Vector3d & base::samples::BodyState::angular_velocity | ( | ) | const |
| Position & base::samples::BodyState::angular_velocity | ( | ) |
performs a composition of this Body State with the Body State given. The result is another Body State with result = this * trans
| const Matrix3d base::samples::BodyState::cov_angular_velocity | ( | ) | const |
A read-only expression of the angular velocity covariance
| void base::samples::BodyState::cov_angular_velocity | ( | const base::Matrix3d & | cov | ) |
| const Matrix3d base::samples::BodyState::cov_linear_velocity | ( | ) | const |
A read-only expression of the linear velocity covariance
| void base::samples::BodyState::cov_linear_velocity | ( | const base::Matrix3d & | cov | ) |
| const Matrix3d base::samples::BodyState::cov_orientation | ( | ) | const |
A read-only expression of the rotation covariance
| void base::samples::BodyState::cov_orientation | ( | const base::Matrix3d & | cov | ) |
| const Matrix6d & base::samples::BodyState::cov_pose | ( | ) | const |
A read-only expression of the pose covariance
| Matrix6d & base::samples::BodyState::cov_pose | ( | ) |
| const Matrix3d base::samples::BodyState::cov_position | ( | ) | const |
A read-only expression of the position covariance
| void base::samples::BodyState::cov_position | ( | const base::Matrix3d & | cov | ) |
| const Matrix6d & base::samples::BodyState::cov_velocity | ( | ) | const |
A read-only expression of the velocity covariance
| Matrix6d & base::samples::BodyState::cov_velocity | ( | ) |
| double base::samples::BodyState::getPitch | ( | ) | const |
| const Affine3d base::samples::BodyState::getPose | ( | ) | const |
| double base::samples::BodyState::getRoll | ( | ) | const |
| double base::samples::BodyState::getYaw | ( | ) | const |
| bool base::samples::BodyState::hasValidPose | ( | ) | const |
| bool base::samples::BodyState::hasValidPoseCovariance | ( | ) | const |
| bool base::samples::BodyState::hasValidVelocity | ( | ) | const |
| bool base::samples::BodyState::hasValidVelocityCovariance | ( | ) | const |
| void base::samples::BodyState::initSane | ( | ) |
For backward compatibility only. Use invalidate()
| void base::samples::BodyState::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::BodyState::invalidate | ( | ) |
Initializes the rigid body state with NaN for the position, velocity, orientation and angular velocity.
| void base::samples::BodyState::invalidateCovariances | ( | bool | pose = true, |
| bool | velocity = true |
||
| ) |
| void base::samples::BodyState::invalidatePose | ( | ) |
| void base::samples::BodyState::invalidatePoseCovariance | ( | ) |
| void base::samples::BodyState::invalidateValues | ( | bool | pose = true, |
| bool | velocity = true |
||
| ) |
| void base::samples::BodyState::invalidateVelocity | ( | ) |
| void base::samples::BodyState::invalidateVelocityCovariance | ( | ) |
| const Vector3d & base::samples::BodyState::linear_velocity | ( | ) | const |
| Position & base::samples::BodyState::linear_velocity | ( | ) |
alias for the composition of two body states
The composition of two body states is here defined as the composition of the pose transformation as it is defined in the TransformWithCovariance. The velocity held by the last body state (here bs1) is assumed to be the current "instantaneous" body state velocity and of the resulting body state.
Resulting velocity and covariance with respect to the pose base frame
Uncertainty propagation through assuming linear transformation. From R. Astudillo and R.Kolossa Chapter 3 Uncertainty Propagation
Improvement at this point(TO-DO): change to Jacobian derivation since the propagation is not linear
| BodyState & base::samples::BodyState::operator= | ( | const base::samples::RigidBodyState & | rbs | ) |
For backward compatibility with RBS
extract the transformation
and the transformation covariance
Extract the velocity
Extract the velocity covariance
| const Quaterniond & base::samples::BodyState::orientation | ( | ) | const |
A read-only expression of the rotation
| Quaterniond & base::samples::BodyState::orientation | ( | ) |
| const Position & base::samples::BodyState::position | ( | ) | const |
| Position & base::samples::BodyState::position | ( | ) |
| void base::samples::BodyState::setPose | ( | const base::Affine3d & | pose | ) |
|
static |
|
friend |
Default std::cout function
cout the 6D pose vector (translation and scaled axis orientation) with its associated covariance matrix
| base::TransformWithCovariance base::samples::BodyState::pose |
Robot pose: rotation in radians and translation in meters
| base::Time base::samples::BodyState::time |
Time-stamp
| base::TwistWithCovariance base::samples::BodyState::velocity |
TwistWithCovariance: Linear[m/s] and Angular[rad/s] Velocity of the Body It is assumed here that velocity is the derivative of a delta pose for a given interval. When such interval tends to zero, one could talk of instantaneous velocity
1.8.13