Drake
drake::multibody Namespace Reference

Namespaces

 benchmarks
 
 collision
 
 constraint
 
 detail
 
 implicit_stribeck
 
 internal
 
 joints
 
 math
 
 multibody_model
 
 parsers
 
 test
 
 test_utilities
 

Classes

class  AngleBetweenVectorsConstraint
 Constrains that the angle between a vector a and another vector b is between [θ_lower, θ_upper]. More...
 
class  ArticulatedBodyInertia
 Articulated Body Inertia is the inertia that a body appears to have when it is the base (or root) of a rigid-body system, also referred to as Articulated Body in the context of articulated body algorithms. More...
 
class  Body
 Body provides the general abstraction of a body with an API that makes no assumption about whether a body is rigid or deformable and neither does it make any assumptions about the underlying physical model or approximation. More...
 
class  BodyFrame
 A BodyFrame is a material Frame that serves as the unique reference frame for a Body. More...
 
class  ContactResults
 A container class storing the contact results information for each contact pair for a given state of the simulation. More...
 
class  ContactResultsToLcmSystem
 A System that encodes ContactResults into a lcmt_contact_results_for_viz message. More...
 
class  CoulombFriction
 Parameters for Coulomb's Law of Friction, namely: More...
 
class  FixedOffsetFrame
 FixedOffsetFrame represents a material frame F whose pose is fixed with respect to a parent material frame P. More...
 
class  ForceElement
 A ForceElement allows modeling state and time dependent forces in a MultibodyTree model. More...
 
class  Frame
 Frame is an abstract class representing a material frame (also called a physical frame), meaning that it is associated with a material point of a Body. More...
 
class  FrameBase
 FrameBase is an abstract representation of the concept of a frame in multibody dynamics. More...
 
class  GazeTargetConstraint
 Constrains a target point T to be within a cone K. More...
 
class  GlobalInverseKinematics
 Solves the inverse kinematics problem as a mixed integer convex optimization problem. More...
 
class  InverseKinematics
 Solves an inverse kinematics (IK) problem on a MultibodyPlant, to find the postures of the robot satisfying certain constraints. More...
 
class  Joint
 A Joint models the kinematical relationship which characterizes the possible relative motion between two bodies. More...
 
class  JointActuator
 The JointActuator class is mostly a simple bookkeeping structure to represent an actuator acting on a given Joint. More...
 
class  LinearSpringDamper
 This ForceElement models a spring-damper attached between two points on two different bodies. More...
 
class  MobilizerTester
 
class  MultibodyForces
 A class to hold a set of forces applied to a MultibodyTree system. More...
 
class  MultibodyPlant
 MultibodyPlant is a Drake system framework representation (see systems::System) for the model of a physical system consisting of a collection of interconnected bodies. More...
 
class  MultibodyPlantTester
 
class  MultibodyTreeElement< ElementType< T >, ElementIndexType >
 A class representing an element or component of a MultibodyTree. More...
 
class  OrientationConstraint
 Constrains that the angle difference θ between the orientation of frame A and the orientation of frame B to satisfy θ ≤ θ_bound. More...
 
class  PackageMap
 Maps ROS package names to their full path on the local file system. More...
 
class  Parser
 Parses SDF and URDF input files into a MultibodyPlant and (optionally) a SceneGraph. More...
 
class  PointPairContactInfo
 A class containing information regarding contact response between two bodies including: More...
 
class  PositionConstraint
 Constrains the position of a point Q, rigidly attached to a frame B, to be within a bounding box measured and expressed in frame A. More...
 
class  PrismaticJoint
 This Joint allows two bodies to translate relative to one another along a common axis. More...
 
class  QuaternionFloatingMobilizer
 This Mobilizer allows two frames to move freely relatively to one another. More...
 
class  RevoluteJoint
 This Joint allows two bodies to rotate relatively to one another around a common axis. More...
 
class  RigidBody
 The term rigid body implies that the deformations of the body under consideration are so small that they have no significant effect on the overall motions of the body and therefore deformations can be neglected. More...
 
class  RotationalInertia
 This class helps describe the mass distribution (inertia properties) of a body or composite body about a particular point. More...
 
class  SpatialAcceleration
 This class is used to represent a spatial acceleration that combines rotational (angular acceleration) and translational (linear acceleration) components. More...
 
