pydrake.multibody.tree¶
Bindings for MultibodyTree and related components.

pydrake.multibody.tree.
Body
¶ alias of
pydrake.multibody.tree.Body_[float]

pydrake.multibody.tree.
BodyFrame
¶

template
pydrake.multibody.tree.
BodyFrame_
¶ Instantiations:
BodyFrame_[float]
,BodyFrame_[AutoDiffXd]
,BodyFrame_[Expression]

class
BodyFrame_[float]
¶ Bases:
pydrake.multibody.tree.Frame_[float]
A BodyFrame is a material Frame that serves as the unique reference frame for a Body.
Each Body B, regardless of whether it represents a rigid body or a flexible body, has a unique body frame for which we use the same symbol B (with meaning clear from context). The body frame is also referred to as a reference frame in the literature for flexible body mechanics modeling using the Finite Element Method. All properties of a body are defined with respect to its body frame, including its mass properties and attachment locations for joints, constraints, actuators, geometry and so on. Run time motion of the body is defined with respect to the motion of its body frame. We represent a body frame by a BodyFrame object that is created whenever a Body is constructed and is owned by the Body.
Note that the BodyFrame associated with a body does not necessarily need to be located at its center of mass nor does it need to be aligned with the body’s principal axes, although, in practice, it frequently is. For flexible bodies, BodyFrame provides a representation for the body’s reference frame. The flexible degrees of freedom associated with a flexible body describe the body’s deformation in this frame. Therefore, the motion of a flexible body is defined by the motion of its BodyFrame, or reference frame, plus the motion of the material points on the body with respect to its BodyFrame.
A BodyFrame and Body are tightly coupled concepts; neither makes sense without the other. Therefore, a BodyFrame instance is constructed in conjunction with its Body and cannot be constructed anywhere else. However, you can still access the frame associated with a body, see Body::body_frame(). This access is more than a convenience; you can use the BodyFrame to define other frames on the body and to attach other multibody elements to it.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.
 Template parameter

class

class
pydrake.multibody.tree.
BodyFrame_[AutoDiffXd]
¶ Bases:
pydrake.multibody.tree.Frame_[AutoDiffXd]
A BodyFrame is a material Frame that serves as the unique reference frame for a Body.
Each Body B, regardless of whether it represents a rigid body or a flexible body, has a unique body frame for which we use the same symbol B (with meaning clear from context). The body frame is also referred to as a reference frame in the literature for flexible body mechanics modeling using the Finite Element Method. All properties of a body are defined with respect to its body frame, including its mass properties and attachment locations for joints, constraints, actuators, geometry and so on. Run time motion of the body is defined with respect to the motion of its body frame. We represent a body frame by a BodyFrame object that is created whenever a Body is constructed and is owned by the Body.
Note that the BodyFrame associated with a body does not necessarily need to be located at its center of mass nor does it need to be aligned with the body’s principal axes, although, in practice, it frequently is. For flexible bodies, BodyFrame provides a representation for the body’s reference frame. The flexible degrees of freedom associated with a flexible body describe the body’s deformation in this frame. Therefore, the motion of a flexible body is defined by the motion of its BodyFrame, or reference frame, plus the motion of the material points on the body with respect to its BodyFrame.
A BodyFrame and Body are tightly coupled concepts; neither makes sense without the other. Therefore, a BodyFrame instance is constructed in conjunction with its Body and cannot be constructed anywhere else. However, you can still access the frame associated with a body, see Body::body_frame(). This access is more than a convenience; you can use the BodyFrame to define other frames on the body and to attach other multibody elements to it.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.
 Template parameter

class
pydrake.multibody.tree.
BodyFrame_[Expression]
¶ Bases:
pydrake.multibody.tree.Frame_[Expression]
A BodyFrame is a material Frame that serves as the unique reference frame for a Body.
Each Body B, regardless of whether it represents a rigid body or a flexible body, has a unique body frame for which we use the same symbol B (with meaning clear from context). The body frame is also referred to as a reference frame in the literature for flexible body mechanics modeling using the Finite Element Method. All properties of a body are defined with respect to its body frame, including its mass properties and attachment locations for joints, constraints, actuators, geometry and so on. Run time motion of the body is defined with respect to the motion of its body frame. We represent a body frame by a BodyFrame object that is created whenever a Body is constructed and is owned by the Body.
Note that the BodyFrame associated with a body does not necessarily need to be located at its center of mass nor does it need to be aligned with the body’s principal axes, although, in practice, it frequently is. For flexible bodies, BodyFrame provides a representation for the body’s reference frame. The flexible degrees of freedom associated with a flexible body describe the body’s deformation in this frame. Therefore, the motion of a flexible body is defined by the motion of its BodyFrame, or reference frame, plus the motion of the material points on the body with respect to its BodyFrame.
A BodyFrame and Body are tightly coupled concepts; neither makes sense without the other. Therefore, a BodyFrame instance is constructed in conjunction with its Body and cannot be constructed anywhere else. However, you can still access the frame associated with a body, see Body::body_frame(). This access is more than a convenience; you can use the BodyFrame to define other frames on the body and to attach other multibody elements to it.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.
 Template parameter

class
pydrake.multibody.tree.
BodyFrame_[float]
¶ Bases:
pydrake.multibody.tree.Frame_[float]
A BodyFrame is a material Frame that serves as the unique reference frame for a Body.
Each Body B, regardless of whether it represents a rigid body or a flexible body, has a unique body frame for which we use the same symbol B (with meaning clear from context). The body frame is also referred to as a reference frame in the literature for flexible body mechanics modeling using the Finite Element Method. All properties of a body are defined with respect to its body frame, including its mass properties and attachment locations for joints, constraints, actuators, geometry and so on. Run time motion of the body is defined with respect to the motion of its body frame. We represent a body frame by a BodyFrame object that is created whenever a Body is constructed and is owned by the Body.
Note that the BodyFrame associated with a body does not necessarily need to be located at its center of mass nor does it need to be aligned with the body’s principal axes, although, in practice, it frequently is. For flexible bodies, BodyFrame provides a representation for the body’s reference frame. The flexible degrees of freedom associated with a flexible body describe the body’s deformation in this frame. Therefore, the motion of a flexible body is defined by the motion of its BodyFrame, or reference frame, plus the motion of the material points on the body with respect to its BodyFrame.
A BodyFrame and Body are tightly coupled concepts; neither makes sense without the other. Therefore, a BodyFrame instance is constructed in conjunction with its Body and cannot be constructed anywhere else. However, you can still access the frame associated with a body, see Body::body_frame(). This access is more than a convenience; you can use the BodyFrame to define other frames on the body and to attach other multibody elements to it.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.
 Template parameter

class
pydrake.multibody.tree.
BodyIndex
¶ Type used to identify bodies by index in a multibody tree system.

__init__
(self: pydrake.multibody.tree.BodyIndex, arg0: int) → None¶ Default constructor; the result is an invalid index. This only exists to serve applications which require a default constructor.

is_valid
(self: pydrake.multibody.tree.BodyIndex) → bool¶ Reports if the index is valid–the only operation on an invalid index that doesn’t throw an exception in Debug builds.


template
pydrake.multibody.tree.
Body_
¶ Instantiations:
Body_[float]
,Body_[AutoDiffXd]
,Body_[Expression]

class
Body_[float]
¶ %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. As an element or component of a MultibodyTree, a body is a MultibodyElement, and therefore it has a unique index of type BodyIndex within the multibody tree it belongs to.
A Body contains a unique BodyFrame; see BodyFrame class documentation for more information.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.

AddInForce
(self: pydrake.multibody.tree.Body_[float], context: pydrake.systems.framework.Context_[float], p_BP_E: numpy.ndarray[float64[3, 1]], F_Bp_E: pydrake.multibody.math.SpatialForce_[float], frame_E: pydrake.multibody.tree.Frame_[float], forces: drake::multibody::MultibodyForces<double>) → None¶ Adds the spatial force on
this
body B, applied at point P and expressed in a frame E intoforces
. Parameter
context
:  The context containing the current state of the model.
 Parameter
p_BP_E
:  The position of point P in B, expressed in a frame E.
 Parameter
F_Bp_E
:  The spatial force to be applied on body B at point P, expressed in frame E.
 Parameter
frame_E
:  The expressedin frame E.
 Parameter
forces
:  A multibody forces objects that on output will have
F_Bp_E
added.
Raises:  RuntimeError if
forces
is nullptr or if it is not consistent  with the model to which
this
body belongs.
 Parameter

AddInForceInWorld
(self: pydrake.multibody.tree.Body_[float], context: pydrake.systems.framework.Context_[float], F_Bo_W: pydrake.multibody.math.SpatialForce_[float], forces: drake::multibody::MultibodyForces<double>) → None¶ Adds the spatial force on
this
body B, applied at body B’s origin Bo and expressed in the world frame W intoforces
.

GetForceInWorld
(self: pydrake.multibody.tree.Body_[float], context: pydrake.systems.framework.Context_[float], forces: drake::multibody::MultibodyForces<double>) → pydrake.multibody.math.SpatialForce_[float]¶ Gets the sptatial force on
this
body B fromforces
as F_BBo_W: applied at body B’s origin Bo and expressed in world world frame W.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.

body_frame
(self: pydrake.multibody.tree.Body_[float]) → pydrake.multibody.tree.BodyFrame_[float]¶ Returns a const reference to the associated BodyFrame.

index
(self: pydrake.multibody.tree.Body_[float]) → pydrake.multibody.tree.BodyIndex¶

model_instance
(self: pydrake.multibody.tree.Body_[float]) → pydrake.multibody.tree.ModelInstanceIndex¶

name
(self: pydrake.multibody.tree.Body_[float]) → str¶ Gets the
name
associated withthis
body.
 Template parameter

class

class
pydrake.multibody.tree.
Body_[AutoDiffXd]
¶ %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. As an element or component of a MultibodyTree, a body is a MultibodyElement, and therefore it has a unique index of type BodyIndex within the multibody tree it belongs to.
A Body contains a unique BodyFrame; see BodyFrame class documentation for more information.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.

AddInForce
(self: pydrake.multibody.tree.Body_[AutoDiffXd], context: pydrake.systems.framework.Context_[AutoDiffXd], p_BP_E: numpy.ndarray[object[3, 1]], F_Bp_E: pydrake.multibody.math.SpatialForce_[AutoDiffXd], frame_E: pydrake.multibody.tree.Frame_[AutoDiffXd], forces: drake::multibody::MultibodyForces<Eigen::AutoDiffScalar<Eigen::Matrix<double, 1, 1, 0, 1, 1> > >) → None¶ Adds the spatial force on
this
body B, applied at point P and expressed in a frame E intoforces
. Parameter
context
:  The context containing the current state of the model.
 Parameter
p_BP_E
:  The position of point P in B, expressed in a frame E.
 Parameter
F_Bp_E
:  The spatial force to be applied on body B at point P, expressed in frame E.
 Parameter
frame_E
:  The expressedin frame E.
 Parameter
forces
:  A multibody forces objects that on output will have
F_Bp_E
added.
Raises:  RuntimeError if
forces
is nullptr or if it is not consistent  with the model to which
this
body belongs.
 Parameter

AddInForceInWorld
(self: pydrake.multibody.tree.Body_[AutoDiffXd], context: pydrake.systems.framework.Context_[AutoDiffXd], F_Bo_W: pydrake.multibody.math.SpatialForce_[AutoDiffXd], forces: drake::multibody::MultibodyForces<Eigen::AutoDiffScalar<Eigen::Matrix<double, 1, 1, 0, 1, 1> > >) → None¶ Adds the spatial force on
this
body B, applied at body B’s origin Bo and expressed in the world frame W intoforces
.

GetForceInWorld
(self: pydrake.multibody.tree.Body_[AutoDiffXd], context: pydrake.systems.framework.Context_[AutoDiffXd], forces: drake::multibody::MultibodyForces<Eigen::AutoDiffScalar<Eigen::Matrix<double, 1, 1, 0, 1, 1> > >) → pydrake.multibody.math.SpatialForce_[AutoDiffXd]¶ Gets the sptatial force on
this
body B fromforces
as F_BBo_W: applied at body B’s origin Bo and expressed in world world frame W.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.

body_frame
(self: pydrake.multibody.tree.Body_[AutoDiffXd]) → pydrake.multibody.tree.BodyFrame_[AutoDiffXd]¶ Returns a const reference to the associated BodyFrame.

index
(self: pydrake.multibody.tree.Body_[AutoDiffXd]) → pydrake.multibody.tree.BodyIndex¶

model_instance
(self: pydrake.multibody.tree.Body_[AutoDiffXd]) → pydrake.multibody.tree.ModelInstanceIndex¶

name
(self: pydrake.multibody.tree.Body_[AutoDiffXd]) → str¶ Gets the
name
associated withthis
body.
 Template parameter

class
pydrake.multibody.tree.
Body_[Expression]
¶ %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. As an element or component of a MultibodyTree, a body is a MultibodyElement, and therefore it has a unique index of type BodyIndex within the multibody tree it belongs to.
A Body contains a unique BodyFrame; see BodyFrame class documentation for more information.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.

AddInForce
(self: pydrake.multibody.tree.Body_[Expression], context: pydrake.systems.framework.Context_[Expression], p_BP_E: numpy.ndarray[object[3, 1]], F_Bp_E: pydrake.multibody.math.SpatialForce_[Expression], frame_E: pydrake.multibody.tree.Frame_[Expression], forces: drake::multibody::MultibodyForces<drake::symbolic::Expression>) → None¶ Adds the spatial force on
this
body B, applied at point P and expressed in a frame E intoforces
. Parameter
context
:  The context containing the current state of the model.
 Parameter
p_BP_E
:  The position of point P in B, expressed in a frame E.
 Parameter
F_Bp_E
:  The spatial force to be applied on body B at point P, expressed in frame E.
 Parameter
frame_E
:  The expressedin frame E.
 Parameter
forces
:  A multibody forces objects that on output will have
F_Bp_E
added.
Raises:  RuntimeError if
forces
is nullptr or if it is not consistent  with the model to which
this
body belongs.
 Parameter

AddInForceInWorld
(self: pydrake.multibody.tree.Body_[Expression], context: pydrake.systems.framework.Context_[Expression], F_Bo_W: pydrake.multibody.math.SpatialForce_[Expression], forces: drake::multibody::MultibodyForces<drake::symbolic::Expression>) → None¶ Adds the spatial force on
this
body B, applied at body B’s origin Bo and expressed in the world frame W intoforces
.

GetForceInWorld
(self: pydrake.multibody.tree.Body_[Expression], context: pydrake.systems.framework.Context_[Expression], forces: drake::multibody::MultibodyForces<drake::symbolic::Expression>) → pydrake.multibody.math.SpatialForce_[Expression]¶ Gets the sptatial force on
this
body B fromforces
as F_BBo_W: applied at body B’s origin Bo and expressed in world world frame W.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.

body_frame
(self: pydrake.multibody.tree.Body_[Expression]) → pydrake.multibody.tree.BodyFrame_[Expression]¶ Returns a const reference to the associated BodyFrame.

index
(self: pydrake.multibody.tree.Body_[Expression]) → pydrake.multibody.tree.BodyIndex¶

model_instance
(self: pydrake.multibody.tree.Body_[Expression]) → pydrake.multibody.tree.ModelInstanceIndex¶

name
(self: pydrake.multibody.tree.Body_[Expression]) → str¶ Gets the
name
associated withthis
body.
 Template parameter

class
pydrake.multibody.tree.
Body_[float]
¶ %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. As an element or component of a MultibodyTree, a body is a MultibodyElement, and therefore it has a unique index of type BodyIndex within the multibody tree it belongs to.
A Body contains a unique BodyFrame; see BodyFrame class documentation for more information.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.

AddInForce
(self: pydrake.multibody.tree.Body_[float], context: pydrake.systems.framework.Context_[float], p_BP_E: numpy.ndarray[float64[3, 1]], F_Bp_E: pydrake.multibody.math.SpatialForce_[float], frame_E: pydrake.multibody.tree.Frame_[float], forces: drake::multibody::MultibodyForces<double>) → None¶ Adds the spatial force on
this
body B, applied at point P and expressed in a frame E intoforces
. Parameter
context
:  The context containing the current state of the model.
 Parameter
p_BP_E
:  The position of point P in B, expressed in a frame E.
 Parameter
F_Bp_E
:  The spatial force to be applied on body B at point P, expressed in frame E.
 Parameter
frame_E
:  The expressedin frame E.
 Parameter
forces
:  A multibody forces objects that on output will have
F_Bp_E
added.
Raises:  RuntimeError if
forces
is nullptr or if it is not consistent  with the model to which
this
body belongs.
 Parameter

AddInForceInWorld
(self: pydrake.multibody.tree.Body_[float], context: pydrake.systems.framework.Context_[float], F_Bo_W: pydrake.multibody.math.SpatialForce_[float], forces: drake::multibody::MultibodyForces<double>) → None¶ Adds the spatial force on
this
body B, applied at body B’s origin Bo and expressed in the world frame W intoforces
.

GetForceInWorld
(self: pydrake.multibody.tree.Body_[float], context: pydrake.systems.framework.Context_[float], forces: drake::multibody::MultibodyForces<double>) → pydrake.multibody.math.SpatialForce_[float]¶ Gets the sptatial force on
this
body B fromforces
as F_BBo_W: applied at body B’s origin Bo and expressed in world world frame W.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.

body_frame
(self: pydrake.multibody.tree.Body_[float]) → pydrake.multibody.tree.BodyFrame_[float]¶ Returns a const reference to the associated BodyFrame.

index
(self: pydrake.multibody.tree.Body_[float]) → pydrake.multibody.tree.BodyIndex¶

model_instance
(self: pydrake.multibody.tree.Body_[float]) → pydrake.multibody.tree.ModelInstanceIndex¶

name
(self: pydrake.multibody.tree.Body_[float]) → str¶ Gets the
name
associated withthis
body.
 Template parameter

pydrake.multibody.tree.
FixedOffsetFrame
¶

template
pydrake.multibody.tree.
FixedOffsetFrame_
¶ Instantiations:
FixedOffsetFrame_[float]
,FixedOffsetFrame_[AutoDiffXd]
,FixedOffsetFrame_[Expression]

class
FixedOffsetFrame_[float]
¶ Bases:
pydrake.multibody.tree.Frame_[float]
%FixedOffsetFrame represents a material frame F whose pose is fixed with respect to a parent material frame P. The pose offset is given by a spatial transform
X_PF
, which is constant after construction. For instance, we could rigidly attach a frame F to move with a rigid body B at a fixed poseX_BF
, where B is the BodyFrame associated with body B. Thus, the World frame poseX_WF
of a FixedOffsetFrame F depends only on the World frame poseX_WP
of its parent P, and the constant poseX_PF
, withX_WF=X_WP*X_PF
.For more information about spatial transforms, see multibody_spatial_pose.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.

__init__
(*args, **kwargs)¶ Overloaded function.
 __init__(self: pydrake.multibody.tree.FixedOffsetFrame_[float], name: str, P: pydrake.multibody.tree.Frame_[float], X_PF: pydrake.math.RigidTransform_[float], model_instance: Optional[pydrake.multibody.tree.ModelInstanceIndex] = None) > None
Creates a material Frame F whose pose is fixed with respect to its parent material Frame P. The pose is given by a spatial transform
X_PF
; see class documentation for more information. Parameter
name
:  The name of this frame.
 Parameter
P
:  The frame to which this frame is attached with a fixed pose.
 Parameter
X_PF
:  The default transform giving the pose of F in P, therefore only the value (as a RigidTransform<double>) is provided.
 Parameter
model_instance
:  The model instance to which this frame belongs to. If unspecified, will use P.body().model_instance().
 __init__(self: pydrake.multibody.tree.FixedOffsetFrame_[float], name: str, P: pydrake.multibody.tree.Frame_[float], X_PF: pydrake.common.eigen_geometry.Isometry3_[float], model_instance: Optional[pydrake.multibody.tree.ModelInstanceIndex] = None) > None
