pydrake.multibody.rational

RationalForwardKinematics module

class pydrake.multibody.rational.RationalForwardKinematics(*args, **kwargs)
__init__(self, plant: pydrake.multibody.plant.MultibodyPlant) → None
CalcBodyPoseAsMultilinearPolynomial(self, q_star: numpy.ndarray[dtype=float64, shape=(*), writable=False], body_index: pydrake.multibody.tree.BodyIndex, expressed_body_index: pydrake.multibody.tree.BodyIndex) → pydrake.multibody.rational.RationalForwardKinematicsPose

Computes the pose X_AB as a multilinear polynomial function. The indeterminates of the polynomials are cos_delta() and sin_delta(). To compute the pose as a rational function of indeterminates s(), we recommend to first call this function to compute the pose as a multilinear polynomial functions, and then call ConvertMultilinearPolynomialToRationalFunction() to convert these polynomials to rational function with indeterminates s().

Parameter q_star:

The nominal posture q*.

Parameter body_index:

Frame B, the body whose pose is computed.

Parameter expressed_body_index:

Frame A, the body in whose frame the pose is expressed.

Returns:

X_AB The pose of body body_index expressed in expressed_body_index.

ComputeQValue(self, s_val: numpy.ndarray[dtype=float64, shape=(*), order='C'], q_star_val: numpy.ndarray[dtype=float64, shape=(*), writable=False]) → numpy.ndarray[dtype=float64, shape=(*), order='C']
ComputeQValue(self, s_val: numpy.ndarray[dtype=object, shape=(*)], q_star_val: numpy.ndarray[dtype=float64, shape=(*), writable=False]) → numpy.ndarray[dtype=object, shape=(*)]
ComputeQValue(self, s_val: numpy.ndarray[dtype=object, shape=(*)], q_star_val: numpy.ndarray[dtype=float64, shape=(*), writable=False]) → numpy.ndarray[dtype=object, shape=(*)]

Computes values of q from s_val and q_star_val, while handling the index matching between q and s (we don’t guarantee that s(i) is computed from q(i)).

ComputeSValue(self, q_val: numpy.ndarray[dtype=float64, shape=(*), order='C'], q_star_val: numpy.ndarray[dtype=float64, shape=(*), writable=False], angles_wrap_to_inf: bool = False) → numpy.ndarray[dtype=float64, shape=(*), order='C']
ComputeSValue(self, q_val: numpy.ndarray[dtype=object, shape=(*)], q_star_val: numpy.ndarray[dtype=float64, shape=(*), writable=False]) → numpy.ndarray[dtype=object, shape=(*)]
ComputeSValue(self, q_val: numpy.ndarray[dtype=object, shape=(*)], q_star_val: numpy.ndarray[dtype=float64, shape=(*), writable=False]) → numpy.ndarray[dtype=object, shape=(*)]

Computes values of s from q_val and q_star_val, while handling the index matching between q and s (we don’t guarantee that s(i) is computed from q(i)).

Parameter angles_wrap_to_inf:

If set to True, then for a revolute joint whose (θ −θ*) >=π/2 (or <= −π/2), we set the corresponding s to ∞ (or −∞), $*Default:* is false.

ConvertMultilinearPolynomialToRationalFunction(self, e: pydrake.symbolic.Polynomial) → pydrake.symbolic.RationalFunction

Given a polynomial whose indeterminates are cos_delta() and sin_delta() (typically this polynomial is obtained from calling CalcBodyPoseAsMultilinearPolynomial()), converts this polynomial to a rational function with indeterminates s().

plant(self) → pydrake.multibody.plant.MultibodyPlant
s(self) → numpy.ndarray[dtype=object, shape=(*)]
class pydrake.multibody.rational.RationalForwardKinematicsPose

Note

This class is templated; see RationalForwardKinematicsPose_ for the list of instantiations.

__init__(*args, **kwargs)
position(self) → numpy.ndarray[dtype=object, shape=(3)]
rotation(self) → numpy.ndarray[dtype=object, shape=(3, 3)]
template pydrake.multibody.rational.RationalForwardKinematicsPose_

Instantiations: RationalForwardKinematicsPose_[Polynomial], RationalForwardKinematicsPose_[RationalFunction]

class pydrake.multibody.rational.RationalForwardKinematicsPose_[RationalFunction]
__init__(*args, **kwargs)
position(self) → numpy.ndarray[dtype=object, shape=(3)]
rotation(self) → numpy.ndarray[dtype=object, shape=(3, 3)]