class  SpatialForce
 This class is used to represent a spatial force (also called a wrench) that combines both rotational (torque) and translational force components. More...
 
class  SpatialInertia
 This class represents the physical concept of a Spatial Inertia. More...
 
class  SpatialMomentum
 This class is used to represent the spatial momentum of a particle, system of particles or body (whether rigid or soft.) The linear momentum l_NS of a system of particles S in a reference frame N is defined by: More...
 
class  SpatialVector
 This class is used to represent physical quantities that correspond to spatial vectors such as spatial velocities, spatial accelerations and spatial forces. More...
 
class  SpatialVelocity
 This class is used to represent a spatial velocity (also called a twist) that combines rotational (angular) and translational (linear) velocity components. More...
 
class  UniformGravityFieldElement
 This ForceElement allows modeling the effect of a uniform gravity field as felt by bodies on the surface of the Earth. More...
 
class  UnitInertia
 This class is used to represent rotational inertias for unit mass bodies. More...
 
class  WeldJoint
 This Joint fixes the relative pose between two frames as if "welding" them together. More...
 

Typedefs

template<typename T >
using MultibodyTree = internal::MultibodyTree< T >
 Public alias to internal MultibodyTree. More...
 
using FrameIndex = TypeSafeIndex< class FrameTag >
 Type used to identify frames by index in a multibody tree system. More...
 
using BodyIndex = TypeSafeIndex< class BodyTag >
 Type used to identify bodies by index in a multibody tree system. More...
 
using ForceElementIndex = TypeSafeIndex< class ForceElementTag >
 Type used to identify force elements by index within a multibody tree system. More...
 
using JointIndex = TypeSafeIndex< class JointElementTag >
 Type used to identify joints by index within a multibody tree system. More...
 
using JointActuatorIndex = TypeSafeIndex< class JointActuatorElementTag >
 Type used to identify actuators by index within a multibody tree system. More...
 
using ModelInstanceIndex = TypeSafeIndex< class ModelInstanceTag >
 Type used to identify model instances by index within a multibody tree system. More...
 

Enumerations

enum  JacobianWrtVariable { kQDot, kV }
 Enumeration that distinguishes between flavors of Jacobians based on the variable with respect to which they are taken. More...
 

Functions

void ApproximateBoundedNormByLinearConstraints (const Eigen::Ref< const Vector3< symbolic::Expression >> &x, double c, solvers::MathematicalProgram *prog)
 
template<typename T >
lcmt_viewer_load_robot CreateLoadRobotMessage (const RigidBodyTree< double > &tree)
 Creates and returns an lcmt_viewer_load_robot message containing the visual geometries from the provided RigidBodyTree. More...
 
template lcmt_viewer_load_robot CreateLoadRobotMessage< double > (const RigidBodyTree< double > &tree)
 
void AddFlatTerrainToWorld (RigidBodyTreed *tree, double box_size=1000, double box_depth=10)
 Adds a box-shaped terrain to tree. More...
 
 TEST_F (RigidBodyTreeKinematicsTests, TestDoKinematicWithValidCache)
 
 TEST_F (RigidBodyTreeKinematicsTests, TestDoKinematicWithBadCache1)
 
 TEST_F (RigidBodyTreeKinematicsTests, TestDoKinematicWithBadCache2)
 
 TEST_F (AcrobotTests, PoseTests)
 
 TEST_F (AcrobotTests, SpatialVelocityTests)
 
 TEST_F (RBTDifferentialKinematicsHelperTest, RPYPoseTest)
 
 TEST_F (RBTDifferentialKinematicsHelperTest, RPYTwistInWorldAlignedBodyTest)
 
 TEST_F (RBTDifferentialKinematicsHelperTest, RPYJacobianTest)
 
 TEST_F (RBTDifferentialKinematicsHelperTest, RPYJacobianDotTimeVTest)
 
 TEST_F (RBTDifferentialKinematicsHelperTest, QuatPoseTest)
 
 TEST_F (RBTDifferentialKinematicsHelperTest, QuatTwistInWorldAlignedBodyTest)
 
 TEST_F (RBTDifferentialKinematicsHelperTest, QuatJacobianTest)
 
 TEST_F (RBTDifferentialKinematicsHelperTest, QuatJacobianDotTimeVTest)
 