This API using Isometry3 is / will be deprecated soon with the resolution of #9865. We only offer it for backwards compatibility. DO NOT USE!.
 Template parameter

class

class
pydrake.multibody.tree.
FixedOffsetFrame_[AutoDiffXd]
¶ Bases:
pydrake.multibody.tree.Frame_[AutoDiffXd]
%FixedOffsetFrame represents a material frame F whose pose is fixed with respect to a parent material frame P. The pose offset is given by a spatial transform
X_PF
, which is constant after construction. For instance, we could rigidly attach a frame F to move with a rigid body B at a fixed poseX_BF
, where B is the BodyFrame associated with body B. Thus, the World frame poseX_WF
of a FixedOffsetFrame F depends only on the World frame poseX_WP
of its parent P, and the constant poseX_PF
, withX_WF=X_WP*X_PF
.For more information about spatial transforms, see multibody_spatial_pose.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.

__init__
(*args, **kwargs)¶ Overloaded function.
 __init__(self: pydrake.multibody.tree.FixedOffsetFrame_[AutoDiffXd], name: str, P: pydrake.multibody.tree.Frame_[AutoDiffXd], X_PF: pydrake.math.RigidTransform_[float], model_instance: Optional[pydrake.multibody.tree.ModelInstanceIndex] = None) > None
Creates a material Frame F whose pose is fixed with respect to its parent material Frame P. The pose is given by a spatial transform
X_PF
; see class documentation for more information. Parameter
name
:  The name of this frame.
 Parameter
P
:  The frame to which this frame is attached with a fixed pose.
 Parameter
X_PF
:  The default transform giving the pose of F in P, therefore only the value (as a RigidTransform<double>) is provided.
 Parameter
model_instance
:  The model instance to which this frame belongs to. If unspecified, will use P.body().model_instance().
 __init__(self: pydrake.multibody.tree.FixedOffsetFrame_[AutoDiffXd], name: str, P: pydrake.multibody.tree.Frame_[AutoDiffXd], X_PF: pydrake.common.eigen_geometry.Isometry3_[float], model_instance: Optional[pydrake.multibody.tree.ModelInstanceIndex] = None) > None
This API using Isometry3 is / will be deprecated soon with the resolution of #9865. We only offer it for backwards compatibility. DO NOT USE!.
 Template parameter

class
pydrake.multibody.tree.
FixedOffsetFrame_[Expression]
¶ Bases:
pydrake.multibody.tree.Frame_[Expression]
%FixedOffsetFrame represents a material frame F whose pose is fixed with respect to a parent material frame P. The pose offset is given by a spatial transform
X_PF
, which is constant after construction. For instance, we could rigidly attach a frame F to move with a rigid body B at a fixed poseX_BF
, where B is the BodyFrame associated with body B. Thus, the World frame poseX_WF
of a FixedOffsetFrame F depends only on the World frame poseX_WP
of its parent P, and the constant poseX_PF
, withX_WF=X_WP*X_PF
.For more information about spatial transforms, see multibody_spatial_pose.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.

__init__
(*args, **kwargs)¶ Overloaded function.
 __init__(self: pydrake.multibody.tree.FixedOffsetFrame_[Expression], name: str, P: pydrake.multibody.tree.Frame_[Expression], X_PF: pydrake.math.RigidTransform_[float], model_instance: Optional[pydrake.multibody.tree.ModelInstanceIndex] = None) > None
Creates a material Frame F whose pose is fixed with respect to its parent material Frame P. The pose is given by a spatial transform
X_PF
; see class documentation for more information. Parameter
name
:  The name of this frame.
 Parameter
P
:  The frame to which this frame is attached with a fixed pose.
 Parameter
X_PF
:  The default transform giving the pose of F in P, therefore only the value (as a RigidTransform<double>) is provided.
 Parameter
model_instance
:  The model instance to which this frame belongs to. If unspecified, will use P.body().model_instance().
 __init__(self: pydrake.multibody.tree.FixedOffsetFrame_[Expression], name: str, P: pydrake.multibody.tree.Frame_[Expression], X_PF: pydrake.common.eigen_geometry.Isometry3_[float], model_instance: Optional[pydrake.multibody.tree.ModelInstanceIndex] = None) > None
This API using Isometry3 is / will be deprecated soon with the resolution of #9865. We only offer it for backwards compatibility. DO NOT USE!.
 Template parameter

class
pydrake.multibody.tree.
FixedOffsetFrame_[float]
¶ Bases:
pydrake.multibody.tree.Frame_[float]
%FixedOffsetFrame represents a material frame F whose pose is fixed with respect to a parent material frame P. The pose offset is given by a spatial transform
X_PF
, which is constant after construction. For instance, we could rigidly attach a frame F to move with a rigid body B at a fixed poseX_BF
, where B is the BodyFrame associated with body B. Thus, the World frame poseX_WF
of a FixedOffsetFrame F depends only on the World frame poseX_WP
of its parent P, and the constant poseX_PF
, withX_WF=X_WP*X_PF
.For more information about spatial transforms, see multibody_spatial_pose.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.

__init__
(*args, **kwargs)¶ Overloaded function.
 __init__(self: pydrake.multibody.tree.FixedOffsetFrame_[float], name: str, P: pydrake.multibody.tree.Frame_[float], X_PF: pydrake.math.RigidTransform_[float], model_instance: Optional[pydrake.multibody.tree.ModelInstanceIndex] = None) > None
Creates a material Frame F whose pose is fixed with respect to its parent material Frame P. The pose is given by a spatial transform
X_PF
; see class documentation for more information. Parameter
name
:  The name of this frame.
 Parameter
P
:  The frame to which this frame is attached with a fixed pose.
 Parameter
X_PF
:  The default transform giving the pose of F in P, therefore only the value (as a RigidTransform<double>) is provided.
 Parameter
model_instance
:  The model instance to which this frame belongs to. If unspecified, will use P.body().model_instance().
 __init__(self: pydrake.multibody.tree.FixedOffsetFrame_[float], name: str, P: pydrake.multibody.tree.Frame_[float], X_PF: pydrake.common.eigen_geometry.Isometry3_[float], model_instance: Optional[pydrake.multibody.tree.ModelInstanceIndex] = None) > None
This API using Isometry3 is / will be deprecated soon with the resolution of #9865. We only offer it for backwards compatibility. DO NOT USE!.
 Template parameter

pydrake.multibody.tree.
ForceElement
¶

class
pydrake.multibody.tree.
ForceElementIndex
¶ Type used to identify force elements by index within a multibody tree system.

__init__
(self: pydrake.multibody.tree.ForceElementIndex, arg0: int) → None¶ Default constructor; the result is an invalid index. This only exists to serve applications which require a default constructor.

is_valid
(self: pydrake.multibody.tree.ForceElementIndex) → bool¶ Reports if the index is valid–the only operation on an invalid index that doesn’t throw an exception in Debug builds.


template
pydrake.multibody.tree.
ForceElement_
¶ Instantiations:
ForceElement_[float]
,ForceElement_[AutoDiffXd]
,ForceElement_[Expression]

class
ForceElement_[float]
¶ A ForceElement allows modeling state and time dependent forces in a MultibodyTree model. Examples of such forces are springs, dampers, drag and gravity. Forces that depend on accelerations such as virtual mass cannot be modeled with a ForceElement. This abstract class provides an API that all force elements subclasses must implement in order to be fully defined. These are:
 CalcAndAddForceContribution(): computes the force contribution of a force element in a MultibodyTree model.
 CalcPotentialEnergy(): computes a force element potential energy contribution.
 CalcConservativePower(): computes the power generated by conservative forces.
 CalcNonConservativePower(): computes the power dissipated by nonconservative forces.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.

index
(self: pydrake.multibody.tree.ForceElement_[float]) → pydrake.multibody.tree.ForceElementIndex¶

model_instance
(self: pydrake.multibody.tree.ForceElement_[float]) → pydrake.multibody.tree.ModelInstanceIndex¶

class

class
pydrake.multibody.tree.
ForceElement_[AutoDiffXd]
¶ A ForceElement allows modeling state and time dependent forces in a MultibodyTree model. Examples of such forces are springs, dampers, drag and gravity. Forces that depend on accelerations such as virtual mass cannot be modeled with a ForceElement. This abstract class provides an API that all force elements subclasses must implement in order to be fully defined. These are:
 CalcAndAddForceContribution(): computes the force contribution of a force element in a MultibodyTree model.
 CalcPotentialEnergy(): computes a force element potential energy contribution.
 CalcConservativePower(): computes the power generated by conservative forces.
 CalcNonConservativePower(): computes the power dissipated by nonconservative forces.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.

index
(self: pydrake.multibody.tree.ForceElement_[AutoDiffXd]) → pydrake.multibody.tree.ForceElementIndex¶

model_instance
(self: pydrake.multibody.tree.ForceElement_[AutoDiffXd]) → pydrake.multibody.tree.ModelInstanceIndex¶

class
pydrake.multibody.tree.
ForceElement_[Expression]
¶ A ForceElement allows modeling state and time dependent forces in a MultibodyTree model. Examples of such forces are springs, dampers, drag and gravity. Forces that depend on accelerations such as virtual mass cannot be modeled with a ForceElement. This abstract class provides an API that all force elements subclasses must implement in order to be fully defined. These are:
 CalcAndAddForceContribution(): computes the force contribution of a force element in a MultibodyTree model.
 CalcPotentialEnergy(): computes a force element potential energy contribution.
 CalcConservativePower(): computes the power generated by conservative forces.
 CalcNonConservativePower(): computes the power dissipated by nonconservative forces.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.

index
(self: pydrake.multibody.tree.ForceElement_[Expression]) → pydrake.multibody.tree.ForceElementIndex¶

model_instance
(self: pydrake.multibody.tree.ForceElement_[Expression]) → pydrake.multibody.tree.ModelInstanceIndex¶

class
pydrake.multibody.tree.
ForceElement_[float]
¶ A ForceElement allows modeling state and time dependent forces in a MultibodyTree model. Examples of such forces are springs, dampers, drag and gravity. Forces that depend on accelerations such as virtual mass cannot be modeled with a ForceElement. This abstract class provides an API that all force elements subclasses must implement in order to be fully defined. These are:
 CalcAndAddForceContribution(): computes the force contribution of a force element in a MultibodyTree model.
 CalcPotentialEnergy(): computes a force element potential energy contribution.
 CalcConservativePower(): computes the power generated by conservative forces.
 CalcNonConservativePower(): computes the power dissipated by nonconservative forces.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.

index
(self: pydrake.multibody.tree.ForceElement_[float]) → pydrake.multibody.tree.ForceElementIndex¶

model_instance
(self: pydrake.multibody.tree.ForceElement_[float]) → pydrake.multibody.tree.ModelInstanceIndex¶

pydrake.multibody.tree.
Frame
¶ alias of
pydrake.multibody.tree.Frame_[float]

class
pydrake.multibody.tree.
FrameIndex
¶ Type used to identify frames by index in a multibody tree system.

__init__
(self: pydrake.multibody.tree.FrameIndex, arg0: int) → None¶ Default constructor; the result is an invalid index. This only exists to serve applications which require a default constructor.

is_valid
(self: pydrake.multibody.tree.FrameIndex) → bool¶ Reports if the index is valid–the only operation on an invalid index that doesn’t throw an exception in Debug builds.


template
pydrake.multibody.tree.
Frame_
¶ Instantiations:
Frame_[float]
,Frame_[AutoDiffXd]
,Frame_[Expression]

class
Frame_[float]
¶ %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. A material frame can be used to apply forces and torques to a multibody system, and can be used as an attachment point for forceproducing elements like joints, actuators, and constraints. Despite its name, Frame is not the most general frame representation in Drake; see FrameBase for a moregeneral discussion.
The pose and motion of a Frame object is always calculated relative to the BodyFrame of the body with which it is associated, and every Frame object can report which Body object that is. Concrete classes derived from Frame differ only in how those kinematic properties are calculated. For soft bodies that calculation may depend on the body’s deformation state variables. A Frame on a rigid body will usually have a fixed offset from its BodyFrame, but that is not required – a frame that moves with respect to its BodyFrame can still be a material frame on that rigid body.
As always in Drake, runtime numerical quantities are stored in a Context. A Frame object does not store runtime values, but provides methods for extracting frameassociated values (such as the Frame object’s kinematics) from a given Context.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.

GetFixedPoseInBodyFrame
(self: pydrake.multibody.tree.Frame_[float]) → pydrake.math.RigidTransform_[float]¶ Variant of CalcPoseInBodyFrame() that returns the fixed pose
X_BF
ofthis
frame F in the body frame B associated with this frame.Raises:  RuntimeError if called on a Frame that does not have a fixed
 offset in the body frame.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.

body
(self: pydrake.multibody.tree.Frame_[float]) → drake::multibody::Body<double>¶ Returns a const reference to the body associated to this Frame.

index
(self: pydrake.multibody.tree.Frame_[float]) → pydrake.multibody.tree.FrameIndex¶

model_instance
(self: pydrake.multibody.tree.Frame_[float]) → pydrake.multibody.tree.ModelInstanceIndex¶

name
(self: pydrake.multibody.tree.Frame_[float]) → str¶ Returns the name of this frame. It may be empty if unnamed.
 Template parameter

class

class
pydrake.multibody.tree.
Frame_[AutoDiffXd]
¶ %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. A material frame can be used to apply forces and torques to a multibody system, and can be used as an attachment point for forceproducing elements like joints, actuators, and constraints. Despite its name, Frame is not the most general frame representation in Drake; see FrameBase for a moregeneral discussion.
The pose and motion of a Frame object is always calculated relative to the BodyFrame of the body with which it is associated, and every Frame object can report which Body object that is. Concrete classes derived from Frame differ only in how those kinematic properties are calculated. For soft bodies that calculation may depend on the body’s deformation state variables. A Frame on a rigid body will usually have a fixed offset from its BodyFrame, but that is not required – a frame that moves with respect to its BodyFrame can still be a material frame on that rigid body.
As always in Drake, runtime numerical quantities are stored in a Context. A Frame object does not store runtime values, but provides methods for extracting frameassociated values (such as the Frame object’s kinematics) from a given Context.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.

GetFixedPoseInBodyFrame
(self: pydrake.multibody.tree.Frame_[AutoDiffXd]) → pydrake.math.RigidTransform_[AutoDiffXd]¶ Variant of CalcPoseInBodyFrame() that returns the fixed pose
X_BF
ofthis
frame F in the body frame B associated with this frame.Raises:  RuntimeError if called on a Frame that does not have a fixed
 offset in the body frame.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.

body
(self: pydrake.multibody.tree.Frame_[AutoDiffXd]) → drake::multibody::Body<Eigen::AutoDiffScalar<Eigen::Matrix<double, 1, 1, 0, 1, 1> > >¶ Returns a const reference to the body associated to this Frame.

index
(self: pydrake.multibody.tree.Frame_[AutoDiffXd]) → pydrake.multibody.tree.FrameIndex¶

model_instance
(self: pydrake.multibody.tree.Frame_[AutoDiffXd]) → pydrake.multibody.tree.ModelInstanceIndex¶

name
(self: pydrake.multibody.tree.Frame_[AutoDiffXd]) → str¶ Returns the name of this frame. It may be empty if unnamed.
 Template parameter

class
pydrake.multibody.tree.
Frame_[Expression]
¶ %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. A material frame can be used to apply forces and torques to a multibody system, and can be used as an attachment point for forceproducing elements like joints, actuators, and constraints. Despite its name, Frame is not the most general frame representation in Drake; see FrameBase for a moregeneral discussion.
The pose and motion of a Frame object is always calculated relative to the BodyFrame of the body with which it is associated, and every Frame object can report which Body object that is. Concrete classes derived from Frame differ only in how those kinematic properties are calculated. For soft bodies that calculation may depend on the body’s deformation state variables. A Frame on a rigid body will usually have a fixed offset from its BodyFrame, but that is not required – a frame that moves with respect to its BodyFrame can still be a material frame on that rigid body.
As always in Drake, runtime numerical quantities are stored in a Context. A Frame object does not store runtime values, but provides methods for extracting frameassociated values (such as the Frame object’s kinematics) from a given Context.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.

GetFixedPoseInBodyFrame
(self: pydrake.multibody.tree.Frame_[Expression]) → pydrake.math.RigidTransform_[Expression]¶ Variant of CalcPoseInBodyFrame() that returns the fixed pose
X_BF
ofthis
frame F in the body frame B associated with this frame.Raises:  RuntimeError if called on a Frame that does not have a fixed
 offset in the body frame.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.

body
(self: pydrake.multibody.tree.Frame_[Expression]) → drake::multibody::Body<drake::symbolic::Expression>¶ Returns a const reference to the body associated to this Frame.

index
(self: pydrake.multibody.tree.Frame_[Expression]) → pydrake.multibody.tree.FrameIndex¶

model_instance
(self: pydrake.multibody.tree.Frame_[Expression]) → pydrake.multibody.tree.ModelInstanceIndex¶

name
(self: pydrake.multibody.tree.Frame_[Expression]) → str¶ Returns the name of this frame. It may be empty if unnamed.
 Template parameter

class
pydrake.multibody.tree.
Frame_[float]
¶ %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. A material frame can be used to apply forces and torques to a multibody system, and can be used as an attachment point for forceproducing elements like joints, actuators, and constraints. Despite its name, Frame is not the most general frame representation in Drake; see FrameBase for a moregeneral discussion.
The pose and motion of a Frame object is always calculated relative to the BodyFrame of the body with which it is associated, and every Frame object can report which Body object that is. Concrete classes derived from Frame differ only in how those kinematic properties are calculated. For soft bodies that calculation may depend on the body’s deformation state variables. A Frame on a rigid body will usually have a fixed offset from its BodyFrame, but that is not required – a frame that moves with respect to its BodyFrame can still be a material frame on that rigid body.
As always in Drake, runtime numerical quantities are stored in a Context. A Frame object does not store runtime values, but provides methods for extracting frameassociated values (such as the Frame object’s kinematics) from a given Context.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.

GetFixedPoseInBodyFrame
(self: pydrake.multibody.tree.Frame_[float]) → pydrake.math.RigidTransform_[float]¶ Variant of CalcPoseInBodyFrame() that returns the fixed pose
X_BF
ofthis
frame F in the body frame B associated with this frame.Raises:  RuntimeError if called on a Frame that does not have a fixed
 offset in the body frame.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.

body
(self: pydrake.multibody.tree.Frame_[float]) → drake::multibody::Body<double>¶ Returns a const reference to the body associated to this Frame.

index
(self: pydrake.multibody.tree.Frame_[float]) → pydrake.multibody.tree.FrameIndex¶

model_instance
(self: pydrake.multibody.tree.Frame_[float]) → pydrake.multibody.tree.ModelInstanceIndex¶

name
(self: pydrake.multibody.tree.Frame_[float]) → str¶ Returns the name of this frame. It may be empty if unnamed.
 Template parameter

class
pydrake.multibody.tree.
JacobianWrtVariable
¶ Enumeration that indicates whether the Jacobian is partial differentiation with respect to q̇ (timederivatives of generalized positions) or with respect to v (generalized velocities).
Members:
kQDot : < J = ∂V/∂q̇
kV : < J = ∂V/∂v

__init__
(self: pydrake.multibody.tree.JacobianWrtVariable, arg0: int) → None¶

kQDot
= JacobianWrtVariable.kQDot¶

kV
= JacobianWrtVariable.kV¶

name
¶ (self – handle) > str


pydrake.multibody.tree.
Joint
¶ alias of
pydrake.multibody.tree.Joint_[float]

pydrake.multibody.tree.
JointActuator
¶

