[SimpleOptimizationTask Inherit] More...
#include <simple_optimization_task.h>
Public Member Functions | |
bool | computeCosts (const Eigen::MatrixXd ¶meters, std::size_t start_timestep, std::size_t num_timesteps, int iteration_number, Eigen::VectorXd &costs, bool &validity) override |
computes the state costs as a function of the distance from the bias parameters More... | |
bool | computeNoisyCosts (const Eigen::MatrixXd ¶meters, std::size_t start_timestep, std::size_t num_timesteps, int iteration_number, int rollout_number, Eigen::VectorXd &costs, bool &validity) override |
computes the state costs as a function of the distance from the bias parameters More... | |
bool | filterParameterUpdates (std::size_t start_timestep, std::size_t num_timesteps, int iteration_number, const Eigen::MatrixXd ¶meters, Eigen::MatrixXd &updates) override |
Filters the given parameters which is applied after the update. It could be used for clipping of joint limits or projecting into the null space of the Jacobian. More... | |
bool | generateNoisyParameters (const Eigen::MatrixXd ¶meters, std::size_t start_timestep, std::size_t num_timesteps, int iteration_number, int rollout_number, Eigen::MatrixXd ¶meters_noise, Eigen::MatrixXd &noise) override |
[SimpleOptimizationTask Inherit] More... | |
SimpleOptimizationTask (const Eigen::MatrixXd ¶meters_bias, const std::vector< double > &bias_thresholds, const std::vector< double > &std_dev) | |
A simple task for demonstrating how to use Stomp. More... | |
Public Member Functions inherited from stomp_core::Task | |
virtual void | done (bool success, int total_iterations, double final_cost, const Eigen::MatrixXd ¶meters) |
Called by Stomp at the end of the optimization process. More... | |
virtual bool | filterNoisyParameters (std::size_t start_timestep, std::size_t num_timesteps, int iteration_number, int rollout_number, Eigen::MatrixXd ¶meters, bool &filtered) |
Filters the given noisy parameters which is applied after noisy trajectory generation. It could be used for clipping of joint limits or projecting into the null space of the Jacobian. More... | |
virtual void | postIteration (std::size_t start_timestep, std::size_t num_timesteps, int iteration_number, double cost, const Eigen::MatrixXd ¶meters) |
Called by STOMP at the end of each iteration. More... | |
Protected Member Functions | |
bool | smoothParameterUpdates (std::size_t start_timestep, std::size_t num_timesteps, int iteration_number, Eigen::MatrixXd &updates) |
Perform a smooth update given a noisy update. More... | |
Protected Attributes | |
std::vector< double > | bias_thresholds_ |
Eigen::MatrixXd | parameters_bias_ |
Eigen::MatrixXd | smoothing_M_ |
std::vector< double > | std_dev_ |
[SimpleOptimizationTask Inherit]
A dummy task for testing STOMP
Definition at line 37 of file simple_optimization_task.h.
|
inline |
A simple task for demonstrating how to use Stomp.
parameters_bias | default parameter bias used for computing cost. |
bias_thresholds | threshold to determine whether two trajectories are equal |
std_dev | standard deviation used for generating noisy parameters |
Definition at line 46 of file simple_optimization_task.h.
|
inlineoverridevirtual |
computes the state costs as a function of the distance from the bias parameters
parameters | A matrix [num_dimensions][num_parameters] of the policy parameters to execute |
start_timestep | The start index into the 'parameters' array, usually 0. |
num_timesteps | The number of elements to use from 'parameters' starting from 'start_timestep' |
iteration_number | The current iteration count in the optimization loop |
costs | A vector containing the state costs per timestep. |
validity | Whether or not the trajectory is valid |
Implements stomp_core::Task.
Definition at line 107 of file simple_optimization_task.h.
|
inlineoverridevirtual |
computes the state costs as a function of the distance from the bias parameters
parameters | A matrix [num_dimensions][num_parameters] of the policy parameters to execute |
start_timestep | The start index into the 'parameters' array, usually 0. |
num_timesteps | The number of elements to use from 'parameters' starting from 'start_timestep' |
iteration_number | The current iteration count in the optimization loop |
rollout_number | The index of the noisy trajectory. |
costs | A vector containing the state costs per timestep. |
validity | Whether or not the trajectory is valid |
Implements stomp_core::Task.
Definition at line 128 of file simple_optimization_task.h.
|
inlineoverridevirtual |
Filters the given parameters which is applied after the update. It could be used for clipping of joint limits or projecting into the null space of the Jacobian.
start_timestep | The start index into the 'parameters' array, usually 0. |
num_timesteps | The number of elements to use from 'parameters' starting from 'start_timestep' |
iteration_number | The current iteration count in the optimization loop |
parameters | The optimized parameters |
updates | The updates to the parameters |
Reimplemented from stomp_core::Task.
Definition at line 172 of file simple_optimization_task.h.
|
inlineoverridevirtual |
[SimpleOptimizationTask Inherit]
Generates a noisy trajectory from the parameters.
parameters | A matrix [num_dimensions][num_parameters] of the current optimized parameters |
start_timestep | The start index into the 'parameters' array, usually 0. |
num_timesteps | The number of elements to use from 'parameters' starting from 'start_timestep' |
iteration_number | The current iteration count in the optimization loop |
rollout_number | The index of the noisy trajectory. |
parameters_noise | The parameters + noise |
noise | The noise applied to the parameters |
Implements stomp_core::Task.
Definition at line 73 of file simple_optimization_task.h.
|
inlineprotected |
Perform a smooth update given a noisy update.
start_timestep | starting timestep |
num_timesteps | number of timesteps |
iteration_number | number of interations allowed |
updates | returned smooth update |
Definition at line 192 of file simple_optimization_task.h.
|
protected |
Threshold to determine whether two trajectories are equal
Definition at line 209 of file simple_optimization_task.h.
|
protected |
Parameter bias used for computing cost for the test
Definition at line 208 of file simple_optimization_task.h.
|
protected |
Matrix used for smoothing the trajectory
Definition at line 211 of file simple_optimization_task.h.
|
protected |
Standard deviation used for generating noisy parameters
Definition at line 210 of file simple_optimization_task.h.