Drake
drake::multibody Namespace Reference

benchmarks

collision

constraint

detail

internal

joints

math

multibody_plant

parsers

test

test_utilities

## Classes

Temporary result from AddMultibodyPlantSceneGraph. More...

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...

struct  ExternallyAppliedSpatialForce

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  IiwaKinematicConstraintTest

class  ImplicitStribeckSolver

struct  ImplicitStribeckSolverIterationStats
Struct used to store information about the iteration process performed by ImplicitStribeckSolver. More...

struct  ImplicitStribeckSolverParameters
These are the parameters controlling the iteration process of the ImplicitStribeckSolver solver. 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  MinimumDistanceConstraint
Constrain that the pairwise distance between objects should be no smaller than a positive threshold. More...

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  RevoluteJoint
This Joint allows two bodies to rotate relatively to one another around a common axis. More...

class  RevoluteSpring
This ForceElement models a torsional spring attached to a RevoluteJoint and applies a torque to that joint. 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  TwoFreeBodiesConstraintTest

class  TwoFreeSpheresTest

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

using MinimumDistancePenaltyFunction = std::function< void(double x, double *penalty, double *dpenalty_dx)>
Computes the penalty function γ(x) and its derivatives dγ(x)/dx, where x is the scaled (and shifted) signed distance (x = distance / distance_threshold. More...

template<typename T >
using AccelerationKinematicsCache = internal::AccelerationKinematicsCache< T >
WARNING: This will be removed on or around 2019/03/01. More...

template<typename T >
using ArticulatedBodyInertiaCache = internal::ArticulatedBodyInertiaCache< T >
WARNING: This will be removed on or around 2019/03/01. More...

template<typename T >
using Mobilizer = internal::Mobilizer< T >
WARNING: This will be removed on or around 2019/03/01. More...

template<typename T , int A, int B>
using MobilizerImpl = internal::MobilizerImpl< T, A, B >
WARNING: This will be removed on or around 2019/03/01. More...

template<typename T >
using MultibodyTree = internal::MultibodyTree< T >
Deprecated 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...

typedef internal::MobilizerIndex MobilizerIndex
WARNING: This will be removed on or around 2019/03/01. More...

typedef internal::BodyNodeIndex BodyNodeIndex
WARNING: This will be removed on or around 2019/03/01. 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...

template<typename T >
using MultibodyTreeSystem = internal::MultibodyTreeSystem< T >
WARNING: This will be removed on or around 2019/03/01. More...

typedef internal::BodyTopology BodyTopology
WARNING: This will be removed on or around 2019/03/01. More...

typedef internal::FrameTopology FrameTopology
WARNING: This will be removed on or around 2019/03/01. More...

typedef internal::MobilizerTopology MobilizerTopology
WARNING: This will be removed on or around 2019/03/01. More...

typedef internal::ForceElementTopology ForceElementTopology
WARNING: This will be removed on or around 2019/03/01. More...

typedef internal::JointActuatorTopology JointActuatorTopology
WARNING: This will be removed on or around 2019/03/01. More...

typedef internal::BodyNodeTopology BodyNodeTopology
WARNING: This will be removed on or around 2019/03/01. More...

typedef internal::MultibodyTreeTopology MultibodyTreeTopology
WARNING: This will be removed on or around 2019/03/01. More...

template<typename T >
using PositionKinematicsCache = internal::PositionKinematicsCache< T >
WARNING: This will be removed on or around 2019/03/01. More...

template<typename T >
using PrismaticMobilizer = internal::PrismaticMobilizer< T >
WARNING: This will be removed on or around 2019/03/01. More...

template<typename T >
using QuaternionFloatingMobilizer = internal::QuaternionFloatingMobilizer< T >
WARNING: This will be removed on or around 2019/03/01. More...

template<typename T >
using RevoluteMobilizer = internal::RevoluteMobilizer< T >
WARNING: This will be removed on or around 2019/03/01. More...

template<typename T >
using SpaceXYZMobilizer = internal::SpaceXYZMobilizer< T >
WARNING: This will be removed on or around 2019/03/01. More...

template<typename T >
using VelocityKinematicsCache = internal::VelocityKinematicsCache< T >
WARNING: This will be removed on or around 2019/03/01. More...

template<typename T >
using WeldMobilizer = internal::WeldMobilizer< T >
WARNING: This will be removed on or around 2019/03/01. More...

## Enumerations

enum  ImplicitStribeckSolverResult { kSuccess = 0, kMaxIterationsReached = 1, kLinearSolverFailed = 2 }
The result from ImplicitStribeckSolver::SolveWithGuess() used to report the success or failure of the solver. More...

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 >
Creates and returns an lcmt_viewer_load_robot message containing the visual geometries from the provided RigidBodyTree. More...

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 (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)

void ExponentiallySmoothedHingeLoss (double x, double *penalty, double *dpenalty_dx)
A hinge loss function smoothed by exponential function. More...

void QuadraticallySmoothedHingeLoss (double x, double *penalty, double *dpenalty_dx)
A linear hinge loss, smoothed with a quadratic loss near the origin. More...

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)