class
pydrake.multibody.tree.
JointActuatorIndex
¶ Type used to identify actuators by index within a multibody tree system.

__init__
(self: pydrake.multibody.tree.JointActuatorIndex, arg0: int) → None¶ Default constructor; the result is an invalid index. This only exists to serve applications which require a default constructor.

is_valid
(self: pydrake.multibody.tree.JointActuatorIndex) → bool¶ Reports if the index is valid–the only operation on an invalid index that doesn’t throw an exception in Debug builds.


template
pydrake.multibody.tree.
JointActuator_
¶ Instantiations:
JointActuator_[float]
,JointActuator_[AutoDiffXd]
,JointActuator_[Expression]

class
JointActuator_[float]
¶ The JointActuator class is mostly a simple bookkeeping structure to represent an actuator acting on a given Joint. It helps to flag whether a given Joint is actuated or not so that MultibodyTree clients can apply forces on actuated joints through their actuators, see AddInOneForce().
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.

index
(self: pydrake.multibody.tree.JointActuator_[float]) → pydrake.multibody.tree.JointActuatorIndex¶

joint
(self: pydrake.multibody.tree.JointActuator_[float]) → pydrake.multibody.tree.Joint_[float]¶ Returns a reference to the joint actuated by this JointActuator.

model_instance
(self: pydrake.multibody.tree.JointActuator_[float]) → pydrake.multibody.tree.ModelInstanceIndex¶

name
(self: pydrake.multibody.tree.JointActuator_[float]) → str¶ Returns the name of the actuator.
 Template parameter

class

class
pydrake.multibody.tree.
JointActuator_[AutoDiffXd]
¶ The JointActuator class is mostly a simple bookkeeping structure to represent an actuator acting on a given Joint. It helps to flag whether a given Joint is actuated or not so that MultibodyTree clients can apply forces on actuated joints through their actuators, see AddInOneForce().
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.

index
(self: pydrake.multibody.tree.JointActuator_[AutoDiffXd]) → pydrake.multibody.tree.JointActuatorIndex¶

joint
(self: pydrake.multibody.tree.JointActuator_[AutoDiffXd]) → pydrake.multibody.tree.Joint_[AutoDiffXd]¶ Returns a reference to the joint actuated by this JointActuator.

model_instance
(self: pydrake.multibody.tree.JointActuator_[AutoDiffXd]) → pydrake.multibody.tree.ModelInstanceIndex¶

name
(self: pydrake.multibody.tree.JointActuator_[AutoDiffXd]) → str¶ Returns the name of the actuator.
 Template parameter

class
pydrake.multibody.tree.
JointActuator_[Expression]
¶ The JointActuator class is mostly a simple bookkeeping structure to represent an actuator acting on a given Joint. It helps to flag whether a given Joint is actuated or not so that MultibodyTree clients can apply forces on actuated joints through their actuators, see AddInOneForce().
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.

index
(self: pydrake.multibody.tree.JointActuator_[Expression]) → pydrake.multibody.tree.JointActuatorIndex¶

joint
(self: pydrake.multibody.tree.JointActuator_[Expression]) → pydrake.multibody.tree.Joint_[Expression]¶ Returns a reference to the joint actuated by this JointActuator.

model_instance
(self: pydrake.multibody.tree.JointActuator_[Expression]) → pydrake.multibody.tree.ModelInstanceIndex¶

name
(self: pydrake.multibody.tree.JointActuator_[Expression]) → str¶ Returns the name of the actuator.
 Template parameter

class
pydrake.multibody.tree.
JointActuator_[float]
¶ The JointActuator class is mostly a simple bookkeeping structure to represent an actuator acting on a given Joint. It helps to flag whether a given Joint is actuated or not so that MultibodyTree clients can apply forces on actuated joints through their actuators, see AddInOneForce().
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.

index
(self: pydrake.multibody.tree.JointActuator_[float]) → pydrake.multibody.tree.JointActuatorIndex¶

joint
(self: pydrake.multibody.tree.JointActuator_[float]) → pydrake.multibody.tree.Joint_[float]¶ Returns a reference to the joint actuated by this JointActuator.

model_instance
(self: pydrake.multibody.tree.JointActuator_[float]) → pydrake.multibody.tree.ModelInstanceIndex¶

name
(self: pydrake.multibody.tree.JointActuator_[float]) → str¶ Returns the name of the actuator.
 Template parameter

class
pydrake.multibody.tree.
JointIndex
¶ Type used to identify joints by index within a multibody tree system.

__init__
(self: pydrake.multibody.tree.JointIndex, arg0: int) → None¶ Default constructor; the result is an invalid index. This only exists to serve applications which require a default constructor.

is_valid
(self: pydrake.multibody.tree.JointIndex) → bool¶ Reports if the index is valid–the only operation on an invalid index that doesn’t throw an exception in Debug builds.


template
pydrake.multibody.tree.
Joint_
¶ Instantiations:
Joint_[float]
,Joint_[AutoDiffXd]
,Joint_[Expression]

class
Joint_[float]
¶ A Joint models the kinematical relationship which characterizes the possible relative motion between two bodies. The two bodies connected by a Joint object are referred to as the parent and child bodies. Although the terms parent and child are sometimes used synonymously to describe the relationship between inboard and outboard bodies in multibody trees, the parent/child relationship is more general and remains meaningful for multibody systems with loops, such as a fourbar linkage. However, whenever possible the parent body will be made to be inboard and the child outboard in the tree. A Joint is a model of a physical kinematic constraint between two bodies, a constraint that in the real physical system does not specify a tree ordering.
In Drake we define a frame F rigidly attached to the parent body P with pose
X_PF
and a frame M rigidly attached to the child body B with poseX_BM
. A Joint object specifies a kinematic relation between frames F and M, which in turn imposes a kinematic relation between bodies P and B.Typical joints include the ball joint, to allow unrestricted rotations about a given point, the revolute joint, that constraints two bodies to rotate about a given common axis, etc.
Consider the following example to build a simple pendulum system:
MultibodyPlant<double> plant; // ... Code here to setup quantities below as mass, com, etc. ... const Body<double>& pendulum = plant.AddBody<RigidBody>(SpatialInertia<double>(mass, com, unit_inertia)); // We will connect the pendulum body to the world using a RevoluteJoint. // In this simple case the parent body P is the model's world body and frame // F IS the world frame. // Additionally, we need to specify the pose of frame M on the pendulum's // body frame B. // Say we declared and initialized X_BM... const RevoluteJoint<double>& elbow = plant.AddJoint<RevoluteJoint>( "Elbow", /* joint name plant.world_body(), /* parent body {}, /* frame F IS the world frame W pendulum, /* child body, the pendulum X_BM, /* pose of frame M in the body frame B Vector3d::UnitZ()); /* revolute axis in this case
Warning
Do not ever attempt to instantiate and manipulate Joint objects on the stack; it will fail. Add joints to your plant using the provided API MultibodyPlant::AddJoint() as in the example above.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.

acceleration_lower_limits
(self: pydrake.multibody.tree.Joint_[float]) → numpy.ndarray[float64[m, 1]]¶ Returns the acceleration lower limits.

acceleration_upper_limits
(self: pydrake.multibody.tree.Joint_[float]) → numpy.ndarray[float64[m, 1]]¶ Returns the acceleration upper limits.

child_body
(self: pydrake.multibody.tree.Joint_[float]) → pydrake.multibody.tree.Body_[float]¶ Returns a const reference to the child body B.

frame_on_child
(self: pydrake.multibody.tree.Joint_[float]) → pydrake.multibody.tree.Frame_[float]¶ Returns a const reference to the frame M attached on the child body B.

frame_on_parent
(self: pydrake.multibody.tree.Joint_[float]) → pydrake.multibody.tree.Frame_[float]¶ Returns a const reference to the frame F attached on the parent body P.

index
(self: pydrake.multibody.tree.Joint_[float]) → pydrake.multibody.tree.JointIndex¶

model_instance
(self: pydrake.multibody.tree.Joint_[float]) → pydrake.multibody.tree.ModelInstanceIndex¶

name
(self: pydrake.multibody.tree.Joint_[float]) → str¶ Returns the name of this joint.

num_positions
(self: pydrake.multibody.tree.Joint_[float]) → int¶ Returns the number of generalized positions describing this joint.

num_velocities
(self: pydrake.multibody.tree.Joint_[float]) → int¶ Returns the number of generalized velocities describing this joint.

parent_body
(self: pydrake.multibody.tree.Joint_[float]) → pydrake.multibody.tree.Body_[float]¶ Returns a const reference to the parent body P.

position_lower_limits
(self: pydrake.multibody.tree.Joint_[float]) → numpy.ndarray[float64[m, 1]]¶ @name Methods to get and set the limits of
this
joint. For position limits, the layout is the same as the generalized position’s. For velocity and acceleration limits, the layout is the same as the generalized velocity’s. A limit with value +/ ∞ implies no upper or lower limit. Returns the position lower limits.

position_start
(self: pydrake.multibody.tree.Joint_[float]) → int¶ Returns the index to the first generalized position for this joint within the vector q of generalized positions for the full multibody system.

position_upper_limits
(self: pydrake.multibody.tree.Joint_[float]) → numpy.ndarray[float64[m, 1]]¶ Returns the position upper limits.

velocity_lower_limits
(self: pydrake.multibody.tree.Joint_[float]) → numpy.ndarray[float64[m, 1]]¶ Returns the velocity lower limits.

velocity_start
(self: pydrake.multibody.tree.Joint_[float]) → int¶ Returns the index to the first generalized velocity for this joint within the vector v of generalized velocities for the full multibody system.

velocity_upper_limits
(self: pydrake.multibody.tree.Joint_[float]) → numpy.ndarray[float64[m, 1]]¶ Returns the velocity upper limits.
 Template parameter

class

class
pydrake.multibody.tree.
Joint_[AutoDiffXd]
¶ A Joint models the kinematical relationship which characterizes the possible relative motion between two bodies. The two bodies connected by a Joint object are referred to as the parent and child bodies. Although the terms parent and child are sometimes used synonymously to describe the relationship between inboard and outboard bodies in multibody trees, the parent/child relationship is more general and remains meaningful for multibody systems with loops, such as a fourbar linkage. However, whenever possible the parent body will be made to be inboard and the child outboard in the tree. A Joint is a model of a physical kinematic constraint between two bodies, a constraint that in the real physical system does not specify a tree ordering.
In Drake we define a frame F rigidly attached to the parent body P with pose
X_PF
and a frame M rigidly attached to the child body B with poseX_BM
. A Joint object specifies a kinematic relation between frames F and M, which in turn imposes a kinematic relation between bodies P and B.Typical joints include the ball joint, to allow unrestricted rotations about a given point, the revolute joint, that constraints two bodies to rotate about a given common axis, etc.
Consider the following example to build a simple pendulum system:
MultibodyPlant<double> plant; // ... Code here to setup quantities below as mass, com, etc. ... const Body<double>& pendulum = plant.AddBody<RigidBody>(SpatialInertia<double>(mass, com, unit_inertia)); // We will connect the pendulum body to the world using a RevoluteJoint. // In this simple case the parent body P is the model's world body and frame // F IS the world frame. // Additionally, we need to specify the pose of frame M on the pendulum's // body frame B. // Say we declared and initialized X_BM... const RevoluteJoint<double>& elbow = plant.AddJoint<RevoluteJoint>( "Elbow", /* joint name plant.world_body(), /* parent body {}, /* frame F IS the world frame W pendulum, /* child body, the pendulum X_BM, /* pose of frame M in the body frame B Vector3d::UnitZ()); /* revolute axis in this case
Warning
Do not ever attempt to instantiate and manipulate Joint objects on the stack; it will fail. Add joints to your plant using the provided API MultibodyPlant::AddJoint() as in the example above.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.

acceleration_lower_limits
(self: pydrake.multibody.tree.Joint_[AutoDiffXd]) → numpy.ndarray[float64[m, 1]]¶ Returns the acceleration lower limits.

acceleration_upper_limits
(self: pydrake.multibody.tree.Joint_[AutoDiffXd]) → numpy.ndarray[float64[m, 1]]¶ Returns the acceleration upper limits.

child_body
(self: pydrake.multibody.tree.Joint_[AutoDiffXd]) → pydrake.multibody.tree.Body_[AutoDiffXd]¶ Returns a const reference to the child body B.

frame_on_child
(self: pydrake.multibody.tree.Joint_[AutoDiffXd]) → pydrake.multibody.tree.Frame_[AutoDiffXd]¶ Returns a const reference to the frame M attached on the child body B.

frame_on_parent
(self: pydrake.multibody.tree.Joint_[AutoDiffXd]) → pydrake.multibody.tree.Frame_[AutoDiffXd]¶ Returns a const reference to the frame F attached on the parent body P.

index
(self: pydrake.multibody.tree.Joint_[AutoDiffXd]) → pydrake.multibody.tree.JointIndex¶

model_instance
(self: pydrake.multibody.tree.Joint_[AutoDiffXd]) → pydrake.multibody.tree.ModelInstanceIndex¶

name
(self: pydrake.multibody.tree.Joint_[AutoDiffXd]) → str¶ Returns the name of this joint.

num_positions
(self: pydrake.multibody.tree.Joint_[AutoDiffXd]) → int¶ Returns the number of generalized positions describing this joint.

num_velocities
(self: pydrake.multibody.tree.Joint_[AutoDiffXd]) → int¶ Returns the number of generalized velocities describing this joint.

parent_body
(self: pydrake.multibody.tree.Joint_[AutoDiffXd]) → pydrake.multibody.tree.Body_[AutoDiffXd]¶ Returns a const reference to the parent body P.

position_lower_limits
(self: pydrake.multibody.tree.Joint_[AutoDiffXd]) → numpy.ndarray[float64[m, 1]]¶ @name Methods to get and set the limits of
this
joint. For position limits, the layout is the same as the generalized position’s. For velocity and acceleration limits, the layout is the same as the generalized velocity’s. A limit with value +/ ∞ implies no upper or lower limit. Returns the position lower limits.

position_start
(self: pydrake.multibody.tree.Joint_[AutoDiffXd]) → int¶ Returns the index to the first generalized position for this joint within the vector q of generalized positions for the full multibody system.

position_upper_limits
(self: pydrake.multibody.tree.Joint_[AutoDiffXd]) → numpy.ndarray[float64[m, 1]]¶ Returns the position upper limits.

velocity_lower_limits
(self: pydrake.multibody.tree.Joint_[AutoDiffXd]) → numpy.ndarray[float64[m, 1]]¶ Returns the velocity lower limits.

velocity_start
(self: pydrake.multibody.tree.Joint_[AutoDiffXd]) → int¶ Returns the index to the first generalized velocity for this joint within the vector v of generalized velocities for the full multibody system.

velocity_upper_limits
(self: pydrake.multibody.tree.Joint_[AutoDiffXd]) → numpy.ndarray[float64[m, 1]]¶ Returns the velocity upper limits.
 Template parameter

class
pydrake.multibody.tree.
Joint_[Expression]
¶ A Joint models the kinematical relationship which characterizes the possible relative motion between two bodies. The two bodies connected by a Joint object are referred to as the parent and child bodies. Although the terms parent and child are sometimes used synonymously to describe the relationship between inboard and outboard bodies in multibody trees, the parent/child relationship is more general and remains meaningful for multibody systems with loops, such as a fourbar linkage. However, whenever possible the parent body will be made to be inboard and the child outboard in the tree. A Joint is a model of a physical kinematic constraint between two bodies, a constraint that in the real physical system does not specify a tree ordering.
In Drake we define a frame F rigidly attached to the parent body P with pose
X_PF
and a frame M rigidly attached to the child body B with poseX_BM
. A Joint object specifies a kinematic relation between frames F and M, which in turn imposes a kinematic relation between bodies P and B.Typical joints include the ball joint, to allow unrestricted rotations about a given point, the revolute joint, that constraints two bodies to rotate about a given common axis, etc.
Consider the following example to build a simple pendulum system:
MultibodyPlant<double> plant; // ... Code here to setup quantities below as mass, com, etc. ... const Body<double>& pendulum = plant.AddBody<RigidBody>(SpatialInertia<double>(mass, com, unit_inertia)); // We will connect the pendulum body to the world using a RevoluteJoint. // In this simple case the parent body P is the model's world body and frame // F IS the world frame. // Additionally, we need to specify the pose of frame M on the pendulum's // body frame B. // Say we declared and initialized X_BM... const RevoluteJoint<double>& elbow = plant.AddJoint<RevoluteJoint>( "Elbow", /* joint name plant.world_body(), /* parent body {}, /* frame F IS the world frame W pendulum, /* child body, the pendulum X_BM, /* pose of frame M in the body frame B Vector3d::UnitZ()); /* revolute axis in this case
Warning
Do not ever attempt to instantiate and manipulate Joint objects on the stack; it will fail. Add joints to your plant using the provided API MultibodyPlant::AddJoint() as in the example above.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.

acceleration_lower_limits
(self: pydrake.multibody.tree.Joint_[Expression]) → numpy.ndarray[float64[m, 1]]¶ Returns the acceleration lower limits.

acceleration_upper_limits
(self: pydrake.multibody.tree.Joint_[Expression]) → numpy.ndarray[float64[m, 1]]¶ Returns the acceleration upper limits.

child_body
(self: pydrake.multibody.tree.Joint_[Expression]) → pydrake.multibody.tree.Body_[Expression]¶ Returns a const reference to the child body B.

frame_on_child
(self: pydrake.multibody.tree.Joint_[Expression]) → pydrake.multibody.tree.Frame_[Expression]¶ Returns a const reference to the frame M attached on the child body B.

frame_on_parent
(self: pydrake.multibody.tree.Joint_[Expression]) → pydrake.multibody.tree.Frame_[Expression]¶ Returns a const reference to the frame F attached on the parent body P.

index
(self: pydrake.multibody.tree.Joint_[Expression]) → pydrake.multibody.tree.JointIndex¶

model_instance
(self: pydrake.multibody.tree.Joint_[Expression]) → pydrake.multibody.tree.ModelInstanceIndex¶

name
(self: pydrake.multibody.tree.Joint_[Expression]) → str¶ Returns the name of this joint.

num_positions
(self: pydrake.multibody.tree.Joint_[Expression]) → int¶ Returns the number of generalized positions describing this joint.

num_velocities
(self: pydrake.multibody.tree.Joint_[Expression]) → int¶ Returns the number of generalized velocities describing this joint.

parent_body
(self: pydrake.multibody.tree.Joint_[Expression]) → pydrake.multibody.tree.Body_[Expression]¶ Returns a const reference to the parent body P.

position_lower_limits
(self: pydrake.multibody.tree.Joint_[Expression]) → numpy.ndarray[float64[m, 1]]¶ @name Methods to get and set the limits of
this
joint. For position limits, the layout is the same as the generalized position’s. For velocity and acceleration limits, the layout is the same as the generalized velocity’s. A limit with value +/ ∞ implies no upper or lower limit. Returns the position lower limits.

position_start
(self: pydrake.multibody.tree.Joint_[Expression]) → int¶ Returns the index to the first generalized position for this joint within the vector q of generalized positions for the full multibody system.

position_upper_limits
(self: pydrake.multibody.tree.Joint_[Expression]) → numpy.ndarray[float64[m, 1]]¶ Returns the position upper limits.

velocity_lower_limits
(self: pydrake.multibody.tree.Joint_[Expression]) → numpy.ndarray[float64[m, 1]]¶ Returns the velocity lower limits.

velocity_start
(self: pydrake.multibody.tree.Joint_[Expression]) → int¶ Returns the index to the first generalized velocity for this joint within the vector v of generalized velocities for the full multibody system.

velocity_upper_limits
(self: pydrake.multibody.tree.Joint_[Expression]) → numpy.ndarray[float64[m, 1]]¶ Returns the velocity upper limits.
 Template parameter

