~ubuntu-branches/ubuntu/trusty/yade/trusty

« back to all changes in this revision

Viewing changes to pkg/common/KinematicEngines.hpp

  • Committer: Package Import Robot
  • Author(s): Anton Gladky, cf3f8d9
  • Date: 2013-10-30 20:56:33 UTC
  • mfrom: (20.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20131030205633-1f01r7hjce17d723
Tags: 1.05.0-2
[cf3f8d9] Pass -ftrack-macro-expansion=0 only if gcc>=4.8. (Closes: #726009)

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
};
94
94
REGISTER_SERIALIZABLE(HarmonicRotationEngine);
95
95
 
 
96
struct ServoPIDController: public TranslationEngine{
 
97
  virtual void apply(const vector<Body::id_t>& ids);
 
98
  YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(ServoPIDController,TranslationEngine,"PIDController servo-engine for applying prescribed force on bodies. http://en.wikipedia.org/wiki/PID_controller",
 
99
    ((Real,maxVelocity,0.0,,"Velocity [m/s]"))
 
100
    ((Vector3r,axis,Vector3r::Zero(),,"Unit vector along which apply the velocity [-]"))
 
101
    ((Real,target,0.0,,"Target value for the controller [N]"))
 
102
    ((Real,kP,0.0,,"Proportional gain/coefficient for the PID-controller [-]"))
 
103
    ((Real,kI,0.0,,"Integral gain/coefficient for the PID-controller [-]"))
 
104
    ((Real,kD,0.0,,"Derivative gain/coefficient for the PID-controller [-]"))
 
105
    ((Real,iTerm,0.0,,"Integral term [N]"))
 
106
    ((Real,curVel,0.0,,"Current applied velocity [m/s]"))
 
107
    ((Real,errorCur,0.0,,"Current error [N]"))
 
108
    ((Real,errorPrev,0.0,,"Previous error [N]"))
 
109
    ((long,iterPeriod,100.0,,"Periodicity criterion of velocity correlation [-]"))
 
110
    ((long,iterPrevStart,-1.0,,"Previous iteration of velocity correlation [-]"))
 
111
    /* attrs*/, 
 
112
    /* ctor */, 
 
113
    /* py */
 
114
  )
 
115
  DECLARE_LOGGER;
 
116
};
 
117
REGISTER_SERIALIZABLE(ServoPIDController);