Cheetah Software
1.0
|
Test spatial vector/transform maniuplation functions. More...
#include "Dynamics/SpatialInertia.h"
#include "Dynamics/spatial.h"
#include "Math/orientation_tools.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
Go to the source code of this file.
Functions | |
TEST (Spatial, axisRotation) | |
TEST (Spatial, crm) | |
TEST (Spatial, crf) | |
TEST (Spatial, crm_prod) | |
TEST (Spatial, crf_prod) | |
TEST (Spatial, inertia) | |
TEST (Spatial, inertia_flips) | |
TEST (Spatial, pluho_and_plux) | |
TEST (Spatial, invert_sxform) | |
TEST (Spatial, jcalc) | |
TEST (Spatial, mass_properties) | |
TEST (Spatial, box_inertia) | |
TEST (Spatial, velocityConver) | |
TEST (Spatial, pointTransform) | |
TEST (Spatial, forceToSpatialForce) | |
TEST (Spatial, spatialToLinearVelocity) | |
TEST (Spatial, spatialToLinearAcceleration) | |
Test spatial vector/transform maniuplation functions.
Test the spatial utilities Doesn't test the algorithms.
Definition in file test_spatial.cpp.
TEST | ( | Spatial | , |
axisRotation | |||
) |
Check the spatialRotation function, which generates spatial transforms for coordinate axis rotations
Definition at line 21 of file test_spatial.cpp.
References almostEqual(), spatial::spatialRotation(), ori::X, ori::Y, and ori::Z.
TEST | ( | Spatial | , |
crm | |||
) |
Check the motionCrossMatrix function, which behaves like crm() in MATLAB
Definition at line 37 of file test_spatial.cpp.
References almostEqual(), and spatial::motionCrossMatrix().
TEST | ( | Spatial | , |
crf | |||
) |
Check the forceCrossMatrix function, which behaves like crf() in MATLAB Uses crm(-v).transpose() = crf(v) identity
Definition at line 54 of file test_spatial.cpp.
References almostEqual(), spatial::forceCrossMatrix(), and spatial::motionCrossMatrix().
TEST | ( | Spatial | , |
crm_prod | |||
) |
Test motionCrossProduct, a function to compute crm(v1)*v2 with fewer multiplies
Definition at line 69 of file test_spatial.cpp.
References almostEqual(), spatial::motionCrossMatrix(), and spatial::motionCrossProduct().
TEST | ( | Spatial | , |
crf_prod | |||
) |
Test forceCrossProduct, a function to compute crf(v1)*v2 with fewer multiplies
Definition at line 83 of file test_spatial.cpp.
References almostEqual(), spatial::forceCrossMatrix(), and spatial::forceCrossProduct().
TEST | ( | Spatial | , |
inertia | |||
) |
Test spatial inertia Checks that it is built correctly from mass, CoM and rotational inertia (like mcI) Also checks the 4x4 Pseudo Inertia
Definition at line 98 of file test_spatial.cpp.
References almostEqual(), SpatialInertia< T >::getCOM(), SpatialInertia< T >::getInertiaTensor(), SpatialInertia< T >::getMass(), SpatialInertia< T >::getMatrix(), and SpatialInertia< T >::getPseudoInertia().
TEST | ( | Spatial | , |
inertia_flips | |||
) |
Check the flipAlongAxis method of spatial inertias
Definition at line 126 of file test_spatial.cpp.
References almostEqual(), and ori::Y.
TEST | ( | Spatial | , |
pluho_and_plux | |||
) |
Check the homogeneous transformation (pluho) Also check the spatial transformation functions (plux)
Definition at line 141 of file test_spatial.cpp.
References almostEqual(), ori::coordinateRotation(), spatial::createSXform(), spatial::homogeneousToSXform(), spatial::rotationFromSXform(), spatial::sxformToHomogeneous(), spatial::translationFromSXform(), ori::X, ori::Y, and ori::Z.
TEST | ( | Spatial | , |
invert_sxform | |||
) |
Check invertSXform, which computes inverse(X) quickly if X is a plucker coordinate transform
Definition at line 169 of file test_spatial.cpp.
References almostEqual(), ori::coordinateRotation(), spatial::createSXform(), spatial::invertSXform(), ori::X, ori::Y, and ori::Z.
TEST | ( | Spatial | , |
jcalc | |||
) |
Test the jointXform and jointMotionSubspace functions, which are similar to jcalc
Definition at line 184 of file test_spatial.cpp.
References almostEqual(), spatial::jointXform(), ori::Y, and ori::Z.
TEST | ( | Spatial | , |
mass_properties | |||
) |
Test functions for converting between spatial inertias and the minimal representation "mass property vector", which contains 10 elements.
Definition at line 215 of file test_spatial.cpp.
References almostEqual(), SpatialInertia< T >::asMassPropertyVector(), and SpatialInertia< T >::getMatrix().
TEST | ( | Spatial | , |
box_inertia | |||
) |
Test utility function for computing the inertia of a uniform rectangular box
Definition at line 229 of file test_spatial.cpp.
References almostEqual(), and spatial::rotInertiaOfBox().
TEST | ( | Spatial | , |
velocityConver | |||
) |
Test utility function for converting spatial velocity to linear velocity at a point
Definition at line 241 of file test_spatial.cpp.
References almostEqual(), and spatial::spatialToLinearVelocity().
TEST | ( | Spatial | , |
pointTransform | |||
) |
Test utility function for transforming a point by a spatial transform
Definition at line 253 of file test_spatial.cpp.
References almostEqual(), ori::coordinateRotation(), spatial::createSXform(), spatial::sXFormPoint(), ori::X, ori::Y, and ori::Z.
TEST | ( | Spatial | , |
forceToSpatialForce | |||
) |
Test utility function for converting force at a point to a spatial force
Definition at line 270 of file test_spatial.cpp.
References almostEqual(), and spatial::forceToSpatialForce().
TEST | ( | Spatial | , |
spatialToLinearVelocity | |||
) |
Test utility function for converting the spatial velocity to the velocity at a point
Definition at line 283 of file test_spatial.cpp.
References almostEqual(), and spatial::spatialToLinearVelocity().
TEST | ( | Spatial | , |
spatialToLinearAcceleration | |||
) |
Test utility function for converting the spatial acceleration to the linear acceleration of a point
Definition at line 301 of file test_spatial.cpp.
References almostEqual(), and spatial::spatialToLinearAcceleration().