class
pydrake.multibody.tree.
Joint_[float]
¶ A Joint models the kinematical relationship which characterizes the possible relative motion between two bodies. The two bodies connected by a Joint object are referred to as the parent and child bodies. Although the terms parent and child are sometimes used synonymously to describe the relationship between inboard and outboard bodies in multibody trees, the parent/child relationship is more general and remains meaningful for multibody systems with loops, such as a fourbar linkage. However, whenever possible the parent body will be made to be inboard and the child outboard in the tree. A Joint is a model of a physical kinematic constraint between two bodies, a constraint that in the real physical system does not specify a tree ordering.
In Drake we define a frame F rigidly attached to the parent body P with pose
X_PF
and a frame M rigidly attached to the child body B with poseX_BM
. A Joint object specifies a kinematic relation between frames F and M, which in turn imposes a kinematic relation between bodies P and B.Typical joints include the ball joint, to allow unrestricted rotations about a given point, the revolute joint, that constraints two bodies to rotate about a given common axis, etc.
Consider the following example to build a simple pendulum system:
MultibodyPlant<double> plant; // ... Code here to setup quantities below as mass, com, etc. ... const Body<double>& pendulum = plant.AddBody<RigidBody>(SpatialInertia<double>(mass, com, unit_inertia)); // We will connect the pendulum body to the world using a RevoluteJoint. // In this simple case the parent body P is the model's world body and frame // F IS the world frame. // Additionally, we need to specify the pose of frame M on the pendulum's // body frame B. // Say we declared and initialized X_BM... const RevoluteJoint<double>& elbow = plant.AddJoint<RevoluteJoint>( "Elbow", /* joint name plant.world_body(), /* parent body {}, /* frame F IS the world frame W pendulum, /* child body, the pendulum X_BM, /* pose of frame M in the body frame B Vector3d::UnitZ()); /* revolute axis in this case
Warning
Do not ever attempt to instantiate and manipulate Joint objects on the stack; it will fail. Add joints to your plant using the provided API MultibodyPlant::AddJoint() as in the example above.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.

acceleration_lower_limits
(self: pydrake.multibody.tree.Joint_[float]) → numpy.ndarray[float64[m, 1]]¶ Returns the acceleration lower limits.

acceleration_upper_limits
(self: pydrake.multibody.tree.Joint_[float]) → numpy.ndarray[float64[m, 1]]¶ Returns the acceleration upper limits.

child_body
(self: pydrake.multibody.tree.Joint_[float]) → pydrake.multibody.tree.Body_[float]¶ Returns a const reference to the child body B.

frame_on_child
(self: pydrake.multibody.tree.Joint_[float]) → pydrake.multibody.tree.Frame_[float]¶ Returns a const reference to the frame M attached on the child body B.

frame_on_parent
(self: pydrake.multibody.tree.Joint_[float]) → pydrake.multibody.tree.Frame_[float]¶ Returns a const reference to the frame F attached on the parent body P.

index
(self: pydrake.multibody.tree.Joint_[float]) → pydrake.multibody.tree.JointIndex¶

model_instance
(self: pydrake.multibody.tree.Joint_[float]) → pydrake.multibody.tree.ModelInstanceIndex¶

name
(self: pydrake.multibody.tree.Joint_[float]) → str¶ Returns the name of this joint.

num_positions
(self: pydrake.multibody.tree.Joint_[float]) → int¶ Returns the number of generalized positions describing this joint.

num_velocities
(self: pydrake.multibody.tree.Joint_[float]) → int¶ Returns the number of generalized velocities describing this joint.

parent_body
(self: pydrake.multibody.tree.Joint_[float]) → pydrake.multibody.tree.Body_[float]¶ Returns a const reference to the parent body P.

position_lower_limits
(self: pydrake.multibody.tree.Joint_[float]) → numpy.ndarray[float64[m, 1]]¶ @name Methods to get and set the limits of
this
joint. For position limits, the layout is the same as the generalized position’s. For velocity and acceleration limits, the layout is the same as the generalized velocity’s. A limit with value +/ ∞ implies no upper or lower limit. Returns the position lower limits.

position_start
(self: pydrake.multibody.tree.Joint_[float]) → int¶ Returns the index to the first generalized position for this joint within the vector q of generalized positions for the full multibody system.

position_upper_limits
(self: pydrake.multibody.tree.Joint_[float]) → numpy.ndarray[float64[m, 1]]¶ Returns the position upper limits.

velocity_lower_limits
(self: pydrake.multibody.tree.Joint_[float]) → numpy.ndarray[float64[m, 1]]¶ Returns the velocity lower limits.

velocity_start
(self: pydrake.multibody.tree.Joint_[float]) → int¶ Returns the index to the first generalized velocity for this joint within the vector v of generalized velocities for the full multibody system.

velocity_upper_limits
(self: pydrake.multibody.tree.Joint_[float]) → numpy.ndarray[float64[m, 1]]¶ Returns the velocity upper limits.
 Template parameter

pydrake.multibody.tree.
LinearSpringDamper
¶

template
pydrake.multibody.tree.
LinearSpringDamper_
¶ Instantiations:
LinearSpringDamper_[float]
,LinearSpringDamper_[AutoDiffXd]
,LinearSpringDamper_[Expression]

class
LinearSpringDamper_[float]
¶ Bases:
pydrake.multibody.tree.ForceElement_[float]
This ForceElement models a springdamper attached between two points on two different bodies. Given a point P on a body A and a point Q on a body B with positions p_AP and p_BQ, respectively, this springdamper applies equal and opposite forces on bodies A and B according to:
f_AP = (k⋅(ℓ  ℓ₀) + c⋅dℓ/dt)⋅r̂ f_BQ = f_AP
where
ℓ = ‖p_WQ  p_WP‖
is the current length of the spring, dℓ/dt its rate of change,r̂ = (p_WQ  p_WP) / ℓ
is the normalized vector from P to Q, ℓ₀ is the free length of the spring and k and c are the stiffness and damping of the springdamper, respectively. This ForceElement is meant to model finite free length springs attached between two points. In this typical arrangement springs are usually preloaded, meaning they apply a nonzero spring force in the static configuration of the system. Thus, neither the free length ℓ₀ nor the current length ℓ of the spring can ever be zero. The length of the spring approaching zero would incur in a nonphysical configuration and therefore this element throws a RuntimeError exception in that case. Note that:The applied force is always along the line connecting points P and Q.  Damping always dissipates energy.  Forces on bodies A and B are equal and opposite according to Newton’s
third law.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
(self: pydrake.multibody.tree.LinearSpringDamper_[float], bodyA: pydrake.multibody.tree.Body_[float], p_AP: numpy.ndarray[float64[3, 1]], bodyB: pydrake.multibody.tree.Body_[float], p_BQ: numpy.ndarray[float64[3, 1]], free_length: float, stiffness: float, damping: float) → None¶ Constructor for a springdamper between a point P on
bodyA
and a point Q onbodyB
. Point P is defined by its positionp_AP
as measured and expressed in the body frame A and similarly, point Q is defined by its position p_BQ as measured and expressed in body frame B. The remaining parameters define: Parameter
free_length
:  The free length of the spring ℓ₀, in meters, at which the spring applies no forces. Since this force element is meant to model finite length springs, ℓ₀ must be strictly positive.
 Parameter
stiffness
:  The stiffness k of the spring in N/m. It must be nonnegative.
 Parameter
damping
:  The damping c of the damper in N⋅s/m. It must be nonnegative. Refer to this class’s documentation for further details.
Raises: RuntimeError if free_length
is negative or zero.Raises: RuntimeError if stiffness
is negative.Raises: RuntimeError if damping
is negative. Parameter

class

class
pydrake.multibody.tree.
LinearSpringDamper_[AutoDiffXd]
¶ Bases:
pydrake.multibody.tree.ForceElement_[AutoDiffXd]
This ForceElement models a springdamper attached between two points on two different bodies. Given a point P on a body A and a point Q on a body B with positions p_AP and p_BQ, respectively, this springdamper applies equal and opposite forces on bodies A and B according to:
f_AP = (k⋅(ℓ  ℓ₀) + c⋅dℓ/dt)⋅r̂ f_BQ = f_AP
where
ℓ = ‖p_WQ  p_WP‖
is the current length of the spring, dℓ/dt its rate of change,r̂ = (p_WQ  p_WP) / ℓ
is the normalized vector from P to Q, ℓ₀ is the free length of the spring and k and c are the stiffness and damping of the springdamper, respectively. This ForceElement is meant to model finite free length springs attached between two points. In this typical arrangement springs are usually preloaded, meaning they apply a nonzero spring force in the static configuration of the system. Thus, neither the free length ℓ₀ nor the current length ℓ of the spring can ever be zero. The length of the spring approaching zero would incur in a nonphysical configuration and therefore this element throws a RuntimeError exception in that case. Note that:The applied force is always along the line connecting points P and Q.  Damping always dissipates energy.  Forces on bodies A and B are equal and opposite according to Newton’s
third law.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
(self: pydrake.multibody.tree.LinearSpringDamper_[AutoDiffXd], bodyA: pydrake.multibody.tree.Body_[AutoDiffXd], p_AP: numpy.ndarray[float64[3, 1]], bodyB: pydrake.multibody.tree.Body_[AutoDiffXd], p_BQ: numpy.ndarray[float64[3, 1]], free_length: float, stiffness: float, damping: float) → None¶ Constructor for a springdamper between a point P on
bodyA
and a point Q onbodyB
. Point P is defined by its positionp_AP
as measured and expressed in the body frame A and similarly, point Q is defined by its position p_BQ as measured and expressed in body frame B. The remaining parameters define: Parameter
free_length
:  The free length of the spring ℓ₀, in meters, at which the spring applies no forces. Since this force element is meant to model finite length springs, ℓ₀ must be strictly positive.
 Parameter
stiffness
:  The stiffness k of the spring in N/m. It must be nonnegative.
 Parameter
damping
:  The damping c of the damper in N⋅s/m. It must be nonnegative. Refer to this class’s documentation for further details.
Raises: RuntimeError if free_length
is negative or zero.Raises: RuntimeError if stiffness
is negative.Raises: RuntimeError if damping
is negative. Parameter

class
pydrake.multibody.tree.
LinearSpringDamper_[Expression]
¶ Bases:
pydrake.multibody.tree.ForceElement_[Expression]
This ForceElement models a springdamper attached between two points on two different bodies. Given a point P on a body A and a point Q on a body B with positions p_AP and p_BQ, respectively, this springdamper applies equal and opposite forces on bodies A and B according to:
f_AP = (k⋅(ℓ  ℓ₀) + c⋅dℓ/dt)⋅r̂ f_BQ = f_AP
where
ℓ = ‖p_WQ  p_WP‖
is the current length of the spring, dℓ/dt its rate of change,r̂ = (p_WQ  p_WP) / ℓ
is the normalized vector from P to Q, ℓ₀ is the free length of the spring and k and c are the stiffness and damping of the springdamper, respectively. This ForceElement is meant to model finite free length springs attached between two points. In this typical arrangement springs are usually preloaded, meaning they apply a nonzero spring force in the static configuration of the system. Thus, neither the free length ℓ₀ nor the current length ℓ of the spring can ever be zero. The length of the spring approaching zero would incur in a nonphysical configuration and therefore this element throws a RuntimeError exception in that case. Note that:The applied force is always along the line connecting points P and Q.  Damping always dissipates energy.  Forces on bodies A and B are equal and opposite according to Newton’s
third law.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
(self: pydrake.multibody.tree.LinearSpringDamper_[Expression], bodyA: pydrake.multibody.tree.Body_[Expression], p_AP: numpy.ndarray[float64[3, 1]], bodyB: pydrake.multibody.tree.Body_[Expression], p_BQ: numpy.ndarray[float64[3, 1]], free_length: float, stiffness: float, damping: float) → None¶ Constructor for a springdamper between a point P on
bodyA
and a point Q onbodyB
. Point P is defined by its positionp_AP
as measured and expressed in the body frame A and similarly, point Q is defined by its position p_BQ as measured and expressed in body frame B. The remaining parameters define: Parameter
free_length
:  The free length of the spring ℓ₀, in meters, at which the spring applies no forces. Since this force element is meant to model finite length springs, ℓ₀ must be strictly positive.
 Parameter
stiffness
:  The stiffness k of the spring in N/m. It must be nonnegative.
 Parameter
damping
:  The damping c of the damper in N⋅s/m. It must be nonnegative. Refer to this class’s documentation for further details.
Raises: RuntimeError if free_length
is negative or zero.Raises: RuntimeError if stiffness
is negative.Raises: RuntimeError if damping
is negative. Parameter

class
pydrake.multibody.tree.
LinearSpringDamper_[float]
¶ Bases:
pydrake.multibody.tree.ForceElement_[float]
This ForceElement models a springdamper attached between two points on two different bodies. Given a point P on a body A and a point Q on a body B with positions p_AP and p_BQ, respectively, this springdamper applies equal and opposite forces on bodies A and B according to:
f_AP = (k⋅(ℓ  ℓ₀) + c⋅dℓ/dt)⋅r̂ f_BQ = f_AP
where
ℓ = ‖p_WQ  p_WP‖
is the current length of the spring, dℓ/dt its rate of change,r̂ = (p_WQ  p_WP) / ℓ
is the normalized vector from P to Q, ℓ₀ is the free length of the spring and k and c are the stiffness and damping of the springdamper, respectively. This ForceElement is meant to model finite free length springs attached between two points. In this typical arrangement springs are usually preloaded, meaning they apply a nonzero spring force in the static configuration of the system. Thus, neither the free length ℓ₀ nor the current length ℓ of the spring can ever be zero. The length of the spring approaching zero would incur in a nonphysical configuration and therefore this element throws a RuntimeError exception in that case. Note that:The applied force is always along the line connecting points P and Q.  Damping always dissipates energy.  Forces on bodies A and B are equal and opposite according to Newton’s
third law.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
(self: pydrake.multibody.tree.LinearSpringDamper_[float], bodyA: pydrake.multibody.tree.Body_[float], p_AP: numpy.ndarray[float64[3, 1]], bodyB: pydrake.multibody.tree.Body_[float], p_BQ: numpy.ndarray[float64[3, 1]], free_length: float, stiffness: float, damping: float) → None¶ Constructor for a springdamper between a point P on
bodyA
and a point Q onbodyB
. Point P is defined by its positionp_AP
as measured and expressed in the body frame A and similarly, point Q is defined by its position p_BQ as measured and expressed in body frame B. The remaining parameters define: Parameter
free_length
:  The free length of the spring ℓ₀, in meters, at which the spring applies no forces. Since this force element is meant to model finite length springs, ℓ₀ must be strictly positive.
 Parameter
stiffness
:  The stiffness k of the spring in N/m. It must be nonnegative.
 Parameter
damping
:  The damping c of the damper in N⋅s/m. It must be nonnegative. Refer to this class’s documentation for further details.
Raises: RuntimeError if free_length
is negative or zero.Raises: RuntimeError if stiffness
is negative.Raises: RuntimeError if damping
is negative. Parameter

class
pydrake.multibody.tree.
ModelInstanceIndex
¶ Type used to identify model instances by index within a multibody tree system.

__init__
(self: pydrake.multibody.tree.ModelInstanceIndex, arg0: int) → None¶ Default constructor; the result is an invalid index. This only exists to serve applications which require a default constructor.

is_valid
(self: pydrake.multibody.tree.ModelInstanceIndex) → bool¶ Reports if the index is valid–the only operation on an invalid index that doesn’t throw an exception in Debug builds.


pydrake.multibody.tree.
MultibodyForces
¶

template
pydrake.multibody.tree.
MultibodyForces_
¶ Instantiations:
MultibodyForces_[float]
,MultibodyForces_[AutoDiffXd]
,MultibodyForces_[Expression]

class
MultibodyForces_[float]
¶ A class to hold a set of forces applied to a MultibodyTree system. Forces can include generalized forces as well as body spatial forces.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

AddInForces
(self: pydrake.multibody.tree.MultibodyForces_[float], addend: pydrake.multibody.tree.MultibodyForces_[float]) → None¶ Adds into
this
the force contribution stored inaddend
.

SetZero
(self: pydrake.multibody.tree.MultibodyForces_[float]) → pydrake.multibody.tree.MultibodyForces_[float]¶ Sets
this
to store zero forces (no applied forces).

__init__
(self: pydrake.multibody.tree.MultibodyForces_[float], plant: drake::multibody::MultibodyPlant<double>) → None¶ Constructs a force object to store a set of forces to be applied to the multibody model for
plant
. Forces are initialized to zero, meaning no forces are applied.plant
must have been already finalized with MultibodyPlant::Finalize() or this constructor will abort.

generalized_forces
(self: pydrake.multibody.tree.MultibodyForces_[float]) → numpy.ndarray[float64[m, 1]]¶ (Advanced) Returns a constant reference to the vector of generalized forces stored by
this
forces object.

mutable_generalized_forces
(self: pydrake.multibody.tree.MultibodyForces_[float]) → numpy.ndarray[float64[m, 1]]¶ (Advanced) Mutable version of generalized_forces().
 Template parameter

class

class
pydrake.multibody.tree.
MultibodyForces_[AutoDiffXd]
¶ A class to hold a set of forces applied to a MultibodyTree system. Forces can include generalized forces as well as body spatial forces.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

AddInForces
(self: pydrake.multibody.tree.MultibodyForces_[AutoDiffXd], addend: pydrake.multibody.tree.MultibodyForces_[AutoDiffXd]) → None¶ Adds into
this
the force contribution stored inaddend
.

SetZero
(self: pydrake.multibody.tree.MultibodyForces_[AutoDiffXd]) → pydrake.multibody.tree.MultibodyForces_[AutoDiffXd]¶ Sets
this
to store zero forces (no applied forces).

__init__
(self: pydrake.multibody.tree.MultibodyForces_[AutoDiffXd], plant: drake::multibody::MultibodyPlant<Eigen::AutoDiffScalar<Eigen::Matrix<double, 1, 1, 0, 1, 1> > >) → None¶ Constructs a force object to store a set of forces to be applied to the multibody model for
plant
. Forces are initialized to zero, meaning no forces are applied.plant
must have been already finalized with MultibodyPlant::Finalize() or this constructor will abort.

generalized_forces
(self: pydrake.multibody.tree.MultibodyForces_[AutoDiffXd]) → numpy.ndarray[object[m, 1]]¶ (Advanced) Returns a constant reference to the vector of generalized forces stored by
this
forces object.

mutable_generalized_forces
(self: pydrake.multibody.tree.MultibodyForces_[AutoDiffXd]) → numpy.ndarray[object[m, 1]]¶ (Advanced) Mutable version of generalized_forces().
 Template parameter

class
pydrake.multibody.tree.
MultibodyForces_[Expression]
¶ A class to hold a set of forces applied to a MultibodyTree system. Forces can include generalized forces as well as body spatial forces.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

AddInForces
(self: pydrake.multibody.tree.MultibodyForces_[Expression], addend: pydrake.multibody.tree.MultibodyForces_[Expression]) → None¶ Adds into
this
the force contribution stored inaddend
.

SetZero
(self: pydrake.multibody.tree.MultibodyForces_[Expression]) → pydrake.multibody.tree.MultibodyForces_[Expression]¶ Sets
this
to store zero forces (no applied forces).

__init__
(self: pydrake.multibody.tree.MultibodyForces_[Expression], plant: drake::multibody::MultibodyPlant<drake::symbolic::Expression>) → None¶ Constructs a force object to store a set of forces to be applied to the multibody model for
plant
. Forces are initialized to zero, meaning no forces are applied.plant
must have been already finalized with MultibodyPlant::Finalize() or this constructor will abort.

generalized_forces
(self: pydrake.multibody.tree.MultibodyForces_[Expression]) → numpy.ndarray[object[m, 1]]¶ (Advanced) Returns a constant reference to the vector of generalized forces stored by
this
forces object.

