The Stomp class.
More...
#include <stomp.h>
|
bool | cancel () |
| Cancel optimization in progress. (Thread-Safe) This method is thead-safe. More...
|
|
bool | clear () |
| Resets all internal variables. More...
|
|
void | setConfig (const StompConfiguration &config) |
| Sets the configuration and resets all internal variables. More...
|
|
bool | solve (const std::vector< double > &first, const std::vector< double > &last, Eigen::MatrixXd ¶meters_optimized) |
| Find the optimal solution provided a start and end goal. More...
|
|
bool | solve (const Eigen::VectorXd &first, const Eigen::VectorXd &last, Eigen::MatrixXd ¶meters_optimized) |
| Find the optimal solution provided a start and end goal. More...
|
|
bool | solve (const Eigen::MatrixXd &initial_parameters, Eigen::MatrixXd ¶meters_optimized) |
| Find the optimal solution provided an intial guess. More...
|
|
| Stomp (const StompConfiguration &config, TaskPtr task) |
| Stomp Constructor. More...
|
|
The Stomp class.
Definition at line 38 of file stomp.h.
Stomp Constructor.
- Parameters
-
config | Stomp configuration parameters |
task | The item to be optimized. |
Definition at line 172 of file stomp.cpp.
bool stomp_core::Stomp::cancel |
( |
| ) |
|
Cancel optimization in progress. (Thread-Safe) This method is thead-safe.
- Returns
- True if sucessful, otherwise false.
Definition at line 416 of file stomp.cpp.
bool stomp_core::Stomp::clear |
( |
| ) |
|
Resets all internal variables.
- Returns
- True if sucessful, otherwise false.
Definition at line 181 of file stomp.cpp.
bool stomp_core::Stomp::computeInitialTrajectory |
( |
const std::vector< double > & |
first, |
|
|
const std::vector< double > & |
last |
|
) |
| |
|
protected |
Computes an inital guess at a solution given a start and end state.
- Parameters
-
first | Start state for the task |
last | Final state for the task |
- Returns
- True if sucessful, otherwise false.
Definition at line 393 of file stomp.cpp.
bool stomp_core::Stomp::computeNoisyRolloutsCosts |
( |
| ) |
|
|
protected |
Computes the total cost for each of the noisy rollouts.
- Returns
- True if sucessful, otherwise false.
Definition at line 564 of file stomp.cpp.
bool stomp_core::Stomp::computeOptimizedCost |
( |
| ) |
|
|
protected |
Computes the optimized trajectory cost [Control Cost + State Cost] If the current cost is not less than the previous cost the parameters are reset to the previous iteration's parameters.
- Returns
Definition at line 771 of file stomp.cpp.
bool stomp_core::Stomp::computeProbabilities |
( |
| ) |
|
|
protected |
Computes the probability from the state cost at every timestep for each noisy rollout.
- Returns
- True if sucessful, otherwise false.
Definition at line 654 of file stomp.cpp.
bool stomp_core::Stomp::computeRolloutsControlCosts |
( |
| ) |
|
|
protected |
Compute the control cost for each noisy rollout. This is the sum of the acceleration squared, then each noisy rollouts control cost is divided by the maximum control cost found amoung the noisy rollouts.
- Returns
- True if sucessful, otherwise false.
Definition at line 629 of file stomp.cpp.
bool stomp_core::Stomp::computeRolloutsStateCosts |
( |
| ) |
|
|
protected |
Computes the cost at every timestep for each noisy rollout.
- Returns
- True if sucessful, otherwise false.
Definition at line 602 of file stomp.cpp.
bool stomp_core::Stomp::filterNoisyRollouts |
( |
| ) |
|
|
protected |
Applies the optimization task's filter methods to the noisy trajectories.
- Returns
- True if sucessful, otherwise false.
Definition at line 538 of file stomp.cpp.
bool stomp_core::Stomp::generateNoisyRollouts |
( |
| ) |
|
|
protected |
Generate a set of noisy rollouts.
- Returns
- True if sucessful, otherwise false.
Definition at line 443 of file stomp.cpp.
bool stomp_core::Stomp::resetVariables |
( |
| ) |
|
|
protected |
Reset all internal variables.
- Returns
- True if sucessful, otherwise false.
Definition at line 299 of file stomp.cpp.
bool stomp_core::Stomp::runSingleIteration |
( |
| ) |
|
|
protected |
Run a single iteration of the stomp algorithm.
- Returns
- True if it was able to succesfully perform a single iteration. False is returned when an error is encounter at one of the many optimization steps.
Definition at line 423 of file stomp.cpp.
Sets the configuration and resets all internal variables.
- Parameters
-
config | Stomp Configuration struct |
Definition at line 186 of file stomp.cpp.
bool stomp_core::Stomp::solve |
( |
const std::vector< double > & |
first, |
|
|
const std::vector< double > & |
last, |
|
|
Eigen::MatrixXd & |
parameters_optimized |
|
) |
| |
Find the optimal solution provided a start and end goal.
- Parameters
-
first | Start state for the task |
last | Final state for the task |
parameters_optimized | Optimized solution [parameters][timesteps] |
- Returns
- True if solution was found, otherwise false.
Definition at line 192 of file stomp.cpp.
bool stomp_core::Stomp::solve |
( |
const Eigen::VectorXd & |
first, |
|
|
const Eigen::VectorXd & |
last, |
|
|
Eigen::MatrixXd & |
parameters_optimized |
|
) |
| |
Find the optimal solution provided a start and end goal.
- Parameters
-
first | Start state for the task |
last | Final state for the task |
parameters_optimized | Optimized solution [Parameters][timesteps] |
- Returns
- True if solution was found, otherwise false.
Definition at line 204 of file stomp.cpp.
bool stomp_core::Stomp::solve |
( |
const Eigen::MatrixXd & |
initial_parameters, |
|
|
Eigen::MatrixXd & |
parameters_optimized |
|
) |
| |
Find the optimal solution provided an intial guess.
- Parameters
-
initial_parameters | A matrix [Parameters][timesteps] |
parameters_optimized | The optimized solution [Parameters][timesteps] |
- Returns
- True if solution was found, otherwise false.
Definition at line 217 of file stomp.cpp.
bool stomp_core::Stomp::updateParameters |
( |
| ) |
|
|
protected |
Computes update from probabilities using convex combination.
- Returns
- True if sucessful, otherwise false.
Definition at line 743 of file stomp.cpp.
The documentation for this class was generated from the following files: