pydrake.common.schema

Bindings for the common.schema package.

class pydrake.common.schema.Deterministic(*args, **kwargs)

Bases: Distribution

A single deterministic value.

__init__(self) → None
__init__(self, other: pydrake.common.schema.Deterministic) → None
__init__(self, value: float) → None
property value: float

(self) -> float

template pydrake.common.schema.DeterministicVector

Instantiations: DeterministicVector[None], DeterministicVector[1], DeterministicVector[2], DeterministicVector[3], DeterministicVector[4], DeterministicVector[5], DeterministicVector[6]

class pydrake.common.schema.DeterministicVector[1](*args, **kwargs)

Bases: DistributionVector

A single deterministic vector value.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

__init__(self) → None
__init__(self, other: pydrake.common.schema.DeterministicVector[1]) → None
__init__(self, value: numpy.ndarray[dtype=float64, shape=(1), order='C']) → None
property value: numpy.ndarray[dtype=float64, shape=(1), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(1), order=’C’]

class pydrake.common.schema.DeterministicVector[2](*args, **kwargs)

Bases: DistributionVector

A single deterministic vector value.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

__init__(self) → None
__init__(self, other: pydrake.common.schema.DeterministicVector[2]) → None
__init__(self, value: numpy.ndarray[dtype=float64, shape=(2), order='C']) → None
property value: numpy.ndarray[dtype=float64, shape=(2), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(2), order=’C’]

class pydrake.common.schema.DeterministicVector[3](*args, **kwargs)

Bases: DistributionVector

A single deterministic vector value.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

__init__(self) → None
__init__(self, other: pydrake.common.schema.DeterministicVector[3]) → None
__init__(self, value: numpy.ndarray[dtype=float64, shape=(3), order='C']) → None
property value: numpy.ndarray[dtype=float64, shape=(3), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(3), order=’C’]

class pydrake.common.schema.DeterministicVector[4](*args, **kwargs)

Bases: DistributionVector

A single deterministic vector value.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

__init__(self) → None
__init__(self, other: pydrake.common.schema.DeterministicVector[4]) → None
__init__(self, value: numpy.ndarray[dtype=float64, shape=(4), order='C']) → None
property value: numpy.ndarray[dtype=float64, shape=(4), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(4), order=’C’]

class pydrake.common.schema.DeterministicVector[5](*args, **kwargs)

Bases: DistributionVector

A single deterministic vector value.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

__init__(self) → None
__init__(self, other: pydrake.common.schema.DeterministicVector[5]) → None
__init__(self, value: numpy.ndarray[dtype=float64, shape=(5), order='C']) → None
property value: numpy.ndarray[dtype=float64, shape=(5), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(5), order=’C’]

class pydrake.common.schema.DeterministicVector[6](*args, **kwargs)

Bases: DistributionVector

A single deterministic vector value.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

__init__(self) → None
__init__(self, other: pydrake.common.schema.DeterministicVector[6]) → None
__init__(self, value: numpy.ndarray[dtype=float64, shape=(6), order='C']) → None
property value: numpy.ndarray[dtype=float64, shape=(6), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(6), order=’C’]

class pydrake.common.schema.DeterministicVector[None](*args, **kwargs)

Bases: DistributionVector

A single deterministic vector value.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

__init__(self) → None
__init__(self, other: pydrake.common.schema.DeterministicVector[None]) → None
__init__(self, value: numpy.ndarray[dtype=float64, shape=(*), order='C']) → None
property value: numpy.ndarray[dtype=float64, shape=(*), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(*), order=’C’]

pydrake.common.schema.DeterministicVectorX

alias of DeterministicVector[None]

class pydrake.common.schema.Distribution

Base class for a single distribution, to be used with YAML archives. (See class DistributionVector for vector-valued distributions.)

See implementing_serialize “Implementing Serialize” for implementation details, especially the unusually public member fields of our subclasses.

__init__(*args, **kwargs)
Mean(self) → float
Sample(self, generator: pydrake.common.RandomGenerator) → float
ToSymbolic(self) → pydrake.symbolic.Expression
class pydrake.common.schema.DistributionVector

Base class for a vector of distributions, to be used with YAML archives. (See class Distribution for scalar-valued distributions.)

See implementing_serialize for implementation details, especially the unusually public member fields in our subclasses.

__init__(*args, **kwargs)
Mean(self) → numpy.ndarray[dtype=float64, shape=(*), order='C']
Sample(self, generator: pydrake.common.RandomGenerator) → numpy.ndarray[dtype=float64, shape=(*), order='C']
ToSymbolic(self) → numpy.ndarray[dtype=object, shape=(*)]
class pydrake.common.schema.Gaussian(*args, **kwargs)

Bases: Distribution

A gaussian distribution with mean and stddev.

__init__(self) → None
__init__(self, other: pydrake.common.schema.Gaussian) → None
__init__(self, mean: float, stddev: float) → None
property mean: float

(self) -> float

property stddev: float

(self) -> float

template pydrake.common.schema.GaussianVector

