Functions | Variables
unit_test_utils Namespace Reference

Functions

static bool checkFrameVectorPairEpsilonClose (const RobotDynamics::Math::FrameVectorPair &v1, const RobotDynamics::Math::FrameVectorPair &v2, const double epsilon)
 
static bool checkMatrix3dEpsilonClose (const RobotDynamics::Math::Matrix3d &t1, const RobotDynamics::Math::Matrix3d &t2, const double epsilon)
 
static bool checkMatrix3dEq (const RobotDynamics::Math::Matrix3d &t1, const RobotDynamics::Math::Matrix3d &t2)
 
static bool checkMatrixNdEpsilonClose (const RobotDynamics::Math::MatrixNd &t1, const RobotDynamics::Math::MatrixNd &t2, const double epsilon)
 
static bool checkMatrixNdEq (const RobotDynamics::Math::MatrixNd &t1, const RobotDynamics::Math::MatrixNd &t2)
 
bool checkModelZeroVectorsAndMatrices (RobotDynamics::Model &model)
 
static bool checkSpatialMatrixEpsilonClose (const RobotDynamics::Math::SpatialMatrix &t1, const RobotDynamics::Math::SpatialMatrix &t2, const double epsilon)
 
static bool checkSpatialVectorsEpsilonClose (const RobotDynamics::Math::SpatialVector &v1, const RobotDynamics::Math::SpatialVector &v2, const double epsilon)
 
static bool checkSpatialVectorsEq (const RobotDynamics::Math::SpatialVector &v1, const RobotDynamics::Math::SpatialVector &v2)
 
static bool checkVector3dEpsilonClose (const RobotDynamics::Math::Vector3d &v1, const RobotDynamics::Math::Vector3d &v2, const double epsilon)
 
static bool checkVector3dEq (const RobotDynamics::Math::Vector3d &v1, const RobotDynamics::Math::Vector3d &v2)
 
static bool checkVector4dEpsilonClose (const RobotDynamics::Math::Vector4d &v1, const RobotDynamics::Math::Vector4d &v2, const double epsilon)
 
static bool checkVector4dEq (const RobotDynamics::Math::Vector4d &v1, const RobotDynamics::Math::Vector4d &v2)
 
static bool checkVectorNdEpsilonClose (const RobotDynamics::Math::VectorNd &v1, const RobotDynamics::Math::VectorNd &v2, const double epsilon)
 
static bool checkVectorNdEq (const RobotDynamics::Math::VectorNd &v1, const RobotDynamics::Math::VectorNd &v2)
 
static RobotDynamics::Math::SpatialTransform createRandomSpatialTransform ()
 
static ReferenceFramePtr createRandomUnchangingFrame (const std::string &frameName, ReferenceFramePtr parentFrame, const unsigned int movableBodyId)
 
static ReferenceFramePtr getARandomFrame (std::vector< ReferenceFramePtr > frames)
 
template<typename T >
static T getRandomAngle ()
 
template<typename T >
static T getRandomNumber ()
 
template<typename T >
static T getRandomNumber (T min, T max)
 
static Point3d getRandomPoint3 ()
 
static RobotDynamics::Math::SpatialTransform getTransformToRootByClimbingTree (ReferenceFramePtr frame)
 
void integrateEuler (Model &model, const Math::VectorNd &Q, const Math::VectorNd &QDot, Math::VectorNd &x, const Math::VectorNd &tau, double h, Math::SpatialForceV *f_ext=nullptr)
 Using simple Euler integration, integrate the system dynamics one step. More...
 
void integrateRk4 (Model &model, const Math::VectorNd &Q, const Math::VectorNd &QDot, Math::VectorNd &x, const Math::VectorNd &tau, double h, Math::SpatialForceV *f_ext=nullptr)
 Using a Runge-Kutta 4th order algorithm, integrate the system dynamics one step. More...
 
static void updateAllFrames (std::vector< ReferenceFramePtr > frames)
 

Variables

const double TEST_PREC = 1.0e-14
 

Function Documentation

static bool unit_test_utils::checkFrameVectorPairEpsilonClose ( const RobotDynamics::Math::FrameVectorPair v1,
const RobotDynamics::Math::FrameVectorPair v2,
const double  epsilon 
)
inlinestatic

Definition at line 269 of file UnitTestUtils.hpp.

static bool unit_test_utils::checkMatrix3dEpsilonClose ( const RobotDynamics::Math::Matrix3d t1,
const RobotDynamics::Math::Matrix3d t2,
const double  epsilon 
)
inlinestatic

Definition at line 138 of file UnitTestUtils.hpp.

static bool unit_test_utils::checkMatrix3dEq ( const RobotDynamics::Math::Matrix3d t1,
const RobotDynamics::Math::Matrix3d t2 
)
inlinestatic

Definition at line 196 of file UnitTestUtils.hpp.

static bool unit_test_utils::checkMatrixNdEpsilonClose ( const RobotDynamics::Math::MatrixNd t1,
const RobotDynamics::Math::MatrixNd t2,
const double  epsilon 
)
inlinestatic

Definition at line 154 of file UnitTestUtils.hpp.

static bool unit_test_utils::checkMatrixNdEq ( const RobotDynamics::Math::MatrixNd t1,
const RobotDynamics::Math::MatrixNd t2 
)
inlinestatic

Definition at line 175 of file UnitTestUtils.hpp.

bool unit_test_utils::checkModelZeroVectorsAndMatrices ( RobotDynamics::Model model)

