Go to the documentation of this file.
30 #ifndef EXOTICA_AICO_SOLVER_BAYESIAN_IK_SOLVER_H_
31 #define EXOTICA_AICO_SOLVER_BAYESIAN_IK_SOLVER_H_
41 #include <exotica_aico_solver/bayesian_ik_solver_initializer.h>
54 void Solve(Eigen::MatrixXd& solution)
override;
159 void UpdateTaskMessage(
const Eigen::Ref<const Eigen::VectorXd>& qhat_t,
double tolerance,
160 double max_step_size = -1.);
171 int max_relocation_iterations,
double tolerance,
bool force_relocation,
172 double max_step_size = -1.);
189 int max_relocation_iterations,
double tolerance,
double max_step_size = -1.);
210 #endif // EXOTICA_AICO_SOLVER_BAYESIAN_IK_SOLVER_H_
UnconstrainedEndPoseProblemPtr prob_
Shared pointer to the planning problem.
double Step()
Compute one step of the AICO algorithm.
@ LOCAL_GAUSS_NEWTON_DAMPED
bool sweep_improved_cost_
Whether the last sweep improved the cost (for backtrack iterations count)
int max_backtrack_iterations_
Max. number of sweeps without improvement before terminating (= line-search)
Eigen::VectorXd qhat_old
Point of linearisation (last most optimal value)
double function_tolerance_
Relative function tolerance/first-order optimality criterion.
Eigen::VectorXd b_old
Belief mean (last most optimal value)
Eigen::MatrixXd Binv
Belief covariance inverse.
void UpdateTimestep(bool update_fwd, bool update_bwd, int max_relocation_iterations, double tolerance, bool force_relocation, double max_step_size=-1.)
Update messages for given time step.
void RememberOldState()
Stores the previous state.
Eigen::VectorXd q
Configuration space trajectory.
Eigen::MatrixXd W
Configuration space weight matrix inverse.
void Instantiate(const BayesianIKSolverInitializer &init) override
Eigen::VectorXd qhat
Point of linearisation.
Eigen::MatrixXd Winv
Configuration space weight matrix inverse.
double EvaluateTrajectory(const Eigen::VectorXd &x, bool skip_update=false)
Computes the cost of the trajectory.
void GetTaskCosts()
Updates the task cost terms . UnconstrainedEndPoseProblem::Update() has to be called before calling t...
void UpdateFwdMessage()
Updates the forward message Updates the mean and covariance of the forward message using: ,...
int sweep_mode_
Sweep mode.
Eigen::MatrixXd Sinv_old
Forward message covariance inverse (last most optimal value)
Eigen::VectorXd b
Belief mean.
Eigen::VectorXd r
Task message mean.
void SpecifyProblem(PlanningProblemPtr pointer) override
Binds the solver to a specific problem which must be pre-initalised.
void InitMessages()
Initializes message data.
Eigen::VectorXd s
Forward message mean.
Eigen::VectorXd v
Backward message mean.
Eigen::MatrixXd Vinv_old
Backward message covariance inverse (last most optimal value)
Eigen::MatrixXd Vinv
Backward message covariance inverse.
Solves motion planning problem using Approximate Inference Control method.
double cost_old_
cost of MAP trajectory (last most optimal value)
double minimum_step_tolerance_
Update tolerance to stop update of messages if change of maximum coefficient is less than this tolera...
std::shared_ptr< exotica::UnconstrainedEndPoseProblem > UnconstrainedEndPoseProblemPtr
int iteration_count_
Iteration counter.
void UpdateTimestepGaussNewton(bool update_fwd, bool update_bwd, int max_relocation_iterations, double tolerance, double max_step_size=-1.)
Update messages for given time step using the Gauss Newton method.
double damping_init_
Damping.
Eigen::MatrixXd Sinv
Forward message covariance inverse.
double cost_
cost of MAP trajectory
void InitTrajectory(const Eigen::VectorXd &q_init)
Initialise AICO messages from an initial trajectory.
double step_tolerance_
Relative step tolerance (termination criterion)
Eigen::VectorXd r_old
Task message mean (last most optimal value)
void PerhapsUndoStep()
Reverts back to previous state if the cost of the current state is higher.
Eigen::VectorXd s_old
Forward message mean (last most optimal value)
std::shared_ptr< PlanningProblem > PlanningProblemPtr
bool use_bwd_msg_
Flag for using backward message initialisation.
double rhat_old
Task message point of linearisation (last most optimal value)
void UpdateTaskMessage(const Eigen::Ref< const Eigen::VectorXd > &qhat_t, double tolerance, double max_step_size=-1.)
Updates the task message.
Eigen::VectorXd v_old
Backward message mean (last most optimal value)
Eigen::MatrixXd R
Task message covariance.
double b_step_
Squared configuration space step.
void init(const M_string &remappings)
Eigen::MatrixXd R_old
Task message covariance (last most optimal value)
double rhat
Task message point of linearisation.
Eigen::VectorXd bwd_msg_v_
Backward message initialisation mean.
Eigen::VectorXd damping_reference_
Damping reference point.
Eigen::MatrixXd Binv_old
Belief covariance inverse (last most optimal value)
Eigen::MatrixXd bwd_msg_Vinv_
Backward message initialisation covariance.
Eigen::VectorXd q_old
Configuration space trajectory (last most optimal value)
void Solve(Eigen::MatrixXd &solution) override
Solves the problem.
double cost_prev_
previous iteration cost
void UpdateBwdMessage()
Updates the backward message Updates the mean and covariance of the backward message using: ,...