Go to the documentation of this file.
56 W = Eigen::MatrixXd::Identity(
N,
N);
57 if (
init.W.rows() > 0)
59 if (
init.W.rows() ==
N)
61 W.diagonal() =
init.W;
65 ThrowNamed(
"W dimension mismatch! Expected " <<
N <<
", got " <<
init.W.rows());
71 if (
init.NominalState.rows() > 0 &&
init.NominalState.rows() !=
N)
ThrowNamed(
"Invalid size of NominalState (" <<
init.NominalState.rows() <<
"), expected: " <<
N);
82 for (
int i = 0; i <
tasks_.size(); ++i)
tasks_[i]->is_used =
false;
98 Eigen::MatrixXd general_cost_hessian = Eigen::MatrixXd::Zero(
N,
N);
106 general_cost_hessian.noalias() += ydiffTS(i) *
cost.
hessian(i);
111 std::cerr <<
"[UnconstrainedEndPoseProblem::GetHessian] Hessian requested but DerivativeOrder < 2" << std::endl;
114 return 2. * general_cost_hessian;
120 return ydiff.transpose() *
GetRho(task_name) * ydiff;
130 for (
int i = 0; i <
tasks_.size(); ++i)
173 if (
cost.
tasks[i]->GetObjectName() == task_name)
180 ThrowPretty(
"Cannot set Goal. Task map '" << task_name <<
"' does not exist.");
187 if (
cost.
tasks[i]->GetObjectName() == task_name)
194 ThrowPretty(
"Cannot set rho. Task map '" << task_name <<
"' does not exist.");
201 if (
cost.
tasks[i]->GetObjectName() == task_name)
206 ThrowPretty(
"Cannot get Goal. Task map '" << task_name <<
"' does not exist.");
213 if (
cost.
tasks[i]->GetObjectName() == task_name)
218 ThrowPretty(
"Cannot get rho. Task map '" << task_name <<
"' does not exist.");
228 if (qNominal_in.rows() ==
N)
231 ThrowPretty(
"Cannot set q_nominal - wrong number of rows (expected "
232 <<
N <<
", received " << qNominal_in.rows() <<
").");
239 if (
cost.
tasks[i]->GetObjectName() == task_name)
244 ThrowPretty(
"Cannot get task. Task map '" << task_name <<
"' does not exist.");
unsigned int number_of_problem_updates_
void SetNominalPose(Eigen::VectorXdRefConst qNominal_in)
void Update(const TaskSpaceVector &big_Phi, Eigen::MatrixXdRefConst big_jacobian, HessianRefConst big_hessian)
void AppendVector(std::vector< Val > &orig, const std::vector< Val > &extra)
void PreUpdate() override
KinematicRequestFlags flags_
void Update(Eigen::VectorXdRefConst x)
void SetGoal(const std::string &task_name, Eigen::VectorXdRefConst goal)
Eigen::RowVectorXd GetScalarJacobian() const
virtual ~UnconstrainedEndPoseProblem()
virtual void Initialize(const std::vector< exotica::Initializer > &inits, std::shared_ptr< PlanningProblem > prob, TaskSpaceVector &Phi)
double GetScalarCost() const
const typedef Eigen::Ref< const Eigen::VectorXd > & VectorXdRefConst
Convenience wrapper for storing references to sub-matrices/vectors.
#define REGISTER_PROBLEM_TYPE(TYPE, DERIV)
Eigen::VectorXd q_nominal
Eigen::VectorXd GetTaskError(const std::string &task_name) const
Eigen::Ref< Eigen::MatrixXd > MatrixXdRef
std::vector< TaskVectorEntry > map
Eigen::VectorXd GetNominalPose() const
std::vector< TaskIndexing > indexing
int GetTaskId(const std::string &task_name) const
void Instantiate(const UnconstrainedEndPoseProblemInitializer &init) override
UnconstrainedEndPoseProblem()
Eigen::VectorXd GetGoal(const std::string &task_name) const
virtual Eigen::VectorXd ApplyStartState(bool update_traj=true)
void init(const M_string &remappings)
Eigen::MatrixXd GetHessian() const
double GetRho(const std::string &task_name) const
double GetScalarTaskCost(const std::string &task_name) const
GetScalarTaskCost get weighted sum-of-squares of cost vector.
void SetZero(const int n)
void SetRho(const std::string &task_name, const double &rho)
exotica_core
Author(s): Yiming Yang, Michael Camilleri
autogenerated on Fri Aug 2 2024 08:43:02