ORCA: Optimization-based framework for Robotic Control Applications
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
orca::task::RegularisationTask< C > Class Template Reference

#include <RegularisationTask.h>

+ Inheritance diagram for orca::task::RegularisationTask< C >:
+ Collaboration diagram for orca::task::RegularisationTask< C >:

Public Types

using Ptr = std::shared_ptr< RegularisationTask< C > >
 
- Public Types inherited from orca::task::GenericTask
using Ptr = std::shared_ptr< GenericTask >
 
- Public Types inherited from orca::common::TaskBase
enum  State {
  Init = 0, Resized, Activating, Activated,
  Deactivating, Deactivated, Error
}
 Represents the internal state of the task. More...
 
using Ptr = std::shared_ptr< TaskBase >
 
- Public Types inherited from orca::common::ConfigurableOrcaObject
using Ptr = std::shared_ptr< ConfigurableOrcaObject >
 
using ParamMap = std::map< std::string, ParameterBase * >
 

Public Member Functions

 RegularisationTask (const std::string &name)
 
- Public Member Functions inherited from orca::task::GenericTask
 GenericTask (const std::string &name, optim::ControlVariable control_var)
 
virtual ~GenericTask ()
 
double getWeight () const
 
void setWeight (double weight)
 
math::Size getSize () const
 
int cols () const
 
int rows () const
 
math::WeightedEuclidianNormFunctioneuclidianNorm ()
 
const math::WeightedEuclidianNormFunctiongetEuclidianNorm () const
 
const Eigen::MatrixXd & getE () const
 
const Eigen::VectorXd & getf () const
 
void setE (const Eigen::MatrixXd &newE)
 
void setf (const Eigen::VectorXd &newf)
 
virtual void print () const
 
const math::WeightedEuclidianNormFunction::QuadraticCostgetQuadraticCost () const
 
Eigen::MatrixXd & E ()
 
Eigen::VectorXd & f ()
 
virtual bool rampUp (double time_since_start)
 
virtual bool rampDown (double time_since_stop)
 
- Public Member Functions inherited from orca::common::TaskBase
 TaskBase (const std::string &name, optim::ControlVariable control_var)
 
virtual ~TaskBase ()
 
bool isActivated () const
 
bool isComputing () const
 
bool setRobotModel (robot::RobotModel::Ptr robot)
 
optim::ControlVariable getControlVariable () const
 
virtual bool activate ()
 
virtual void update (double current_time, double dt)
 
virtual bool deactivate ()
 
virtual bool setProblem (std::shared_ptr< const orca::optim::Problem > problem)
 
bool hasProblem () const
 
bool hasRobot () const
 
bool dependsOnProblem () const
 
bool dependsOnWrench () const
 
bool dependsOnRobotJoints () const
 
bool dependsOnFloatingBase () const
 
bool hasWrench () const
 
bool isRobotInitialized () const
 
State getState () const
 
void setRampDuration (double ramp_time)
 
double getRampDuration () const
 
double getCurrentRampValue () const
 
double getStartTime () const
 
double getStopTime () const
 
std::shared_ptr< const optim::ProblemgetProblem () const
 
std::shared_ptr< const common::WrenchgetWrench () const
 
std::shared_ptr< const robot::RobotModelgetRobot () const
 
void addChild (TaskBase::Ptr e)
 Add a child/slave task that will be updated BEFORE the parent task. More...
 
bool hasParent () const
 Returns true if the task owned by a parent task. More...
 
bool hasChildren () const
 Returns true if the task has children. More...
 
const std::string & getParentName () const
 Returns the parent name if it exists, empty otherwise. More...
 
const std::string & getPrintableName () const
 Returns the name that include parent name if present. More...
 
void onResizedCallback (std::function< void(void)> cb)
 
void onActivationCallback (std::function< void(void)> cb)
 
void onActivatedCallback (std::function< void(void)> cb)
 
void onComputeBeginCallback (std::function< void(double, double)> cb)
 
void onComputeEndCallback (std::function< void(double, double)> cb)
 
void onDeactivationCallback (std::function< void(void)> cb)
 
void onDeactivatedCallback (std::function< void(void)> cb)
 
- Public Member Functions inherited from orca::common::ConfigurableOrcaObject
 ConfigurableOrcaObject (const std::string &config_name)
 
virtual ~ConfigurableOrcaObject ()
 
template<class T >
void addParameter (const std::string &param_name, Parameter< T > *param, ParamPolicy policy=ParamPolicy::Required, std::function< void()> on_loading_success=0)
 Returns true if all params added with have been set. More...
 
template<class T >
void addParameter (const std::string &param_name, T &param, ParamPolicy policy=ParamPolicy::Required, std::function< void()> on_loading_success=0)
 
ParameterBasegetParameter (const std::string &param_name)
 Returns a param via its name. More...
 
void printParameters () const
 Print all parameters to std::cout. More...
 
bool configureFromFile (const std::string &yaml_url)
 Configure the task from YAML/JSON file. It must contain all the required parameters. More...
 
bool configureFromString (const std::string &yaml_str)
 Configure the task from YAML/JSON string. It must contain all the required parameters. More...
 
bool isConfigured () const
 
const ParamMapgetParameters () const
 
void onConfigureSuccess (std::function< void()> f)
 
- Public Member Functions inherited from orca::common::OrcaObject
 OrcaObject (const std::string &name)
 
virtual ~OrcaObject ()
 
const std::string & getName () const
 
void setName (const std::string &name)
 

Public Attributes

const double DefaultWeight = 1.e-4
 
- Public Attributes inherited from orca::common::TaskBase
orca::common::MutexRecursive mutex
 The recursive mutex that is locked during the update function. It is up to the external user to lock this mutex to protect the task attributes. More...
 

Protected Member Functions

void onActivation ()
 
void onUpdateAffineFunction (double current_time, double dt)
 
void onDeactivation ()
 
void onResize ()
 
- Protected Member Functions inherited from orca::common::TaskBase
virtual void resize ()
 
robot::RobotModel::Ptr robot ()
 
std::shared_ptr< Wrenchwrench ()
 
virtual void onResized ()
 
virtual void onActivated ()
 
void setRampValue (double new_val)
 
virtual void onDeactivated ()
 

Member Typedef Documentation

template<optim::ControlVariable C>
using orca::task::RegularisationTask< C >::Ptr = std::shared_ptr<RegularisationTask<C> >

Constructor & Destructor Documentation

template<optim::ControlVariable C>
orca::task::RegularisationTask< C >::RegularisationTask ( const std::string &  name)
inline

Member Function Documentation

template<optim::ControlVariable C>
void orca::task::RegularisationTask< C >::onActivation ( )
inlineprotectedvirtual

Reimplemented from orca::common::TaskBase.

template<optim::ControlVariable C>
void orca::task::RegularisationTask< C >::onDeactivation ( )
inlineprotectedvirtual

Reimplemented from orca::task::GenericTask.

template<optim::ControlVariable C>
void orca::task::RegularisationTask< C >::onResize ( )
inlineprotectedvirtual
template<optim::ControlVariable C>
void orca::task::RegularisationTask< C >::onUpdateAffineFunction ( double  current_time,
double  dt 
)
inlineprotectedvirtual

Member Data Documentation

template<optim::ControlVariable C>
const double orca::task::RegularisationTask< C >::DefaultWeight = 1.e-4

The documentation for this class was generated from the following file: