template<class _Task, class _State>
ILinearTaskSolver class
ILinearTaskSolver describes the interface for solving problem related to LinearTask class.
Please check IntegrationBasedIK for further details.
Base classes
-
template<class Output>class Source<_State>
- Source is a template specialization of Advanceable and represents a block that does not contains input.
Public types
Constructors, destructors, conversion operators
- ~ILinearTaskSolver() defaulted virtual
- Destructor.
Public functions
-
auto addTask(std::shared_ptr<Task> task,
const std::string& taskName,
std::size_t priority,
std::shared_ptr<const System::
WeightProviderPort> weightProvider = nullptr) -> bool pure virtual - Add a linear task in the solver.
- auto addTask(std::shared_ptr<Task> task, const std::string& taskName, std::size_t priority, Eigen::Ref<const Eigen::VectorXd> weight) -> bool pure virtual
- Add a linear task in the solver.
- auto setTaskWeight(const std::string& taskName, std::shared_ptr<const WeightProviderPort> weightProvider) -> bool pure virtual
- Set the weightProvider associated to an already existing task.
- auto setTaskWeight(const std::string& taskName, Eigen::Ref<const Eigen::VectorXd> weight) -> bool pure virtual
- Set the weight associated to an already existing task.
- auto getTaskWeightProvider(const std::string& taskName) const -> std::weak_ptr<const WeightProviderPort> pure virtual
- Get the weightProvider associated to an already existing task.
- auto getTaskNames() const -> std::vector<std::string> pure virtual
- Get a vector containing the name of the tasks.
-
auto finalize(const System::
VariablesHandler& handler) -> bool pure virtual - Finalize the Solver.
- auto getTask(const std::string& name) const -> std::weak_ptr<Task> pure virtual
- Get a specific task.
- auto toString() const -> std::string pure virtual
- Return the description of the solver problem.
- auto getRawSolution() const -> Eigen::Ref<const Eigen::VectorXd> pure virtual
- Return the vector representing the entire solution of the ILinearTaskSolver.
Function documentation
template<class _Task, class _State>
bool BipedalLocomotion:: System:: ILinearTaskSolver<_Task, _State>:: addTask(std::shared_ptr<Task> task,
const std::string& taskName,
std::size_t priority,
std::shared_ptr<const System:: WeightProviderPort> weightProvider = nullptr) pure virtual
Add a linear task in the solver.
Parameters | |
---|---|
task | pointer to a given linear task |
taskName | unique name associated to the task. |
priority | Priority associated to the task. The lower the number the higher the priority. |
weightProvider | Weight provider associated to the task. This parameter is optional. The default value is an object that does not contain any value. So is an invalid provider. |
Returns | true if the task has been added to the solver. |
template<class _Task, class _State>
bool BipedalLocomotion:: System:: ILinearTaskSolver<_Task, _State>:: addTask(std::shared_ptr<Task> task,
const std::string& taskName,
std::size_t priority,
Eigen::Ref<const Eigen::VectorXd> weight) pure virtual
Add a linear task in the solver.
Parameters | |
---|---|
task | pointer to a given linear task |
taskName | unique name associated to the task. |
priority | Priority associated to the task. The lower the number the higher the priority. |
weight | Weight associated to the task. |
Returns | true if the task has been added to the solver. |
template<class _Task, class _State>
bool BipedalLocomotion:: System:: ILinearTaskSolver<_Task, _State>:: setTaskWeight(const std::string& taskName,
std::shared_ptr<const WeightProviderPort> weightProvider) pure virtual
Set the weightProvider associated to an already existing task.
Parameters | |
---|---|
taskName | name associated to the task |
weightProvider | new weight provider associated to the task. |
Returns | true if the weight has been updated |
template<class _Task, class _State>
bool BipedalLocomotion:: System:: ILinearTaskSolver<_Task, _State>:: setTaskWeight(const std::string& taskName,
Eigen::Ref<const Eigen::VectorXd> weight) pure virtual
Set the weight associated to an already existing task.
Parameters | |
---|---|
taskName | name associated to the task |
weight | new Weight associated to the task. A constant weight is assumed. |
Returns | true if the weight has been updated |
template<class _Task, class _State>
std::weak_ptr<const WeightProviderPort> BipedalLocomotion:: System:: ILinearTaskSolver<_Task, _State>:: getTaskWeightProvider(const std::string& taskName) const pure virtual
Get the weightProvider associated to an already existing task.
Parameters | |
---|---|
taskName | name associated to the task |
Returns | a weak pointer to the weightProvider. If the task does not exist the pointer is not lockable |
template<class _Task, class _State>
std::vector<std::string> BipedalLocomotion:: System:: ILinearTaskSolver<_Task, _State>:: getTaskNames() const pure virtual
Get a vector containing the name of the tasks.
Returns | an std::vector containing all the names associated to the tasks |
---|
template<class _Task, class _State>
bool BipedalLocomotion:: System:: ILinearTaskSolver<_Task, _State>:: finalize(const System:: VariablesHandler& handler) pure virtual
Finalize the Solver.
Parameters | |
---|---|
handler | parameter handler. |
Returns | true in case of success, false otherwise. |
template<class _Task, class _State>
std::weak_ptr<Task> BipedalLocomotion:: System:: ILinearTaskSolver<_Task, _State>:: getTask(const std::string& name) const pure virtual
Get a specific task.
Parameters | |
---|---|
name | name associated to the task. |
Returns | a weak ptr associated to an existing task in the solver. If the task does not exist a nullptr is returned. |
template<class _Task, class _State>
std::string BipedalLocomotion:: System:: ILinearTaskSolver<_Task, _State>:: toString() const pure virtual
Return the description of the solver problem.
Returns | a string containing the description of the solver. |
---|
template<class _Task, class _State>
Eigen::Ref<const Eigen::VectorXd> BipedalLocomotion:: System:: ILinearTaskSolver<_Task, _State>:: getRawSolution() const pure virtual
Return the vector representing the entire solution of the ILinearTaskSolver.
Returns | a vector containing the solution of the solver |
---|