mutable_generalized_forces
(self: pydrake.multibody.tree.MultibodyForces_[Expression]) → numpy.ndarray[object[m, 1]]¶ (Advanced) Mutable version of generalized_forces().
 Template parameter

class
pydrake.multibody.tree.
MultibodyForces_[float]
¶ A class to hold a set of forces applied to a MultibodyTree system. Forces can include generalized forces as well as body spatial forces.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

AddInForces
(self: pydrake.multibody.tree.MultibodyForces_[float], addend: pydrake.multibody.tree.MultibodyForces_[float]) → None¶ Adds into
this
the force contribution stored inaddend
.

SetZero
(self: pydrake.multibody.tree.MultibodyForces_[float]) → pydrake.multibody.tree.MultibodyForces_[float]¶ Sets
this
to store zero forces (no applied forces).

__init__
(self: pydrake.multibody.tree.MultibodyForces_[float], plant: drake::multibody::MultibodyPlant<double>) → None¶ Constructs a force object to store a set of forces to be applied to the multibody model for
plant
. Forces are initialized to zero, meaning no forces are applied.plant
must have been already finalized with MultibodyPlant::Finalize() or this constructor will abort.

generalized_forces
(self: pydrake.multibody.tree.MultibodyForces_[float]) → numpy.ndarray[float64[m, 1]]¶ (Advanced) Returns a constant reference to the vector of generalized forces stored by
this
forces object.

mutable_generalized_forces
(self: pydrake.multibody.tree.MultibodyForces_[float]) → numpy.ndarray[float64[m, 1]]¶ (Advanced) Mutable version of generalized_forces().
 Template parameter

pydrake.multibody.tree.
PrismaticJoint
¶

template
pydrake.multibody.tree.
PrismaticJoint_
¶ Instantiations:
PrismaticJoint_[float]
,PrismaticJoint_[AutoDiffXd]
,PrismaticJoint_[Expression]

class
PrismaticJoint_[float]
¶ Bases:
pydrake.multibody.tree.Joint_[float]
This Joint allows two bodies to translate relative to one another along a common axis. That is, given a frame F attached to the parent body P and a frame M attached to the child body B (see the Joint class’s documentation), this Joint allows frames F and M to translate with respect to each other along an axis â. The translation distance is defined positive when child body B translates along the direction of â. Axis â is constant and has the same measures in both frames F and M, that is,
â_F = â_M
. Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
(self: pydrake.multibody.tree.PrismaticJoint_[float], name: str, frame_on_parent: pydrake.multibody.tree.Frame_[float], frame_on_child: pydrake.multibody.tree.Frame_[float], axis: numpy.ndarray[float64[3, 1]], pos_lower_limit: float = inf, pos_upper_limit: float = inf, damping: float = 0) → None¶ Constructor to create a prismatic joint between two bodies so that frame F attached to the parent body P and frame M attached to the child body B, translate relatively to one another along a common axis. See this class’s documentation for further details on the definition of these frames and translation distance. The first three arguments to this constructor are those of the Joint class constructor. See the Joint class’s documentation for details. The additional parameter
axis
is: Parameter
axis
:  A vector in ℝ³ specifying the translation axis for this joint.
Given that frame M only translates with respect to F and there is
no relative rotation, the measures of
axis
in either frame F or M are exactly the same, that is,axis_F = axis_M
. This vector can have any length, only the direction is used.  Parameter
pos_lower_limit
:  Lower position limit, in meters, for the translation coordinate (see get_translation()).
 Parameter
pos_upper_limit
:  Upper position limit, in meters, for the translation coordinate (see get_translation()).
 Parameter
damping
:  Viscous damping coefficient, in N⋅s/m, used to model losses within
the joint. The damping force (in N) is modeled as
f = damping⋅v
, i.e. opposing motion, with v the translational speed forthis
joint (see get_translation_rate()).
Raises:  RuntimeError if the L2 norm of
axis
is less than the square  root of machine epsilon.
Raises: RuntimeError if damping is negative.
Raises: RuntimeError if pos_lower_limit > pos_upper_limit.
 Parameter

get_translation
(self: pydrake.multibody.tree.PrismaticJoint_[float], context: pydrake.systems.framework.Context_[float]) → float¶ Gets the translation distance of
this
mobilizer fromcontext
. Parameter
context
:  The context of the MultibodyTree this joint belongs to.
Returns: The translation coordinate of this
joint read fromcontext
. Parameter

get_translation_rate
(self: pydrake.multibody.tree.PrismaticJoint_[float], context: pydrake.systems.framework.Context_[float]) → float¶ Gets the rate of change, in meters per second, of
this
joint’s translation distance (see get_translation()) fromcontext
. Parameter
context
:  The context of the MultibodyTree this joint belongs to.
Returns: The rate of change of this
joint’s translation read fromcontext
. Parameter

set_random_translation_distribution
(self: pydrake.multibody.tree.PrismaticJoint_[float], translation: pydrake.symbolic.Expression) → None¶

set_translation
(self: pydrake.multibody.tree.PrismaticJoint_[float], context: pydrake.systems.framework.Context_[float], translation: float) → pydrake.multibody.tree.PrismaticJoint_[float]¶ Sets
context
so that the generalized coordinate corresponding to the translation distance ofthis
joint equalstranslation
. Parameter
context
:  The context of the MultibodyTree this joint belongs to.
 Parameter
translation
:  The desired translation in meters to be stored in
context
.
Returns: a constant reference to this
joint. Parameter

set_translation_rate
(self: pydrake.multibody.tree.PrismaticJoint_[float], context: pydrake.systems.framework.Context_[float], translation_dot: float) → pydrake.multibody.tree.PrismaticJoint_[float]¶ Sets the rate of change, in meters per second, of
this
joint’s translation distance totranslation_dot
. The new rate of changetranslation_dot
gets stored incontext
. Parameter
context
:  The context of the MultibodyTree this joint belongs to.
 Parameter
translation_dot
:  The desired rate of change of
this
joints’s translation in meters per second.
Returns: a constant reference to this
joint. Parameter
 Template parameter

class

class
pydrake.multibody.tree.
PrismaticJoint_[AutoDiffXd]
¶ Bases:
pydrake.multibody.tree.Joint_[AutoDiffXd]
This Joint allows two bodies to translate relative to one another along a common axis. That is, given a frame F attached to the parent body P and a frame M attached to the child body B (see the Joint class’s documentation), this Joint allows frames F and M to translate with respect to each other along an axis â. The translation distance is defined positive when child body B translates along the direction of â. Axis â is constant and has the same measures in both frames F and M, that is,
â_F = â_M
. Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
(self: pydrake.multibody.tree.PrismaticJoint_[AutoDiffXd], name: str, frame_on_parent: pydrake.multibody.tree.Frame_[AutoDiffXd], frame_on_child: pydrake.multibody.tree.Frame_[AutoDiffXd], axis: numpy.ndarray[float64[3, 1]], pos_lower_limit: float = inf, pos_upper_limit: float = inf, damping: float = 0) → None¶ Constructor to create a prismatic joint between two bodies so that frame F attached to the parent body P and frame M attached to the child body B, translate relatively to one another along a common axis. See this class’s documentation for further details on the definition of these frames and translation distance. The first three arguments to this constructor are those of the Joint class constructor. See the Joint class’s documentation for details. The additional parameter
axis
is: Parameter
axis
:  A vector in ℝ³ specifying the translation axis for this joint.
Given that frame M only translates with respect to F and there is
no relative rotation, the measures of
axis
in either frame F or M are exactly the same, that is,axis_F = axis_M
. This vector can have any length, only the direction is used.  Parameter
pos_lower_limit
:  Lower position limit, in meters, for the translation coordinate (see get_translation()).
 Parameter
pos_upper_limit
:  Upper position limit, in meters, for the translation coordinate (see get_translation()).
 Parameter
damping
:  Viscous damping coefficient, in N⋅s/m, used to model losses within
the joint. The damping force (in N) is modeled as
f = damping⋅v
, i.e. opposing motion, with v the translational speed forthis
joint (see get_translation_rate()).
Raises:  RuntimeError if the L2 norm of
axis
is less than the square  root of machine epsilon.
Raises: RuntimeError if damping is negative.
Raises: RuntimeError if pos_lower_limit > pos_upper_limit.
 Parameter

get_translation
(self: pydrake.multibody.tree.PrismaticJoint_[AutoDiffXd], context: pydrake.systems.framework.Context_[AutoDiffXd]) → pydrake.autodiffutils.AutoDiffXd¶ Gets the translation distance of
this
mobilizer fromcontext
. Parameter
context
:  The context of the MultibodyTree this joint belongs to.
Returns: The translation coordinate of this
joint read fromcontext
. Parameter

get_translation_rate
(self: pydrake.multibody.tree.PrismaticJoint_[AutoDiffXd], context: pydrake.systems.framework.Context_[AutoDiffXd]) → pydrake.autodiffutils.AutoDiffXd¶ Gets the rate of change, in meters per second, of
this
joint’s translation distance (see get_translation()) fromcontext
. Parameter
context
:  The context of the MultibodyTree this joint belongs to.
Returns: The rate of change of this
joint’s translation read fromcontext
. Parameter

set_random_translation_distribution
(self: pydrake.multibody.tree.PrismaticJoint_[AutoDiffXd], translation: pydrake.symbolic.Expression) → None¶

set_translation
(self: pydrake.multibody.tree.PrismaticJoint_[AutoDiffXd], context: pydrake.systems.framework.Context_[AutoDiffXd], translation: pydrake.autodiffutils.AutoDiffXd) → pydrake.multibody.tree.PrismaticJoint_[AutoDiffXd]¶ Sets
context
so that the generalized coordinate corresponding to the translation distance ofthis
joint equalstranslation
. Parameter
context
:  The context of the MultibodyTree this joint belongs to.
 Parameter
translation
:  The desired translation in meters to be stored in
context
.
Returns: a constant reference to this
joint. Parameter

set_translation_rate
(self: pydrake.multibody.tree.PrismaticJoint_[AutoDiffXd], context: pydrake.systems.framework.Context_[AutoDiffXd], translation_dot: pydrake.autodiffutils.AutoDiffXd) → pydrake.multibody.tree.PrismaticJoint_[AutoDiffXd]¶ Sets the rate of change, in meters per second, of
this
joint’s translation distance totranslation_dot
. The new rate of changetranslation_dot
gets stored incontext
. Parameter
context
:  The context of the MultibodyTree this joint belongs to.
 Parameter
translation_dot
:  The desired rate of change of
this
joints’s translation in meters per second.
Returns: a constant reference to this
joint. Parameter
 Template parameter

class
pydrake.multibody.tree.
PrismaticJoint_[Expression]
¶ Bases:
pydrake.multibody.tree.Joint_[Expression]
This Joint allows two bodies to translate relative to one another along a common axis. That is, given a frame F attached to the parent body P and a frame M attached to the child body B (see the Joint class’s documentation), this Joint allows frames F and M to translate with respect to each other along an axis â. The translation distance is defined positive when child body B translates along the direction of â. Axis â is constant and has the same measures in both frames F and M, that is,
â_F = â_M
. Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
(self: pydrake.multibody.tree.PrismaticJoint_[Expression], name: str, frame_on_parent: pydrake.multibody.tree.Frame_[Expression], frame_on_child: pydrake.multibody.tree.Frame_[Expression], axis: numpy.ndarray[float64[3, 1]], pos_lower_limit: float = inf, pos_upper_limit: float = inf, damping: float = 0) → None¶ Constructor to create a prismatic joint between two bodies so that frame F attached to the parent body P and frame M attached to the child body B, translate relatively to one another along a common axis. See this class’s documentation for further details on the definition of these frames and translation distance. The first three arguments to this constructor are those of the Joint class constructor. See the Joint class’s documentation for details. The additional parameter
axis
is: Parameter
axis
:  A vector in ℝ³ specifying the translation axis for this joint.
Given that frame M only translates with respect to F and there is
no relative rotation, the measures of
axis
in either frame F or M are exactly the same, that is,axis_F = axis_M
. This vector can have any length, only the direction is used.  Parameter
pos_lower_limit
:  Lower position limit, in meters, for the translation coordinate (see get_translation()).
 Parameter
pos_upper_limit
:  Upper position limit, in meters, for the translation coordinate (see get_translation()).
 Parameter
damping
:  Viscous damping coefficient, in N⋅s/m, used to model losses within
the joint. The damping force (in N) is modeled as
f = damping⋅v
, i.e. opposing motion, with v the translational speed forthis
joint (see get_translation_rate()).
Raises:  RuntimeError if the L2 norm of
axis
is less than the square  root of machine epsilon.
Raises: RuntimeError if damping is negative.
Raises: RuntimeError if pos_lower_limit > pos_upper_limit.
 Parameter

get_translation
(self: pydrake.multibody.tree.PrismaticJoint_[Expression], context: pydrake.systems.framework.Context_[Expression]) → pydrake.symbolic.Expression¶ Gets the translation distance of
this
mobilizer fromcontext
. Parameter
context
:  The context of the MultibodyTree this joint belongs to.
Returns: The translation coordinate of this
joint read fromcontext
. Parameter

get_translation_rate
(self: pydrake.multibody.tree.PrismaticJoint_[Expression], context: pydrake.systems.framework.Context_[Expression]) → pydrake.symbolic.Expression¶ Gets the rate of change, in meters per second, of
this
joint’s translation distance (see get_translation()) fromcontext
. Parameter
context
:  The context of the MultibodyTree this joint belongs to.
Returns: The rate of change of this
joint’s translation read fromcontext
. Parameter

set_random_translation_distribution
(self: pydrake.multibody.tree.PrismaticJoint_[Expression], translation: pydrake.symbolic.Expression) → None¶

set_translation
(self: pydrake.multibody.tree.PrismaticJoint_[Expression], context: pydrake.systems.framework.Context_[Expression], translation: pydrake.symbolic.Expression) → pydrake.multibody.tree.PrismaticJoint_[Expression]¶ Sets
context
so that the generalized coordinate corresponding to the translation distance ofthis
joint equalstranslation
. Parameter
context
:  The context of the MultibodyTree this joint belongs to.
 Parameter
translation
:  The desired translation in meters to be stored in
context
.
Returns: a constant reference to this
joint. Parameter

set_translation_rate
(self: pydrake.multibody.tree.PrismaticJoint_[Expression], context: pydrake.systems.framework.Context_[Expression], translation_dot: pydrake.symbolic.Expression) → pydrake.multibody.tree.PrismaticJoint_[Expression]¶ Sets the rate of change, in meters per second, of
this
joint’s translation distance totranslation_dot
. The new rate of changetranslation_dot
gets stored incontext
. Parameter
context
:  The context of the MultibodyTree this joint belongs to.
 Parameter
translation_dot
:  The desired rate of change of
this
joints’s translation in meters per second.
Returns: a constant reference to this
joint. Parameter
 Template parameter

class
pydrake.multibody.tree.
PrismaticJoint_[float]
¶ Bases:
pydrake.multibody.tree.Joint_[float]
This Joint allows two bodies to translate relative to one another along a common axis. That is, given a frame F attached to the parent body P and a frame M attached to the child body B (see the Joint class’s documentation), this Joint allows frames F and M to translate with respect to each other along an axis â. The translation distance is defined positive when child body B translates along the direction of â. Axis â is constant and has the same measures in both frames F and M, that is,
â_F = â_M
. Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
(self: pydrake.multibody.tree.PrismaticJoint_[float], name: str, frame_on_parent: pydrake.multibody.tree.Frame_[float], frame_on_child: pydrake.multibody.tree.Frame_[float], axis: numpy.ndarray[float64[3, 1]], pos_lower_limit: float = inf, pos_upper_limit: float = inf, damping: float = 0) → None¶ Constructor to create a prismatic joint between two bodies so that frame F attached to the parent body P and frame M attached to the child body B, translate relatively to one another along a common axis. See this class’s documentation for further details on the definition of these frames and translation distance. The first three arguments to this constructor are those of the Joint class constructor. See the Joint class’s documentation for details. The additional parameter
axis
is: Parameter
axis
:  A vector in ℝ³ specifying the translation axis for this joint.
Given that frame M only translates with respect to F and there is
no relative rotation, the measures of
axis
in either frame F or M are exactly the same, that is,axis_F = axis_M
. This vector can have any length, only the direction is used.  Parameter
pos_lower_limit
:  Lower position limit, in meters, for the translation coordinate (see get_translation()).
 Parameter
pos_upper_limit
:  Upper position limit, in meters, for the translation coordinate (see get_translation()).
 Parameter
damping
:  Viscous damping coefficient, in N⋅s/m, used to model losses within
the joint. The damping force (in N) is modeled as
f = damping⋅v
, i.e. opposing motion, with v the translational speed forthis
joint (see get_translation_rate()).
Raises:  RuntimeError if the L2 norm of
axis
is less than the square  root of machine epsilon.
Raises: RuntimeError if damping is negative.
Raises: RuntimeError if pos_lower_limit > pos_upper_limit.
 Parameter

get_translation
(self: pydrake.multibody.tree.PrismaticJoint_[float], context: pydrake.systems.framework.Context_[float]) → float¶ Gets the translation distance of
this
mobilizer fromcontext
. Parameter
context
:  The context of the MultibodyTree this joint belongs to.
Returns: The translation coordinate of this
joint read fromcontext
. Parameter

get_translation_rate
(self: pydrake.multibody.tree.PrismaticJoint_[float], context: pydrake.systems.framework.Context_[float]) → float¶ Gets the rate of change, in meters per second, of
this
joint’s translation distance (see get_translation()) fromcontext
. Parameter
context
:  The context of the MultibodyTree this joint belongs to.
Returns: The rate of change of this
joint’s translation read fromcontext
. Parameter

set_random_translation_distribution
(self: pydrake.multibody.tree.PrismaticJoint_[float], translation: pydrake.symbolic.Expression) → None¶

set_translation
(self: pydrake.multibody.tree.PrismaticJoint_[float], context: pydrake.systems.framework.Context_[float], translation: float) → pydrake.multibody.tree.PrismaticJoint_[float]¶ Sets
context
so that the generalized coordinate corresponding to the translation distance ofthis
joint equalstranslation
. Parameter
context
:  The context of the MultibodyTree this joint belongs to.
 Parameter
translation
:  The desired translation in meters to be stored in
context
.
Returns: a constant reference to this
joint. Parameter

set_translation_rate
(self: pydrake.multibody.tree.PrismaticJoint_[float], context: pydrake.systems.framework.Context_[float], translation_dot: float) → pydrake.multibody.tree.PrismaticJoint_[float]¶ Sets the rate of change, in meters per second, of
this
joint’s translation distance totranslation_dot
. The new rate of changetranslation_dot
gets stored incontext
. Parameter
context
:  The context of the MultibodyTree this joint belongs to.
 Parameter
translation_dot
:  The desired rate of change of
this
joints’s translation in meters per second.
Returns: a constant reference to this
joint. Parameter
 Template parameter

pydrake.multibody.tree.
RevoluteJoint
¶

template
pydrake.multibody.tree.
RevoluteJoint_
¶ Instantiations:
RevoluteJoint_[float]
,RevoluteJoint_[AutoDiffXd]
,RevoluteJoint_[Expression]

