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