Instantiations: GaussianVector[None], GaussianVector[1], GaussianVector[2], GaussianVector[3], GaussianVector[4], GaussianVector[5], GaussianVector[6]

class pydrake.common.schema.GaussianVector[1](*args, **kwargs)

Bases: DistributionVector

A gaussian distribution with vector mean and vector or scalar stddev.

When mean and stddev both have the same number of elements, that denotes an elementwise pairing of the 0th mean with 0th stddev, 1st mean with 1st stddev, etc.

Alternatively, stddev can be a vector with a single element, no matter the size of mean; that denotes the same stddev value applied to every element of mean.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

__init__(self) → None
__init__(self, other: pydrake.common.schema.GaussianVector[1]) → None
__init__(self, mean: numpy.ndarray[dtype=float64, shape=(1), order='C'], stddev: numpy.ndarray[dtype=float64, shape=(*), order='C']) → None
property mean: numpy.ndarray[dtype=float64, shape=(1), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(1), order=’C’]

property stddev: numpy.ndarray[dtype=float64, shape=(*), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(*), order=’C’]

class pydrake.common.schema.GaussianVector[2](*args, **kwargs)

Bases: DistributionVector

A gaussian distribution with vector mean and vector or scalar stddev.

When mean and stddev both have the same number of elements, that denotes an elementwise pairing of the 0th mean with 0th stddev, 1st mean with 1st stddev, etc.

Alternatively, stddev can be a vector with a single element, no matter the size of mean; that denotes the same stddev value applied to every element of mean.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

__init__(self) → None
__init__(self, other: pydrake.common.schema.GaussianVector[2]) → None
__init__(self, mean: numpy.ndarray[dtype=float64, shape=(2), order='C'], stddev: numpy.ndarray[dtype=float64, shape=(*), order='C']) → None
property mean: numpy.ndarray[dtype=float64, shape=(2), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(2), order=’C’]

property stddev: numpy.ndarray[dtype=float64, shape=(*), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(*), order=’C’]

class pydrake.common.schema.GaussianVector[3](*args, **kwargs)

Bases: DistributionVector

A gaussian distribution with vector mean and vector or scalar stddev.

When mean and stddev both have the same number of elements, that denotes an elementwise pairing of the 0th mean with 0th stddev, 1st mean with 1st stddev, etc.

Alternatively, stddev can be a vector with a single element, no matter the size of mean; that denotes the same stddev value applied to every element of mean.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

__init__(self) → None
__init__(self, other: pydrake.common.schema.GaussianVector[3]) → None
__init__(self, mean: numpy.ndarray[dtype=float64, shape=(3), order='C'], stddev: numpy.ndarray[dtype=float64, shape=(*), order='C']) → None
property mean: numpy.ndarray[dtype=float64, shape=(3), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(3), order=’C’]

property stddev: numpy.ndarray[dtype=float64, shape=(*), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(*), order=’C’]

class pydrake.common.schema.GaussianVector[4](*args, **kwargs)

Bases: DistributionVector

A gaussian distribution with vector mean and vector or scalar stddev.

When mean and stddev both have the same number of elements, that denotes an elementwise pairing of the 0th mean with 0th stddev, 1st mean with 1st stddev, etc.

Alternatively, stddev can be a vector with a single element, no matter the size of mean; that denotes the same stddev value applied to every element of mean.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

__init__(self) → None
__init__(self, other: pydrake.common.schema.GaussianVector[4]) → None
__init__(self, mean: numpy.ndarray[dtype=float64, shape=(4), order='C'], stddev: numpy.ndarray[dtype=float64, shape=(*), order='C']) → None
property mean: numpy.ndarray[dtype=float64, shape=(4), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(4), order=’C’]

property stddev: numpy.ndarray[dtype=float64, shape=(*), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(*), order=’C’]

class pydrake.common.schema.GaussianVector[5](*args, **kwargs)

Bases: DistributionVector

A gaussian distribution with vector mean and vector or scalar stddev.

When mean and stddev both have the same number of elements, that denotes an elementwise pairing of the 0th mean with 0th stddev, 1st mean with 1st stddev, etc.

Alternatively, stddev can be a vector with a single element, no matter the size of mean; that denotes the same stddev value applied to every element of mean.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

__init__(self) → None
__init__(self, other: pydrake.common.schema.GaussianVector[5]) → None
__init__(self, mean: numpy.ndarray[dtype=float64, shape=(5), order='C'], stddev: numpy.ndarray[dtype=float64, shape=(*), order='C']) → None
property mean: numpy.ndarray[dtype=float64, shape=(5), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(5), order=’C’]

property stddev: numpy.ndarray[dtype=float64, shape=(*), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(*), order=’C’]

class pydrake.common.schema.GaussianVector[6](*args, **kwargs)

Bases: DistributionVector

A gaussian distribution with vector mean and vector or scalar stddev.

When mean and stddev both have the same number of elements, that denotes an elementwise pairing of the 0th mean with 0th stddev, 1st mean with 1st stddev, etc.

