This class is used to represent physical quantities that correspond to spatial vectors such as spatial velocities, spatial accelerations and spatial forces.
More...
#include <multibody/multibody_tree/math/spatial_vector.h>
template<template< typename > class SV, typename T>
class drake::multibody::SpatialVector< SV, T >
This class is used to represent physical quantities that correspond to spatial vectors such as spatial velocities, spatial accelerations and spatial forces.
Spatial vectors are 6element quantities that are pairs of ordinary 3vectors. Elements 02 are always the rotational component while elements 35 are always the translational component. For a more detailed introduction on spatial vectors please refer to section Spatial Vectors.
 Template Parameters

SV  The type of the more specialized spatial vector class. It must be a template on the scalar type T. 
T  The underlying scalar type. Must be a valid Eigen scalar. 
The type of the underlying inmemory representation using an Eigen vector.
The more specialized spatial vector class templated on the scalar type T.
Sizes for spatial quantities and its components in three dimensions.
Enumerator 

kSpatialVectorSize 

kRotationSize 

kTranslationSize 

Default constructor.
In Release builds the elements of the newly constructed spatial vector are left uninitialized resulting in a zero cost operation. However in Debug builds those entries are set to NaN so that operations using this uninitialized spatial vector fail fast, allowing fast bug detection.
SpatialVector constructor from an rotational component w
and a linear component v
.
SpatialVector constructor from an Eigen expression that represents a sixdimensional vector.
This constructor will assert the size of V is six (6) at compiletime for fixed sized Eigen expressions and at runtime for dynamic sized Eigen expressions.
Returns a (const) bare pointer to the underlying data.
It is guaranteed that there will be six (6) T's densely packed at data[0], data[1], etc.
Returns a reference to the underlying storage.
Returns a constant reference to the underlying storage.
std::tuple<const T, const T> GetMaximumAbsoluteDifferences 
( 
const SpatialQuantity & 
other  ) 
const 

inline 
Returns the maximum absolute values of the differences in the rotational and translational components of this
and other
(i.e., the infinity norms of the difference in rotational and translational components).
These quantities are returned in a tuple, in the order below.
std::tuple  Description 
w_max_difference  Maximum absolute difference in rotation components 
v_max_difference  Maximum absolute difference in translation components 
Compares this
spatial vector to the provided spatial vector other
within a specified precision.
 Returns
true
if other
is within a precision given by tolerance
. The comparison is performed by comparing the translational component of this
spatial vector with the rotational component of other
using the fuzzy comparison provided by Eigen's method isApprox().
bool IsNearlyEqualWithinAbsoluteTolerance 
( 
const SpatialQuantity & 
other, 


const T & 
rotational_tolerance, 


const T & 
translational_tolerance 

) 
 const 

inline 
Compares the rotational and translational parts of this
and other
to check if they are the same to within specified absolute differences.
 Parameters

[in]  rotational_tolerance  maximum allowable absolute difference between the rotational parts of this and other . The units depend on the underlying class. For example, spatial velocity, acceleration, and force have units of rad/sec, rad/sec^2, and N*m, respectively. 
[in]  translational_tolerance  maximum allowable absolute difference between the translational parts of this and other . The units depend on the underlying class. For example, spatial velocity, acceleration, and force have units of meter/sec, meter/sec^2, and Newton, respectively. 
 Returns
true
if the rotational part of this
and other
are equal within rotational_tolerance
and the translational part of this
and other
are equal within translational_tolerance
.
Returns a (mutable) bare pointer to the underlying data.
It is guaranteed that there will be six (6) T's densely packed at data[0], data[1], etc.
const T& operator[] 
( 
int 
i  ) 
const 

inline 
Const access to the ith component of this spatial vector.
Bounds are only checked in Debug builds for a zero overhead implementation in Release builds.
Mutable access to the ith component of this spatial vector.
Bounds are only checked in Debug builds for a zero overhead implementation in Release builds.
const Vector3<T>& rotational 
( 
 ) 
const 

inline 
Const access to the rotational component of this spatial vector.
Mutable access to the rotational component of this spatial vector.
Sets all entries in this
SpatialVector to NaN.
Typically used to quickly detect uninitialized values since NaN will trigger a chain of invalid computations that can then be tracked back to the source.
Sets both rotational and translational components of this
SpatialVector to zero.
The total size of the concatenation of the angular and linear components.
In three dimensions this is six (6) and it is known at compile time.
const Vector3<T>& translational 
( 
 ) 
const 

inline 
Const access to the translational component of this spatial vector.
Mutable access to the translational component of this spatial vector.
Factory to create a zero SpatialVector, i.e.
rotational and translational components are both zero.
Multiplication of a spatial vector V from the left by a scalar s
.
Multiplication of a spatial vector V from the right by a scalar s
.
This operation reexpresses the spatial vector V_E
originally expressed in frame E, into V_F
, the same spatial vector expresed in another frame F.
The transformation requires the rotation matrix R_FE
representing the orientation of the original frame E with respect to frame F. The operation performed is:
V_F.rotational() = R_FE * V_E.rotational(),
V_F.translational() = R_FE * V_E.translational()
 Returns
 V_F The same spatial vector reexpressed in frame F.
Stream insertion operator to write SpatialVector objects into a std::ostream
.
Especially useful for debugging.
The documentation for this class was generated from the following file: