libmove3d-planners
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
stomp_motion_planner::CovariantTrajectoryPolicy Class Reference
Inheritance diagram for stomp_motion_planner::CovariantTrajectoryPolicy:
stomp_motion_planner::Policy

Public Member Functions

bool initialize ()
 
bool initialize (const int num_time_steps, const int num_dimensions, const double movement_duration, const double cost_ridge_factor, const std::vector< double > &derivative_costs)
 
bool setToMinControlCost (Eigen::VectorXd &start, Eigen::VectorXd &goal)
 compute the minmal control costs given a start and goal state
 
bool getParametersAll (std::vector< Eigen::VectorXd > &parameters)
 
void setFileNameBase (const std::string &file_name_base)
 
void setPrintDebug (bool print_debug)
 
bool setNumTimeSteps (const int num_time_steps)
 Sets the number of time steps used in reinforcement learning. More...
 
bool getNumTimeSteps (int &num_time_steps)
 Gets the number of time steps used in reinforcement learning. More...
 
bool getNumDimensions (int &num_dimensions)
 Gets the number of dimensions. More...
 
bool getNumParameters (std::vector< int > &num_params)
 Gets the number of policy parameters per dimension. More...
 
bool getBasisFunctions (std::vector< Eigen::MatrixXd > &basis_functions)
 Gets the basis functions that multiply the policy parameters in the dynamical system. More...
 
bool getControlCosts (std::vector< Eigen::MatrixXd > &control_costs)
 Gets the positive semi-definite matrix of the quadratic control cost The weight of this control cost is provided by the task. More...
 
bool updateParameters (const std::vector< Eigen::MatrixXd > &updates)
 Update the policy parameters based on the updates per timestep. More...
 
void printParameters ()
 print paramters in standard output
 
bool getParameters (std::vector< Eigen::VectorXd > &parameters)
 Get the policy parameters per dimension. More...
 
bool setParameters (const std::vector< Eigen::VectorXd > &parameters)
 Set the policy parameters per dimension. More...
 
bool computeControlCosts (const std::vector< Eigen::MatrixXd > &control_cost_matrices, const std::vector< std::vector< Eigen::VectorXd > > &parameters, const double weight, std::vector< Eigen::VectorXd > &control_costs)
 Compute the control costs over time, given the control cost matrix per dimension and parameters over time. More...
 
bool computeControlCosts (const std::vector< Eigen::MatrixXd > &control_cost_matrices, const std::vector< Eigen::VectorXd > &parameters, const std::vector< Eigen::VectorXd > &noise, const double weight, std::vector< Eigen::VectorXd > &control_costs)
 
std::string getInfoString ()
 
std::string getClassName ()
 
bool readFromDisc (const std::string directory_name, const int item_id, const int trial_id=0)
 
bool writeToDisc (const int trial_id=0)
 
bool readFromDisc (const std::string abs_file_name)
 
bool writeToDisc (const std::string abs_file_name)
 
std::string getFileName (const int trial_id)
 

Public Attributes

double movement_dt_
 

Member Function Documentation

bool stomp_motion_planner::CovariantTrajectoryPolicy::computeControlCosts ( const std::vector< Eigen::MatrixXd > &  control_cost_matrices,
const std::vector< std::vector< Eigen::VectorXd > > &  parameters,
const double  weight,
std::vector< Eigen::VectorXd > &  control_costs 
)
virtual

Compute the control costs over time, given the control cost matrix per dimension and parameters over time.

Parameters
control_cost_matrices(input) [num_dimensions] num_parameters x num_parameters: Quadratic control cost matrix (R)
parameters(input) [num_dimensions][num_time_steps] num_parameters: Parameters over time (can also be theta + projected noise)
weight(input) constant multiplier for the control costs
control_costs(output) [num_dimensions] num_time_steps: Control costs over time
Returns

Implements stomp_motion_planner::Policy.

bool stomp_motion_planner::CovariantTrajectoryPolicy::getBasisFunctions ( std::vector< Eigen::MatrixXd > &  basis_functions)
inlinevirtual

Gets the basis functions that multiply the policy parameters in the dynamical system.

Parameters
basis_function_matrix_array(output) Array of "num_time_steps x num_parameters" matrices, per dimension
Returns
true on success, false on failure

Implements stomp_motion_planner::Policy.

bool stomp_motion_planner::CovariantTrajectoryPolicy::getControlCosts ( std::vector< Eigen::MatrixXd > &  control_costs)
inlinevirtual

Gets the positive semi-definite matrix of the quadratic control cost The weight of this control cost is provided by the task.

Parameters
control_cost_matrix(output) Array of square, positive semi-definite matrix: num_params x num_params
Returns
true on success, false on failure

Implements stomp_motion_planner::Policy.

bool stomp_motion_planner::CovariantTrajectoryPolicy::getNumDimensions ( int &  num_dimensions)
inlinevirtual

Gets the number of dimensions.

Parameters
num_dimensions(output) number of dimensions
Returns
true on success, false on failure

Implements stomp_motion_planner::Policy.

bool stomp_motion_planner::CovariantTrajectoryPolicy::getNumParameters ( std::vector< int > &  num_params)
inlinevirtual

Gets the number of policy parameters per dimension.

Parameters
num_params(output) vector of number of parameters per dimension
Returns
true on success, false on failure

Implements stomp_motion_planner::Policy.

bool stomp_motion_planner::CovariantTrajectoryPolicy::getNumTimeSteps ( int &  num_time_steps)
inlinevirtual

Gets the number of time steps used in reinforcement learning.

Parameters
num_time_steps
Returns
true on success, fase on failure

Implements stomp_motion_planner::Policy.

bool stomp_motion_planner::CovariantTrajectoryPolicy::getParameters ( std::vector< Eigen::VectorXd > &  parameters)
inlinevirtual

Get the policy parameters per dimension.

Parameters
parameters(output) array of parameter vectors
Returns
true on success, false on failure

Implements stomp_motion_planner::Policy.

bool stomp_motion_planner::CovariantTrajectoryPolicy::setNumTimeSteps ( const int  num_time_steps)
inlinevirtual

Sets the number of time steps used in reinforcement learning.

Parameters
num_time_steps
Returns
true on success, false on failure

Implements stomp_motion_planner::Policy.

bool stomp_motion_planner::CovariantTrajectoryPolicy::setParameters ( const std::vector< Eigen::VectorXd > &  parameters)
inlinevirtual

Set the policy parameters per dimension.

Parameters
parameters(input) array of parameter vectors
Returns
true on success, false on failure

Implements stomp_motion_planner::Policy.

bool stomp_motion_planner::CovariantTrajectoryPolicy::updateParameters ( const std::vector< Eigen::MatrixXd > &  updates)
virtual

Update the policy parameters based on the updates per timestep.

Parameters
updates(input) parameter updates per time-step, num_time_steps x num_parameters
Returns
true on success, false on failure

Implements stomp_motion_planner::Policy.


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