Alternatively, stddev can be a vector with a single element, no matter the size of mean; that denotes the same stddev value applied to every element of mean.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

__init__(self) → None
__init__(self, other: pydrake.common.schema.GaussianVector[6]) → None
__init__(self, mean: numpy.ndarray[dtype=float64, shape=(6), order='C'], stddev: numpy.ndarray[dtype=float64, shape=(*), order='C']) → None
property mean: numpy.ndarray[dtype=float64, shape=(6), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(6), order=’C’]

property stddev: numpy.ndarray[dtype=float64, shape=(*), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(*), order=’C’]

class pydrake.common.schema.GaussianVector[None](*args, **kwargs)

Bases: DistributionVector

A gaussian distribution with vector mean and vector or scalar stddev.

When mean and stddev both have the same number of elements, that denotes an elementwise pairing of the 0th mean with 0th stddev, 1st mean with 1st stddev, etc.

Alternatively, stddev can be a vector with a single element, no matter the size of mean; that denotes the same stddev value applied to every element of mean.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

__init__(self) → None
__init__(self, other: pydrake.common.schema.GaussianVector[None]) → None
__init__(self, mean: numpy.ndarray[dtype=float64, shape=(*), order='C'], stddev: numpy.ndarray[dtype=float64, shape=(*), order='C']) → None
property mean: numpy.ndarray[dtype=float64, shape=(*), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(*), order=’C’]

property stddev: numpy.ndarray[dtype=float64, shape=(*), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(*), order=’C’]

pydrake.common.schema.GaussianVectorX

alias of GaussianVector[None]

pydrake.common.schema.GetDeterministicValue(var: float | pydrake.common.schema.Deterministic | pydrake.common.schema.Gaussian | pydrake.common.schema.Uniform | pydrake.common.schema.UniformDiscrete) → float
pydrake.common.schema.GetDeterministicValue(vec: numpy.ndarray[dtype=float64, shape=(*), order='C'] | pydrake.common.schema.DeterministicVector[None] | pydrake.common.schema.GaussianVector[None] | pydrake.common.schema.UniformVector[None] | pydrake.common.schema.Deterministic | pydrake.common.schema.Gaussian | pydrake.common.schema.Uniform) → numpy.ndarray[dtype=float64, shape=(*), order='C']
pydrake.common.schema.GetDeterministicValue(vec: numpy.ndarray[dtype=float64, shape=(1), order='C'] | pydrake.common.schema.DeterministicVector[1] | pydrake.common.schema.GaussianVector[1] | pydrake.common.schema.UniformVector[1] | pydrake.common.schema.Deterministic | pydrake.common.schema.Gaussian | pydrake.common.schema.Uniform) → numpy.ndarray[dtype=float64, shape=(*), order='C']
pydrake.common.schema.GetDeterministicValue(vec: numpy.ndarray[dtype=float64, shape=(2), order='C'] | pydrake.common.schema.DeterministicVector[2] | pydrake.common.schema.GaussianVector[2] | pydrake.common.schema.UniformVector[2] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform) → numpy.ndarray[dtype=float64, shape=(*), order='C']
pydrake.common.schema.GetDeterministicValue(vec: numpy.ndarray[dtype=float64, shape=(3), order='C'] | pydrake.common.schema.DeterministicVector[3] | pydrake.common.schema.GaussianVector[3] | pydrake.common.schema.UniformVector[3] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform) → numpy.ndarray[dtype=float64, shape=(*), order='C']
pydrake.common.schema.GetDeterministicValue(vec: numpy.ndarray[dtype=float64, shape=(4), order='C'] | pydrake.common.schema.DeterministicVector[4] | pydrake.common.schema.GaussianVector[4] | pydrake.common.schema.UniformVector[4] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform) → numpy.ndarray[dtype=float64, shape=(*), order='C']
pydrake.common.schema.GetDeterministicValue(vec: numpy.ndarray[dtype=float64, shape=(5), order='C'] | pydrake.common.schema.DeterministicVector[5] | pydrake.common.schema.GaussianVector[5] | pydrake.common.schema.UniformVector[5] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform) → numpy.ndarray[dtype=float64, shape=(*), order='C']
pydrake.common.schema.GetDeterministicValue(vec: numpy.ndarray[dtype=float64, shape=(6), order='C'] | pydrake.common.schema.DeterministicVector[6] | pydrake.common.schema.GaussianVector[6] | pydrake.common.schema.UniformVector[6] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform) → numpy.ndarray[dtype=float64, shape=(*), order='C']

Overloaded function.

  1. GetDeterministicValue(var: float | pydrake.common.schema.Deterministic | pydrake.common.schema.Gaussian | pydrake.common.schema.Uniform | pydrake.common.schema.UniformDiscrete) -> float

If var is deterministic, retrieves its value.

Raises:

