# pydrake.multibody.math¶

Bindings for multibody math.

pydrake.multibody.math.SpatialAcceleration
template pydrake.multibody.math.SpatialAcceleration_
class SpatialAcceleration_[float]

This class is used to represent a spatial acceleration that combines rotational (angular acceleration) and translational (linear acceleration) components. While a SpatialVelocity V_XY represents the motion of a “moving frame” Y measured with respect to a “measured-in” frame X, the SpatialAcceleration A_XY represents the rate of change of this spatial velocity V_XY in frame X. That is $$^XA^Y = \frac{^Xd}{dt}\,{^XV^Y}$$ where $$\frac{^Xd}{dt}$$ denotes the time derivative taken in frame X. That is, to compute an acceleration we need to specify in what frame the time derivative is taken, see [Mitiguy 2016, §6.1] for a more in depth discussion on this. Time derivatives can be taken in different frames, and they transform according to the “Transport Theorem”, which in Drake is implemented in drake::math::ConvertTimeDerivativeToOtherFrame(). In source code comments we write A_XY = DtX(V_XY), where DtX() is the operator that takes the time derivative in the X frame. By convention, and unless otherwise stated, we assume that the frame in which the time derivative is taken is the “measured-in” frame, i.e. the time derivative used in A_XY is in frame X by default (i.e. DtX()). To perform numerical computations, we need to specify an “expressed-in” frame E (which may be distinct from either X or Y), so that components can be expressed as real numbers. Only the vector values are stored in a SpatialAcceleration object; the frames must be understood from context and it is the responsibility of the user to keep track of them. That is best accomplished through disciplined notation. In source code we use monogram notation where capital A is used to designate a spatial acceleration quantity. The same monogram notation rules for SpatialVelocity are also used for SpatialAcceleration. That is, the spatial acceleration of a frame Y measured in X and expressed in E is denoted with A_XY_E. For a more detailed introduction on spatial vectors and the monogram notation please refer to section multibody_spatial_vectors.

[Mitiguy 2016] Mitiguy, P., 2016. Advanced Dynamics & Motion Simulation.

Template parameter T:
The underlying scalar type. Must be a valid Eigen scalar.
SetZero(self: pydrake.multibody.math.SpatialAcceleration_[float]) → pydrake.multibody.math.SpatialAcceleration_[float]

Sets both rotational and translational components of this SpatialVector to zero.

static Zero() → pydrake.multibody.math.SpatialAcceleration_[float]

Factory to create a zero SpatialVector, i.e. rotational and translational components are both zero.

__init__(*args, **kwargs)

1. __init__(self: pydrake.multibody.math.SpatialAcceleration_[float]) -> None

Default constructor. In Release builds the elements of the newly constructed spatial acceleration are left uninitialized resulting in a zero cost operation. However in Debug builds those entries are set to NaN so that operations using this uninitialized spatial acceleration fail fast, allowing fast bug detection.

1. __init__(self: pydrake.multibody.math.SpatialAcceleration_[float], alpha: numpy.ndarray[float64[3, 1]], a: numpy.ndarray[float64[3, 1]]) -> None

SpatialAcceleration constructor from an angular acceleration alpha and a linear acceleration a.

1. __init__(self: pydrake.multibody.math.SpatialAcceleration_[float], A: numpy.ndarray[float64[6, 1]]) -> None

SpatialAcceleration constructor from an Eigen expression that represents a six-dimensional vector. Under the hood, spatial accelerations are 6-element quantities that are pairs of ordinary 3-vectors. Elements 0-2 constitute the angular acceleration component while elements 3-5 constitute the translational acceleration. The argument A in this constructor is the concatenation of the rotational 3D component followed by the translational 3D component. This constructor will assert the size of A is six (6) at compile-time for fixed sized Eigen expressions and at run-time for dynamic sized Eigen expressions.

get_coeffs(self: pydrake.multibody.math.SpatialAcceleration_[float]) → numpy.ndarray[float64[6, 1]]

Returns a constant reference to the underlying storage.

rotational(self: pydrake.multibody.math.SpatialAcceleration_[float]) → numpy.ndarray[float64[3, 1]]

translational(self: pydrake.multibody.math.SpatialAcceleration_[float]) → numpy.ndarray[float64[3, 1]]

class pydrake.multibody.math.SpatialAcceleration_[AutoDiffXd]

This class is used to represent a spatial acceleration that combines rotational (angular acceleration) and translational (linear acceleration) components. While a SpatialVelocity V_XY represents the motion of a “moving frame” Y measured with respect to a “measured-in” frame X, the SpatialAcceleration A_XY represents the rate of change of this spatial velocity V_XY in frame X. That is $$^XA^Y = \frac{^Xd}{dt}\,{^XV^Y}$$ where $$\frac{^Xd}{dt}$$ denotes the time derivative taken in frame X. That is, to compute an acceleration we need to specify in what frame the time derivative is taken, see [Mitiguy 2016, §6.1] for a more in depth discussion on this. Time derivatives can be taken in different frames, and they transform according to the “Transport Theorem”, which in Drake is implemented in drake::math::ConvertTimeDerivativeToOtherFrame(). In source code comments we write A_XY = DtX(V_XY), where DtX() is the operator that takes the time derivative in the X frame. By convention, and unless otherwise stated, we assume that the frame in which the time derivative is taken is the “measured-in” frame, i.e. the time derivative used in A_XY is in frame X by default (i.e. DtX()). To perform numerical computations, we need to specify an “expressed-in” frame E (which may be distinct from either X or Y), so that components can be expressed as real numbers. Only the vector values are stored in a SpatialAcceleration object; the frames must be understood from context and it is the responsibility of the user to keep track of them. That is best accomplished through disciplined notation. In source code we use monogram notation where capital A is used to designate a spatial acceleration quantity. The same monogram notation rules for SpatialVelocity are also used for SpatialAcceleration. That is, the spatial acceleration of a frame Y measured in X and expressed in E is denoted with A_XY_E. For a more detailed introduction on spatial vectors and the monogram notation please refer to section multibody_spatial_vectors.