class
RevoluteJoint_[float]
¶ Bases:
pydrake.multibody.tree.Joint_[float]
This Joint allows two bodies to rotate relatively to one another around a common axis. That is, given a frame F attached to the parent body P and a frame M attached to the child body B (see the Joint class’s documentation), this Joint allows frames F and M to rotate with respect to each other about an axis â. The rotation angle’s sign is defined such that child body B rotates about axis â according to the right hand rule, with thumb aligned in the axis direction. Axis â is constant and has the same measures in both frames F and M, that is,
â_F = â_M
. Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
(self: pydrake.multibody.tree.RevoluteJoint_[float], name: str, frame_on_parent: pydrake.multibody.tree.Frame_[float], frame_on_child: pydrake.multibody.tree.Frame_[float], axis: numpy.ndarray[float64[3, 1]], damping: float = 0) → None¶ Constructor to create a revolute joint between two bodies so that frame F attached to the parent body P and frame M attached to the child body B, rotate relatively to one another about a common axis. See this class’s documentation for further details on the definition of these frames and rotation angle. This constructor signature creates a joint with no joint limits, i.e. the joint position, velocity and acceleration limits are the pair
(∞, ∞)
. The first three arguments to this constructor are those of the Joint class constructor. See the Joint class’s documentation for details. The additional parameters are: Parameter
axis
:  A vector in ℝ³ specifying the axis of revolution for this joint.
Given that frame M only rotates with respect to F and their
origins are coincident at all times, the measures of
axis
in either frame F or M are exactly the same, that is,axis_F = axis_M
. In other words,axis_F
(oraxis_M
) is the eigenvector ofR_FM
with eigenvalue equal to one. This vector can have any length, only the direction is used. This method aborts ifaxis
is the zero vector.  Parameter
damping
:  Viscous damping coefficient, in N⋅m⋅s, used to model losses within
the joint. The damping torque (in N⋅m) is modeled as
τ = damping⋅ω
, i.e. opposing motion, with ω the angular rate forthis
joint (see get_angular_rate()).
Raises: RuntimeError if damping is negative.  Parameter

get_angle
(self: pydrake.multibody.tree.RevoluteJoint_[float], context: pydrake.systems.framework.Context_[float]) → float¶ Gets the rotation angle of
this
mobilizer fromcontext
. Parameter
context
:  The context of the MultibodyTree this joint belongs to.
Returns: The angle coordinate of this
joint stored in thecontext
. Parameter

set_angle
(self: pydrake.multibody.tree.RevoluteJoint_[float], context: pydrake.systems.framework.Context_[float], angle: float) → pydrake.multibody.tree.RevoluteJoint_[float]¶ Sets the
context
so that the generalized coordinate corresponding to the rotation angle ofthis
joint equalsangle
. Parameter
context
:  The context of the MultibodyTree this joint belongs to.
 Parameter
angle
:  The desired angle in radians to be stored in
context
.
Returns: a constant reference to this
joint. Parameter

set_random_angle_distribution
(self: pydrake.multibody.tree.RevoluteJoint_[float], angle: pydrake.symbolic.Expression) → None¶
 Template parameter

class

class
pydrake.multibody.tree.
RevoluteJoint_[AutoDiffXd]
¶ Bases:
pydrake.multibody.tree.Joint_[AutoDiffXd]
This Joint allows two bodies to rotate relatively to one another around a common axis. That is, given a frame F attached to the parent body P and a frame M attached to the child body B (see the Joint class’s documentation), this Joint allows frames F and M to rotate with respect to each other about an axis â. The rotation angle’s sign is defined such that child body B rotates about axis â according to the right hand rule, with thumb aligned in the axis direction. Axis â is constant and has the same measures in both frames F and M, that is,
â_F = â_M
. Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
(self: pydrake.multibody.tree.RevoluteJoint_[AutoDiffXd], name: str, frame_on_parent: pydrake.multibody.tree.Frame_[AutoDiffXd], frame_on_child: pydrake.multibody.tree.Frame_[AutoDiffXd], axis: numpy.ndarray[float64[3, 1]], damping: float = 0) → None¶ Constructor to create a revolute joint between two bodies so that frame F attached to the parent body P and frame M attached to the child body B, rotate relatively to one another about a common axis. See this class’s documentation for further details on the definition of these frames and rotation angle. This constructor signature creates a joint with no joint limits, i.e. the joint position, velocity and acceleration limits are the pair
(∞, ∞)
. The first three arguments to this constructor are those of the Joint class constructor. See the Joint class’s documentation for details. The additional parameters are: Parameter
axis
:  A vector in ℝ³ specifying the axis of revolution for this joint.
Given that frame M only rotates with respect to F and their
origins are coincident at all times, the measures of
axis
in either frame F or M are exactly the same, that is,axis_F = axis_M
. In other words,axis_F
(oraxis_M
) is the eigenvector ofR_FM
with eigenvalue equal to one. This vector can have any length, only the direction is used. This method aborts ifaxis
is the zero vector.  Parameter
damping
:  Viscous damping coefficient, in N⋅m⋅s, used to model losses within
the joint. The damping torque (in N⋅m) is modeled as
τ = damping⋅ω
, i.e. opposing motion, with ω the angular rate forthis
joint (see get_angular_rate()).
Raises: RuntimeError if damping is negative.  Parameter

get_angle
(self: pydrake.multibody.tree.RevoluteJoint_[AutoDiffXd], context: pydrake.systems.framework.Context_[AutoDiffXd]) → pydrake.autodiffutils.AutoDiffXd¶ Gets the rotation angle of
this
mobilizer fromcontext
. Parameter
context
:  The context of the MultibodyTree this joint belongs to.
Returns: The angle coordinate of this
joint stored in thecontext
. Parameter

set_angle
(self: pydrake.multibody.tree.RevoluteJoint_[AutoDiffXd], context: pydrake.systems.framework.Context_[AutoDiffXd], angle: pydrake.autodiffutils.AutoDiffXd) → pydrake.multibody.tree.RevoluteJoint_[AutoDiffXd]¶ Sets the
context
so that the generalized coordinate corresponding to the rotation angle ofthis
joint equalsangle
. Parameter
context
:  The context of the MultibodyTree this joint belongs to.
 Parameter
angle
:  The desired angle in radians to be stored in
context
.
Returns: a constant reference to this
joint. Parameter

set_random_angle_distribution
(self: pydrake.multibody.tree.RevoluteJoint_[AutoDiffXd], angle: pydrake.symbolic.Expression) → None¶
 Template parameter

class
pydrake.multibody.tree.
RevoluteJoint_[Expression]
¶ Bases:
pydrake.multibody.tree.Joint_[Expression]
This Joint allows two bodies to rotate relatively to one another around a common axis. That is, given a frame F attached to the parent body P and a frame M attached to the child body B (see the Joint class’s documentation), this Joint allows frames F and M to rotate with respect to each other about an axis â. The rotation angle’s sign is defined such that child body B rotates about axis â according to the right hand rule, with thumb aligned in the axis direction. Axis â is constant and has the same measures in both frames F and M, that is,
â_F = â_M
. Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
(self: pydrake.multibody.tree.RevoluteJoint_[Expression], name: str, frame_on_parent: pydrake.multibody.tree.Frame_[Expression], frame_on_child: pydrake.multibody.tree.Frame_[Expression], axis: numpy.ndarray[float64[3, 1]], damping: float = 0) → None¶ Constructor to create a revolute joint between two bodies so that frame F attached to the parent body P and frame M attached to the child body B, rotate relatively to one another about a common axis. See this class’s documentation for further details on the definition of these frames and rotation angle. This constructor signature creates a joint with no joint limits, i.e. the joint position, velocity and acceleration limits are the pair
(∞, ∞)
. The first three arguments to this constructor are those of the Joint class constructor. See the Joint class’s documentation for details. The additional parameters are: Parameter
axis
:  A vector in ℝ³ specifying the axis of revolution for this joint.
Given that frame M only rotates with respect to F and their
origins are coincident at all times, the measures of
axis
in either frame F or M are exactly the same, that is,axis_F = axis_M
. In other words,axis_F
(oraxis_M
) is the eigenvector ofR_FM
with eigenvalue equal to one. This vector can have any length, only the direction is used. This method aborts ifaxis
is the zero vector.  Parameter
damping
:  Viscous damping coefficient, in N⋅m⋅s, used to model losses within
the joint. The damping torque (in N⋅m) is modeled as
τ = damping⋅ω
, i.e. opposing motion, with ω the angular rate forthis
joint (see get_angular_rate()).
Raises: RuntimeError if damping is negative.  Parameter

get_angle
(self: pydrake.multibody.tree.RevoluteJoint_[Expression], context: pydrake.systems.framework.Context_[Expression]) → pydrake.symbolic.Expression¶ Gets the rotation angle of
this
mobilizer fromcontext
. Parameter
context
:  The context of the MultibodyTree this joint belongs to.
Returns: The angle coordinate of this
joint stored in thecontext
. Parameter

set_angle
(self: pydrake.multibody.tree.RevoluteJoint_[Expression], context: pydrake.systems.framework.Context_[Expression], angle: pydrake.symbolic.Expression) → pydrake.multibody.tree.RevoluteJoint_[Expression]¶ Sets the
context
so that the generalized coordinate corresponding to the rotation angle ofthis
joint equalsangle
. Parameter
context
:  The context of the MultibodyTree this joint belongs to.
 Parameter
angle
:  The desired angle in radians to be stored in
context
.
Returns: a constant reference to this
joint. Parameter

set_random_angle_distribution
(self: pydrake.multibody.tree.RevoluteJoint_[Expression], angle: pydrake.symbolic.Expression) → None¶
 Template parameter

class
pydrake.multibody.tree.
RevoluteJoint_[float]
¶ Bases:
pydrake.multibody.tree.Joint_[float]
This Joint allows two bodies to rotate relatively to one another around a common axis. That is, given a frame F attached to the parent body P and a frame M attached to the child body B (see the Joint class’s documentation), this Joint allows frames F and M to rotate with respect to each other about an axis â. The rotation angle’s sign is defined such that child body B rotates about axis â according to the right hand rule, with thumb aligned in the axis direction. Axis â is constant and has the same measures in both frames F and M, that is,
â_F = â_M
. Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
(self: pydrake.multibody.tree.RevoluteJoint_[float], name: str, frame_on_parent: pydrake.multibody.tree.Frame_[float], frame_on_child: pydrake.multibody.tree.Frame_[float], axis: numpy.ndarray[float64[3, 1]], damping: float = 0) → None¶ Constructor to create a revolute joint between two bodies so that frame F attached to the parent body P and frame M attached to the child body B, rotate relatively to one another about a common axis. See this class’s documentation for further details on the definition of these frames and rotation angle. This constructor signature creates a joint with no joint limits, i.e. the joint position, velocity and acceleration limits are the pair
(∞, ∞)
. The first three arguments to this constructor are those of the Joint class constructor. See the Joint class’s documentation for details. The additional parameters are: Parameter
axis
:  A vector in ℝ³ specifying the axis of revolution for this joint.
Given that frame M only rotates with respect to F and their
origins are coincident at all times, the measures of
axis
in either frame F or M are exactly the same, that is,axis_F = axis_M
. In other words,axis_F
(oraxis_M
) is the eigenvector ofR_FM
with eigenvalue equal to one. This vector can have any length, only the direction is used. This method aborts ifaxis
is the zero vector.  Parameter
damping
:  Viscous damping coefficient, in N⋅m⋅s, used to model losses within
the joint. The damping torque (in N⋅m) is modeled as
τ = damping⋅ω
, i.e. opposing motion, with ω the angular rate forthis
joint (see get_angular_rate()).
Raises: RuntimeError if damping is negative.  Parameter

get_angle
(self: pydrake.multibody.tree.RevoluteJoint_[float], context: pydrake.systems.framework.Context_[float]) → float¶ Gets the rotation angle of
this
mobilizer fromcontext
. Parameter
context
:  The context of the MultibodyTree this joint belongs to.
Returns: The angle coordinate of this
joint stored in thecontext
. Parameter

set_angle
(self: pydrake.multibody.tree.RevoluteJoint_[float], context: pydrake.systems.framework.Context_[float], angle: float) → pydrake.multibody.tree.RevoluteJoint_[float]¶ Sets the
context
so that the generalized coordinate corresponding to the rotation angle ofthis
joint equalsangle
. Parameter
context
:  The context of the MultibodyTree this joint belongs to.
 Parameter
angle
:  The desired angle in radians to be stored in
context
.
Returns: a constant reference to this
joint. Parameter

set_random_angle_distribution
(self: pydrake.multibody.tree.RevoluteJoint_[float], angle: pydrake.symbolic.Expression) → None¶
 Template parameter

pydrake.multibody.tree.
RigidBody
¶

template
pydrake.multibody.tree.
RigidBody_
¶ Instantiations:
RigidBody_[float]
,RigidBody_[AutoDiffXd]
,RigidBody_[Expression]

class
RigidBody_[float]
¶ Bases:
pydrake.multibody.tree.Body_[float]
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. If deformations are neglected, the distance between any two points on the rigid body remains constant at all times. This invariance of the distance between two arbitrary points is often taken as the definition of a rigid body in classical treatments of multibody mechanics [Goldstein 2001]. It can be demonstrated that the unconstrained threedimensional motions of a rigid body can be described by six coordinates and thus it is often said that a free body in space has six degrees of freedom. These degrees of freedom obey the NewtonEuler equations of motion. However, within a MultibodyTree, a RigidBody is not free in space; instead, it is assigned a limited number of degrees of freedom (06) with respect to its parent body in the multibody tree by its Mobilizer (also called a “tree joint” or “inboard joint”). Additional constraints on permissible motion can be added using Constraint objects to remove more degrees of freedom.
 [Goldstein 2001] H Goldstein, CP Poole, JL Safko, Classical Mechanics
 (3rd Edition), AddisonWesley, 2001.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.

default_com
(self: pydrake.multibody.tree.RigidBody_[float]) → numpy.ndarray[float64[3, 1]]¶ Returns the default value of this rigid body’s center of mass as measured and expressed in this body’s frame. This value is initially supplied at construction when specifying this body’s SpatialInertia.
 Returns
p_BoBcm_B
:  The position of this rigid body B’s center of mass
Bcm
measured from Bo (B’s frame origin) and expressed in B (body B’s frame).
 Returns

default_mass
(self: pydrake.multibody.tree.RigidBody_[float]) → float¶ Returns the default value of this body’s mass. This value is initially supplied at construction when specifying this body’s SpatialInertia.
Returns: This body’s default mass.

default_spatial_inertia
(self: pydrake.multibody.tree.RigidBody_[float]) → drake::multibody::SpatialInertia<double>¶ Gets the default value of this body B’s spatial inertia about Bo (B’s origin) and expressed in B (this body’s frame).
 Returns
M_BBo_B
:  body B’s spatial inertia about Bo, expressed in B.
 Returns

default_unit_inertia
(self: pydrake.multibody.tree.RigidBody_[float]) → drake::multibody::UnitInertia<double>¶ Returns the default value of this body B’s unit inertia about Bo (body B’s origin), expressed in B (this body’s frame). This value is initially supplied at construction when specifying this body’s SpatialInertia.
 Returns
G_BBo_B
:  rigid body B’s unit inertia about Bo, expressed in B.
 Returns

class

class
pydrake.multibody.tree.
RigidBody_[AutoDiffXd]
¶ Bases:
pydrake.multibody.tree.Body_[AutoDiffXd]
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. If deformations are neglected, the distance between any two points on the rigid body remains constant at all times. This invariance of the distance between two arbitrary points is often taken as the definition of a rigid body in classical treatments of multibody mechanics [Goldstein 2001]. It can be demonstrated that the unconstrained threedimensional motions of a rigid body can be described by six coordinates and thus it is often said that a free body in space has six degrees of freedom. These degrees of freedom obey the NewtonEuler equations of motion. However, within a MultibodyTree, a RigidBody is not free in space; instead, it is assigned a limited number of degrees of freedom (06) with respect to its parent body in the multibody tree by its Mobilizer (also called a “tree joint” or “inboard joint”). Additional constraints on permissible motion can be added using Constraint objects to remove more degrees of freedom.
 [Goldstein 2001] H Goldstein, CP Poole, JL Safko, Classical Mechanics
 (3rd Edition), AddisonWesley, 2001.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.

default_com
(self: pydrake.multibody.tree.RigidBody_[AutoDiffXd]) → numpy.ndarray[float64[3, 1]]¶ Returns the default value of this rigid body’s center of mass as measured and expressed in this body’s frame. This value is initially supplied at construction when specifying this body’s SpatialInertia.
 Returns
p_BoBcm_B
:  The position of this rigid body B’s center of mass
Bcm
measured from Bo (B’s frame origin) and expressed in B (body B’s frame).
 Returns

default_mass
(self: pydrake.multibody.tree.RigidBody_[AutoDiffXd]) → float¶ Returns the default value of this body’s mass. This value is initially supplied at construction when specifying this body’s SpatialInertia.
Returns: This body’s default mass.

default_spatial_inertia
(self: pydrake.multibody.tree.RigidBody_[AutoDiffXd]) → pydrake.multibody.tree.SpatialInertia_[float]¶ Gets the default value of this body B’s spatial inertia about Bo (B’s origin) and expressed in B (this body’s frame).
 Returns
M_BBo_B
:  body B’s spatial inertia about Bo, expressed in B.
 Returns

default_unit_inertia
(self: pydrake.multibody.tree.RigidBody_[AutoDiffXd]) → pydrake.multibody.tree.UnitInertia_[float]¶ Returns the default value of this body B’s unit inertia about Bo (body B’s origin), expressed in B (this body’s frame). This value is initially supplied at construction when specifying this body’s SpatialInertia.
 Returns
G_BBo_B
:  rigid body B’s unit inertia about Bo, expressed in B.
 Returns

class
pydrake.multibody.tree.
RigidBody_[Expression]
¶ Bases:
pydrake.multibody.tree.Body_[Expression]
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. If deformations are neglected, the distance between any two points on the rigid body remains constant at all times. This invariance of the distance between two arbitrary points is often taken as the definition of a rigid body in classical treatments of multibody mechanics [Goldstein 2001]. It can be demonstrated that the unconstrained threedimensional motions of a rigid body can be described by six coordinates and thus it is often said that a free body in space has six degrees of freedom. These degrees of freedom obey the NewtonEuler equations of motion. However, within a MultibodyTree, a RigidBody is not free in space; instead, it is assigned a limited number of degrees of freedom (06) with respect to its parent body in the multibody tree by its Mobilizer (also called a “tree joint” or “inboard joint”). Additional constraints on permissible motion can be added using Constraint objects to remove more degrees of freedom.
 [Goldstein 2001] H Goldstein, CP Poole, JL Safko, Classical Mechanics
 (3rd Edition), AddisonWesley, 2001.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.

default_com
(self: pydrake.multibody.tree.RigidBody_[Expression]) → numpy.ndarray[float64[3, 1]]¶ Returns the default value of this rigid body’s center of mass as measured and expressed in this body’s frame. This value is initially supplied at construction when specifying this body’s SpatialInertia.
 Returns
p_BoBcm_B
:  The position of this rigid body B’s center of mass
Bcm
measured from Bo (B’s frame origin) and expressed in B (body B’s frame).
 Returns

default_mass
(self: pydrake.multibody.tree.RigidBody_[Expression]) → float¶ Returns the default value of this body’s mass. This value is initially supplied at construction when specifying this body’s SpatialInertia.
Returns: This body’s default mass.

default_spatial_inertia
(self: pydrake.multibody.tree.RigidBody_[Expression]) → pydrake.multibody.tree.SpatialInertia_[float]¶ Gets the default value of this body B’s spatial inertia about Bo (B’s origin) and expressed in B (this body’s frame).
 Returns
M_BBo_B
:  body B’s spatial inertia about Bo, expressed in B.
 Returns

default_unit_inertia
(self: pydrake.multibody.tree.RigidBody_[Expression]) → pydrake.multibody.tree.UnitInertia_[float]¶ Returns the default value of this body B’s unit inertia about Bo (body B’s origin), expressed in B (this body’s frame). This value is initially supplied at construction when specifying this body’s SpatialInertia.
 Returns
G_BBo_B
:  rigid body B’s unit inertia about Bo, expressed in B.
 Returns