RuntimeError if var is not deterministic. –

  1. GetDeterministicValue(vec: numpy.ndarray[dtype=float64, shape=(*), order='C'] | pydrake.common.schema.DeterministicVector[None] | pydrake.common.schema.GaussianVector[None] | pydrake.common.schema.UniformVector[None] | pydrake.common.schema.Deterministic | pydrake.common.schema.Gaussian | pydrake.common.schema.Uniform) -> numpy.ndarray[dtype=float64, shape=(*), order='C']

If vec is deterministic, retrieves its value.

Raises:

RuntimeError if vec is not deterministic. –

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

  1. GetDeterministicValue(vec: numpy.ndarray[dtype=float64, shape=(1), order='C'] | pydrake.common.schema.DeterministicVector[1] | pydrake.common.schema.GaussianVector[1] | pydrake.common.schema.UniformVector[1] | pydrake.common.schema.Deterministic | pydrake.common.schema.Gaussian | pydrake.common.schema.Uniform) -> numpy.ndarray[dtype=float64, shape=(*), order='C']

If vec is deterministic, retrieves its value.

Raises:

RuntimeError if vec is not deterministic. –

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

  1. GetDeterministicValue(vec: numpy.ndarray[dtype=float64, shape=(2), order='C'] | pydrake.common.schema.DeterministicVector[2] | pydrake.common.schema.GaussianVector[2] | pydrake.common.schema.UniformVector[2] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform) -> numpy.ndarray[dtype=float64, shape=(*), order='C']

If vec is deterministic, retrieves its value.

Raises:

RuntimeError if vec is not deterministic. –

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

  1. GetDeterministicValue(vec: numpy.ndarray[dtype=float64, shape=(3), order='C'] | pydrake.common.schema.DeterministicVector[3] | pydrake.common.schema.GaussianVector[3] | pydrake.common.schema.UniformVector[3] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform) -> numpy.ndarray[dtype=float64, shape=(*), order='C']

If vec is deterministic, retrieves its value.

Raises:

RuntimeError if vec is not deterministic. –

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

  1. GetDeterministicValue(vec: numpy.ndarray[dtype=float64, shape=(4), order='C'] | pydrake.common.schema.DeterministicVector[4] | pydrake.common.schema.GaussianVector[4] | pydrake.common.schema.UniformVector[4] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform) -> numpy.ndarray[dtype=float64, shape=(*), order='C']

If vec is deterministic, retrieves its value.

Raises:

RuntimeError if vec is not deterministic. –

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

  1. GetDeterministicValue(vec: numpy.ndarray[dtype=float64, shape=(5), order='C'] | pydrake.common.schema.DeterministicVector[5] | pydrake.common.schema.GaussianVector[5] | pydrake.common.schema.UniformVector[5] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform) -> numpy.ndarray[dtype=float64, shape=(*), order='C']

If vec is deterministic, retrieves its value.

Raises:

RuntimeError if vec is not deterministic. –

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

  1. GetDeterministicValue(vec: numpy.ndarray[dtype=float64, shape=(6), order='C'] | pydrake.common.schema.DeterministicVector[6] | pydrake.common.schema.GaussianVector[6] | pydrake.common.schema.UniformVector[6] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform) -> numpy.ndarray[dtype=float64, shape=(*), order='C']

If vec is deterministic, retrieves its value.

Raises:

RuntimeError if vec is not deterministic. –

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

pydrake.common.schema.IsDeterministic(var: float | pydrake.common.schema.Deterministic | pydrake.common.schema.Gaussian | pydrake.common.schema.Uniform | pydrake.common.schema.UniformDiscrete) → bool
pydrake.common.schema.IsDeterministic(vec: numpy.ndarray[dtype=float64, shape=(*), order='C'] | pydrake.common.schema.DeterministicVector[None] | pydrake.common.schema.GaussianVector[None] | pydrake.common.schema.UniformVector[None] | pydrake.common.schema.Deterministic | pydrake.common.schema.Gaussian | pydrake.common.schema.Uniform) → bool
pydrake.common.schema.IsDeterministic(vec: numpy.ndarray[dtype=float64, shape=(1), order='C'] | pydrake.common.schema.DeterministicVector[1] | pydrake.common.schema.GaussianVector[1] | pydrake.common.schema.UniformVector[1] | pydrake.common.schema.Deterministic | pydrake.common.schema.Gaussian | pydrake.common.schema.Uniform) → bool
pydrake.common.schema.IsDeterministic(vec: numpy.ndarray[dtype=float64, shape=(2), order='C'] | pydrake.common.schema.DeterministicVector[2] | pydrake.common.schema.GaussianVector[2] | pydrake.common.schema.UniformVector[2] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform) → bool
pydrake.common.schema.IsDeterministic(vec: numpy.ndarray[dtype=float64, shape=(3), order='C'] | pydrake.common.schema.DeterministicVector[3] | pydrake.common.schema.GaussianVector[3] | pydrake.common.schema.UniformVector[3] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform) → bool
pydrake.common.schema.IsDeterministic(vec: numpy.ndarray[dtype=float64, shape=(4), order='C'] | pydrake.common.schema.DeterministicVector[4] | pydrake.common.schema.GaussianVector[4] | pydrake.common.schema.UniformVector[4] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform) → bool
pydrake.common.schema.IsDeterministic(vec: numpy.ndarray[dtype=float64, shape=(5), order='C'] | pydrake.common.schema.DeterministicVector[5] | pydrake.common.schema.GaussianVector[5] | pydrake.common.schema.UniformVector[5] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform) → bool
pydrake.common.schema.IsDeterministic(vec: numpy.ndarray[dtype=float64, shape=(6), order='C'] | pydrake.common.schema.DeterministicVector[6] | pydrake.common.schema.GaussianVector[6] | pydrake.common.schema.UniformVector[6] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform) → bool