[Mitiguy 2016] Mitiguy, P., 2016. Advanced Dynamics & Motion Simulation.

Template parameter T:
The underlying scalar type. Must be a valid Eigen scalar.
SetZero(self: pydrake.multibody.math.SpatialAcceleration_[AutoDiffXd]) → pydrake.multibody.math.SpatialAcceleration_[AutoDiffXd]

Sets both rotational and translational components of this SpatialVector to zero.

static Zero() → pydrake.multibody.math.SpatialAcceleration_[AutoDiffXd]

Factory to create a zero SpatialVector, i.e. rotational and translational components are both zero.

__init__(*args, **kwargs)

1. __init__(self: pydrake.multibody.math.SpatialAcceleration_[AutoDiffXd]) -> None

Default constructor. In Release builds the elements of the newly constructed spatial acceleration are left uninitialized resulting in a zero cost operation. However in Debug builds those entries are set to NaN so that operations using this uninitialized spatial acceleration fail fast, allowing fast bug detection.

1. __init__(self: pydrake.multibody.math.SpatialAcceleration_[AutoDiffXd], alpha: numpy.ndarray[object[3, 1]], a: numpy.ndarray[object[3, 1]]) -> None

SpatialAcceleration constructor from an angular acceleration alpha and a linear acceleration a.

1. __init__(self: pydrake.multibody.math.SpatialAcceleration_[AutoDiffXd], A: numpy.ndarray[object[6, 1]]) -> None

SpatialAcceleration constructor from an Eigen expression that represents a six-dimensional vector. Under the hood, spatial accelerations are 6-element quantities that are pairs of ordinary 3-vectors. Elements 0-2 constitute the angular acceleration component while elements 3-5 constitute the translational acceleration. The argument A in this constructor is the concatenation of the rotational 3D component followed by the translational 3D component. This constructor will assert the size of A is six (6) at compile-time for fixed sized Eigen expressions and at run-time for dynamic sized Eigen expressions.

get_coeffs(self: pydrake.multibody.math.SpatialAcceleration_[AutoDiffXd]) → numpy.ndarray[object[6, 1]]

Returns a constant reference to the underlying storage.

rotational(self: pydrake.multibody.math.SpatialAcceleration_[AutoDiffXd]) → numpy.ndarray[object[3, 1]]

translational(self: pydrake.multibody.math.SpatialAcceleration_[AutoDiffXd]) → numpy.ndarray[object[3, 1]]

class pydrake.multibody.math.SpatialAcceleration_[Expression]

This class is used to represent a spatial acceleration that combines rotational (angular acceleration) and translational (linear acceleration) components. While a SpatialVelocity V_XY represents the motion of a “moving frame” Y measured with respect to a “measured-in” frame X, the SpatialAcceleration A_XY represents the rate of change of this spatial velocity V_XY in frame X. That is $$^XA^Y = \frac{^Xd}{dt}\,{^XV^Y}$$ where $$\frac{^Xd}{dt}$$ denotes the time derivative taken in frame X. That is, to compute an acceleration we need to specify in what frame the time derivative is taken, see [Mitiguy 2016, §6.1] for a more in depth discussion on this. Time derivatives can be taken in different frames, and they transform according to the “Transport Theorem”, which in Drake is implemented in drake::math::ConvertTimeDerivativeToOtherFrame(). In source code comments we write A_XY = DtX(V_XY), where DtX() is the operator that takes the time derivative in the X frame. By convention, and unless otherwise stated, we assume that the frame in which the time derivative is taken is the “measured-in” frame, i.e. the time derivative used in A_XY is in frame X by default (i.e. DtX()). To perform numerical computations, we need to specify an “expressed-in” frame E (which may be distinct from either X or Y), so that components can be expressed as real numbers. Only the vector values are stored in a SpatialAcceleration object; the frames must be understood from context and it is the responsibility of the user to keep track of them. That is best accomplished through disciplined notation. In source code we use monogram notation where capital A is used to designate a spatial acceleration quantity. The same monogram notation rules for SpatialVelocity are also used for SpatialAcceleration. That is, the spatial acceleration of a frame Y measured in X and expressed in E is denoted with A_XY_E. For a more detailed introduction on spatial vectors and the monogram notation please refer to section multibody_spatial_vectors.

[Mitiguy 2016] Mitiguy, P., 2016. Advanced Dynamics & Motion Simulation.