Eigen::Quaterniond Vector4ToQuaternion (const Eigen::Ref< const Eigen::Vector4d > &q)
 
 GTEST_TEST (InverseKinematicsTest, ConstructorWithJointLimits)
 
 TEST_F (TwoFreeBodiesTest, PositionConstraint)
 
 TEST_F (TwoFreeBodiesTest, OrientationConstraint)
 
 TEST_F (TwoFreeBodiesTest, GazeTargetConstraint)
 
 TEST_F (TwoFreeBodiesTest, AngleBetweenVectorsConstraint)
 
template<typename T >
std::unique_ptr< MultibodyTree< T > > ConstructTwoFreeBodies ()
 Constructs a MultibodyTree consisting of two free bodies. More...
 
template<typename T >
std::unique_ptr< MultibodyPlant< T > > ConstructTwoFreeBodiesPlant ()
 Constructs a MultibodyPlant consisting of two free bodies. More...
 
std::unique_ptr< MultibodyPlant< double > > ConstructIiwaPlant (const std::string &iiwa_sdf_name, double time_step)
 Constructs a MultibodyPlant consisting of an Iiwa robot. More...
 
Eigen::Vector4d QuaternionToVectorWxyz (const Eigen::Quaterniond &q)
 Convert an Eigen::Quaternion to a vector 4d in the order (w, x, y, z). More...
 
template std::unique_ptr< MultibodyTree< double > > ConstructTwoFreeBodies< double > ()
 
template std::unique_ptr< MultibodyTree< AutoDiffXd > > ConstructTwoFreeBodies< AutoDiffXd > ()
 
template std::unique_ptr< MultibodyPlant< double > > ConstructTwoFreeBodiesPlant< double > ()
 
template std::unique_ptr< MultibodyPlant< AutoDiffXd > > ConstructTwoFreeBodiesPlant< AutoDiffXd > ()
 
template<typename DerivedA , typename DerivedB >
std::enable_if< std::is_same< typename DerivedA::Scalar, typename DerivedB::Scalar >::value &&std::is_same< typename DerivedA::Scalar, AutoDiffXd >::value >::type CompareAutoDiffVectors (const Eigen::MatrixBase< DerivedA > &a, const Eigen::MatrixBase< DerivedB > &b, double tol)
 Compares if two eigen matrices of AutoDiff have the same values and gradients. More...
 
template<typename T >
SpatialForce< T > operator+ (const SpatialForce< T > &F1_Sp_E, const SpatialForce< T > &F2_Sp_E)
 Computes the resultant spatial force as the addition of two spatial forces F1_Sp_E and F2_Sp_E on a same system or body S, at the same point P and expressed in the same frame E. More...
 
template<typename T >
SpatialMomentum< T > operator+ (const SpatialMomentum< T > &L1_NSp_E, const SpatialMomentum< T > &L2_NSp_E)
 Computes the resultant spatial momentum as the addition of two spatial momenta L1_NSp_E and L2_NSp_E on a same system S, about the same point P and expressed in the same frame E. More...
 
template<typename T >
SpatialVelocity< T > operator+ (const SpatialVelocity< T > &V_MAb_E, const SpatialVelocity< T > &V_AB_E)
 Performs the addition of two spatial velocities. More...
 
template<typename T >
SpatialVelocity< T > operator- (const SpatialVelocity< T > &V_MB_E, const SpatialVelocity< T > &V_MAb_E)
 The addition of two spatial velocities relates to the composition of the spatial velocities for two frames given we know the relative spatial velocity between them, see operator+(const SpatialVelocity<T>&, const SpatialVelocity<T>&) for further details. More...
 
std::ostream & operator<< (std::ostream &out, const PackageMap &package_map)
 
systems::lcm::LcmPublisherSystemConnectContactResultsToDrakeVisualizer (systems::DiagramBuilder< double > *builder, const MultibodyPlant< double > &multibody_plant, lcm::DrakeLcmInterface *lcm=nullptr)
 Extends a Diagram with the required components to publish contact results to drake_visualizer. More...
 
systems::lcm::LcmPublisherSystemConnectContactResultsToDrakeVisualizer (systems::DiagramBuilder< double > *builder, const MultibodyPlant< double > &multibody_plant, const systems::OutputPort< double > &contact_results_port, lcm::DrakeLcmInterface *lcm=nullptr)
 Implements ConnectContactResultsToDrakeVisualizer, but using contact_results_port to explicitly specify the output port used to get contact results for multibody_plant. More...
 