Overloaded function.

  1. IsDeterministic(var: float | pydrake.common.schema.Deterministic | pydrake.common.schema.Gaussian | pydrake.common.schema.Uniform | pydrake.common.schema.UniformDiscrete) -> bool

Returns true iff var is set to a deterministic value.

  1. IsDeterministic(vec: numpy.ndarray[dtype=float64, shape=(*), order='C'] | pydrake.common.schema.DeterministicVector[None] | pydrake.common.schema.GaussianVector[None] | pydrake.common.schema.UniformVector[None] | pydrake.common.schema.Deterministic | pydrake.common.schema.Gaussian | pydrake.common.schema.Uniform) -> bool

Returns true iff all of vec’s elements are set to a deterministic value.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

  1. IsDeterministic(vec: numpy.ndarray[dtype=float64, shape=(1), order='C'] | pydrake.common.schema.DeterministicVector[1] | pydrake.common.schema.GaussianVector[1] | pydrake.common.schema.UniformVector[1] | pydrake.common.schema.Deterministic | pydrake.common.schema.Gaussian | pydrake.common.schema.Uniform) -> bool

Returns true iff all of vec’s elements are set to a deterministic value.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

  1. IsDeterministic(vec: numpy.ndarray[dtype=float64, shape=(2), order='C'] | pydrake.common.schema.DeterministicVector[2] | pydrake.common.schema.GaussianVector[2] | pydrake.common.schema.UniformVector[2] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform) -> bool

Returns true iff all of vec’s elements are set to a deterministic value.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

  1. IsDeterministic(vec: numpy.ndarray[dtype=float64, shape=(3), order='C'] | pydrake.common.schema.DeterministicVector[3] | pydrake.common.schema.GaussianVector[3] | pydrake.common.schema.UniformVector[3] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform) -> bool

Returns true iff all of vec’s elements are set to a deterministic value.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

  1. IsDeterministic(vec: numpy.ndarray[dtype=float64, shape=(4), order='C'] | pydrake.common.schema.DeterministicVector[4] | pydrake.common.schema.GaussianVector[4] | pydrake.common.schema.UniformVector[4] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform) -> bool

Returns true iff all of vec’s elements are set to a deterministic value.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

  1. IsDeterministic(vec: numpy.ndarray[dtype=float64, shape=(5), order='C'] | pydrake.common.schema.DeterministicVector[5] | pydrake.common.schema.GaussianVector[5] | pydrake.common.schema.UniformVector[5] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform) -> bool

Returns true iff all of vec’s elements are set to a deterministic value.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

  1. IsDeterministic(vec: numpy.ndarray[dtype=float64, shape=(6), order='C'] | pydrake.common.schema.DeterministicVector[6] | pydrake.common.schema.GaussianVector[6] | pydrake.common.schema.UniformVector[6] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform) -> bool

Returns true iff all of vec’s elements are set to a deterministic value.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

pydrake.common.schema.Mean(var: float | pydrake.common.schema.Deterministic | pydrake.common.schema.Gaussian | pydrake.common.schema.Uniform | pydrake.common.schema.UniformDiscrete) → float

Like Distribution::Mean, but on a DistributionVariant instead.

class pydrake.common.schema.Rotation(*args, **kwargs)

A specification for an SO(3) rotation, to be used for serialization purposes, e.g., to define stochastic scenarios. This structure specifies either one specific rotation or else a distribution of possible rotations. It does not provide mathematical operators to compose or mutate rotations. Instead, users should call either GetDeterministicValue() or ToSymbolic() to obtain a RotationMatrix value that can be operated on.

For an overview of configuring stochastic transforms, see schema_transform and schema_stochastic.

See implementing_serialize “Implementing Serialize” for implementation details, especially the unusually public member fields.

__init__(self) → None
__init__(self, other: pydrake.common.schema.Rotation) → None
__init__(self, arg: pydrake.math.RotationMatrix, /) → None
__init__(self, arg: pydrake.math.RollPitchYaw, /) → None
__init__(self, **kwargs) → None

Overloaded function.

  1. __init__(self) -> None

Constructs the Identity rotation.

  1. __init__(self, other: pydrake.common.schema.Rotation) -> None

  2. __init__(self, arg: pydrake.math.RotationMatrix, /) -> None

Constructs an Rpy rotation with the given value.

  1. __init__(self, arg: pydrake.math.RollPitchYaw, /) -> None

