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>
50 void Instantiate(
const BayesianIKSolverInitializer& init)
override;
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.
Definition: bayesian_ik_solver.h:73
double Step()
Compute one step of the AICO algorithm.
@ LOCAL_GAUSS_NEWTON_DAMPED
Definition: bayesian_ik_solver.h:128
bool sweep_improved_cost_
Whether the last sweep improved the cost (for backtrack iterations count)
Definition: bayesian_ik_solver.h:83
int max_backtrack_iterations_
Max. number of sweeps without improvement before terminating (= line-search)
Definition: bayesian_ik_solver.h:79
Eigen::VectorXd qhat_old
Point of linearisation (last most optimal value)
Definition: bayesian_ik_solver.h:108
SweepMode
Definition: bayesian_ik_solver.h:123
double function_tolerance_
Relative function tolerance/first-order optimality criterion.
Definition: bayesian_ik_solver.h:78
Eigen::VectorXd b_old
Belief mean (last most optimal value)
Definition: bayesian_ik_solver.h:105
Eigen::MatrixXd Binv
Belief covariance inverse.
Definition: bayesian_ik_solver.h:94
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.
Definition: bayesian_ik_solver.h:95
double b_step_old_
Definition: bayesian_ik_solver.h:115
Eigen::MatrixXd W
Configuration space weight matrix inverse.
Definition: bayesian_ik_solver.h:117
void Instantiate(const BayesianIKSolverInitializer &init) override
Eigen::VectorXd qhat
Point of linearisation.
Definition: bayesian_ik_solver.h:96
Eigen::MatrixXd Winv
Configuration space weight matrix inverse.
Definition: bayesian_ik_solver.h:118
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.
Definition: bayesian_ik_solver.h:130
Eigen::MatrixXd Sinv_old
Forward message covariance inverse (last most optimal value)
Definition: bayesian_ik_solver.h:99
Definition: property.h:110
Eigen::VectorXd b
Belief mean.
Definition: bayesian_ik_solver.h:93
Definition: cartpole_dynamics_solver.h:38
Eigen::VectorXd r
Task message mean.
Definition: bayesian_ik_solver.h:90
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.
Definition: bayesian_ik_solver.h:86
Eigen::VectorXd v
Backward message mean.
Definition: bayesian_ik_solver.h:88
Eigen::MatrixXd Vinv_old
Backward message covariance inverse (last most optimal value)
Definition: bayesian_ik_solver.h:101
Eigen::MatrixXd Vinv
Backward message covariance inverse.
Definition: bayesian_ik_solver.h:89
Solves motion planning problem using Approximate Inference Control method.
Definition: bayesian_ik_solver.h:47
double cost_old_
cost of MAP trajectory (last most optimal value)
Definition: bayesian_ik_solver.h:112
double minimum_step_tolerance_
Update tolerance to stop update of messages if change of maximum coefficient is less than this tolera...
Definition: bayesian_ik_solver.h:76
std::shared_ptr< exotica::UnconstrainedEndPoseProblem > UnconstrainedEndPoseProblemPtr
Definition: unconstrained_end_pose_problem.h:81
int iteration_count_
Iteration counter.
Definition: bayesian_ik_solver.h:84
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.
Definition: bayesian_ik_solver.h:75
Eigen::MatrixXd Sinv
Forward message covariance inverse.
Definition: bayesian_ik_solver.h:87
double cost_
cost of MAP trajectory
Definition: bayesian_ik_solver.h:111
void InitTrajectory(const Eigen::VectorXd &q_init)
Initialise AICO messages from an initial trajectory.
bool verbose_
Definition: bayesian_ik_solver.h:133
double step_tolerance_
Relative step tolerance (termination criterion)
Definition: bayesian_ik_solver.h:77
Eigen::VectorXd r_old
Task message mean (last most optimal value)
Definition: bayesian_ik_solver.h:102
void PerhapsUndoStep()
Reverts back to previous state if the cost of the current state is higher.
Definition: motion_solver.h:42
int best_sweep_
Definition: bayesian_ik_solver.h:121
Eigen::VectorXd s_old
Forward message mean (last most optimal value)
Definition: bayesian_ik_solver.h:98
std::shared_ptr< PlanningProblem > PlanningProblemPtr
Definition: planning_problem.h:116
bool use_bwd_msg_
Flag for using backward message initialisation.
Definition: bayesian_ik_solver.h:80
double rhat_old
Task message point of linearisation (last most optimal value)
Definition: bayesian_ik_solver.h:104
void UpdateTaskMessage(const Eigen::Ref< const Eigen::VectorXd > &qhat_t, double tolerance, double max_step_size=-1.)
Updates the task message.
@ SYMMETRIC
Definition: bayesian_ik_solver.h:126
int sweep_
Sweeps so far.
Definition: bayesian_ik_solver.h:120
Eigen::VectorXd v_old
Backward message mean (last most optimal value)
Definition: bayesian_ik_solver.h:100
double damping
Damping.
Definition: bayesian_ik_solver.h:74
Eigen::MatrixXd R
Task message covariance.
Definition: bayesian_ik_solver.h:91
double b_step_
Squared configuration space step.
Definition: bayesian_ik_solver.h:114
Eigen::MatrixXd R_old
Task message covariance (last most optimal value)
Definition: bayesian_ik_solver.h:103
@ LOCAL_GAUSS_NEWTON
Definition: bayesian_ik_solver.h:127
double rhat
Task message point of linearisation.
Definition: bayesian_ik_solver.h:92
Eigen::VectorXd bwd_msg_v_
Backward message initialisation mean.
Definition: bayesian_ik_solver.h:81
Eigen::VectorXd damping_reference_
Damping reference point.
Definition: bayesian_ik_solver.h:110
Eigen::MatrixXd Binv_old
Belief covariance inverse (last most optimal value)
Definition: bayesian_ik_solver.h:106
Eigen::MatrixXd bwd_msg_Vinv_
Backward message initialisation covariance.
Definition: bayesian_ik_solver.h:82
Eigen::VectorXd q_old
Configuration space trajectory (last most optimal value)
Definition: bayesian_ik_solver.h:107
int best_sweep_old_
Definition: bayesian_ik_solver.h:122
void Solve(Eigen::MatrixXd &solution) override
Solves the problem.
double cost_prev_
previous iteration cost
Definition: bayesian_ik_solver.h:113
int update_count_
Definition: bayesian_ik_solver.h:131
void UpdateBwdMessage()
Updates the backward message Updates the mean and covariance of the backward message using: ,...
@ FORWARD
Definition: bayesian_ik_solver.h:125