template<typename T >
CoulombFriction< T > CalcContactFrictionFromSurfaceProperties (const CoulombFriction< T > &surface_properties1, const CoulombFriction< T > &surface_properties2)
 Given the surface properties of two different surfaces, this method computes the Coulomb's law coefficients of friction characterizing the interaction by friction of the given surface pair. More...
 
ModelInstanceIndex world_model_instance ()
 Returns the model instance containing the world body. More...
 
ModelInstanceIndex default_model_instance ()
 Returns the model instance which contains all tree elements with no explicit model instance specified. More...
 
BodyIndex world_index ()
 For every MultibodyTree the world body always has this unique index and it is always zero. More...
 
Drake joint comparison methods.

These methods compare joint original with joint clone.

Since these methods are intended to compare a clone, an exact match is performed. This method will only return true if the provided clone joint is exactly the same as the provided original joint.

bool CompareDrakeJointToClone (const DrakeJoint &original, const DrakeJoint &clone)
 
bool CompareFixedJointToClone (const FixedJoint &original, const FixedJoint &other)
 
bool CompareHelicalJointToClone (const HelicalJoint &original, const HelicalJoint &clone)
 
bool ComparePrismaticJointToClone (const PrismaticJoint &original, const PrismaticJoint &clone)
 
bool CompareQuaternionBallJointToClone (const QuaternionBallJoint &original, const QuaternionBallJoint &clone)
 
bool CompareQuaternionFloatingJointToClone (const QuaternionFloatingJoint &original, const QuaternionFloatingJoint &clone)
 
bool CompareRevoluteJointToClone (const RevoluteJoint &original, const RevoluteJoint &clone)
 
bool CompareRollPitchYawFloatingJointToClone (const RollPitchYawFloatingJoint &original, const RollPitchYawFloatingJoint &clone)
 
template<typename Derived >
bool CompareFixedAxisOneDofJointToClone (const FixedAxisOneDoFJoint< Derived > &original, const FixedAxisOneDoFJoint< Derived > &clone)
 

Typedef Documentation

◆ BodyIndex

using BodyIndex = TypeSafeIndex<class BodyTag>

Type used to identify bodies by index in a multibody tree system.

◆ ForceElementIndex

using ForceElementIndex = TypeSafeIndex<class ForceElementTag>

Type used to identify force elements by index within a multibody tree system.

◆ FrameIndex

using FrameIndex = TypeSafeIndex<class FrameTag>

Type used to identify frames by index in a multibody tree system.

◆ JointActuatorIndex

using JointActuatorIndex = TypeSafeIndex<class JointActuatorElementTag>

Type used to identify actuators by index within a multibody tree system.

◆ JointIndex

using JointIndex = TypeSafeIndex<class JointElementTag>

Type used to identify joints by index within a multibody tree system.

◆ ModelInstanceIndex

using ModelInstanceIndex = TypeSafeIndex<class ModelInstanceTag>

Type used to identify model instances by index within a multibody tree system.

◆ MultibodyTree

Public alias to internal MultibodyTree.

Warning
This alias will soon be deprecated.

Enumeration Type Documentation

◆ JacobianWrtVariable

enum JacobianWrtVariable
strong

Enumeration that distinguishes between flavors of Jacobians based on the variable with respect to which they are taken.

Enumerator
kQDot 
kV 

J = ∂V/∂q̇

J = ∂V/∂v

Function Documentation

◆ AddFlatTerrainToWorld()

void AddFlatTerrainToWorld ( RigidBodyTreed tree,
double  box_size = 1000,
double  box_depth = 10 
)

Adds a box-shaped terrain to tree.

This directly modifies the existing world rigid body within tree and thus does not need to return a model_instance_id value.

Two opposite corners of the resulting axis-aligned box are: (box_size / 2, box_size / 2, 0) and (-box_size / 2, -box_size / 2, -box_depth).

Parameters
[in]treeThe RigidBodyTreed to which to add the terrain.
[in]box_sizeThe length and width of the terrain aligned with the world's X and Y axes.
[in]box_depthThe depth of the terrain aligned with the world's Z axis. Note that regardless of how deep the terrain is, the top surface of the terrain will be at Z = 0.

◆ ApproximateBoundedNormByLinearConstraints()