Constructs an Rpy rotation with the given value.

  1. __init__(self, **kwargs) -> None

class AngleAxis(*args, **kwargs)

Rotation constructed from a fixed axis and an angle.

__init__(self, other: pydrake.common.schema.Rotation.AngleAxis) → None
__init__(self, **kwargs) → None
property angle_deg: float | pydrake.common.schema.Deterministic | pydrake.common.schema.Gaussian | pydrake.common.schema.Uniform | pydrake.common.schema.UniformDiscrete

(self) -> float | pydrake.common.schema.Deterministic | pydrake.common.schema.Gaussian | pydrake.common.schema.Uniform | pydrake.common.schema.UniformDiscrete

property axis: numpy.ndarray[dtype=float64, shape=(3), order='C'] | pydrake.common.schema.DeterministicVector[3] | pydrake.common.schema.GaussianVector[3] | pydrake.common.schema.UniformVector[3] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform

(self) -> numpy.ndarray[dtype=float64, shape=(3), order=’C’] | pydrake.common.schema.DeterministicVector[3] | pydrake.common.schema.GaussianVector[3] | pydrake.common.schema.UniformVector[3] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform

GetDeterministicValue(self) → pydrake.math.RotationMatrix

If this is deterministic, retrieves its value.

Raises:

RuntimeError if this is not fully deterministic. –

class Identity(*args, **kwargs)

No-op rotation.

__init__(self, other: pydrake.common.schema.Rotation.Identity) → None
__init__(self, **kwargs) → None
IsDeterministic(self) → bool

Returns true iff this is fully deterministic.

class Rpy(*args, **kwargs)

A roll-pitch-yaw rotation, using the angle conventions of Drake’s RollPitchYaw.

__init__(self, other: pydrake.common.schema.Rotation.Rpy) → None
__init__(self, **kwargs) → None
property deg: numpy.ndarray[dtype=float64, shape=(3), order='C'] | pydrake.common.schema.DeterministicVector[3] | pydrake.common.schema.GaussianVector[3] | pydrake.common.schema.UniformVector[3] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform

(self) -> numpy.ndarray[dtype=float64, shape=(3), order=’C’] | pydrake.common.schema.DeterministicVector[3] | pydrake.common.schema.GaussianVector[3] | pydrake.common.schema.UniformVector[3] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform

set_rpy_deg(self, rpy_deg: numpy.ndarray[dtype=float64, shape=(3), order='C']) → None

Sets this value to the given deterministic RPY, in degrees.

ToSymbolic(self) → pydrake.math.RotationMatrix_[Expression]

Returns the symbolic form of this rotation. If this is deterministic, the result will contain no variables. If this is random, the result will contain one or more random variables, based on the distributions in use.

class Uniform(*args, **kwargs)

Rotation sampled from a uniform distribution over SO(3).

__init__(self, other: pydrake.common.schema.Rotation.Uniform) → None
__init__(self, **kwargs) → None
property value: pydrake.common.schema.Rotation.Identity | pydrake.common.schema.Rotation.Rpy | pydrake.common.schema.Rotation.AngleAxis | pydrake.common.schema.Rotation.Uniform

(self) -> pydrake.common.schema.Rotation.Identity | pydrake.common.schema.Rotation.Rpy | pydrake.common.schema.Rotation.AngleAxis | pydrake.common.schema.Rotation.Uniform

pydrake.common.schema.Sample(var: float | pydrake.common.schema.Deterministic | pydrake.common.schema.Gaussian | pydrake.common.schema.Uniform | pydrake.common.schema.UniformDiscrete, generator: pydrake.common.RandomGenerator) → float

Like Distribution::Sample, but on a DistributionVariant instead.

pydrake.common.schema.ToDistribution(var: float | pydrake.common.schema.Deterministic | pydrake.common.schema.Gaussian | pydrake.common.schema.Uniform | pydrake.common.schema.UniformDiscrete) → pydrake.common.schema.Distribution

Copies the given variant into a Distribution base class.