TEST_F (TwoFreeSpheresTest, MinimalDistanceConstraintTest)

template<typename T >
void AddTwoFreeBodiesToPlant (MultibodyPlant< T > *model)

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 &file_path, 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< 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...

AutoDiffVecXd EvalMinimumDistanceConstraintAutoDiff (const systems::Context< AutoDiffXd > &context, const MultibodyPlant< AutoDiffXd > &plant, double minimum_distance, PenaltyType penalty_type)

void CheckMinimumDistanceConstraintEval (const MinimumDistanceConstraint &constraint, const Eigen::Ref< const AutoDiffVecXd > &x_autodiff, const MultibodyPlant< AutoDiffXd > &plant_autodiff, systems::Context< AutoDiffXd > *context_autodiff, double tol, PenaltyType penalty_type)

template<typename T >
Vector3< T > ComputeCollisionSphereCenterPosition (const Vector3< T > &p_WB, const Quaternion< T > &quat_WB, const Eigen::Isometry3d &X_BS)

TEST_F (TwoFreeSpheresMinimumDistanceTest, ExponentialPenalty)

GTEST_TEST (MinimumDistanceConstraintTest, MultibodyPlantWithouthGeometrySource)

TEST_F (TwoFreeSpheresTest, NonpositiveMinimalDistance)

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...

template<typename T >
AddMultibodyPlantSceneGraphResult< T > AddMultibodyPlantSceneGraph (systems::DiagramBuilder< T > *builder, std::unique_ptr< MultibodyPlant< T >> plant=nullptr, std::unique_ptr< geometry::SceneGraph< T >> scene_graph=nullptr)
Adds a MultibodyPlant and a SceneGraph instance to a diagram builder, connecting the geometry ports. More...

template AddMultibodyPlantSceneGraphResult< doubleAddMultibodyPlantSceneGraph (systems::DiagramBuilder< double > *builder, std::unique_ptr< MultibodyPlant< double >> plant, std::unique_ptr< geometry::SceneGraph< double >> scene_graph)

template AddMultibodyPlantSceneGraphResult< AutoDiffXdAddMultibodyPlantSceneGraph (systems::DiagramBuilder< AutoDiffXd > *builder, std::unique_ptr< MultibodyPlant< AutoDiffXd >> plant, std::unique_ptr< geometry::SceneGraph< AutoDiffXd >> scene_graph)

BodyIndex world_index ()
For every MultibodyTree the world body always has this unique index and it is always zero. 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...

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)

## Variables

const double kEps = std::numeric_limits<double>::epsilon()

## ◆ AccelerationKinematicsCache

WARNING: This will be removed on or around 2019/03/01.

## ◆ ArticulatedBodyInertiaCache

WARNING: This will be removed on or around 2019/03/01.

## ◆ BodyIndex

 using BodyIndex = TypeSafeIndex

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

## ◆ BodyNodeIndex

 typedef internal::BodyNodeIndex BodyNodeIndex

WARNING: This will be removed on or around 2019/03/01.

(Deprecated.)

Deprecated:
"This public alias is deprecated, and will be removed around 2019/03/01."

## ◆ BodyNodeTopology

WARNING: This will be removed on or around 2019/03/01.

(Deprecated.)

Deprecated:
"This public alias is deprecated, and will be removed around 2019/03/01."