void drake::multibody::ApproximateBoundedNormByLinearConstraints ( const Eigen::Ref< const Vector3< symbolic::Expression >> &  x,
double  c,
solvers::MathematicalProgram prog 
)

◆ CalcContactFrictionFromSurfaceProperties()

CoulombFriction<T> drake::multibody::CalcContactFrictionFromSurfaceProperties ( const CoulombFriction< T > &  surface_properties1,
const CoulombFriction< T > &  surface_properties2 
)

Given the surface properties of two different surfaces, this method computes the Coulomb's law coefficients of friction characterizing the interaction by friction of the given surface pair.

The surface properties are specified by individual Coulomb's law coefficients of friction. As outlined in the class's documentation for CoulombFriction, friction coefficients characterize a surface pair and not individual surfaces. However, we find it useful in practice to associate the abstract idea of friction coefficients to a single surface. Please refer to the documentation for CoulombFriction for details on this topic.

More specifically, this method computes the contact coefficients for the given surface pair as:

  μ = 2μₘμₙ/(μₘ + μₙ)

where the operation above is performed separately on the static and dynamic friction coefficients.

Parameters
[in]surface_properties1Surface properties for surface 1. Specified as an individual set of Coulomb's law coefficients of friction.
[in]surface_properties2Surface properties for surface 2. Specified as an individual set of Coulomb's law coefficients of friction.
Returns
the combined friction coefficients for the interacting surfaces.

◆ CompareAutoDiffVectors()

std::enable_if< std::is_same<typename DerivedA::Scalar, typename DerivedB::Scalar>::value && std::is_same<typename DerivedA::Scalar, AutoDiffXd>::value>::type drake::multibody::CompareAutoDiffVectors ( const Eigen::MatrixBase< DerivedA > &  a,
const Eigen::MatrixBase< DerivedB > &  b,
double  tol 
)

Compares if two eigen matrices of AutoDiff have the same values and gradients.

◆ CompareDrakeJointToClone()

bool CompareDrakeJointToClone ( const DrakeJoint original,
const DrakeJoint clone 
)

◆ CompareFixedAxisOneDofJointToClone()

bool drake::multibody::CompareFixedAxisOneDofJointToClone ( const FixedAxisOneDoFJoint< Derived > &  original,
const FixedAxisOneDoFJoint< Derived > &  clone 
)

◆ CompareFixedJointToClone()

bool CompareFixedJointToClone ( const FixedJoint original,
const FixedJoint other 
)

◆ CompareHelicalJointToClone()

bool CompareHelicalJointToClone ( const HelicalJoint original,
const HelicalJoint clone 
)

◆ ComparePrismaticJointToClone()

bool ComparePrismaticJointToClone ( const PrismaticJoint original,
const PrismaticJoint clone 
)

◆ CompareQuaternionBallJointToClone()

bool CompareQuaternionBallJointToClone ( const QuaternionBallJoint original,
const QuaternionBallJoint clone 
)

◆ CompareQuaternionFloatingJointToClone()

bool CompareQuaternionFloatingJointToClone ( const QuaternionFloatingJoint original,
const QuaternionFloatingJoint clone 
)

◆ CompareRevoluteJointToClone()

bool CompareRevoluteJointToClone ( const RevoluteJoint original,
const RevoluteJoint clone 
)

◆ CompareRollPitchYawFloatingJointToClone()

bool CompareRollPitchYawFloatingJointToClone ( const RollPitchYawFloatingJoint original,
const RollPitchYawFloatingJoint clone 
)

◆ ConstructIiwaPlant()

std::unique_ptr< MultibodyPlant< double > > ConstructIiwaPlant ( const std::string &  iiwa_sdf_name,
double  time_step 
)

Constructs a MultibodyPlant consisting of an Iiwa robot.

◆ ConstructTwoFreeBodies()

std::unique_ptr< MultibodyTree< T > > ConstructTwoFreeBodies ( )

Constructs a MultibodyTree consisting of two free bodies.

◆ ConstructTwoFreeBodies< AutoDiffXd >()

◆ ConstructTwoFreeBodies< double >()

◆ ConstructTwoFreeBodiesPlant()

std::unique_ptr< MultibodyPlant< T > > ConstructTwoFreeBodiesPlant ( )

Constructs a MultibodyPlant consisting of two free bodies.

