Klamp't  0.8.1
ContactController.h
1 #ifndef CONTACT_CONTROLLER_H
2 #define CONTACT_CONTROLLER_H
3 
4 #include "OperationalSpaceController.h"
5 #include "JointTrackingController.h"
6 #include <KrisLibrary/robotics/TorqueSolver.h>
7 
11 {
12  ContactJointTrackingController(Robot& robot,const SmartPointer<JointTrackingController>& base);
13  void SetGravity(const Vector3& gravity);
14  //contact estimates are given in the LOCAL frame
15  void SetContactEstimate(const ContactFormation& contacts,Real penetrationWeight=100);
16  //uses lowest point on robot to select contacts (standing on a plane)
17  void SetFlatContactEstimate(Real kFriction,Real penetrationWeight=100,Real tol=1e-3);
18  //uses contact sensors to produce the contact estimate
19  void SenseContactEstimate(Real kFriction,Real penetrationWeight=100);
20  //penalizes large torques
21  void SetTorqueRegularization(Real regularizationFactor);
22  void DesiredToAccel(Real dt,const Config& qdes,const Vector& dqdes,Vector& ddqdes);
23 
24  virtual void Update(Real dt);
25  virtual void Reset();
26  virtual bool ReadState(File& f);
27  virtual bool WriteState(File& f) const;
28 
29  SmartPointer<JointTrackingController> base;
30  OperationalSpaceController opSpaceController;
31  Config qdes_last,dqdes_last;
32 };
33 
34 
35 #endif
The main robot type used in RobotSim.
Definition: Robot.h:79
Makes a joint tracking controller &#39;aware&#39; of a contact formation.
Definition: ContactController.h:10
A combination of multiple "tasks" that define a weighted optimization objective for the joint torques...
Definition: OperationalSpaceController.h:90
A base class for a robot controller. The base class does nothing.
Definition: Controller.h:27