## ◆ BodyTopology

 typedef internal::BodyTopology BodyTopology

WARNING: This will be removed on or around 2019/03/01.

(Deprecated.)

Deprecated:
"This public alias is deprecated, and will be removed around 2019/03/01."

## ◆ ForceElementIndex

 using ForceElementIndex = TypeSafeIndex

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

## ◆ ForceElementTopology

WARNING: This will be removed on or around 2019/03/01.

(Deprecated.)

Deprecated:
"This public alias is deprecated, and will be removed around 2019/03/01."

## ◆ FrameIndex

 using FrameIndex = TypeSafeIndex

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

## ◆ FrameTopology

 typedef internal::FrameTopology FrameTopology

WARNING: This will be removed on or around 2019/03/01.

(Deprecated.)

Deprecated:
"This public alias is deprecated, and will be removed around 2019/03/01."

## ◆ JointActuatorIndex

 using JointActuatorIndex = TypeSafeIndex

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

## ◆ JointActuatorTopology

WARNING: This will be removed on or around 2019/03/01.

(Deprecated.)

Deprecated:
"This public alias is deprecated, and will be removed around 2019/03/01."

## ◆ JointIndex

 using JointIndex = TypeSafeIndex

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

## ◆ MinimumDistancePenaltyFunction

 using MinimumDistancePenaltyFunction = std::function

Computes the penalty function γ(x) and its derivatives dγ(x)/dx, where x is the scaled (and shifted) signed distance (x = distance / distance_threshold.

• 1). This function is used by MinimumDistanceConstraint, in which we impose the constraint that the pairwise distance are all no smaller than a distance threshold. We do this with the constraint ∑ᵢ γ(dᵢ / distance_threshold - 1) = 0 where dᵢ is the signed distance between the i'th pair of geometries.

## ◆ Mobilizer

 using Mobilizer = internal::Mobilizer

WARNING: This will be removed on or around 2019/03/01.

## ◆ MobilizerImpl

 using MobilizerImpl = internal::MobilizerImpl

WARNING: This will be removed on or around 2019/03/01.

## ◆ MobilizerIndex

WARNING: This will be removed on or around 2019/03/01.

(Deprecated.)

Deprecated:
"This public alias is deprecated, and will be removed around 2019/03/01."

## ◆ MobilizerTopology

WARNING: This will be removed on or around 2019/03/01.

(Deprecated.)

Deprecated:
"This public alias is deprecated, and will be removed around 2019/03/01."

## ◆ ModelInstanceIndex

 using ModelInstanceIndex = TypeSafeIndex

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

## ◆ MultibodyTree

 using MultibodyTree = internal::MultibodyTree

Deprecated public alias to internal MultibodyTree.

Warning
This alias will be removed 2019-03-01.

## ◆ MultibodyTreeSystem

 using MultibodyTreeSystem = internal::MultibodyTreeSystem

WARNING: This will be removed on or around 2019/03/01.

## ◆ MultibodyTreeTopology

WARNING: This will be removed on or around 2019/03/01.

(Deprecated.)

Deprecated:
"This public alias is deprecated, and will be removed around 2019/03/01."

## ◆ PositionKinematicsCache

WARNING: This will be removed on or around 2019/03/01.

## ◆ PrismaticMobilizer

 using PrismaticMobilizer = internal::PrismaticMobilizer

WARNING: This will be removed on or around 2019/03/01.

## ◆ QuaternionFloatingMobilizer

WARNING: This will be removed on or around 2019/03/01.

## ◆ RevoluteMobilizer

 using RevoluteMobilizer = internal::RevoluteMobilizer

WARNING: This will be removed on or around 2019/03/01.

## ◆ SpaceXYZMobilizer

 using SpaceXYZMobilizer = internal::SpaceXYZMobilizer

WARNING: This will be removed on or around 2019/03/01.

## ◆ VelocityKinematicsCache

WARNING: This will be removed on or around 2019/03/01.

## ◆ WeldMobilizer

 using WeldMobilizer = internal::WeldMobilizer

WARNING: This will be removed on or around 2019/03/01.

## ◆ ImplicitStribeckSolverResult

 strong

The result from ImplicitStribeckSolver::SolveWithGuess() used to report the success or failure of the solver.

