pydrake.common.schema
Bindings for the common.schema package.
- class pydrake.common.schema.Deterministic
Bases:
pydrake.common.schema.Distribution
A single deterministic
value
.- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.Deterministic) -> None
__init__(self: pydrake.common.schema.Deterministic, other: pydrake.common.schema.Deterministic) -> None
__init__(self: pydrake.common.schema.Deterministic, value: float) -> None
- property value
- 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]
Bases:
pydrake.common.schema.DistributionVector
A single deterministic vector
value
.- Template parameter
Size
: rows at compile time (max 6) or else Eigen::Dynamic.
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.DeterministicVector[1]) -> None
__init__(self: pydrake.common.schema.DeterministicVector[1], other: pydrake.common.schema.DeterministicVector[1]) -> None
__init__(self: pydrake.common.schema.DeterministicVector[1], value: numpy.ndarray[numpy.float64[1, 1]]) -> None
- property value
- Template parameter
- class pydrake.common.schema.DeterministicVector[2]
Bases:
pydrake.common.schema.DistributionVector
A single deterministic vector
value
.- Template parameter
Size
: rows at compile time (max 6) or else Eigen::Dynamic.
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.DeterministicVector[2]) -> None
__init__(self: pydrake.common.schema.DeterministicVector[2], other: pydrake.common.schema.DeterministicVector[2]) -> None
__init__(self: pydrake.common.schema.DeterministicVector[2], value: numpy.ndarray[numpy.float64[2, 1]]) -> None
- property value
- Template parameter
- class pydrake.common.schema.DeterministicVector[3]
Bases:
pydrake.common.schema.DistributionVector
A single deterministic vector
value
.- Template parameter
Size
: rows at compile time (max 6) or else Eigen::Dynamic.
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.DeterministicVector[3]) -> None
__init__(self: pydrake.common.schema.DeterministicVector[3], other: pydrake.common.schema.DeterministicVector[3]) -> None
__init__(self: pydrake.common.schema.DeterministicVector[3], value: numpy.ndarray[numpy.float64[3, 1]]) -> None
- property value
- Template parameter
- class pydrake.common.schema.DeterministicVector[4]
Bases:
pydrake.common.schema.DistributionVector
A single deterministic vector
value
.- Template parameter
Size
: rows at compile time (max 6) or else Eigen::Dynamic.
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.DeterministicVector[4]) -> None
__init__(self: pydrake.common.schema.DeterministicVector[4], other: pydrake.common.schema.DeterministicVector[4]) -> None
__init__(self: pydrake.common.schema.DeterministicVector[4], value: numpy.ndarray[numpy.float64[4, 1]]) -> None
- property value
- Template parameter
- class pydrake.common.schema.DeterministicVector[5]
Bases:
pydrake.common.schema.DistributionVector
A single deterministic vector
value
.- Template parameter
Size
: rows at compile time (max 6) or else Eigen::Dynamic.
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.DeterministicVector[5]) -> None
__init__(self: pydrake.common.schema.DeterministicVector[5], other: pydrake.common.schema.DeterministicVector[5]) -> None
__init__(self: pydrake.common.schema.DeterministicVector[5], value: numpy.ndarray[numpy.float64[5, 1]]) -> None
- property value
- Template parameter
- class pydrake.common.schema.DeterministicVector[6]
Bases:
pydrake.common.schema.DistributionVector
A single deterministic vector
value
.- Template parameter
Size
: rows at compile time (max 6) or else Eigen::Dynamic.
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.DeterministicVector[6]) -> None
__init__(self: pydrake.common.schema.DeterministicVector[6], other: pydrake.common.schema.DeterministicVector[6]) -> None
__init__(self: pydrake.common.schema.DeterministicVector[6], value: numpy.ndarray[numpy.float64[6, 1]]) -> None
- property value
- Template parameter
- class pydrake.common.schema.DeterministicVector[None]
Bases:
pydrake.common.schema.DistributionVector
A single deterministic vector
value
.- Template parameter
Size
: rows at compile time (max 6) or else Eigen::Dynamic.
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.DeterministicVector[None]) -> None
__init__(self: pydrake.common.schema.DeterministicVector[None], other: pydrake.common.schema.DeterministicVector[None]) -> None
__init__(self: pydrake.common.schema.DeterministicVector[None], value: numpy.ndarray[numpy.float64[m, 1]]) -> None
- property value
- Template parameter
- pydrake.common.schema.DeterministicVectorX
- 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: pydrake.common.schema.Distribution) float
- Sample(self: pydrake.common.schema.Distribution, generator: pydrake.common.RandomGenerator) float
- ToSymbolic(self: pydrake.common.schema.Distribution) 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: pydrake.common.schema.DistributionVector) numpy.ndarray[numpy.float64[m, 1]]
- Sample(self: pydrake.common.schema.DistributionVector, generator: pydrake.common.RandomGenerator) numpy.ndarray[numpy.float64[m, 1]]
- ToSymbolic(self: pydrake.common.schema.DistributionVector) numpy.ndarray[object[m, 1]]
- class pydrake.common.schema.Gaussian
Bases:
pydrake.common.schema.Distribution
A gaussian distribution with
mean
andstddev
.- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.Gaussian) -> None
__init__(self: pydrake.common.schema.Gaussian, other: pydrake.common.schema.Gaussian) -> None
__init__(self: pydrake.common.schema.Gaussian, mean: float, stddev: float) -> None
- property mean
- property stddev
- 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]
Bases:
pydrake.common.schema.DistributionVector
A gaussian distribution with vector
mean
and vector or scalarstddev
.When
mean
andstddev
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 ofmean
; that denotes the samestddev
value applied to every element ofmean
.- Template parameter
Size
: rows at compile time (max 6) or else Eigen::Dynamic.
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.GaussianVector[1]) -> None
__init__(self: pydrake.common.schema.GaussianVector[1], other: pydrake.common.schema.GaussianVector[1]) -> None
__init__(self: pydrake.common.schema.GaussianVector[1], mean: numpy.ndarray[numpy.float64[1, 1]], stddev: numpy.ndarray[numpy.float64[m, 1]]) -> None
- property mean
- property stddev
- Template parameter
- class pydrake.common.schema.GaussianVector[2]
Bases:
pydrake.common.schema.DistributionVector
A gaussian distribution with vector
mean
and vector or scalarstddev
.When
mean
andstddev
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 ofmean
; that denotes the samestddev
value applied to every element ofmean
.- Template parameter
Size
: rows at compile time (max 6) or else Eigen::Dynamic.
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.GaussianVector[2]) -> None
__init__(self: pydrake.common.schema.GaussianVector[2], other: pydrake.common.schema.GaussianVector[2]) -> None
__init__(self: pydrake.common.schema.GaussianVector[2], mean: numpy.ndarray[numpy.float64[2, 1]], stddev: numpy.ndarray[numpy.float64[m, 1]]) -> None
- property mean
- property stddev
- Template parameter
- class pydrake.common.schema.GaussianVector[3]
Bases:
pydrake.common.schema.DistributionVector
A gaussian distribution with vector
mean
and vector or scalarstddev
.When
mean
andstddev
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 ofmean
; that denotes the samestddev
value applied to every element ofmean
.- Template parameter
Size
: rows at compile time (max 6) or else Eigen::Dynamic.
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.GaussianVector[3]) -> None
__init__(self: pydrake.common.schema.GaussianVector[3], other: pydrake.common.schema.GaussianVector[3]) -> None
__init__(self: pydrake.common.schema.GaussianVector[3], mean: numpy.ndarray[numpy.float64[3, 1]], stddev: numpy.ndarray[numpy.float64[m, 1]]) -> None
- property mean
- property stddev
- Template parameter
- class pydrake.common.schema.GaussianVector[4]
Bases:
pydrake.common.schema.DistributionVector
A gaussian distribution with vector
mean
and vector or scalarstddev
.When
mean
andstddev
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 ofmean
; that denotes the samestddev
value applied to every element ofmean
.- Template parameter
Size
: rows at compile time (max 6) or else Eigen::Dynamic.
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.GaussianVector[4]) -> None
__init__(self: pydrake.common.schema.GaussianVector[4], other: pydrake.common.schema.GaussianVector[4]) -> None
__init__(self: pydrake.common.schema.GaussianVector[4], mean: numpy.ndarray[numpy.float64[4, 1]], stddev: numpy.ndarray[numpy.float64[m, 1]]) -> None
- property mean
- property stddev
- Template parameter
- class pydrake.common.schema.GaussianVector[5]
Bases:
pydrake.common.schema.DistributionVector
A gaussian distribution with vector
mean
and vector or scalarstddev
.When
mean
andstddev
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 ofmean
; that denotes the samestddev
value applied to every element ofmean
.- Template parameter
Size
: rows at compile time (max 6) or else Eigen::Dynamic.
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.GaussianVector[5]) -> None
__init__(self: pydrake.common.schema.GaussianVector[5], other: pydrake.common.schema.GaussianVector[5]) -> None
__init__(self: pydrake.common.schema.GaussianVector[5], mean: numpy.ndarray[numpy.float64[5, 1]], stddev: numpy.ndarray[numpy.float64[m, 1]]) -> None
- property mean
- property stddev
- Template parameter
- class pydrake.common.schema.GaussianVector[6]
Bases:
pydrake.common.schema.DistributionVector
A gaussian distribution with vector
mean
and vector or scalarstddev
.When
mean
andstddev
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 ofmean
; that denotes the samestddev
value applied to every element ofmean
.- Template parameter
Size
: rows at compile time (max 6) or else Eigen::Dynamic.
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.GaussianVector[6]) -> None
__init__(self: pydrake.common.schema.GaussianVector[6], other: pydrake.common.schema.GaussianVector[6]) -> None
__init__(self: pydrake.common.schema.GaussianVector[6], mean: numpy.ndarray[numpy.float64[6, 1]], stddev: numpy.ndarray[numpy.float64[m, 1]]) -> None
- property mean
- property stddev
- Template parameter
- class pydrake.common.schema.GaussianVector[None]
Bases:
pydrake.common.schema.DistributionVector
A gaussian distribution with vector
mean
and vector or scalarstddev
.When
mean
andstddev
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 ofmean
; that denotes the samestddev
value applied to every element ofmean
.- Template parameter
Size
: rows at compile time (max 6) or else Eigen::Dynamic.
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.GaussianVector[None]) -> None
__init__(self: pydrake.common.schema.GaussianVector[None], other: pydrake.common.schema.GaussianVector[None]) -> None
__init__(self: pydrake.common.schema.GaussianVector[None], mean: numpy.ndarray[numpy.float64[m, 1]], stddev: numpy.ndarray[numpy.float64[m, 1]]) -> None
- property mean
- property stddev
- Template parameter
- pydrake.common.schema.GaussianVectorX
- pydrake.common.schema.GetDeterministicValue(*args, **kwargs)
Overloaded function.
GetDeterministicValue(var: Union[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. –
GetDeterministicValue(vec: Union[numpy.ndarray[numpy.float64[m, 1]], 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[numpy.float64[m, 1]]
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.
GetDeterministicValue(vec: Union[numpy.ndarray[numpy.float64[1, 1]], 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[numpy.float64[m, 1]]
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.
GetDeterministicValue(vec: Union[numpy.ndarray[numpy.float64[2, 1]], 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[numpy.float64[m, 1]]
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.
GetDeterministicValue(vec: Union[numpy.ndarray[numpy.float64[3, 1]], 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[numpy.float64[m, 1]]
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.
GetDeterministicValue(vec: Union[numpy.ndarray[numpy.float64[4, 1]], 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[numpy.float64[m, 1]]
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.
GetDeterministicValue(vec: Union[numpy.ndarray[numpy.float64[5, 1]], 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[numpy.float64[m, 1]]
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.
GetDeterministicValue(vec: Union[numpy.ndarray[numpy.float64[6, 1]], 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[numpy.float64[m, 1]]
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(*args, **kwargs)
Overloaded function.
IsDeterministic(var: Union[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.IsDeterministic(vec: Union[numpy.ndarray[numpy.float64[m, 1]], 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.
IsDeterministic(vec: Union[numpy.ndarray[numpy.float64[1, 1]], 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.
IsDeterministic(vec: Union[numpy.ndarray[numpy.float64[2, 1]], 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.
IsDeterministic(vec: Union[numpy.ndarray[numpy.float64[3, 1]], 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.
IsDeterministic(vec: Union[numpy.ndarray[numpy.float64[4, 1]], 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.
IsDeterministic(vec: Union[numpy.ndarray[numpy.float64[5, 1]], 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.
IsDeterministic(vec: Union[numpy.ndarray[numpy.float64[6, 1]], 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: Union[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
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__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.Rotation) -> None
Constructs the Identity rotation.
__init__(self: pydrake.common.schema.Rotation, other: pydrake.common.schema.Rotation) -> None
__init__(self: pydrake.common.schema.Rotation, arg0: pydrake.math.RotationMatrix) -> None
Constructs an Rpy rotation with the given value.
__init__(self: pydrake.common.schema.Rotation, arg0: pydrake.math.RollPitchYaw) -> None
Constructs an Rpy rotation with the given value.
__init__(self: pydrake.common.schema.Rotation, **kwargs) -> None
- class AngleAxis
Rotation constructed from a fixed axis and an angle.
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.Rotation.AngleAxis, other: pydrake.common.schema.Rotation.AngleAxis) -> None
__init__(self: pydrake.common.schema.Rotation.AngleAxis, **kwargs) -> None
- property angle_deg
- property axis
- GetDeterministicValue(self: pydrake.common.schema.Rotation) pydrake.math.RotationMatrix
If this is deterministic, retrieves its value.
- Raises
RuntimeError if this is not fully deterministic. –
- class Identity
No-op rotation.
- IsDeterministic(self: pydrake.common.schema.Rotation) bool
Returns true iff this is fully deterministic.
- class Rpy
A roll-pitch-yaw rotation, using the angle conventions of Drake’s RollPitchYaw.
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.Rotation.Rpy, other: pydrake.common.schema.Rotation.Rpy) -> None
__init__(self: pydrake.common.schema.Rotation.Rpy, **kwargs) -> None
- property deg
- set_rpy_deg(self: pydrake.common.schema.Rotation, rpy_deg: numpy.ndarray[numpy.float64[3, 1]]) None
Sets this value to the given deterministic RPY, in degrees.
- ToSymbolic(self: pydrake.common.schema.Rotation) 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
Rotation sampled from a uniform distribution over SO(3).
- property value
- pydrake.common.schema.Sample(var: Union[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: Union[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(*args, **kwargs)
Overloaded function.
ToDistributionVector(vec: Union[numpy.ndarray[numpy.float64[m, 1]], 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
Copies the given variant into a DistributionVector base class.
- Template parameter
Size
: rows at compile time (max 6) or else Eigen::Dynamic.
ToDistributionVector(vec: Union[numpy.ndarray[numpy.float64[1, 1]], 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
Copies the given variant into a DistributionVector base class.
- Template parameter
Size
: rows at compile time (max 6) or else Eigen::Dynamic.
ToDistributionVector(vec: Union[numpy.ndarray[numpy.float64[2, 1]], 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
Copies the given variant into a DistributionVector base class.
- Template parameter
Size
: rows at compile time (max 6) or else Eigen::Dynamic.
ToDistributionVector(vec: Union[numpy.ndarray[numpy.float64[3, 1]], 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
Copies the given variant into a DistributionVector base class.
- Template parameter
Size
: rows at compile time (max 6) or else Eigen::Dynamic.
ToDistributionVector(vec: Union[numpy.ndarray[numpy.float64[4, 1]], 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
Copies the given variant into a DistributionVector base class.
- Template parameter
Size
: rows at compile time (max 6) or else Eigen::Dynamic.
ToDistributionVector(vec: Union[numpy.ndarray[numpy.float64[5, 1]], 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
Copies the given variant into a DistributionVector base class.
- Template parameter
Size
: rows at compile time (max 6) or else Eigen::Dynamic.
ToDistributionVector(vec: Union[numpy.ndarray[numpy.float64[6, 1]], 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: Union[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
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__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.Transform) -> None
Constructs the Identity transform.
__init__(self: pydrake.common.schema.Transform, other: pydrake.common.schema.Transform) -> None
__init__(self: pydrake.common.schema.Transform, arg0: pydrake.math.RigidTransform) -> None
Constructs the given transform.
__init__(self: pydrake.common.schema.Transform, **kwargs) -> None
- property base_frame
- GetDeterministicValue(self: pydrake.common.schema.Transform) pydrake.math.RigidTransform
If this is deterministic, retrieves its value.
- Raises
RuntimeError if this is not fully deterministic. –
- IsDeterministic(self: pydrake.common.schema.Transform) bool
Returns true iff this is fully deterministic.
- Mean(self: pydrake.common.schema.Transform) 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
A variant that allows for several ways to specify a rotation.
- Sample(self: pydrake.common.schema.Transform, 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: pydrake.common.schema.Transform, rpy_deg: numpy.ndarray[numpy.float64[3, 1]]) None
Sets the rotation field to the given deterministic RPY, in degrees.
- ToSymbolic(self: pydrake.common.schema.Transform) 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
- class pydrake.common.schema.Uniform
Bases:
pydrake.common.schema.Distribution
A uniform distribution with
min
inclusive andmax
exclusive.- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.Uniform) -> None
__init__(self: pydrake.common.schema.Uniform, other: pydrake.common.schema.Uniform) -> None
__init__(self: pydrake.common.schema.Uniform, min: float, max: float) -> None
- property max
- property min
- class pydrake.common.schema.UniformDiscrete
Bases:
pydrake.common.schema.Distribution
Chooses from among discrete
values
with equal probability.- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.UniformDiscrete) -> None
__init__(self: pydrake.common.schema.UniformDiscrete, other: pydrake.common.schema.UniformDiscrete) -> None
__init__(self: pydrake.common.schema.UniformDiscrete, values: list[float]) -> None
- property values
- 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]
Bases:
pydrake.common.schema.DistributionVector
A uniform distribution with vector
min
inclusive and vectormax
exclusive.- Template parameter
Size
: rows at compile time (max 6) or else Eigen::Dynamic.
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.UniformVector[1]) -> None
__init__(self: pydrake.common.schema.UniformVector[1], other: pydrake.common.schema.UniformVector[1]) -> None
__init__(self: pydrake.common.schema.UniformVector[1], min: numpy.ndarray[numpy.float64[1, 1]], max: numpy.ndarray[numpy.float64[1, 1]]) -> None
- property max
- property min
- Template parameter
- class pydrake.common.schema.UniformVector[2]
Bases:
pydrake.common.schema.DistributionVector
A uniform distribution with vector
min
inclusive and vectormax
exclusive.- Template parameter
Size
: rows at compile time (max 6) or else Eigen::Dynamic.
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.UniformVector[2]) -> None
__init__(self: pydrake.common.schema.UniformVector[2], other: pydrake.common.schema.UniformVector[2]) -> None
__init__(self: pydrake.common.schema.UniformVector[2], min: numpy.ndarray[numpy.float64[2, 1]], max: numpy.ndarray[numpy.float64[2, 1]]) -> None
- property max
- property min
- Template parameter
- class pydrake.common.schema.UniformVector[3]
Bases:
pydrake.common.schema.DistributionVector
A uniform distribution with vector
min
inclusive and vectormax
exclusive.- Template parameter
Size
: rows at compile time (max 6) or else Eigen::Dynamic.
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.UniformVector[3]) -> None
__init__(self: pydrake.common.schema.UniformVector[3], other: pydrake.common.schema.UniformVector[3]) -> None
__init__(self: pydrake.common.schema.UniformVector[3], min: numpy.ndarray[numpy.float64[3, 1]], max: numpy.ndarray[numpy.float64[3, 1]]) -> None
- property max
- property min
- Template parameter
- class pydrake.common.schema.UniformVector[4]
Bases:
pydrake.common.schema.DistributionVector
A uniform distribution with vector
min
inclusive and vectormax
exclusive.- Template parameter
Size
: rows at compile time (max 6) or else Eigen::Dynamic.
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.UniformVector[4]) -> None
__init__(self: pydrake.common.schema.UniformVector[4], other: pydrake.common.schema.UniformVector[4]) -> None
__init__(self: pydrake.common.schema.UniformVector[4], min: numpy.ndarray[numpy.float64[4, 1]], max: numpy.ndarray[numpy.float64[4, 1]]) -> None
- property max
- property min
- Template parameter
- class pydrake.common.schema.UniformVector[5]
Bases:
pydrake.common.schema.DistributionVector
A uniform distribution with vector
min
inclusive and vectormax
exclusive.- Template parameter
Size
: rows at compile time (max 6) or else Eigen::Dynamic.
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.UniformVector[5]) -> None
__init__(self: pydrake.common.schema.UniformVector[5], other: pydrake.common.schema.UniformVector[5]) -> None
__init__(self: pydrake.common.schema.UniformVector[5], min: numpy.ndarray[numpy.float64[5, 1]], max: numpy.ndarray[numpy.float64[5, 1]]) -> None
- property max
- property min
- Template parameter
- class pydrake.common.schema.UniformVector[6]
Bases:
pydrake.common.schema.DistributionVector
A uniform distribution with vector
min
inclusive and vectormax
exclusive.- Template parameter
Size
: rows at compile time (max 6) or else Eigen::Dynamic.
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.UniformVector[6]) -> None
__init__(self: pydrake.common.schema.UniformVector[6], other: pydrake.common.schema.UniformVector[6]) -> None
__init__(self: pydrake.common.schema.UniformVector[6], min: numpy.ndarray[numpy.float64[6, 1]], max: numpy.ndarray[numpy.float64[6, 1]]) -> None
- property max
- property min
- Template parameter
- class pydrake.common.schema.UniformVector[None]
Bases:
pydrake.common.schema.DistributionVector
A uniform distribution with vector
min
inclusive and vectormax
exclusive.- Template parameter
Size
: rows at compile time (max 6) or else Eigen::Dynamic.
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: pydrake.common.schema.UniformVector[None]) -> None
__init__(self: pydrake.common.schema.UniformVector[None], other: pydrake.common.schema.UniformVector[None]) -> None
__init__(self: pydrake.common.schema.UniformVector[None], min: numpy.ndarray[numpy.float64[m, 1]], max: numpy.ndarray[numpy.float64[m, 1]]) -> None
- property max
- property min
- Template parameter
- pydrake.common.schema.UniformVectorX