Template parameter T:
The underlying scalar type. Must be a valid Eigen scalar.
SetZero(self: pydrake.multibody.math.SpatialAcceleration_[Expression]) → pydrake.multibody.math.SpatialAcceleration_[Expression]

Sets both rotational and translational components of this SpatialVector to zero.

static Zero() → pydrake.multibody.math.SpatialAcceleration_[Expression]

Factory to create a zero SpatialVector, i.e. rotational and translational components are both zero.

__init__(*args, **kwargs)

1. __init__(self: pydrake.multibody.math.SpatialAcceleration_[Expression]) -> None

Default constructor. In Release builds the elements of the newly constructed spatial acceleration are left uninitialized resulting in a zero cost operation. However in Debug builds those entries are set to NaN so that operations using this uninitialized spatial acceleration fail fast, allowing fast bug detection.

1. __init__(self: pydrake.multibody.math.SpatialAcceleration_[Expression], alpha: numpy.ndarray[object[3, 1]], a: numpy.ndarray[object[3, 1]]) -> None

SpatialAcceleration constructor from an angular acceleration alpha and a linear acceleration a.

1. __init__(self: pydrake.multibody.math.SpatialAcceleration_[Expression], A: numpy.ndarray[object[6, 1]]) -> None

SpatialAcceleration constructor from an Eigen expression that represents a six-dimensional vector. Under the hood, spatial accelerations are 6-element quantities that are pairs of ordinary 3-vectors. Elements 0-2 constitute the angular acceleration component while elements 3-5 constitute the translational acceleration. The argument A in this constructor is the concatenation of the rotational 3D component followed by the translational 3D component. This constructor will assert the size of A is six (6) at compile-time for fixed sized Eigen expressions and at run-time for dynamic sized Eigen expressions.

get_coeffs(self: pydrake.multibody.math.SpatialAcceleration_[Expression]) → numpy.ndarray[object[6, 1]]

Returns a constant reference to the underlying storage.

rotational(self: pydrake.multibody.math.SpatialAcceleration_[Expression]) → numpy.ndarray[object[3, 1]]

translational(self: pydrake.multibody.math.SpatialAcceleration_[Expression]) → numpy.ndarray[object[3, 1]]

class pydrake.multibody.math.SpatialAcceleration_[float]

This class is used to represent a spatial acceleration that combines rotational (angular acceleration) and translational (linear acceleration) components. While a SpatialVelocity V_XY represents the motion of a “moving frame” Y measured with respect to a “measured-in” frame X, the SpatialAcceleration A_XY represents the rate of change of this spatial velocity V_XY in frame X. That is $$^XA^Y = \frac{^Xd}{dt}\,{^XV^Y}$$ where $$\frac{^Xd}{dt}$$ denotes the time derivative taken in frame X. That is, to compute an acceleration we need to specify in what frame the time derivative is taken, see [Mitiguy 2016, §6.1] for a more in depth discussion on this. Time derivatives can be taken in different frames, and they transform according to the “Transport Theorem”, which in Drake is implemented in drake::math::ConvertTimeDerivativeToOtherFrame(). In source code comments we write A_XY = DtX(V_XY), where DtX() is the operator that takes the time derivative in the X frame. By convention, and unless otherwise stated, we assume that the frame in which the time derivative is taken is the “measured-in” frame, i.e. the time derivative used in A_XY is in frame X by default (i.e. DtX()). To perform numerical computations, we need to specify an “expressed-in” frame E (which may be distinct from either X or Y), so that components can be expressed as real numbers. Only the vector values are stored in a SpatialAcceleration object; the frames must be understood from context and it is the responsibility of the user to keep track of them. That is best accomplished through disciplined notation. In source code we use monogram notation where capital A is used to designate a spatial acceleration quantity. The same monogram notation rules for SpatialVelocity are also used for SpatialAcceleration. That is, the spatial acceleration of a frame Y measured in X and expressed in E is denoted with A_XY_E. For a more detailed introduction on spatial vectors and the monogram notation please refer to section multibody_spatial_vectors.

[Mitiguy 2016] Mitiguy, P., 2016. Advanced Dynamics & Motion Simulation.

Template parameter T:
The underlying scalar type. Must be a valid Eigen scalar.
SetZero(self: pydrake.multibody.math.SpatialAcceleration_[float]) → pydrake.multibody.math.SpatialAcceleration_[float]

Sets both rotational and translational components of this SpatialVector to zero.

static Zero() → pydrake.multibody.math.SpatialAcceleration_[float]

Factory to create a zero SpatialVector, i.e. rotational and translational components are both zero.

__init__(*args, **kwargs)

1. __init__(self: pydrake.multibody.math.SpatialAcceleration_[float]) -> None

Default constructor. In Release builds the elements of the newly constructed spatial acceleration are left uninitialized resulting in a zero cost operation. However in Debug builds those entries are set to NaN so that operations using this uninitialized spatial acceleration fail fast, allowing fast bug detection.

1. __init__(self: pydrake.multibody.math.SpatialAcceleration_[float], alpha: numpy.ndarray[float64[3, 1]], a: numpy.ndarray[float64[3, 1]]) -> None

SpatialAcceleration constructor from an angular acceleration alpha and a linear acceleration a.

1. __init__(self: pydrake.multibody.math.SpatialAcceleration_[float], A: numpy.ndarray[float64[6, 1]]) -> None