Enumerator
kSuccess

Successful computation.

kMaxIterationsReached

The maximum number of iterations was reached.

kLinearSolverFailed

The linear solver used within the Newton-Raphson loop failed.

This might be caused by a divergent iteration that led to an invalid Jacobian matrix.

## ◆ 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

 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] tree The RigidBodyTreed to which to add the terrain. [in] box_size The length and width of the terrain aligned with the world's X and Y axes. [in] box_depth The 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.

 AddMultibodyPlantSceneGraphResult< T > AddMultibodyPlantSceneGraph ( systems::DiagramBuilder< T > * builder, std::unique_ptr< MultibodyPlant< T >> plant = nullptr, std::unique_ptr< geometry::SceneGraph< T >> scene_graph = nullptr )

Adds a MultibodyPlant and a SceneGraph instance to a diagram builder, connecting the geometry ports.

Parameters
 [in,out] builder Builder to add to. [in] plant (optional) Constructed plant (e.g. for using a discrete plant). By default, a continuous plant is used. [in] scene_graph (optional) Constructed scene graph. If none is provided, one will be created and used.
Returns
Pair of the registered plant and scene graph.
Precondition
builder must be non-null.

Recommended usages:

Assign to a MultibodyPlant reference (ignoring the SceneGraph):

plant.DoFoo(...);

This flavor is the simplest, when the SceneGraph is not explicitly needed. (It can always be retrieved later via GetSubsystemByName("scene_graph").)

Assign to auto, and use the named public fields:

items.plant.DoFoo(...);
items.scene_graph.DoBar(...);

or

MultibodyPlant<double>& plant = items.plant;
SceneGraph<double>& scene_graph = items.scene_graph;
...
plant.DoFoo(...);
scene_graph.DoBar(...);

This is the easiest way to use both the plant and scene_graph.

MultibodyPlant<double>* plant{};
SceneGraph<double>* scene_graph{};
plant->DoFoo(...);
scene_graph->DoBar(...);

This flavor is most useful when the pointers are class member fields (and so perhaps cannot be references).

 template AddMultibodyPlantSceneGraphResult drake::multibody::AddMultibodyPlantSceneGraph ( systems::DiagramBuilder< double > * builder, std::unique_ptr< MultibodyPlant< double >> plant, std::unique_ptr< geometry::SceneGraph< double >> scene_graph )

 template AddMultibodyPlantSceneGraphResult drake::multibody::AddMultibodyPlantSceneGraph ( systems::DiagramBuilder< AutoDiffXd > * builder, std::unique_ptr< MultibodyPlant< AutoDiffXd >> plant, std::unique_ptr< geometry::SceneGraph< AutoDiffXd >> scene_graph )

 void drake::multibody::AddTwoFreeBodiesToPlant ( MultibodyPlant< T > * model )

## ◆ ApproximateBoundedNormByLinearConstraints()

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

## ◆ CalcContactFrictionFromSurfaceProperties()

 CoulombFriction 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_properties1 Surface properties for surface 1. Specified as an individual set of Coulomb's law coefficients of friction. [in] surface_properties2 Surface 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.

## ◆ CheckMinimumDistanceConstraintEval()

 void drake::multibody::CheckMinimumDistanceConstraintEval ( const MinimumDistanceConstraint & constraint, const Eigen::Ref< const AutoDiffVecXd > & x_autodiff, const MultibodyPlant< AutoDiffXd > & plant_autodiff, systems::Context< AutoDiffXd > * context_autodiff, double tol, PenaltyType penalty_type )

## ◆ CompareAutoDiffVectors()

 std::enable_if< std::is_same::value && std::is_same::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 )

## ◆ ComputeCollisionSphereCenterPosition()

 Vector3 drake::multibody::ComputeCollisionSphereCenterPosition ( const Vector3< T > & p_WB, const Quaternion< T > & quat_WB, const Eigen::Isometry3d & X_BS )

## ◆ ConstructIiwaPlant()

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

Constructs a MultibodyPlant consisting of an Iiwa robot.

## ◆ ConstructTwoFreeBodiesPlant()

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

Constructs a MultibodyPlant consisting of two free bodies.

