Drake
Drake C++ Documentation
IrisParameterizationFunction Class Reference

Detailed Description

Ordinarily, IRIS algorithms grow collision free regions in the robot's configuration space C.

This allows the user to specify a function f:Q→C , and grow the region in Q instead. The function should be a map R^m to R^n, where n is the dimension of the plant configuration space and m is the input dimension, if specified. If the user provides a version of the function for Eigen::VectorX<double>, then the parameterization can be used with IrisZo. IrisNp2 requires that the user also provies a version of the function for Eigen::VectorX<AutoDiffXd>. If not specified, the input dimension is assumed to be equal to the output dimension. The user must also specify whether or not the parameterization function can be called in parallel.

#include <drake/planning/iris/iris_common.h>

Public Types

typedef std::function< Eigen::VectorXd(const Eigen::VectorXd &)> ParameterizationFunctionDouble
 
typedef std::function< Eigen::VectorX< AutoDiffXd > const Eigen::VectorX< AutoDiffXd > &)> ParameterizationFunctionAutodiff
 

Public Member Functions

 IrisParameterizationFunction (const ParameterizationFunctionDouble &parameterization_double, bool parameterization_is_threadsafe, int parameterization_dimension)
 Constructor for when the user only provides a version of the parameterization function for Eigen::VectorX<double>. More...
 
 IrisParameterizationFunction (const ParameterizationFunctionDouble &parameterization_double, const ParameterizationFunctionAutodiff &parameterization_autodiff, bool parameterization_is_threadsafe, int parameterization_dimension)
 Constructor for when the user only provides both versions of the parameterization function. More...
 
 IrisParameterizationFunction ()=default
 Default constructor – returns the identity mapping, which is threadsafe and compatible with any dimension configuration space. More...
 
 IrisParameterizationFunction (const Eigen::VectorX< symbolic::Expression > &expression_parameterization, const Eigen::VectorX< symbolic::Variable > &variables)
 Alternative constructor that allows the user to define the parameterization using a VectorX<Expression>. More...
 
 IrisParameterizationFunction (const multibody::RationalForwardKinematics *kin, const Eigen::Ref< const Eigen::VectorXd > &q_star_val)
 Constructs an instance of IrisParameterizationFunction that handles a rational kinematic parameterization. More...
 
const ParameterizationFunctionDoubleget_parameterization_double () const
 Get the Eigen::VectorX<double> parameterization function. More...
 
const ParameterizationFunctionAutodiffget_parameterization_autodiff () const
 Get the Eigen::VectorX<AutoDiffXd> parameterization function. More...
 
bool get_parameterization_is_threadsafe () const
 Returns whether or not the user has specified the parameterization to be threadsafe. More...
 
std::optional< intget_parameterization_dimension () const
 Returns what the user has specified as the input dimension for the parameterization function, or std::nullopt if it has not been set. More...
 
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 IrisParameterizationFunction (const IrisParameterizationFunction &)=default
 
IrisParameterizationFunctionoperator= (const IrisParameterizationFunction &)=default
 
 IrisParameterizationFunction (IrisParameterizationFunction &&)=default
 
IrisParameterizationFunctionoperator= (IrisParameterizationFunction &&)=default
 

Member Typedef Documentation

◆ ParameterizationFunctionAutodiff

typedef std::function<Eigen::VectorX<AutoDiffXd> const Eigen::VectorX<AutoDiffXd>&)> ParameterizationFunctionAutodiff

◆ ParameterizationFunctionDouble

typedef std::function<Eigen::VectorXd(const Eigen::VectorXd&)> ParameterizationFunctionDouble

Constructor & Destructor Documentation

◆ IrisParameterizationFunction() [1/7]

◆ IrisParameterizationFunction() [2/7]

◆ IrisParameterizationFunction() [3/7]

IrisParameterizationFunction ( const ParameterizationFunctionDouble parameterization_double,
bool  parameterization_is_threadsafe,
int  parameterization_dimension 
)