Definition at line 27 of file UnitTestUtils.hpp.

static bool unit_test_utils::checkSpatialMatrixEpsilonClose ( const RobotDynamics::Math::SpatialMatrix t1,
const RobotDynamics::Math::SpatialMatrix t2,
const double  epsilon 
)
inlinestatic

Definition at line 122 of file UnitTestUtils.hpp.

static bool unit_test_utils::checkSpatialVectorsEpsilonClose ( const RobotDynamics::Math::SpatialVector v1,
const RobotDynamics::Math::SpatialVector v2,
const double  epsilon 
)
inlinestatic

Definition at line 306 of file UnitTestUtils.hpp.

static bool unit_test_utils::checkSpatialVectorsEq ( const RobotDynamics::Math::SpatialVector v1,
const RobotDynamics::Math::SpatialVector v2 
)
inlinestatic

Definition at line 319 of file UnitTestUtils.hpp.

static bool unit_test_utils::checkVector3dEpsilonClose ( const RobotDynamics::Math::Vector3d v1,
const RobotDynamics::Math::Vector3d v2,
const double  epsilon 
)
inlinestatic

Definition at line 256 of file UnitTestUtils.hpp.

static bool unit_test_utils::checkVector3dEq ( const RobotDynamics::Math::Vector3d v1,
const RobotDynamics::Math::Vector3d v2 
)
inlinestatic

Definition at line 212 of file UnitTestUtils.hpp.

static bool unit_test_utils::checkVector4dEpsilonClose ( const RobotDynamics::Math::Vector4d v1,
const RobotDynamics::Math::Vector4d v2,
const double  epsilon 
)
inlinestatic

Definition at line 275 of file UnitTestUtils.hpp.

static bool unit_test_utils::checkVector4dEq ( const RobotDynamics::Math::Vector4d v1,
const RobotDynamics::Math::Vector4d v2 
)
inlinestatic

Definition at line 225 of file UnitTestUtils.hpp.

static bool unit_test_utils::checkVectorNdEpsilonClose ( const RobotDynamics::Math::VectorNd v1,
const RobotDynamics::Math::VectorNd v2,
const double  epsilon 
)
inlinestatic

Definition at line 288 of file UnitTestUtils.hpp.

static bool unit_test_utils::checkVectorNdEq ( const RobotDynamics::Math::VectorNd v1,
const RobotDynamics::Math::VectorNd v2 
)
inlinestatic

Definition at line 238 of file UnitTestUtils.hpp.

static RobotDynamics::Math::SpatialTransform unit_test_utils::createRandomSpatialTransform ( )
inlinestatic

Definition at line 347 of file UnitTestUtils.hpp.

static ReferenceFramePtr unit_test_utils::createRandomUnchangingFrame ( const std::string &  frameName,
ReferenceFramePtr  parentFrame,
const unsigned int  movableBodyId 
)
inlinestatic

Definition at line 376 of file UnitTestUtils.hpp.

static ReferenceFramePtr unit_test_utils::getARandomFrame ( std::vector< ReferenceFramePtr frames)
inlinestatic

Definition at line 340 of file UnitTestUtils.hpp.

template<typename T >
static T unit_test_utils::getRandomAngle ( )
static

Definition at line 116 of file UnitTestUtils.hpp.

template<typename T >
static T unit_test_utils::getRandomNumber ( )
static

Definition at line 92 of file UnitTestUtils.hpp.

template<typename T >
static T unit_test_utils::getRandomNumber ( min,
max 
)
static

Definition at line 99 of file UnitTestUtils.hpp.

static Point3d unit_test_utils::getRandomPoint3 ( )
static

Definition at line 105 of file UnitTestUtils.hpp.

static RobotDynamics::Math::SpatialTransform unit_test_utils::getTransformToRootByClimbingTree ( ReferenceFramePtr  frame)
inlinestatic

Definition at line 358 of file UnitTestUtils.hpp.

void unit_test_utils::integrateEuler ( Model model,
const Math::VectorNd Q,
const Math::VectorNd QDot,
Math::VectorNd x,
const Math::VectorNd tau,
double  h,
Math::SpatialForceV f_ext = nullptr 
)

Using simple Euler integration, integrate the system dynamics one step.

Parameters
model
Q
QDot
x
tau
hIntegration step size
f_ext
Note
This only works for models consisting solely of revolute/prismatic joints and spherical joints. It will not work for any euler joints, etc.

Definition at line 395 of file UnitTestUtils.hpp.

void unit_test_utils::integrateRk4 ( Model model,
const Math::VectorNd Q,
const Math::VectorNd QDot,
Math::VectorNd x,
const Math::VectorNd tau,
double  h,
Math::SpatialForceV f_ext = nullptr 
)

Using a Runge-Kutta 4th order algorithm, integrate the system dynamics one step.

Parameters
model
Q
QDot
x
tau
hIntegration step size
f_ext
Note
This only works for models consisting solely of revolute/prismatic joints. It will not work for any euler joints or spherical joints, etc.

Definition at line 471 of file UnitTestUtils.hpp.

static void unit_test_utils::updateAllFrames ( std::vector< ReferenceFramePtr frames)
inlinestatic

Definition at line 332 of file UnitTestUtils.hpp.

Variable Documentation

const double unit_test_utils::TEST_PREC = 1.0e-14

Definition at line 22 of file UnitTestUtils.hpp.



rdl_dynamics
Author(s):
autogenerated on Tue Apr 20 2021 02:25:28