|
| PolicyImprovement () |
| Constructor for the policy improvement class.
|
|
| ~PolicyImprovement () |
| Destructor.
|
|
bool | initialize (const int num_rollouts, const int num_time_steps, const int num_reused_rollouts, const int num_extra_rollouts, boost::shared_ptr< stomp_motion_planner::Policy > policy, boost::shared_ptr< stomp_motion_planner::Task > task, bool use_cumulative_costs=true) |
| Initializes the object which is required for all operations to succeed. More...
|
|
bool | setNumRollouts (const int num_rollouts, const int num_reused_rollouts, const int num_extra_rollouts) |
| Resets the number of rollouts. More...
|
|
bool | getRollouts (std::vector< std::vector< Eigen::VectorXd > > &rollouts, const std::vector< double > &noise_stddev, bool get_reused, std::vector< std::vector< Eigen::VectorXd > > &reused_rollouts) |
| Gets the next set of rollouts. More...
|
|
bool | setRolloutCosts (const Eigen::MatrixXd &costs, const double control_cost_weight, std::vector< double > &rollout_costs_total) |
| Set the costs of each rollout per time-step Only the first "n" rows of the costs matrix is used, where n is the number of rollouts generated by getRollouts(), because some rollouts may be used from previous iterations. More...
|
|
bool | improvePolicy (std::vector< Eigen::MatrixXd > ¶meter_updates) |
| Performs the PI^2 update and provides parameter updates at every time step. More...
|
|
bool | addExtraRollouts (std::vector< std::vector< Eigen::VectorXd > > &rollouts, std::vector< Eigen::VectorXd > &rollout_costs) |
| Adds extra rollouts to the set of rollouts to be reused.
|
|
void | testNoiseGenerators () |
| Tests the noise generators Function added by jim.
|
|
void | setRolloutOutOfBounds (int id, bool out_of_bounds) |
| Set rollout as out of bounds Function added by jim.
|
|
bool | resetReusedRollouts () |
| Reset extra rollouts.
|
|
|
std::vector< Eigen::MatrixXd > | projection_matrix_ |
| [num_dimensions] num_parameters x num_parameters
|
|
bool stomp_motion_planner::PolicyImprovement::getRollouts |
( |
std::vector< std::vector< Eigen::VectorXd > > & |
rollouts, |
|
|
const std::vector< double > & |
noise_stddev, |
|
|
bool |
get_reused, |
|
|
std::vector< std::vector< Eigen::VectorXd > > & |
reused_rollouts |
|
) |
| |
Gets the next set of rollouts.
Only "new" rollouts that need to be executed are returned, not rollouts which might be reused from the previous set.
- Parameters
-
rollouts_ | [num_rollouts][num_dimensions] num_parameters |
noise_variance | [num_dimensions] noise standard deviation per dimension |
- Returns
bool stomp_motion_planner::PolicyImprovement::improvePolicy |
( |
std::vector< Eigen::MatrixXd > & |
parameter_updates | ) |
|
Performs the PI^2 update and provides parameter updates at every time step.
- Parameters
-
parameter_updates | [num_dimensions] num_time_steps x num_parameters |
- Returns
bool stomp_motion_planner::PolicyImprovement::initialize |
( |
const int |
num_rollouts, |
|
|
const int |
num_time_steps, |
|
|
const int |
num_reused_rollouts, |
|
|
const int |
num_extra_rollouts, |
|
|
boost::shared_ptr< stomp_motion_planner::Policy > |
policy, |
|
|
boost::shared_ptr< stomp_motion_planner::Task > |
task, |
|
|
bool |
use_cumulative_costs = true |
|
) |
| |
Initializes the object which is required for all operations to succeed.
Initialize policy improvment 1 - Allocates a multivariate gaussian sampler 2 - Computes the projection matrix.
- Parameters
-
num_rollouts | |
num_time_steps | |
num_reused_rollouts | |
policy | |
- Returns
- true on success, false on failure
bool stomp_motion_planner::PolicyImprovement::setNumRollouts |
( |
const int |
num_rollouts, |
|
|
const int |
num_reused_rollouts, |
|
|
const int |
num_extra_rollouts |
|
) |
| |
Resets the number of rollouts.
Allocates the rollout structures.
- Parameters
-
- Returns
- Parameters
-
num_rollouts | the total number of rollouts |
num_reused_rollouts | the reused number of rollouts |
num_extra_rollouts | the number of extra rollouts |
bool stomp_motion_planner::PolicyImprovement::setRolloutCosts |
( |
const Eigen::MatrixXd & |
costs, |
|
|
const double |
control_cost_weight, |
|
|
std::vector< double > & |
rollout_costs_total |
|
) |
| |
Set the costs of each rollout per time-step Only the first "n" rows of the costs matrix is used, where n is the number of rollouts generated by getRollouts(), because some rollouts may be used from previous iterations.
Outputs the total cost for each rollout (generated and reused) in rollout_costs_total
- Parameters
-
The documentation for this class was generated from the following files:
- src/planner/TrajectoryOptim/Stomp/policy_improvement.hpp
- src/planner/TrajectoryOptim/Stomp/policy_improvement.cpp