◆ ConstructTwoFreeBodiesPlant< AutoDiffXd >()

◆ ConstructTwoFreeBodiesPlant< double >()

◆ CreateLoadRobotMessage()

lcmt_viewer_load_robot CreateLoadRobotMessage ( const RigidBodyTree< double > &  tree)

Creates and returns an lcmt_viewer_load_robot message containing the visual geometries from the provided RigidBodyTree.

Note that this includes any visual geometries attached to the world body.

Instantiated templates for the following ScalarTypes are provided:

  • double

They are already available to link against in the containing library.

◆ CreateLoadRobotMessage< double >()

template lcmt_viewer_load_robot drake::multibody::CreateLoadRobotMessage< double > ( const RigidBodyTree< double > &  tree)

◆ default_model_instance()

ModelInstanceIndex drake::multibody::default_model_instance ( )
inline

Returns the model instance which contains all tree elements with no explicit model instance specified.

◆ GTEST_TEST()

drake::multibody::GTEST_TEST ( InverseKinematicsTest  ,
ConstructorWithJointLimits   
)

◆ operator+() [1/3]

SpatialForce<T> drake::multibody::operator+ ( const SpatialForce< T > &  F1_Sp_E,
const SpatialForce< T > &  F2_Sp_E 
)
inline

Computes the resultant spatial force as the addition of two spatial forces F1_Sp_E and F2_Sp_E on a same system or body S, at the same point P and expressed in the same frame E.

Return values
Fr_Sp_EThe resultant spatial force on system or body S from combining F1_Sp_E and F2_Sp_E, applied at the same point P and in the same expressed-in frame E as the operand spatial forces.

◆ operator+() [2/3]

SpatialMomentum<T> drake::multibody::operator+ ( const SpatialMomentum< T > &  L1_NSp_E,
const SpatialMomentum< T > &  L2_NSp_E 
)
inline

Computes the resultant spatial momentum as the addition of two spatial momenta L1_NSp_E and L2_NSp_E on a same system S, about the same point P and expressed in the same frame E.

Return values
Lc_NSp_EThe combined spatial momentum of system S from combining L1_NSp_E and L2_NSp_E, applied about the same point P, and in the same expressed-in frame E as the operand spatial momenta.

◆ operator+() [3/3]

SpatialVelocity<T> drake::multibody::operator+ ( const SpatialVelocity< T > &  V_MAb_E,
const SpatialVelocity< T > &  V_AB_E 
)
inline

Performs the addition of two spatial velocities.

This operator returns the spatial velocity that results from adding the operands as if they were 6-dimensional vectors. In other words, the resulting spatial velocity contains a rotational component which is the 3-dimensional addition of the operand's rotational components and a translational component which is the 3-dimensional addition of the operand's translational components.

The addition of two spatial velocities has a clear physical meaning but can only be performed if the operands meet strict conditions. In addition the the usual requirement of common expressed-in frames, both spatial velocities must be for frames with the same origin point. The general idea is that if frame A has a spatial velocity with respect to M, and frame B has a spatial velocity with respect to A, we want to "compose" them so that we get frame B's spatial velocity in M. But that can't be done directly since frames A and B don't have the same origin. So:

Given the velocity V_MA_E of a frame A in a measured-in frame M, and the velocity V_AB_E of a frame B measured in frame A (both expressed in a common frame E), we can calculate V_MB_E as their sum after shifting A's velocity to point Bo:

  V_MB_E = V_MA_E.Shift(p_AB_E) + V_AB_E

where p_AB_E is the position vector from A's origin to B's origin, expressed in E. This shift can also be thought of as yielding the spatial velocity of a new frame Ab, which is an offset frame rigidly aligned with A, but with its origin shifted to B's origin:

  V_MAb_E = V_MA_E.Shift(p_AB_E)
  V_MB_E = V_MAb_E + V_AB_E

The addition in the last expression is what is carried out by this operator; the caller must have already performed the necessary shift.

◆ operator-()

SpatialVelocity<T> drake::multibody::operator- ( const SpatialVelocity< T > &  V_MB_E,
const SpatialVelocity< T > &  V_MAb_E 
)
inline

The addition of two spatial velocities relates to the composition of the spatial velocities for two frames given we know the relative spatial velocity between them, see operator+(const SpatialVelocity<T>&, const SpatialVelocity<T>&) for further details.