SpatialAcceleration constructor from an Eigen expression that represents a six-dimensional vector. Under the hood, spatial accelerations are 6-element quantities that are pairs of ordinary 3-vectors. Elements 0-2 constitute the angular acceleration component while elements 3-5 constitute the translational acceleration. The argument A in this constructor is the concatenation of the rotational 3D component followed by the translational 3D component. This constructor will assert the size of A is six (6) at compile-time for fixed sized Eigen expressions and at run-time for dynamic sized Eigen expressions.

get_coeffs(self: pydrake.multibody.math.SpatialAcceleration_[float]) → numpy.ndarray[float64[6, 1]]

Returns a constant reference to the underlying storage.

rotational(self: pydrake.multibody.math.SpatialAcceleration_[float]) → numpy.ndarray[float64[3, 1]]

translational(self: pydrake.multibody.math.SpatialAcceleration_[float]) → numpy.ndarray[float64[3, 1]]

pydrake.multibody.math.SpatialForce
template pydrake.multibody.math.SpatialForce_
class SpatialForce_[float]

This class is used to represent a spatial force (also called a wrench) that combines both rotational (torque) and translational force components. Spatial forces are 6-element quantities that are pairs of ordinary 3-vectors. Elements 0-2 are the torque component while elements 3-5 are the force component. Both vectors must be expressed in the same frame, and the translational force is applied to a particular point of a body, but neither the frame nor the point are stored with a SpatialForce object; they must be understood from context. It is the responsibility of the user to keep track of the application point and the expressed-in frame. That is best accomplished through disciplined notation. In source code we use monogram notation where capital F is used to designate a spatial force quantity. We write a point P fixed to body (or frame) B as $$B_P$$ which appears in code and comments as Bp. Then we write a particular spatial force as F_Bp_E where the _E suffix indicates that the expressed-in frame is E. This symbol represents a torque applied to body B, and a force applied to point P on B, with both vectors expressed in E. Very often the application point will be the body origin Bo; if no point is shown the origin is understood, so F_B_E means F_Bo_E. For a more detailed introduction on spatial vectors and the monogram notation please refer to section multibody_spatial_vectors.

Template parameter T:
The underlying scalar type. Must be a valid Eigen scalar.
SetZero(self: pydrake.multibody.math.SpatialForce_[float]) → pydrake.multibody.math.SpatialForce_[float]

Sets both rotational and translational components of this SpatialVector to zero.

static Zero() → pydrake.multibody.math.SpatialForce_[float]

Factory to create a zero SpatialVector, i.e. rotational and translational components are both zero.

__init__(*args, **kwargs)

1. __init__(self: pydrake.multibody.math.SpatialForce_[float]) -> None

Default constructor. In Release builds the elements of the newly constructed spatial force are left uninitialized resulting in a zero cost operation. However in Debug builds those entries are set to NaN so that operations using this uninitialized spatial force fail fast, allowing fast bug detection.

1. __init__(self: pydrake.multibody.math.SpatialForce_[float], tau: numpy.ndarray[float64[3, 1]], f: numpy.ndarray[float64[3, 1]]) -> None

SpatialForce constructor from a torque tau and a force f.

1. __init__(self: pydrake.multibody.math.SpatialForce_[float], F: numpy.ndarray[float64[6, 1]]) -> None

SpatialForce constructor from an Eigen expression that represents a six-dimensional vector. This constructor will assert the size of F is six (6) at compile-time for fixed sized Eigen expressions and at run-time for dynamic sized Eigen expressions.

get_coeffs(self: pydrake.multibody.math.SpatialForce_[float]) → numpy.ndarray[float64[6, 1]]

Returns a constant reference to the underlying storage.

rotational(self: pydrake.multibody.math.SpatialForce_[float]) → numpy.ndarray[float64[3, 1]]

translational(self: pydrake.multibody.math.SpatialForce_[float]) → numpy.ndarray[float64[3, 1]]

class pydrake.multibody.math.SpatialForce_[AutoDiffXd]

This class is used to represent a spatial force (also called a wrench) that combines both rotational (torque) and translational force components. Spatial forces are 6-element quantities that are pairs of ordinary 3-vectors. Elements 0-2 are the torque component while elements 3-5 are the force component. Both vectors must be expressed in the same frame, and the translational force is applied to a particular point of a body, but neither the frame nor the point are stored with a SpatialForce object; they must be understood from context. It is the responsibility of the user to keep track of the application point and the expressed-in frame. That is best accomplished through disciplined notation. In source code we use monogram notation where capital F is used to designate a spatial force quantity. We write a point P fixed to body (or frame) B as $$B_P$$ which appears in code and comments as Bp. Then we write a particular spatial force as F_Bp_E where the _E suffix indicates that the expressed-in frame is E. This symbol represents a torque applied to body B, and a force applied to point P on B, with both vectors expressed in E. Very often the application point will be the body origin Bo; if no point is shown the origin is understood, so F_B_E means F_Bo_E. For a more detailed introduction on spatial vectors and the monogram notation please refer to section multibody_spatial_vectors.

Template parameter T:
The underlying scalar type. Must be a valid Eigen scalar.
SetZero(self: pydrake.multibody.math.SpatialForce_[AutoDiffXd]) → pydrake.multibody.math.SpatialForce_[AutoDiffXd]

Sets both rotational and translational components of this SpatialVector to zero.

static Zero() → pydrake.multibody.math.SpatialForce_[AutoDiffXd]

Factory to create a zero SpatialVector, i.e. rotational and translational components are both zero.

__init__(*args, **kwargs)

1. __init__(self: pydrake.multibody.math.SpatialForce_[AutoDiffXd]) -> None

Default constructor. In Release builds the elements of the newly constructed spatial force are left uninitialized resulting in a zero cost operation. However in Debug builds those entries are set to NaN so that operations using this uninitialized spatial force fail fast, allowing fast bug detection.

1. __init__(self: pydrake.multibody.math.SpatialForce_[AutoDiffXd], tau: numpy.ndarray[object[3, 1]], f: numpy.ndarray[object[3, 1]]) -> None

SpatialForce constructor from a torque tau and a force f.

1. __init__(self: pydrake.multibody.math.SpatialForce_[AutoDiffXd], F: numpy.ndarray[object[6, 1]]) -> None

SpatialForce constructor from an Eigen expression that represents a six-dimensional vector. This constructor will assert the size of F is six (6) at compile-time for fixed sized Eigen expressions and at run-time for dynamic sized Eigen expressions.

get_coeffs(self: pydrake.multibody.math.SpatialForce_[AutoDiffXd]) → numpy.ndarray[object[6, 1]]

Returns a constant reference to the underlying storage.

rotational(self: pydrake.multibody.math.SpatialForce_[AutoDiffXd]) → numpy.ndarray[object[3, 1]]

translational(self: pydrake.multibody.math.SpatialForce_[AutoDiffXd]) → numpy.ndarray[object[3, 1]]

class pydrake.multibody.math.SpatialForce_[Expression]

This class is used to represent a spatial force (also called a wrench) that combines both rotational (torque) and translational force components. Spatial forces are 6-element quantities that are pairs of ordinary 3-vectors. Elements 0-2 are the torque component while elements 3-5 are the force component. Both vectors must be expressed in the same frame, and the translational force is applied to a particular point of a body, but neither the frame nor the point are stored with a SpatialForce object; they must be understood from context. It is the responsibility of the user to keep track of the application point and the expressed-in frame. That is best accomplished through disciplined notation. In source code we use monogram notation where capital F is used to designate a spatial force quantity. We write a point P fixed to body (or frame) B as $$B_P$$ which appears in code and comments as Bp. Then we write a particular spatial force as F_Bp_E where the _E suffix indicates that the expressed-in frame is E. This symbol represents a torque applied to body B, and a force applied to point P on B, with both vectors expressed in E. Very often the application point will be the body origin Bo; if no point is shown the origin is understood, so F_B_E means F_Bo_E. For a more detailed introduction on spatial vectors and the monogram notation please refer to section multibody_spatial_vectors.

Template parameter T:
The underlying scalar type. Must be a valid Eigen scalar.
SetZero(self: pydrake.multibody.math.SpatialForce_[Expression]) → pydrake.multibody.math.SpatialForce_[Expression]

Sets both rotational and translational components of this SpatialVector to zero.

static Zero() → pydrake.multibody.math.SpatialForce_[Expression]

Factory to create a zero SpatialVector, i.e. rotational and translational components are both zero.

__init__(*args, **kwargs)

1. __init__(self: pydrake.multibody.math.SpatialForce_[Expression]) -> None

Default constructor. In Release builds the elements of the newly constructed spatial force are left uninitialized resulting in a zero cost operation. However in Debug builds those entries are set to NaN so that operations using this uninitialized spatial force fail fast, allowing fast bug detection.

1. __init__(self: pydrake.multibody.math.SpatialForce_[Expression], tau: numpy.ndarray[object[3, 1]], f: numpy.ndarray[object[3, 1]]) -> None

SpatialForce constructor from a torque tau and a force f.

1. __init__(self: pydrake.multibody.math.SpatialForce_[Expression], F: numpy.ndarray[object[6, 1]]) -> None

SpatialForce constructor from an Eigen expression that represents a six-dimensional vector. This constructor will assert the size of F is six (6) at compile-time for fixed sized Eigen expressions and at run-time for dynamic sized Eigen expressions.

get_coeffs(self: pydrake.multibody.math.SpatialForce_[Expression]) → numpy.ndarray[object[6, 1]]

Returns a constant reference to the underlying storage.

rotational(self: pydrake.multibody.math.SpatialForce_[Expression]) → numpy.ndarray[object[3, 1]]

translational(self: pydrake.multibody.math.SpatialForce_[Expression]) → numpy.ndarray[object[3, 1]]

class pydrake.multibody.math.SpatialForce_[float]