## ◆ ConstructTwoFreeBodiesPlant< AutoDiffXd >()

 template std::unique_ptr > drake::multibody::ConstructTwoFreeBodiesPlant< AutoDiffXd > ( )

## ◆ ConstructTwoFreeBodiesPlant< double >()

 template std::unique_ptr > drake::multibody::ConstructTwoFreeBodiesPlant< double > ( )

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

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

## ◆ default_model_instance()

 ModelInstanceIndex drake::multibody::default_model_instance ( )

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

## ◆ EvalMinimumDistanceConstraintAutoDiff()

 AutoDiffVecXd drake::multibody::EvalMinimumDistanceConstraintAutoDiff ( const systems::Context< AutoDiffXd > & context, const MultibodyPlant< AutoDiffXd > & plant, double minimum_distance, PenaltyType penalty_type )

## ◆ ExponentiallySmoothedHingeLoss()

 void ExponentiallySmoothedHingeLoss ( double x, double * penalty, double * dpenalty_dx )

A hinge loss function smoothed by exponential function.

This loss function is differentiable everywhere. The fomulation is described in section II.C of [2] The penalty is

       ⎧ 0            if x ≥ 0
γ(x) = ⎨
⎩  -x exp(1/x) if x < 0.


[2] "Whole-body Motion Planning with Centroidal Dynamics and Full Kinematics" by Hongkai Dai, Andres Valenzuela and Russ Tedrake, IEEE-RAS International Conference on Humanoid Robots, 2014.

## ◆ GTEST_TEST() [1/2]

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

## ◆ GTEST_TEST() [2/2]

 drake::multibody::GTEST_TEST ( MinimumDistanceConstraintTest , MultibodyPlantWithouthGeometrySource )

## ◆ operator+() [1/3]

 SpatialForce drake::multibody::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.

Return values
 Fr_Sp_E The 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 drake::multibody::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.

Return values
 Lc_NSp_E The 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 drake::multibody::operator+ ( const SpatialVelocity< T > & V_MAb_E, const SpatialVelocity< T > & V_AB_E )

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 drake::multibody::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.

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 )

 void QuadraticallySmoothedHingeLoss ( double x, double * penalty, double * dpenalty_dx )

A linear hinge loss, smoothed with a quadratic loss near the origin.

The formulation is in equation (6) of [1]. The penalty is

       ⎧  0        if x ≥ 0
γ(x) = ⎨  x²/2     if -1 < x < 0
⎩  -0.5 - x if x ≤ -1.


[1] "Loss Functions for Preference Levels: Regression with Discrete Ordered Labels." by Jason Rennie and Nathan Srebro, Proceedings of IJCAI multidisciplinary workshop on Advances in preference handling.

## ◆ 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/21]

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

## ◆ TEST_F() [2/21]

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

## ◆ TEST_F() [3/21]

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

## ◆ TEST_F() [4/21]

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

## ◆ TEST_F() [5/21]

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

## ◆ TEST_F() [6/21]

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

## ◆ TEST_F() [7/21]

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

## ◆ TEST_F() [8/21]

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

## ◆ TEST_F() [9/21]

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

## ◆ TEST_F() [10/21]

 drake::multibody::TEST_F ( TwoFreeSpheresTest , MinimalDistanceConstraintTest )

## ◆ TEST_F() [11/21]

 drake::multibody::TEST_F ( TwoFreeSpheresMinimumDistanceTest , ExponentialPenalty )

## ◆ TEST_F() [12/21]

 drake::multibody::TEST_F ( TwoFreeSpheresMinimumDistanceTest , QuadraticallySmoothedHingePenalty )

## ◆ TEST_F() [13/21]

 drake::multibody::TEST_F ( TwoFreeSpheresTest , NonpositiveMinimalDistance )

## ◆ TEST_F() [14/21]

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

## ◆ TEST_F() [15/21]

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

## ◆ TEST_F() [16/21]

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

## ◆ TEST_F() [17/21]

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

## ◆ TEST_F() [18/21]

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

## ◆ TEST_F() [19/21]

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

## ◆ TEST_F() [20/21]

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

## ◆ TEST_F() [21/21]

 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 ( )

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 ( )

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).

## ◆ kEps

 const double kEps = std::numeric_limits::epsilon()