class
pydrake.multibody.tree.
RigidBody_[float]
¶ Bases:
pydrake.multibody.tree.Body_[float]
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. If deformations are neglected, the distance between any two points on the rigid body remains constant at all times. This invariance of the distance between two arbitrary points is often taken as the definition of a rigid body in classical treatments of multibody mechanics [Goldstein 2001]. It can be demonstrated that the unconstrained threedimensional motions of a rigid body can be described by six coordinates and thus it is often said that a free body in space has six degrees of freedom. These degrees of freedom obey the NewtonEuler equations of motion. However, within a MultibodyTree, a RigidBody is not free in space; instead, it is assigned a limited number of degrees of freedom (06) with respect to its parent body in the multibody tree by its Mobilizer (also called a “tree joint” or “inboard joint”). Additional constraints on permissible motion can be added using Constraint objects to remove more degrees of freedom.
 [Goldstein 2001] H Goldstein, CP Poole, JL Safko, Classical Mechanics
 (3rd Edition), AddisonWesley, 2001.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
¶ Initialize self. See help(type(self)) for accurate signature.

default_com
(self: pydrake.multibody.tree.RigidBody_[float]) → numpy.ndarray[float64[3, 1]]¶ Returns the default value of this rigid body’s center of mass as measured and expressed in this body’s frame. This value is initially supplied at construction when specifying this body’s SpatialInertia.
 Returns
p_BoBcm_B
:  The position of this rigid body B’s center of mass
Bcm
measured from Bo (B’s frame origin) and expressed in B (body B’s frame).
 Returns

default_mass
(self: pydrake.multibody.tree.RigidBody_[float]) → float¶ Returns the default value of this body’s mass. This value is initially supplied at construction when specifying this body’s SpatialInertia.
Returns: This body’s default mass.

default_spatial_inertia
(self: pydrake.multibody.tree.RigidBody_[float]) → drake::multibody::SpatialInertia<double>¶ Gets the default value of this body B’s spatial inertia about Bo (B’s origin) and expressed in B (this body’s frame).
 Returns
M_BBo_B
:  body B’s spatial inertia about Bo, expressed in B.
 Returns

default_unit_inertia
(self: pydrake.multibody.tree.RigidBody_[float]) → drake::multibody::UnitInertia<double>¶ Returns the default value of this body B’s unit inertia about Bo (body B’s origin), expressed in B (this body’s frame). This value is initially supplied at construction when specifying this body’s SpatialInertia.
 Returns
G_BBo_B
:  rigid body B’s unit inertia about Bo, expressed in B.
 Returns

pydrake.multibody.tree.
SpatialInertia
¶

template
pydrake.multibody.tree.
SpatialInertia_
¶ Instantiations:
SpatialInertia_[float]
,SpatialInertia_[AutoDiffXd]
,SpatialInertia_[Expression]

class
SpatialInertia_[float]
¶ This class represents the physical concept of a Spatial Inertia. A spatial inertia (or spatial mass matrix) encapsulates the mass, center of mass, and rotational inertia of the mass distribution of a body or composite body S, where with “composite body” we mean a collection of bodies welded together containing at least one body (throughout this documentation “body” is many times used instead of “composite body” but the same concepts apply to a collection of bodies as well.) A spatial inertia is an element of ℝ⁶ˣ⁶ that is symmetric, and positive semidefinite. It logically consists of
3x3
submatrices arranged like so, [Jain 2010]:Spatial mass matrix   0    1  I_SP  m p_PScm×  2      3    4  m p_PScm×  m Id  5      Symbol: M
where, with the monogram notation described in multibody_spatial_inertia,
I_SP
is the rotational inertia of body or composite body S computed about a point P, m is the mass of this composite body,p_PScm
is the position vector from point P to the center of massScm
of the composite body S withp_PScm×
denoting its skewsymmetric cross product matrix (defined such thata× b = a.cross(b)
), andId
is the identity matrix in ℝ³ˣ³. See Section 2.1, p. 17 of [Jain 2010]. The logical arrangement as shown above is chosen to be consistent with our logical arrangement for spatial vectors as documented in multibody_spatial_algebra for which the rotational component comes first followed by the translational component.In typeset material we use the symbol \([M^{S/P}]_E\) to represent the spatial inertia of a body or composite body S about point P, expressed in frame E. For this inertia, the monogram notation reads
M_SP_E
. If the point P is fixed to a body B, we write that point as \(B_P\) which appears in code and comments asBp
. So if the body or composite body is B and the about point isBp
, the monogram notation readsM_BBp_E
, which can be abbreviated toM_Bp_E
since the about pointBp
also identifies the body. Common cases are that the about point is the originBo
of the body, or it’s the center of massBcm
for which the rotational inertia in monogram notation would read asI_Bo_E
andI_Bcm_E
, respectively. GivenM_BP_E
(\([M^{B/P}]_E\)), the rotational inertia of this spatial inertia isI_BP_E
(\([I^{B/P}]_E\)) and the position vector of the center of mass measured from point P and expressed in E isp_PBcm_E
(\([^Pp^{B_{cm}}]_E\)).Note
This class does not implement any mechanism to track the frame E in which a spatial inertia is expressed or about what point is computed. Methods and operators on this class have no means to determine frame consistency through operations. It is therefore the responsibility of users of this class to keep track of frames in which operations are performed. We suggest doing that using disciplined notation, as described above.
Note
Several methods in this class throw a RuntimeError for invalid rotational inertia operations in debug releases only. This provides speed in a release build while facilitating debugging in debug builds. In addition, these validity tests are only performed for scalar types for which drake::scalar_predicate<T>::is_bool is
True
. For instance, validity checks are not performed when T is symbolic::Expression. [Jain 2010] Jain, A., 2010. Robot and multibody dynamics: analysis and
 algorithms. Springer Science & Business Media.
 Template parameter
T
:  The underlying scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library.

__init__
(*args, **kwargs)¶ Overloaded function.
 __init__(self: pydrake.multibody.tree.SpatialInertia_[float]) > None
Default SpatialInertia constructor initializes mass, center of mass and rotational inertia to invalid NaN’s for a quick detection of uninitialized values.
 __init__(self: pydrake.multibody.tree.SpatialInertia_[float], mass: float, p_PScm_E: numpy.ndarray[float64[3, 1]], G_SP_E: pydrake.multibody.tree.UnitInertia_[float]) > None
Constructs a spatial inertia for a physical body or composite body S about a point P from a given mass, center of mass and rotational inertia. The center of mass is specified by the position vector
p_PScm_E
from point P to the center of mass pointScm
, expressed in a frame E. The rotational inertia is provided as the UnitInertiaG_SP_E
of the body or composite body S computed about point P and expressed in frame E.Note
The third argument of this constructor is unusual in that it is an UnitInertia (not a traditional RotationalInertia) and its inertia is about the arbitrary point P (not Scm – S’s center of mass).
See also
MakeFromCentralInertia a factory method with traditional utility.
This constructor checks for the physical validity of the resulting SpatialInertia with IsPhysicallyValid() and throws a RuntimeError exception in the event the provided input parameters lead to nonphysically viable spatial inertia.
 Parameter
mass
:  The mass of the body or composite body S.
 Parameter
p_PScm_E
:  The position vector from point P to the center of mass of body or composite body S expressed in frame E.
 Parameter
G_SP_E
:  UnitInertia of the body or composite body S computed about origin point P and expressed in frame E.

class

class
pydrake.multibody.tree.
SpatialInertia_[AutoDiffXd]
¶ This class represents the physical concept of a Spatial Inertia. A spatial inertia (or spatial mass matrix) encapsulates the mass, center of mass, and rotational inertia of the mass distribution of a body or composite body S, where with “composite body” we mean a collection of bodies welded together containing at least one body (throughout this documentation “body” is many times used instead of “composite body” but the same concepts apply to a collection of bodies as well.) A spatial inertia is an element of ℝ⁶ˣ⁶ that is symmetric, and positive semidefinite. It logically consists of
3x3
submatrices arranged like so, [Jain 2010]:Spatial mass matrix   0    1  I_SP  m p_PScm×  2      3    4  m p_PScm×  m Id  5      Symbol: M
where, with the monogram notation described in multibody_spatial_inertia,
I_SP
is the rotational inertia of body or composite body S computed about a point P, m is the mass of this composite body,p_PScm
is the position vector from point P to the center of massScm
of the composite body S withp_PScm×
denoting its skewsymmetric cross product matrix (defined such thata× b = a.cross(b)
), andId
is the identity matrix in ℝ³ˣ³. See Section 2.1, p. 17 of [Jain 2010]. The logical arrangement as shown above is chosen to be consistent with our logical arrangement for spatial vectors as documented in multibody_spatial_algebra for which the rotational component comes first followed by the translational component.In typeset material we use the symbol \([M^{S/P}]_E\) to represent the spatial inertia of a body or composite body S about point P, expressed in frame E. For this inertia, the monogram notation reads
M_SP_E
. If the point P is fixed to a body B, we write that point as \(B_P\) which appears in code and comments asBp
. So if the body or composite body is B and the about point isBp
, the monogram notation readsM_BBp_E
, which can be abbreviated toM_Bp_E
since the about pointBp
also identifies the body. Common cases are that the about point is the originBo
of the body, or it’s the center of massBcm
for which the rotational inertia in monogram notation would read asI_Bo_E
andI_Bcm_E
, respectively. GivenM_BP_E
(\([M^{B/P}]_E\)), the rotational inertia of this spatial inertia isI_BP_E
(\([I^{B/P}]_E\)) and the position vector of the center of mass measured from point P and expressed in E isp_PBcm_E
(\([^Pp^{B_{cm}}]_E\)).Note
This class does not implement any mechanism to track the frame E in which a spatial inertia is expressed or about what point is computed. Methods and operators on this class have no means to determine frame consistency through operations. It is therefore the responsibility of users of this class to keep track of frames in which operations are performed. We suggest doing that using disciplined notation, as described above.
Note
Several methods in this class throw a RuntimeError for invalid rotational inertia operations in debug releases only. This provides speed in a release build while facilitating debugging in debug builds. In addition, these validity tests are only performed for scalar types for which drake::scalar_predicate<T>::is_bool is
True
. For instance, validity checks are not performed when T is symbolic::Expression. [Jain 2010] Jain, A., 2010. Robot and multibody dynamics: analysis and
 algorithms. Springer Science & Business Media.
 Template parameter
T
:  The underlying scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library.

__init__
(*args, **kwargs)¶ Overloaded function.
 __init__(self: pydrake.multibody.tree.SpatialInertia_[AutoDiffXd]) > None
Default SpatialInertia constructor initializes mass, center of mass and rotational inertia to invalid NaN’s for a quick detection of uninitialized values.
 __init__(self: pydrake.multibody.tree.SpatialInertia_[AutoDiffXd], mass: pydrake.autodiffutils.AutoDiffXd, p_PScm_E: numpy.ndarray[object[3, 1]], G_SP_E: pydrake.multibody.tree.UnitInertia_[AutoDiffXd]) > None
Constructs a spatial inertia for a physical body or composite body S about a point P from a given mass, center of mass and rotational inertia. The center of mass is specified by the position vector
p_PScm_E
from point P to the center of mass pointScm
, expressed in a frame E. The rotational inertia is provided as the UnitInertiaG_SP_E
of the body or composite body S computed about point P and expressed in frame E.Note
The third argument of this constructor is unusual in that it is an UnitInertia (not a traditional RotationalInertia) and its inertia is about the arbitrary point P (not Scm – S’s center of mass).
See also
MakeFromCentralInertia a factory method with traditional utility.
This constructor checks for the physical validity of the resulting SpatialInertia with IsPhysicallyValid() and throws a RuntimeError exception in the event the provided input parameters lead to nonphysically viable spatial inertia.
 Parameter
mass
:  The mass of the body or composite body S.
 Parameter
p_PScm_E
:  The position vector from point P to the center of mass of body or composite body S expressed in frame E.
 Parameter
G_SP_E
:  UnitInertia of the body or composite body S computed about origin point P and expressed in frame E.

class
pydrake.multibody.tree.
SpatialInertia_[Expression]
¶ This class represents the physical concept of a Spatial Inertia. A spatial inertia (or spatial mass matrix) encapsulates the mass, center of mass, and rotational inertia of the mass distribution of a body or composite body S, where with “composite body” we mean a collection of bodies welded together containing at least one body (throughout this documentation “body” is many times used instead of “composite body” but the same concepts apply to a collection of bodies as well.) A spatial inertia is an element of ℝ⁶ˣ⁶ that is symmetric, and positive semidefinite. It logically consists of
3x3
submatrices arranged like so, [Jain 2010]:Spatial mass matrix   0    1  I_SP  m p_PScm×  2      3    4  m p_PScm×  m Id  5      Symbol: M
where, with the monogram notation described in multibody_spatial_inertia,
I_SP
is the rotational inertia of body or composite body S computed about a point P, m is the mass of this composite body,p_PScm
is the position vector from point P to the center of massScm
of the composite body S withp_PScm×
denoting its skewsymmetric cross product matrix (defined such thata× b = a.cross(b)
), andId
is the identity matrix in ℝ³ˣ³. See Section 2.1, p. 17 of [Jain 2010]. The logical arrangement as shown above is chosen to be consistent with our logical arrangement for spatial vectors as documented in multibody_spatial_algebra for which the rotational component comes first followed by the translational component.In typeset material we use the symbol \([M^{S/P}]_E\) to represent the spatial inertia of a body or composite body S about point P, expressed in frame E. For this inertia, the monogram notation reads
M_SP_E
. If the point P is fixed to a body B, we write that point as \(B_P\) which appears in code and comments asBp
. So if the body or composite body is B and the about point isBp
, the monogram notation readsM_BBp_E
, which can be abbreviated toM_Bp_E
since the about pointBp
also identifies the body. Common cases are that the about point is the originBo
of the body, or it’s the center of massBcm
for which the rotational inertia in monogram notation would read asI_Bo_E
andI_Bcm_E
, respectively. GivenM_BP_E
(\([M^{B/P}]_E\)), the rotational inertia of this spatial inertia isI_BP_E
(\([I^{B/P}]_E\)) and the position vector of the center of mass measured from point P and expressed in E isp_PBcm_E
(\([^Pp^{B_{cm}}]_E\)).Note
This class does not implement any mechanism to track the frame E in which a spatial inertia is expressed or about what point is computed. Methods and operators on this class have no means to determine frame consistency through operations. It is therefore the responsibility of users of this class to keep track of frames in which operations are performed. We suggest doing that using disciplined notation, as described above.
Note
Several methods in this class throw a RuntimeError for invalid rotational inertia operations in debug releases only. This provides speed in a release build while facilitating debugging in debug builds. In addition, these validity tests are only performed for scalar types for which drake::scalar_predicate<T>::is_bool is
True
. For instance, validity checks are not performed when T is symbolic::Expression. [Jain 2010] Jain, A., 2010. Robot and multibody dynamics: analysis and
 algorithms. Springer Science & Business Media.
 Template parameter
T
:  The underlying scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library.

__init__
(*args, **kwargs)¶ Overloaded function.
 __init__(self: pydrake.multibody.tree.SpatialInertia_[Expression]) > None
Default SpatialInertia constructor initializes mass, center of mass and rotational inertia to invalid NaN’s for a quick detection of uninitialized values.
 __init__(self: pydrake.multibody.tree.SpatialInertia_[Expression], mass: pydrake.symbolic.Expression, p_PScm_E: numpy.ndarray[object[3, 1]], G_SP_E: pydrake.multibody.tree.UnitInertia_[Expression]) > None
Constructs a spatial inertia for a physical body or composite body S about a point P from a given mass, center of mass and rotational inertia. The center of mass is specified by the position vector
p_PScm_E
from point P to the center of mass pointScm
, expressed in a frame E. The rotational inertia is provided as the UnitInertiaG_SP_E
of the body or composite body S computed about point P and expressed in frame E.Note
The third argument of this constructor is unusual in that it is an UnitInertia (not a traditional RotationalInertia) and its inertia is about the arbitrary point P (not Scm – S’s center of mass).
See also
MakeFromCentralInertia a factory method with traditional utility.
This constructor checks for the physical validity of the resulting SpatialInertia with IsPhysicallyValid() and throws a RuntimeError exception in the event the provided input parameters lead to nonphysically viable spatial inertia.
 Parameter
mass
:  The mass of the body or composite body S.
 Parameter
p_PScm_E
:  The position vector from point P to the center of mass of body or composite body S expressed in frame E.
 Parameter
G_SP_E
:  UnitInertia of the body or composite body S computed about origin point P and expressed in frame E.

class
pydrake.multibody.tree.
SpatialInertia_[float]
¶ This class represents the physical concept of a Spatial Inertia. A spatial inertia (or spatial mass matrix) encapsulates the mass, center of mass, and rotational inertia of the mass distribution of a body or composite body S, where with “composite body” we mean a collection of bodies welded together containing at least one body (throughout this documentation “body” is many times used instead of “composite body” but the same concepts apply to a collection of bodies as well.) A spatial inertia is an element of ℝ⁶ˣ⁶ that is symmetric, and positive semidefinite. It logically consists of
3x3
submatrices arranged like so, [Jain 2010]:Spatial mass matrix   0    1  I_SP  m p_PScm×  2      3    4  m p_PScm×  m Id  5      Symbol: M
where, with the monogram notation described in multibody_spatial_inertia,
I_SP
is the rotational inertia of body or composite body S computed about a point P, m is the mass of this composite body,p_PScm
is the position vector from point P to the center of massScm
of the composite body S withp_PScm×
denoting its skewsymmetric cross product matrix (defined such thata× b = a.cross(b)
), andId
is the identity matrix in ℝ³ˣ³. See Section 2.1, p. 17 of [Jain 2010]. The logical arrangement as shown above is chosen to be consistent with our logical arrangement for spatial vectors as documented in multibody_spatial_algebra for which the rotational component comes first followed by the translational component.In typeset material we use the symbol \([M^{S/P}]_E\) to represent the spatial inertia of a body or composite body S about point P, expressed in frame E. For this inertia, the monogram notation reads
M_SP_E
. If the point P is fixed to a body B, we write that point as \(B_P\) which appears in code and comments asBp
. So if the body or composite body is B and the about point isBp
, the monogram notation readsM_BBp_E
, which can be abbreviated toM_Bp_E
since the about pointBp
also identifies the body. Common cases are that the about point is the originBo
of the body, or it’s the center of massBcm
for which the rotational inertia in monogram notation would read asI_Bo_E
andI_Bcm_E
, respectively. GivenM_BP_E
(\([M^{B/P}]_E\)), the rotational inertia of this spatial inertia isI_BP_E
(\([I^{B/P}]_E\)) and the position vector of the center of mass measured from point P and expressed in E isp_PBcm_E
(\([^Pp^{B_{cm}}]_E\)).Note
This class does not implement any mechanism to track the frame E in which a spatial inertia is expressed or about what point is computed. Methods and operators on this class have no means to determine frame consistency through operations. It is therefore the responsibility of users of this class to keep track of frames in which operations are performed. We suggest doing that using disciplined notation, as described above.
Note
Several methods in this class throw a RuntimeError for invalid rotational inertia operations in debug releases only. This provides speed in a release build while facilitating debugging in debug builds. In addition, these validity tests are only performed for scalar types for which drake::scalar_predicate<T>::is_bool is
True
. For instance, validity checks are not performed when T is symbolic::Expression. [Jain 2010] Jain, A., 2010. Robot and multibody dynamics: analysis and
 algorithms. Springer Science & Business Media.
 Template parameter
T
:  The underlying scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library.

__init__
(*args, **kwargs)¶ Overloaded function.
 __init__(self: pydrake.multibody.tree.SpatialInertia_[float]) > None