This class is used to represent a spatial force (also called a wrench) that combines both rotational (torque) and translational force components. Spatial forces are 6-element quantities that are pairs of ordinary 3-vectors. Elements 0-2 are the torque component while elements 3-5 are the force component. Both vectors must be expressed in the same frame, and the translational force is applied to a particular point of a body, but neither the frame nor the point are stored with a SpatialForce object; they must be understood from context. It is the responsibility of the user to keep track of the application point and the expressed-in frame. That is best accomplished through disciplined notation. In source code we use monogram notation where capital F is used to designate a spatial force quantity. We write a point P fixed to body (or frame) B as $$B_P$$ which appears in code and comments as Bp. Then we write a particular spatial force as F_Bp_E where the _E suffix indicates that the expressed-in frame is E. This symbol represents a torque applied to body B, and a force applied to point P on B, with both vectors expressed in E. Very often the application point will be the body origin Bo; if no point is shown the origin is understood, so F_B_E means F_Bo_E. For a more detailed introduction on spatial vectors and the monogram notation please refer to section multibody_spatial_vectors.

Template parameter T:
The underlying scalar type. Must be a valid Eigen scalar.
SetZero(self: pydrake.multibody.math.SpatialForce_[float]) → pydrake.multibody.math.SpatialForce_[float]

Sets both rotational and translational components of this SpatialVector to zero.

static Zero() → pydrake.multibody.math.SpatialForce_[float]

Factory to create a zero SpatialVector, i.e. rotational and translational components are both zero.

__init__(*args, **kwargs)

1. __init__(self: pydrake.multibody.math.SpatialForce_[float]) -> None

Default constructor. In Release builds the elements of the newly constructed spatial force are left uninitialized resulting in a zero cost operation. However in Debug builds those entries are set to NaN so that operations using this uninitialized spatial force fail fast, allowing fast bug detection.

1. __init__(self: pydrake.multibody.math.SpatialForce_[float], tau: numpy.ndarray[float64[3, 1]], f: numpy.ndarray[float64[3, 1]]) -> None

SpatialForce constructor from a torque tau and a force f.

1. __init__(self: pydrake.multibody.math.SpatialForce_[float], F: numpy.ndarray[float64[6, 1]]) -> None

SpatialForce constructor from an Eigen expression that represents a six-dimensional vector. This constructor will assert the size of F is six (6) at compile-time for fixed sized Eigen expressions and at run-time for dynamic sized Eigen expressions.

get_coeffs(self: pydrake.multibody.math.SpatialForce_[float]) → numpy.ndarray[float64[6, 1]]

Returns a constant reference to the underlying storage.

rotational(self: pydrake.multibody.math.SpatialForce_[float]) → numpy.ndarray[float64[3, 1]]

translational(self: pydrake.multibody.math.SpatialForce_[float]) → numpy.ndarray[float64[3, 1]]

pydrake.multibody.math.SpatialVelocity
template pydrake.multibody.math.SpatialVelocity_
class SpatialVelocity_[float]

This class is used to represent a spatial velocity (also called a twist) that combines rotational (angular) and translational (linear) velocity components. Spatial velocities are 6-element quantities that are pairs of ordinary 3-vectors. Elements 0-2 are the angular velocity component while elements 3-5 are the translational velocity. Spatial velocities represent the motion of a “moving frame” B measured with respect to a “measured-in” frame A. In addition, the two contained vectors must be expressed in the same “expressed-in” frame E, which may be distinct from either A or B. Finally, while angular velocity is identical for any frame fixed to a rigid body, translational velocity refers to a particular point. Only the vector values are stored in a SpatialVelocity object; the three frames and the point must be understood from context. It is the responsibility of the user to keep track of them. That is best accomplished through disciplined notation. In source code we use monogram notation where capital V is used to designate a spatial velocity quantity. We write a point P fixed to body (or frame) B as $$B_P$$ which appears in code and comments as Bp. Then we write a particular spatial velocity as V_ABp_E where the _E suffix indicates that the expressed-in frame is E. This symbol represents the angular velocity of frame B in frame A, and the translational velocity of point P in A, where P is fixed to frame B, with both vectors expressed in E. Very often the point of interest will be the body origin Bo; if no point is shown the origin is understood, so V_AB_E means V_ABo_E. For a more detailed introduction on spatial vectors and the monogram notation please refer to section multibody_spatial_vectors.

Template parameter T:
The underlying scalar type. Must be a valid Eigen scalar.
SetZero(self: pydrake.multibody.math.SpatialVelocity_[float]) → pydrake.multibody.math.SpatialVelocity_[float]

Sets both rotational and translational components of this SpatialVector to zero.

static Zero() → pydrake.multibody.math.SpatialVelocity_[float]

Factory to create a zero SpatialVector, i.e. rotational and translational components are both zero.

__init__(*args, **kwargs)

1. __init__(self: pydrake.multibody.math.SpatialVelocity_[float]) -> None

Default constructor. In Release builds the elements of the newly constructed spatial velocity are left uninitialized resulting in a zero cost operation. However in Debug builds those entries are set to NaN so that operations using this uninitialized spatial velocity fail fast, allowing fast bug detection.

1. __init__(self: pydrake.multibody.math.SpatialVelocity_[float], w: numpy.ndarray[float64[3, 1]], v: numpy.ndarray[float64[3, 1]]) -> None

SpatialVelocity constructor from an angular velocity w and a linear velocity v.

1. __init__(self: pydrake.multibody.math.SpatialVelocity_[float], V: numpy.ndarray[float64[6, 1]]) -> None

SpatialVelocity constructor from an Eigen expression that represents a six-dimensional vector. This constructor will assert the size of V is six (6) at compile-time for fixed sized Eigen expressions and at run-time for dynamic sized Eigen expressions.