Constructor for when the user only provides a version of the parameterization function for Eigen::VectorX<double>.

parameterization_double is the function itself, parameterization_is_threadsafe specifies whether or not its threadsafe, and parameterization_dimension is the input dimension.

◆ IrisParameterizationFunction() [4/7]

IrisParameterizationFunction ( const ParameterizationFunctionDouble parameterization_double,
const ParameterizationFunctionAutodiff parameterization_autodiff,
bool  parameterization_is_threadsafe,
int  parameterization_dimension 
)

Constructor for when the user only provides both versions of the parameterization function.

parameterization_double is the version for Eigen::VectorX<double>, parameterization_autodiff_ is the version for Eigen::VectorX<AutoDiffXd>, parameterization_is_threadsafe specifies whether or not its threadsafe, and parameterization_dimension is the input dimension.

◆ IrisParameterizationFunction() [5/7]

Default constructor – returns the identity mapping, which is threadsafe and compatible with any dimension configuration space.

◆ IrisParameterizationFunction() [6/7]

IrisParameterizationFunction ( const Eigen::VectorX< symbolic::Expression > &  expression_parameterization,
const Eigen::VectorX< symbolic::Variable > &  variables 
)

Alternative constructor that allows the user to define the parameterization using a VectorX<Expression>.

The user must also provide a vector containing the variables used in expression_parameterization, in the order that they should be evaluated. Each Variable in variables must be used, each Variable used in expression_parameterization must appear in variables, and there must be no duplicates in variables.

Note
This constructor only populates the VectorX<double> parameterization.
Expression parameterizations are always threadsafe.
Exceptions
ifthe number of variables used across expression_parameterization does not match ssize(variables).
ifany variables in expression_parameterization are not listed in variables.
ifany variables in variables are not used anywhere in expression_parameterization.

◆ IrisParameterizationFunction() [7/7]

IrisParameterizationFunction ( const multibody::RationalForwardKinematics kin,
const Eigen::Ref< const Eigen::VectorXd > &  q_star_val 
)

Constructs an instance of IrisParameterizationFunction that handles a rational kinematic parameterization.

Regions are grown in the s variables, so as to minimize collisions in the q variables. See RationalForwardKinematics for details.

Note
This constructor populates the VectorX<double> and VectorX<AutoDiffXd> parameterizations.
The user is responsible for ensuring kin (and the underlying MultibodyPlant it is built on) is kept alive. If that object is deleted, then the parameterization can no longer be used.

Member Function Documentation

◆ get_parameterization_autodiff()

const ParameterizationFunctionAutodiff& get_parameterization_autodiff ( ) const

Get the Eigen::VectorX<AutoDiffXd> parameterization function.

Note
If the user has not specified this with set_parameterization(), then the default value of parameterization_double_ is the identity function, indicating that the regions should be grown in the full configuration space (in the standard coordinate system).
Exceptions
Ifthe user has specified the VectorX<double> parameterization but not the VectorX<AutoDiffXd> parameterization.

◆ get_parameterization_dimension()

std::optional<int> get_parameterization_dimension ( ) const

Returns what the user has specified as the input dimension for the parameterization function, or std::nullopt if it has not been set.

A std::nullopt value indicates that the chosen IRIS algorithm should use the ambient configuration space dimension as the input dimension to the parameterization.

◆ get_parameterization_double()

const ParameterizationFunctionDouble& get_parameterization_double ( ) const

Get the Eigen::VectorX<double> parameterization function.

Note
If the user has not specified this with set_parameterization(), then the default value of parameterization_double_ is the identity function, indicating that the regions should be grown in the full configuration space (in the standard coordinate system).

◆ get_parameterization_is_threadsafe()

bool get_parameterization_is_threadsafe ( ) const

Returns whether or not the user has specified the parameterization to be threadsafe.

Note
The default parameterization is the identity function, which is threadsafe.

◆ operator=() [1/2]

◆ operator=() [2/2]


The documentation for this class was generated from the following file: