Drake
drake::multibody::internal Namespace Reference

Classes

class  AngleBetweenVectorsConstraint
 
class  BodyNode
 For internal use only of the MultibodyTree implementation. More...
 
class  BodyNodeImpl
 For internal use only of the MultibodyTree implementation. More...
 
class  BodyNodeWelded
 This class represents a BodyNode for nodes with zero degrees of freedom. More...
 
class  GazeTargetConstraint
 
class  IiwaKinematicConstraintTest
 
class  ModelInstance
 
class  OrientationConstraint
 
class  PositionConstraint
 
class  TwoFreeBodiesConstraintTest
 

Functions

bool AreAutoDiffVecXdEqual (const Eigen::Ref< const VectorX< AutoDiffXd >> &a, const Eigen::Ref< const VectorX< AutoDiffXd >> &b)
 
void UpdateContextConfiguration (const Eigen::Ref< const VectorX< AutoDiffXd >> &q, MultibodyTreeContext< AutoDiffXd > *mbt_context)
 Check if the generalized positions in mbt_context are the same as q. More...
 
bool AreAutoDiffVecXdEqual (const Eigen::Ref< const AutoDiffVecXd > &a, const Eigen::Ref< const AutoDiffVecXd > &b)
 Determines if a and b are equal. More...
 
template<typename DerivedA >
std::enable_if< is_eigen_vector_of< DerivedA, double >::value, Eigen::Matrix< double, DerivedA::RowsAtCompileTime, 1 > >::type NormalizeVector (const Eigen::MatrixBase< DerivedA > &a)
 Normalize an Eigen vector of doubles. More...
 
 TEST_F (IiwaKinematicConstraintTest, AngleBetweenVectorsConstraint)
 
 TEST_F (TwoFreeBodiesConstraintTest, AngleBetweenVectorsConstraint)
 
 TEST_F (IiwaKinematicConstraintTest, AngleBetweenVectorsConstraintConstructorError)
 
 TEST_F (IiwaKinematicConstraintTest, GazeTargetConstraint)
 
 TEST_F (TwoFreeBodiesConstraintTest, GazeTargetConstraint)
 
 TEST_F (IiwaKinematicConstraintTest, GazeTargetConstraintConstructorError)
 
 TEST_F (IiwaKinematicConstraintTest, OrientationConstraint)
 
 TEST_F (TwoFreeBodiesConstraintTest, OrientationConstraint)
 
 TEST_F (IiwaKinematicConstraintTest, OrientationConstraintConstructionError)
 
 TEST_F (IiwaKinematicConstraintTest, PositionConstraint)
 
 TEST_F (TwoFreeBodiesConstraintTest, PositionConstraint)
 
 EXPLICITLY_INSTANTIATE_IMPLS (double)
 
 EXPLICITLY_INSTANTIATE_IMPLS (AutoDiffXd)
 

Function Documentation

◆ AreAutoDiffVecXdEqual() [1/2]

bool drake::multibody::internal::AreAutoDiffVecXdEqual ( const Eigen::Ref< const VectorX< AutoDiffXd >> &  a,
const Eigen::Ref< const VectorX< AutoDiffXd >> &  b 
)

◆ AreAutoDiffVecXdEqual() [2/2]

bool drake::multibody::internal::AreAutoDiffVecXdEqual ( const Eigen::Ref< const AutoDiffVecXd > &  a,
const Eigen::Ref< const AutoDiffVecXd > &  b 
)

Determines if a and b are equal.

a equals to b if they have the same value and gradients. TODO(hongkai.dai) implement and use std::equal_to<> for comparing Eigen vector of AutoDiffXd.

◆ EXPLICITLY_INSTANTIATE_IMPLS() [1/2]

drake::multibody::internal::EXPLICITLY_INSTANTIATE_IMPLS ( double  )

◆ EXPLICITLY_INSTANTIATE_IMPLS() [2/2]

drake::multibody::internal::EXPLICITLY_INSTANTIATE_IMPLS ( AutoDiffXd  )

◆ NormalizeVector()

std::enable_if< is_eigen_vector_of<DerivedA, double>::value, Eigen::Matrix<double, DerivedA::RowsAtCompileTime, 1> >::type drake::multibody::internal::NormalizeVector ( const Eigen::MatrixBase< DerivedA > &  a)

Normalize an Eigen vector of doubles.

Throw a logic error if the vector is close to zero. This function is used in the constructor of some kinematic constraints.

◆ TEST_F() [1/11]

drake::multibody::internal::TEST_F ( IiwaKinematicConstraintTest  ,
PositionConstraint   
)

◆ TEST_F() [2/11]

drake::multibody::internal::TEST_F ( IiwaKinematicConstraintTest  ,
AngleBetweenVectorsConstraint   
)

◆ TEST_F() [3/11]

drake::multibody::internal::TEST_F ( IiwaKinematicConstraintTest  ,
OrientationConstraint   
)

◆ TEST_F() [4/11]

drake::multibody::internal::TEST_F ( IiwaKinematicConstraintTest  ,
GazeTargetConstraint   
)

◆ TEST_F() [5/11]

drake::multibody::internal::TEST_F ( TwoFreeBodiesConstraintTest  ,
AngleBetweenVectorsConstraint   
)

◆ TEST_F() [6/11]

drake::multibody::internal::TEST_F ( TwoFreeBodiesConstraintTest  ,
OrientationConstraint   
)

◆ TEST_F() [7/11]

drake::multibody::internal::TEST_F ( TwoFreeBodiesConstraintTest  ,
GazeTargetConstraint   
)

◆ TEST_F() [8/11]

drake::multibody::internal::TEST_F ( TwoFreeBodiesConstraintTest  ,
PositionConstraint   
)

◆ TEST_F() [9/11]

drake::multibody::internal::TEST_F ( IiwaKinematicConstraintTest  ,
AngleBetweenVectorsConstraintConstructorError   
)

◆ TEST_F() [10/11]

drake::multibody::internal::TEST_F ( IiwaKinematicConstraintTest  ,
OrientationConstraintConstructionError   
)

◆ TEST_F() [11/11]

drake::multibody::internal::TEST_F ( IiwaKinematicConstraintTest  ,
GazeTargetConstraintConstructorError   
)

◆ UpdateContextConfiguration()

void UpdateContextConfiguration ( const Eigen::Ref< const VectorX< AutoDiffXd >> &  q,
MultibodyTreeContext< AutoDiffXd > *  mbt_context 
)

Check if the generalized positions in mbt_context are the same as q.

If they are not the same, then reset mbt_context's generalized positions to q. Otherwise, leave mbt_context unchanged. The intention is to avoid dirtying the computation cache, given it is ticket-based rather than hash-based.