Mathematically, operator-(v1, v2) is equivalent ot operator+(v1, -v2).

Physically, the subtraction operation allow us to compute the relative velocity between two frames. As an example, consider having the the spatial velocities V_MA and V_MB of two frames A and B respectively measured in the same frame M. The velocity of B in A can be obtained as:

  V_AB_E = V_MB_E - V_MAb_E = V_AB_E = V_MB_E - V_MA_E.Shift(p_AB_E)

where we have expressed all quantities in a common frame E. Notice that, as explained in the documentation for operator+(const SpatialVelocity<T>&, const SpatialVelocity<T>&) a shift operation with SpatialVelocity::Shift() operation is needed.

◆ operator<<()

std::ostream& drake::multibody::operator<< ( std::ostream &  out,
const PackageMap package_map 
)

◆ QuaternionToVectorWxyz()

Eigen::Vector4d QuaternionToVectorWxyz ( const Eigen::Quaterniond &  q)

Convert an Eigen::Quaternion to a vector 4d in the order (w, x, y, z).

◆ TEST_F() [1/17]

drake::multibody::TEST_F ( RigidBodyTreeKinematicsTests  ,
TestDoKinematicWithValidCache   
)

◆ TEST_F() [2/17]

drake::multibody::TEST_F ( RigidBodyTreeKinematicsTests  ,
TestDoKinematicWithBadCache1   
)

◆ TEST_F() [3/17]

drake::multibody::TEST_F ( RigidBodyTreeKinematicsTests  ,
TestDoKinematicWithBadCache2   
)

◆ TEST_F() [4/17]

drake::multibody::TEST_F ( TwoFreeBodiesTest  ,
PositionConstraint   
)

◆ TEST_F() [5/17]

drake::multibody::TEST_F ( TwoFreeBodiesTest  ,
OrientationConstraint   
)

◆ TEST_F() [6/17]

drake::multibody::TEST_F ( TwoFreeBodiesTest  ,
GazeTargetConstraint   
)

◆ TEST_F() [7/17]

drake::multibody::TEST_F ( TwoFreeBodiesTest  ,
AngleBetweenVectorsConstraint   
)

◆ TEST_F() [8/17]

drake::multibody::TEST_F ( AcrobotTests  ,
PoseTests   
)

◆ TEST_F() [9/17]

drake::multibody::TEST_F ( AcrobotTests  ,
SpatialVelocityTests   
)

◆ TEST_F() [10/17]

drake::multibody::TEST_F ( RBTDifferentialKinematicsHelperTest  ,
RPYPoseTest   
)

◆ TEST_F() [11/17]

drake::multibody::TEST_F ( RBTDifferentialKinematicsHelperTest  ,
RPYTwistInWorldAlignedBodyTest   
)

◆ TEST_F() [12/17]

drake::multibody::TEST_F ( RBTDifferentialKinematicsHelperTest  ,
RPYJacobianTest   
)

◆ TEST_F() [13/17]

drake::multibody::TEST_F ( RBTDifferentialKinematicsHelperTest  ,
RPYJacobianDotTimeVTest   
)

◆ TEST_F() [14/17]

drake::multibody::TEST_F ( RBTDifferentialKinematicsHelperTest  ,
QuatPoseTest   
)

◆ TEST_F() [15/17]

drake::multibody::TEST_F ( RBTDifferentialKinematicsHelperTest  ,
QuatTwistInWorldAlignedBodyTest   
)

◆ TEST_F() [16/17]

drake::multibody::TEST_F ( RBTDifferentialKinematicsHelperTest  ,
QuatJacobianTest   
)

◆ TEST_F() [17/17]

drake::multibody::TEST_F ( RBTDifferentialKinematicsHelperTest  ,
QuatJacobianDotTimeVTest   
)

◆ Vector4ToQuaternion()

Eigen::Quaterniond drake::multibody::Vector4ToQuaternion ( const Eigen::Ref< const Eigen::Vector4d > &  q)

◆ world_index()

BodyIndex drake::multibody::world_index ( )
inline

For every MultibodyTree the world body always has this unique index and it is always zero.

◆ world_model_instance()

ModelInstanceIndex drake::multibody::world_model_instance ( )
inline

Returns the model instance containing the world body.

For every MultibodyTree the world body always has this unique model instance and it is always zero (as described in #3088).