ocra-recipes
Doxygen documentation for the ocra-recipes repository
ModelContacts.h
Go to the documentation of this file.
1 
16 #ifndef _OCRACONTROL_ROBOT_CONTACTS_H_
17 #define _OCRACONTROL_ROBOT_CONTACTS_H_
18 
19 #ifdef WIN32
20 # pragma once
21 #endif
22 
24 #include <Eigen/Core>
25 #include <boost/shared_ptr.hpp>
26 
27 namespace ocra
28 {
29  class Model;
30  class Variable;
31  class Feature;
32 }
33 
34 namespace ocra
35 {
53  : public ObserverSubject
54  {
55  public:
56  ModelContacts(Model& model);
58 
59  public:
60  ModelContacts& addContactPoint(Variable& f, const Feature& contactFeature);
62  void removeAllContacts();
63 
65  const Eigen::MatrixXd& getJct() const;
66 
67  int nbContactPoints() const;
68  std::pair<const Variable*, const Feature*> getContactPoint(int index) const;
69  const Variable& getContactForceVariable(int index) const;
70  const Feature& getContactFeature(int index) const;
71 
72  const Model& getModel() const;
73 
74  private:
75  void invalidate(int timestamp = 0);
76 
77  private:
78  struct Pimpl;
79  boost::shared_ptr<Pimpl> pimpl;
80  };
81 }
82 
83 #endif //_OCRACONTROL_ROBOT_CONTACTS_H_
84 
85 // cmake:sourcegroup=Api
std::pair< const Variable *, const Feature * > getContactPoint(int index) const
ModelContacts class.
Definition: ModelContacts.h:52
const Feature & getContactFeature(int index) const
Model class.
Definition: Model.h:38
Feature interface, used by tasks to compute errors and jacobians.
Definition: Feature.h:55
Variable & getContactForcesVariable() const
Optimization-based Robot Controller namespace. a library of classes to write and solve optimization p...
ModelContacts(Model &model)
const Variable & getContactForceVariable(int index) const
This class represents a variable in a mathematical sense.
Definition: Variable.h:105
ModelContacts & addContactPoint(Variable &f, const Feature &contactFeature)
const Eigen::MatrixXd & getJct() const
ModelContacts & removeContactPoint(Variable &f)
int nbContactPoints() const
Declaration file of the Observer, Subject and ObserverSubject classes.
const Model & getModel() const