pydrake.common.schema.ToDistributionVector(vec: numpy.ndarray[dtype=float64, shape=(*), order='C'] | pydrake.common.schema.DeterministicVector[None] | pydrake.common.schema.GaussianVector[None] | pydrake.common.schema.UniformVector[None] | pydrake.common.schema.Deterministic | pydrake.common.schema.Gaussian | pydrake.common.schema.Uniform) → pydrake.common.schema.DistributionVector
pydrake.common.schema.ToDistributionVector(vec: numpy.ndarray[dtype=float64, shape=(1), order='C'] | pydrake.common.schema.DeterministicVector[1] | pydrake.common.schema.GaussianVector[1] | pydrake.common.schema.UniformVector[1] | pydrake.common.schema.Deterministic | pydrake.common.schema.Gaussian | pydrake.common.schema.Uniform) → pydrake.common.schema.DistributionVector
pydrake.common.schema.ToDistributionVector(vec: numpy.ndarray[dtype=float64, shape=(2), order='C'] | pydrake.common.schema.DeterministicVector[2] | pydrake.common.schema.GaussianVector[2] | pydrake.common.schema.UniformVector[2] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform) → pydrake.common.schema.DistributionVector
pydrake.common.schema.ToDistributionVector(vec: numpy.ndarray[dtype=float64, shape=(3), order='C'] | pydrake.common.schema.DeterministicVector[3] | pydrake.common.schema.GaussianVector[3] | pydrake.common.schema.UniformVector[3] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform) → pydrake.common.schema.DistributionVector
pydrake.common.schema.ToDistributionVector(vec: numpy.ndarray[dtype=float64, shape=(4), order='C'] | pydrake.common.schema.DeterministicVector[4] | pydrake.common.schema.GaussianVector[4] | pydrake.common.schema.UniformVector[4] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform) → pydrake.common.schema.DistributionVector
pydrake.common.schema.ToDistributionVector(vec: numpy.ndarray[dtype=float64, shape=(5), order='C'] | pydrake.common.schema.DeterministicVector[5] | pydrake.common.schema.GaussianVector[5] | pydrake.common.schema.UniformVector[5] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform) → pydrake.common.schema.DistributionVector
pydrake.common.schema.ToDistributionVector(vec: numpy.ndarray[dtype=float64, shape=(6), order='C'] | pydrake.common.schema.DeterministicVector[6] | pydrake.common.schema.GaussianVector[6] | pydrake.common.schema.UniformVector[6] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform) → pydrake.common.schema.DistributionVector

Copies the given variant into a DistributionVector base class.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

pydrake.common.schema.ToSymbolic(var: float | pydrake.common.schema.Deterministic | pydrake.common.schema.Gaussian | pydrake.common.schema.Uniform | pydrake.common.schema.UniformDiscrete) → pydrake.symbolic.Expression

Like Distribution::ToSymbolic, but on a DistributionVariant instead.

class pydrake.common.schema.Transform(*args, **kwargs)

A specification for a 3d rotation and translation, optionally with respect to a base frame.

For an overview of configuring stochastic transforms, see schema_transform and schema_stochastic.

See implementing_serialize “Implementing Serialize” for implementation details, especially the unusually public member fields.

__init__(self) → None
__init__(self, other: pydrake.common.schema.Transform) → None
__init__(self, arg: pydrake.math.RigidTransform, /) → None
__init__(self, **kwargs) → None

Overloaded function.

  1. __init__(self) -> None

Constructs the Identity transform.

  1. __init__(self, other: pydrake.common.schema.Transform) -> None

  2. __init__(self, arg: pydrake.math.RigidTransform, /) -> None

Constructs the given transform.

  1. __init__(self, **kwargs) -> None

property base_frame: str | None

(self) -> str | None

GetDeterministicValue(self) → pydrake.math.RigidTransform

If this is deterministic, retrieves its value.

Raises:

RuntimeError if this is not fully deterministic. –

IsDeterministic(self) → bool

Returns true iff this is fully deterministic.

Mean(self) → pydrake.math.RigidTransform

Returns the mean of this rotation. If this is deterministic, the result is the same as GetDeterministicValue. If this is random, note that the mean here is simply defined as setting all of the random variables individually to their mean. Various other measures of the resulting RigidTransform (e.g., the distribution of one of the Euler angles) may not necessarily match that measure on the returned value.

property rotation: pydrake.common.schema.Rotation

A variant that allows for several ways to specify a rotation.

Sample(self, generator: pydrake.common.RandomGenerator) → pydrake.math.RigidTransform

Samples this Transform. If this is deterministic, the result is the same as GetDeterministicValue.

set_rotation_rpy_deg(self, rpy_deg: numpy.ndarray[dtype=float64, shape=(3), order='C']) → None

Sets the rotation field to the given deterministic RPY, in degrees.

ToSymbolic(self) → pydrake.math.RigidTransform_[Expression]

Returns the symbolic form of this rotation. If this is deterministic, the result will contain no variables. If this is random, the result will contain one or more random variables, based on the distributions in use.

property translation: numpy.ndarray[dtype=float64, shape=(3), order='C'] | pydrake.common.schema.DeterministicVector[3] | pydrake.common.schema.GaussianVector[3] | pydrake.common.schema.UniformVector[3] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform

(self) -> numpy.ndarray[dtype=float64, shape=(3), order=’C’] | pydrake.common.schema.DeterministicVector[3] | pydrake.common.schema.GaussianVector[3] | pydrake.common.schema.UniformVector[3] | pydrake.common.schema._InvalidVariantSelectionDeterministic | pydrake.common.schema._InvalidVariantSelectionGaussian | pydrake.common.schema._InvalidVariantSelectionUniform

class pydrake.common.schema.Uniform(*args, **kwargs)

Bases: Distribution

A uniform distribution with min inclusive and max exclusive.

__init__(self) → None
__init__(self, other: pydrake.common.schema.Uniform) → None
__init__(self, min: float, max: float) → None
property max: float

(self) -> float

property min: float

(self) -> float

class pydrake.common.schema.UniformDiscrete(*args, **kwargs)