get_coeffs(self: pydrake.multibody.math.SpatialVelocity_[float]) → numpy.ndarray[float64[6, 1]]

Returns a constant reference to the underlying storage.

rotational(self: pydrake.multibody.math.SpatialVelocity_[float]) → numpy.ndarray[float64[3, 1]]

translational(self: pydrake.multibody.math.SpatialVelocity_[float]) → numpy.ndarray[float64[3, 1]]

class pydrake.multibody.math.SpatialVelocity_[AutoDiffXd]

This class is used to represent a spatial velocity (also called a twist) that combines rotational (angular) and translational (linear) velocity components. Spatial velocities are 6-element quantities that are pairs of ordinary 3-vectors. Elements 0-2 are the angular velocity component while elements 3-5 are the translational velocity. Spatial velocities represent the motion of a “moving frame” B measured with respect to a “measured-in” frame A. In addition, the two contained vectors must be expressed in the same “expressed-in” frame E, which may be distinct from either A or B. Finally, while angular velocity is identical for any frame fixed to a rigid body, translational velocity refers to a particular point. Only the vector values are stored in a SpatialVelocity object; the three frames and the point must be understood from context. It is the responsibility of the user to keep track of them. That is best accomplished through disciplined notation. In source code we use monogram notation where capital V is used to designate a spatial velocity quantity. We write a point P fixed to body (or frame) B as $$B_P$$ which appears in code and comments as Bp. Then we write a particular spatial velocity as V_ABp_E where the _E suffix indicates that the expressed-in frame is E. This symbol represents the angular velocity of frame B in frame A, and the translational velocity of point P in A, where P is fixed to frame B, with both vectors expressed in E. Very often the point of interest will be the body origin Bo; if no point is shown the origin is understood, so V_AB_E means V_ABo_E. For a more detailed introduction on spatial vectors and the monogram notation please refer to section multibody_spatial_vectors.

Template parameter T:
The underlying scalar type. Must be a valid Eigen scalar.
SetZero(self: pydrake.multibody.math.SpatialVelocity_[AutoDiffXd]) → pydrake.multibody.math.SpatialVelocity_[AutoDiffXd]

Sets both rotational and translational components of this SpatialVector to zero.

static Zero() → pydrake.multibody.math.SpatialVelocity_[AutoDiffXd]

Factory to create a zero SpatialVector, i.e. rotational and translational components are both zero.

__init__(*args, **kwargs)

1. __init__(self: pydrake.multibody.math.SpatialVelocity_[AutoDiffXd]) -> None

Default constructor. In Release builds the elements of the newly constructed spatial velocity are left uninitialized resulting in a zero cost operation. However in Debug builds those entries are set to NaN so that operations using this uninitialized spatial velocity fail fast, allowing fast bug detection.

1. __init__(self: pydrake.multibody.math.SpatialVelocity_[AutoDiffXd], w: numpy.ndarray[object[3, 1]], v: numpy.ndarray[object[3, 1]]) -> None

SpatialVelocity constructor from an angular velocity w and a linear velocity v.

1. __init__(self: pydrake.multibody.math.SpatialVelocity_[AutoDiffXd], V: numpy.ndarray[object[6, 1]]) -> None

SpatialVelocity constructor from an Eigen expression that represents a six-dimensional vector. This constructor will assert the size of V is six (6) at compile-time for fixed sized Eigen expressions and at run-time for dynamic sized Eigen expressions.

get_coeffs(self: pydrake.multibody.math.SpatialVelocity_[AutoDiffXd]) → numpy.ndarray[object[6, 1]]

Returns a constant reference to the underlying storage.

rotational(self: pydrake.multibody.math.SpatialVelocity_[AutoDiffXd]) → numpy.ndarray[object[3, 1]]

translational(self: pydrake.multibody.math.SpatialVelocity_[AutoDiffXd]) → numpy.ndarray[object[3, 1]]

class pydrake.multibody.math.SpatialVelocity_[Expression]

This class is used to represent a spatial velocity (also called a twist) that combines rotational (angular) and translational (linear) velocity components. Spatial velocities are 6-element quantities that are pairs of ordinary 3-vectors. Elements 0-2 are the angular velocity component while elements 3-5 are the translational velocity. Spatial velocities represent the motion of a “moving frame” B measured with respect to a “measured-in” frame A. In addition, the two contained vectors must be expressed in the same “expressed-in” frame E, which may be distinct from either A or B. Finally, while angular velocity is identical for any frame fixed to a rigid body, translational velocity refers to a particular point. Only the vector values are stored in a SpatialVelocity object; the three frames and the point must be understood from context. It is the responsibility of the user to keep track of them. That is best accomplished through disciplined notation. In source code we use monogram notation where capital V is used to designate a spatial velocity quantity. We write a point P fixed to body (or frame) B as $$B_P$$ which appears in code and comments as Bp. Then we write a particular spatial velocity as V_ABp_E where the _E suffix indicates that the expressed-in frame is E. This symbol represents the angular velocity of frame B in frame A, and the translational velocity of point P in A, where P is fixed to frame B, with both vectors expressed in E. Very often the point of interest will be the body origin Bo; if no point is shown the origin is understood, so V_AB_E means V_ABo_E. For a more detailed introduction on spatial vectors and the monogram notation please refer to section multibody_spatial_vectors.