Default SpatialInertia constructor initializes mass, center of mass and rotational inertia to invalid NaN’s for a quick detection of uninitialized values.
 __init__(self: pydrake.multibody.tree.SpatialInertia_[float], mass: float, p_PScm_E: numpy.ndarray[float64[3, 1]], G_SP_E: pydrake.multibody.tree.UnitInertia_[float]) > None
Constructs a spatial inertia for a physical body or composite body S about a point P from a given mass, center of mass and rotational inertia. The center of mass is specified by the position vector
p_PScm_E
from point P to the center of mass pointScm
, expressed in a frame E. The rotational inertia is provided as the UnitInertiaG_SP_E
of the body or composite body S computed about point P and expressed in frame E.Note
The third argument of this constructor is unusual in that it is an UnitInertia (not a traditional RotationalInertia) and its inertia is about the arbitrary point P (not Scm – S’s center of mass).
See also
MakeFromCentralInertia a factory method with traditional utility.
This constructor checks for the physical validity of the resulting SpatialInertia with IsPhysicallyValid() and throws a RuntimeError exception in the event the provided input parameters lead to nonphysically viable spatial inertia.
 Parameter
mass
:  The mass of the body or composite body S.
 Parameter
p_PScm_E
:  The position vector from point P to the center of mass of body or composite body S expressed in frame E.
 Parameter
G_SP_E
:  UnitInertia of the body or composite body S computed about origin point P and expressed in frame E.

pydrake.multibody.tree.
UniformGravityFieldElement
¶ alias of
pydrake.multibody.tree.UniformGravityFieldElement_[float]

template
pydrake.multibody.tree.
UniformGravityFieldElement_
¶ Instantiations:
UniformGravityFieldElement_[float]
,UniformGravityFieldElement_[AutoDiffXd]
,UniformGravityFieldElement_[Expression]

class
UniformGravityFieldElement_[float]
¶ Bases:
pydrake.multibody.tree.ForceElement_[float]
This ForceElement allows modeling the effect of a uniform gravity field as felt by bodies on the surface of the Earth. This gravity field acts on all bodies in the MultibodyTree model.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
(*args, **kwargs)¶ Overloaded function.
 __init__(self: pydrake.multibody.tree.UniformGravityFieldElement_[float]) > None
Constructs a uniform gravity field element with a default strength (on the earth’s surface) and direction (z).
 __init__(self: pydrake.multibody.tree.UniformGravityFieldElement_[float], g_W: numpy.ndarray[float64[3, 1]]) > None
Constructs a uniform gravity field element with a strength given by the acceleration of gravity vector
g_W
, expressed in the world frame W.

gravity_vector
(self: pydrake.multibody.tree.UniformGravityFieldElement_[float]) → numpy.ndarray[float64[3, 1]]¶ Returns the acceleration of the gravity vector in m/s², expressed in the world frame W.

set_gravity_vector
(self: pydrake.multibody.tree.UniformGravityFieldElement_[float], arg0: numpy.ndarray[float64[3, 1]]) → None¶ Sets the acceleration of gravity vector, expressed in the world frame W in m/s².
 Template parameter

class

class
pydrake.multibody.tree.
UniformGravityFieldElement_[AutoDiffXd]
¶ Bases:
pydrake.multibody.tree.ForceElement_[AutoDiffXd]
This ForceElement allows modeling the effect of a uniform gravity field as felt by bodies on the surface of the Earth. This gravity field acts on all bodies in the MultibodyTree model.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
(*args, **kwargs)¶ Overloaded function.
 __init__(self: pydrake.multibody.tree.UniformGravityFieldElement_[AutoDiffXd]) > None
Constructs a uniform gravity field element with a default strength (on the earth’s surface) and direction (z).
 __init__(self: pydrake.multibody.tree.UniformGravityFieldElement_[AutoDiffXd], g_W: numpy.ndarray[float64[3, 1]]) > None
Constructs a uniform gravity field element with a strength given by the acceleration of gravity vector
g_W
, expressed in the world frame W.

gravity_vector
(self: pydrake.multibody.tree.UniformGravityFieldElement_[AutoDiffXd]) → numpy.ndarray[float64[3, 1]]¶ Returns the acceleration of the gravity vector in m/s², expressed in the world frame W.

set_gravity_vector
(self: pydrake.multibody.tree.UniformGravityFieldElement_[AutoDiffXd], arg0: numpy.ndarray[float64[3, 1]]) → None¶ Sets the acceleration of gravity vector, expressed in the world frame W in m/s².
 Template parameter

class
pydrake.multibody.tree.
UniformGravityFieldElement_[Expression]
¶ Bases:
pydrake.multibody.tree.ForceElement_[Expression]
This ForceElement allows modeling the effect of a uniform gravity field as felt by bodies on the surface of the Earth. This gravity field acts on all bodies in the MultibodyTree model.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
(*args, **kwargs)¶ Overloaded function.
 __init__(self: pydrake.multibody.tree.UniformGravityFieldElement_[Expression]) > None
Constructs a uniform gravity field element with a default strength (on the earth’s surface) and direction (z).
 __init__(self: pydrake.multibody.tree.UniformGravityFieldElement_[Expression], g_W: numpy.ndarray[float64[3, 1]]) > None
Constructs a uniform gravity field element with a strength given by the acceleration of gravity vector
g_W
, expressed in the world frame W.

gravity_vector
(self: pydrake.multibody.tree.UniformGravityFieldElement_[Expression]) → numpy.ndarray[float64[3, 1]]¶ Returns the acceleration of the gravity vector in m/s², expressed in the world frame W.

set_gravity_vector
(self: pydrake.multibody.tree.UniformGravityFieldElement_[Expression], arg0: numpy.ndarray[float64[3, 1]]) → None¶ Sets the acceleration of gravity vector, expressed in the world frame W in m/s².
 Template parameter

class
pydrake.multibody.tree.
UniformGravityFieldElement_[float]
¶ Bases:
pydrake.multibody.tree.ForceElement_[float]
This ForceElement allows modeling the effect of a uniform gravity field as felt by bodies on the surface of the Earth. This gravity field acts on all bodies in the MultibodyTree model.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
(*args, **kwargs)¶ Overloaded function.
 __init__(self: pydrake.multibody.tree.UniformGravityFieldElement_[float]) > None
Constructs a uniform gravity field element with a default strength (on the earth’s surface) and direction (z).
 __init__(self: pydrake.multibody.tree.UniformGravityFieldElement_[float], g_W: numpy.ndarray[float64[3, 1]]) > None
Constructs a uniform gravity field element with a strength given by the acceleration of gravity vector
g_W
, expressed in the world frame W.

gravity_vector
(self: pydrake.multibody.tree.UniformGravityFieldElement_[float]) → numpy.ndarray[float64[3, 1]]¶ Returns the acceleration of the gravity vector in m/s², expressed in the world frame W.

set_gravity_vector
(self: pydrake.multibody.tree.UniformGravityFieldElement_[float], arg0: numpy.ndarray[float64[3, 1]]) → None¶ Sets the acceleration of gravity vector, expressed in the world frame W in m/s².
 Template parameter

pydrake.multibody.tree.
UnitInertia
¶

template
pydrake.multibody.tree.
UnitInertia_
¶ Instantiations:
UnitInertia_[float]
,UnitInertia_[AutoDiffXd]
,UnitInertia_[Expression]

class
UnitInertia_[float]
¶ This class is used to represent rotational inertias for unit mass bodies. Therefore, unlike RotationalInertia whose units are kg⋅m², the units of a UnitInertia are those of length squared. A unit inertia is a useful concept to represent the geometric distribution of mass in a body regardless of the actual value of the body mass. The rotational inertia of a body can therefore be obtained by multiplying its unit inertia by its mass. Unit inertia matrices can also be called gyration matrices and therefore we choose to represent them in source code notation with the capital letter G. In contrast, the capital letter I is used to represent nonunit mass rotational inertias. This class restricts the set of allowed operations on a unit inertia to ensure the unitmass invariant. For instance, multiplication by a scalar can only return a general RotationalInertia but not a UnitInertia.
Note
This class has no means to check at construction from user provided parameters whether it actually represents the unit inertia or gyration matrix of a unitmass body. However, as previously noted, once a unit inertia is created, a number of operations are disallowed to ensure the unitmass invariant. Also notice that once a unit inertia is created, it is the unit inertia of some body, perhaps with scaled geometry from the user’s intention.
 Template parameter
T
:  The underlying scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library.

__init__
(*args, **kwargs)¶ Overloaded function.
 __init__(self: pydrake.multibody.tree.UnitInertia_[float]) > None
Default UnitInertia constructor sets all entries to NaN for quick detection of uninitialized values.
 __init__(self: pydrake.multibody.tree.UnitInertia_[float], Ixx: float, Iyy: float, Izz: float) > None
Creates a unit inertia with moments of inertia
Ixx
, Iyy,Izz
, and with each product of inertia set to zero. In debug builds, throws RuntimeError if unit inertia constructed from these arguments violates RotationalInertia::CouldBePhysicallyValid().
 Template parameter

class

class
pydrake.multibody.tree.
UnitInertia_[AutoDiffXd]
¶ This class is used to represent rotational inertias for unit mass bodies. Therefore, unlike RotationalInertia whose units are kg⋅m², the units of a UnitInertia are those of length squared. A unit inertia is a useful concept to represent the geometric distribution of mass in a body regardless of the actual value of the body mass. The rotational inertia of a body can therefore be obtained by multiplying its unit inertia by its mass. Unit inertia matrices can also be called gyration matrices and therefore we choose to represent them in source code notation with the capital letter G. In contrast, the capital letter I is used to represent nonunit mass rotational inertias. This class restricts the set of allowed operations on a unit inertia to ensure the unitmass invariant. For instance, multiplication by a scalar can only return a general RotationalInertia but not a UnitInertia.
Note
This class has no means to check at construction from user provided parameters whether it actually represents the unit inertia or gyration matrix of a unitmass body. However, as previously noted, once a unit inertia is created, a number of operations are disallowed to ensure the unitmass invariant. Also notice that once a unit inertia is created, it is the unit inertia of some body, perhaps with scaled geometry from the user’s intention.
 Template parameter
T
:  The underlying scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library.

__init__
(*args, **kwargs)¶ Overloaded function.
 __init__(self: pydrake.multibody.tree.UnitInertia_[AutoDiffXd]) > None
Default UnitInertia constructor sets all entries to NaN for quick detection of uninitialized values.
 __init__(self: pydrake.multibody.tree.UnitInertia_[AutoDiffXd], Ixx: pydrake.autodiffutils.AutoDiffXd, Iyy: pydrake.autodiffutils.AutoDiffXd, Izz: pydrake.autodiffutils.AutoDiffXd) > None
Creates a unit inertia with moments of inertia
Ixx
, Iyy,Izz
, and with each product of inertia set to zero. In debug builds, throws RuntimeError if unit inertia constructed from these arguments violates RotationalInertia::CouldBePhysicallyValid().
 Template parameter

class
pydrake.multibody.tree.
UnitInertia_[Expression]
¶ This class is used to represent rotational inertias for unit mass bodies. Therefore, unlike RotationalInertia whose units are kg⋅m², the units of a UnitInertia are those of length squared. A unit inertia is a useful concept to represent the geometric distribution of mass in a body regardless of the actual value of the body mass. The rotational inertia of a body can therefore be obtained by multiplying its unit inertia by its mass. Unit inertia matrices can also be called gyration matrices and therefore we choose to represent them in source code notation with the capital letter G. In contrast, the capital letter I is used to represent nonunit mass rotational inertias. This class restricts the set of allowed operations on a unit inertia to ensure the unitmass invariant. For instance, multiplication by a scalar can only return a general RotationalInertia but not a UnitInertia.
Note
This class has no means to check at construction from user provided parameters whether it actually represents the unit inertia or gyration matrix of a unitmass body. However, as previously noted, once a unit inertia is created, a number of operations are disallowed to ensure the unitmass invariant. Also notice that once a unit inertia is created, it is the unit inertia of some body, perhaps with scaled geometry from the user’s intention.
 Template parameter
T
:  The underlying scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library.

__init__
(*args, **kwargs)¶ Overloaded function.
 __init__(self: pydrake.multibody.tree.UnitInertia_[Expression]) > None
Default UnitInertia constructor sets all entries to NaN for quick detection of uninitialized values.
 __init__(self: pydrake.multibody.tree.UnitInertia_[Expression], Ixx: pydrake.symbolic.Expression, Iyy: pydrake.symbolic.Expression, Izz: pydrake.symbolic.Expression) > None
Creates a unit inertia with moments of inertia
Ixx
, Iyy,Izz
, and with each product of inertia set to zero. In debug builds, throws RuntimeError if unit inertia constructed from these arguments violates RotationalInertia::CouldBePhysicallyValid().
 Template parameter

class
pydrake.multibody.tree.
UnitInertia_[float]
¶ This class is used to represent rotational inertias for unit mass bodies. Therefore, unlike RotationalInertia whose units are kg⋅m², the units of a UnitInertia are those of length squared. A unit inertia is a useful concept to represent the geometric distribution of mass in a body regardless of the actual value of the body mass. The rotational inertia of a body can therefore be obtained by multiplying its unit inertia by its mass. Unit inertia matrices can also be called gyration matrices and therefore we choose to represent them in source code notation with the capital letter G. In contrast, the capital letter I is used to represent nonunit mass rotational inertias. This class restricts the set of allowed operations on a unit inertia to ensure the unitmass invariant. For instance, multiplication by a scalar can only return a general RotationalInertia but not a UnitInertia.
Note
This class has no means to check at construction from user provided parameters whether it actually represents the unit inertia or gyration matrix of a unitmass body. However, as previously noted, once a unit inertia is created, a number of operations are disallowed to ensure the unitmass invariant. Also notice that once a unit inertia is created, it is the unit inertia of some body, perhaps with scaled geometry from the user’s intention.
 Template parameter
T
:  The underlying scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library.

__init__
(*args, **kwargs)¶ Overloaded function.
 __init__(self: pydrake.multibody.tree.UnitInertia_[float]) > None
Default UnitInertia constructor sets all entries to NaN for quick detection of uninitialized values.
 __init__(self: pydrake.multibody.tree.UnitInertia_[float], Ixx: float, Iyy: float, Izz: float) > None
Creates a unit inertia with moments of inertia
Ixx
, Iyy,Izz
, and with each product of inertia set to zero. In debug builds, throws RuntimeError if unit inertia constructed from these arguments violates RotationalInertia::CouldBePhysicallyValid().
 Template parameter

pydrake.multibody.tree.
WeldJoint
¶

template
pydrake.multibody.tree.
WeldJoint_
¶ Instantiations:
WeldJoint_[float]
,WeldJoint_[AutoDiffXd]
,WeldJoint_[Expression]

class
WeldJoint_[float]
¶ Bases:
pydrake.multibody.tree.Joint_[float]
This Joint fixes the relative pose between two frames as if “welding” them together.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
(*args, **kwargs)¶ Overloaded function.
 __init__(self: pydrake.multibody.tree.WeldJoint_[float], name: str, parent_frame_P: pydrake.multibody.tree.Frame_[float], child_frame_C: pydrake.multibody.tree.Frame_[float], X_PC: pydrake.math.RigidTransform_[float]) > None
Constructor for a WeldJoint between a
parent_frame_P
and achild_frame_C
so that their relative poseX_PC
is fixed as if they were “welded” together. __init__(self: pydrake.multibody.tree.WeldJoint_[float], name: str, parent_frame_P: pydrake.multibody.tree.Frame_[float], child_frame_C: pydrake.multibody.tree.Frame_[float], X_PC: pydrake.common.eigen_geometry.Isometry3_[float]) > None
This API using Isometry3 is / will be deprecated soon with the resolution of #9865. We only offer it for backwards compatibility. DO NOT USE!.
 Template parameter

class

class
pydrake.multibody.tree.
WeldJoint_[AutoDiffXd]
¶ Bases:
pydrake.multibody.tree.Joint_[AutoDiffXd]
This Joint fixes the relative pose between two frames as if “welding” them together.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
(*args, **kwargs)¶ Overloaded function.
 __init__(self: pydrake.multibody.tree.WeldJoint_[AutoDiffXd], name: str, parent_frame_P: pydrake.multibody.tree.Frame_[AutoDiffXd], child_frame_C: pydrake.multibody.tree.Frame_[AutoDiffXd], X_PC: pydrake.math.RigidTransform_[float]) > None
Constructor for a WeldJoint between a
parent_frame_P
and achild_frame_C
so that their relative poseX_PC
is fixed as if they were “welded” together. __init__(self: pydrake.multibody.tree.WeldJoint_[AutoDiffXd], name: str, parent_frame_P: pydrake.multibody.tree.Frame_[AutoDiffXd], child_frame_C: pydrake.multibody.tree.Frame_[AutoDiffXd], X_PC: pydrake.common.eigen_geometry.Isometry3_[float]) > None
This API using Isometry3 is / will be deprecated soon with the resolution of #9865. We only offer it for backwards compatibility. DO NOT USE!.
 Template parameter

class
pydrake.multibody.tree.
WeldJoint_[Expression]
¶ Bases:
pydrake.multibody.tree.Joint_[Expression]
This Joint fixes the relative pose between two frames as if “welding” them together.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
(*args, **kwargs)¶ Overloaded function.
 __init__(self: pydrake.multibody.tree.WeldJoint_[Expression], name: str, parent_frame_P: pydrake.multibody.tree.Frame_[Expression], child_frame_C: pydrake.multibody.tree.Frame_[Expression], X_PC: pydrake.math.RigidTransform_[float]) > None
Constructor for a WeldJoint between a
parent_frame_P
and achild_frame_C
so that their relative poseX_PC
is fixed as if they were “welded” together. __init__(self: pydrake.multibody.tree.WeldJoint_[Expression], name: str, parent_frame_P: pydrake.multibody.tree.Frame_[Expression], child_frame_C: pydrake.multibody.tree.Frame_[Expression], X_PC: pydrake.common.eigen_geometry.Isometry3_[float]) > None
This API using Isometry3 is / will be deprecated soon with the resolution of #9865. We only offer it for backwards compatibility. DO NOT USE!.
 Template parameter

class
pydrake.multibody.tree.
WeldJoint_[float]
¶ Bases:
pydrake.multibody.tree.Joint_[float]
This Joint fixes the relative pose between two frames as if “welding” them together.
 Template parameter
T
:  The scalar type. Must be a valid Eigen scalar.
Instantiated templates for the following kinds of T’s are provided:
 double
 AutoDiffXd
 symbolic::Expression
They are already available to link against in the containing library. No other values for T are currently supported.

__init__
(*args, **kwargs)¶ Overloaded function.
 __init__(self: pydrake.multibody.tree.WeldJoint_[float], name: str, parent_frame_P: pydrake.multibody.tree.Frame_[float], child_frame_C: pydrake.multibody.tree.Frame_[float], X_PC: pydrake.math.RigidTransform_[float]) > None
Constructor for a WeldJoint between a
parent_frame_P
and achild_frame_C
so that their relative poseX_PC
is fixed as if they were “welded” together. __init__(self: pydrake.multibody.tree.WeldJoint_[float], name: str, parent_frame_P: pydrake.multibody.tree.Frame_[float], child_frame_C: pydrake.multibody.tree.Frame_[float], X_PC: pydrake.common.eigen_geometry.Isometry3_[float]) > None
This API using Isometry3 is / will be deprecated soon with the resolution of #9865. We only offer it for backwards compatibility. DO NOT USE!.
 Template parameter

pydrake.multibody.tree.
default_model_instance
() → pydrake.multibody.tree.ModelInstanceIndex¶ Returns the model instance which contains all tree elements with no explicit model instance specified.

pydrake.multibody.tree.
world_index
() → pydrake.multibody.tree.BodyIndex¶ For every MultibodyTree the world body always has this unique index and it is always zero.

pydrake.multibody.tree.
world_model_instance
() → pydrake.multibody.tree.ModelInstanceIndex¶ 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).