Bases: Distribution

Chooses from among discrete values with equal probability.

__init__(self) → None
__init__(self, other: pydrake.common.schema.UniformDiscrete) → None
__init__(self, values: collections.abc.Sequence[float]) → None
property values: list[float]

(self) -> list[float]

template pydrake.common.schema.UniformVector

Instantiations: UniformVector[None], UniformVector[1], UniformVector[2], UniformVector[3], UniformVector[4], UniformVector[5], UniformVector[6]

class pydrake.common.schema.UniformVector[1](*args, **kwargs)

Bases: DistributionVector

A uniform distribution with vector min inclusive and vector max exclusive.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

__init__(self) → None
__init__(self, other: pydrake.common.schema.UniformVector[1]) → None
__init__(self, min: numpy.ndarray[dtype=float64, shape=(1), order='C'], max: numpy.ndarray[dtype=float64, shape=(1), order='C']) → None
property max: numpy.ndarray[dtype=float64, shape=(1), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(1), order=’C’]

property min: numpy.ndarray[dtype=float64, shape=(1), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(1), order=’C’]

class pydrake.common.schema.UniformVector[2](*args, **kwargs)

Bases: DistributionVector

A uniform distribution with vector min inclusive and vector max exclusive.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

__init__(self) → None
__init__(self, other: pydrake.common.schema.UniformVector[2]) → None
__init__(self, min: numpy.ndarray[dtype=float64, shape=(2), order='C'], max: numpy.ndarray[dtype=float64, shape=(2), order='C']) → None
property max: numpy.ndarray[dtype=float64, shape=(2), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(2), order=’C’]

property min: numpy.ndarray[dtype=float64, shape=(2), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(2), order=’C’]

class pydrake.common.schema.UniformVector[3](*args, **kwargs)

Bases: DistributionVector

A uniform distribution with vector min inclusive and vector max exclusive.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

__init__(self) → None
__init__(self, other: pydrake.common.schema.UniformVector[3]) → None
__init__(self, min: numpy.ndarray[dtype=float64, shape=(3), order='C'], max: numpy.ndarray[dtype=float64, shape=(3), order='C']) → None
property max: numpy.ndarray[dtype=float64, shape=(3), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(3), order=’C’]

property min: numpy.ndarray[dtype=float64, shape=(3), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(3), order=’C’]

class pydrake.common.schema.UniformVector[4](*args, **kwargs)

Bases: DistributionVector

A uniform distribution with vector min inclusive and vector max exclusive.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

__init__(self) → None
__init__(self, other: pydrake.common.schema.UniformVector[4]) → None
__init__(self, min: numpy.ndarray[dtype=float64, shape=(4), order='C'], max: numpy.ndarray[dtype=float64, shape=(4), order='C']) → None
property max: numpy.ndarray[dtype=float64, shape=(4), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(4), order=’C’]

property min: numpy.ndarray[dtype=float64, shape=(4), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(4), order=’C’]

class pydrake.common.schema.UniformVector[5](*args, **kwargs)

Bases: DistributionVector

A uniform distribution with vector min inclusive and vector max exclusive.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

__init__(self) → None
__init__(self, other: pydrake.common.schema.UniformVector[5]) → None
__init__(self, min: numpy.ndarray[dtype=float64, shape=(5), order='C'], max: numpy.ndarray[dtype=float64, shape=(5), order='C']) → None
property max: numpy.ndarray[dtype=float64, shape=(5), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(5), order=’C’]

property min: numpy.ndarray[dtype=float64, shape=(5), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(5), order=’C’]

class pydrake.common.schema.UniformVector[6](*args, **kwargs)

Bases: DistributionVector

A uniform distribution with vector min inclusive and vector max exclusive.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

__init__(self) → None
__init__(self, other: pydrake.common.schema.UniformVector[6]) → None
__init__(self, min: numpy.ndarray[dtype=float64, shape=(6), order='C'], max: numpy.ndarray[dtype=float64, shape=(6), order='C']) → None
property max: numpy.ndarray[dtype=float64, shape=(6), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(6), order=’C’]

property min: numpy.ndarray[dtype=float64, shape=(6), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(6), order=’C’]

class pydrake.common.schema.UniformVector[None](*args, **kwargs)

Bases: DistributionVector

A uniform distribution with vector min inclusive and vector max exclusive.

Template parameter Size:

rows at compile time (max 6) or else Eigen::Dynamic.

__init__(self) → None
__init__(self, other: pydrake.common.schema.UniformVector[None]) → None
__init__(self, min: numpy.ndarray[dtype=float64, shape=(*), order='C'], max: numpy.ndarray[dtype=float64, shape=(*), order='C']) → None
property max: numpy.ndarray[dtype=float64, shape=(*), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(*), order=’C’]

property min: numpy.ndarray[dtype=float64, shape=(*), order='C']

(self) -> numpy.ndarray[dtype=float64, shape=(*), order=’C’]

pydrake.common.schema.UniformVectorX

alias of UniformVector[None]