Template parameter T:
The underlying scalar type. Must be a valid Eigen scalar.
SetZero(self: pydrake.multibody.math.SpatialVelocity_[Expression]) → pydrake.multibody.math.SpatialVelocity_[Expression]

Sets both rotational and translational components of this SpatialVector to zero.

static Zero() → pydrake.multibody.math.SpatialVelocity_[Expression]

Factory to create a zero SpatialVector, i.e. rotational and translational components are both zero.

__init__(*args, **kwargs)

1. __init__(self: pydrake.multibody.math.SpatialVelocity_[Expression]) -> None

Default constructor. In Release builds the elements of the newly constructed spatial velocity are left uninitialized resulting in a zero cost operation. However in Debug builds those entries are set to NaN so that operations using this uninitialized spatial velocity fail fast, allowing fast bug detection.

1. __init__(self: pydrake.multibody.math.SpatialVelocity_[Expression], w: numpy.ndarray[object[3, 1]], v: numpy.ndarray[object[3, 1]]) -> None

SpatialVelocity constructor from an angular velocity w and a linear velocity v.

1. __init__(self: pydrake.multibody.math.SpatialVelocity_[Expression], V: numpy.ndarray[object[6, 1]]) -> None

SpatialVelocity constructor from an Eigen expression that represents a six-dimensional vector. This constructor will assert the size of V is six (6) at compile-time for fixed sized Eigen expressions and at run-time for dynamic sized Eigen expressions.

get_coeffs(self: pydrake.multibody.math.SpatialVelocity_[Expression]) → numpy.ndarray[object[6, 1]]

Returns a constant reference to the underlying storage.

rotational(self: pydrake.multibody.math.SpatialVelocity_[Expression]) → numpy.ndarray[object[3, 1]]

translational(self: pydrake.multibody.math.SpatialVelocity_[Expression]) → numpy.ndarray[object[3, 1]]

class pydrake.multibody.math.SpatialVelocity_[float]

This class is used to represent a spatial velocity (also called a twist) that combines rotational (angular) and translational (linear) velocity components. Spatial velocities are 6-element quantities that are pairs of ordinary 3-vectors. Elements 0-2 are the angular velocity component while elements 3-5 are the translational velocity. Spatial velocities represent the motion of a “moving frame” B measured with respect to a “measured-in” frame A. In addition, the two contained vectors must be expressed in the same “expressed-in” frame E, which may be distinct from either A or B. Finally, while angular velocity is identical for any frame fixed to a rigid body, translational velocity refers to a particular point. Only the vector values are stored in a SpatialVelocity object; the three frames and the point must be understood from context. It is the responsibility of the user to keep track of them. That is best accomplished through disciplined notation. In source code we use monogram notation where capital V is used to designate a spatial velocity quantity. We write a point P fixed to body (or frame) B as $$B_P$$ which appears in code and comments as Bp. Then we write a particular spatial velocity as V_ABp_E where the _E suffix indicates that the expressed-in frame is E. This symbol represents the angular velocity of frame B in frame A, and the translational velocity of point P in A, where P is fixed to frame B, with both vectors expressed in E. Very often the point of interest will be the body origin Bo; if no point is shown the origin is understood, so V_AB_E means V_ABo_E. For a more detailed introduction on spatial vectors and the monogram notation please refer to section multibody_spatial_vectors.

Template parameter T:
The underlying scalar type. Must be a valid Eigen scalar.
SetZero(self: pydrake.multibody.math.SpatialVelocity_[float]) → pydrake.multibody.math.SpatialVelocity_[float]

Sets both rotational and translational components of this SpatialVector to zero.

static Zero() → pydrake.multibody.math.SpatialVelocity_[float]

Factory to create a zero SpatialVector, i.e. rotational and translational components are both zero.

__init__(*args, **kwargs)

1. __init__(self: pydrake.multibody.math.SpatialVelocity_[float]) -> None

Default constructor. In Release builds the elements of the newly constructed spatial velocity are left uninitialized resulting in a zero cost operation. However in Debug builds those entries are set to NaN so that operations using this uninitialized spatial velocity fail fast, allowing fast bug detection.

1. __init__(self: pydrake.multibody.math.SpatialVelocity_[float], w: numpy.ndarray[float64[3, 1]], v: numpy.ndarray[float64[3, 1]]) -> None

SpatialVelocity constructor from an angular velocity w and a linear velocity v.

1. __init__(self: pydrake.multibody.math.SpatialVelocity_[float], V: numpy.ndarray[float64[6, 1]]) -> None

SpatialVelocity constructor from an Eigen expression that represents a six-dimensional vector. This constructor will assert the size of V is six (6) at compile-time for fixed sized Eigen expressions and at run-time for dynamic sized Eigen expressions.

get_coeffs(self: pydrake.multibody.math.SpatialVelocity_[float]) → numpy.ndarray[float64[6, 1]]

Returns a constant reference to the underlying storage.

rotational(self: pydrake.multibody.math.SpatialVelocity_[float]) → numpy.ndarray[float64[3, 1]]

translational(self: pydrake.multibody.math.SpatialVelocity_[float]) → numpy.ndarray[float64[3, 1]]