Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
dynamicgraph::sot::GainHyperbolic Class Reference

Hyperbolic gain. It follows the law

\[ g(e) = a \frac{\tanh(-b(||e|| - d)) + 1}{2} + c \]

The default coefficients are: More...

#include <gain-hyperbolic.hh>

Inheritance diagram for dynamicgraph::sot::GainHyperbolic:
Inheritance graph
[legend]

Public Member Functions

virtual void display (std::ostream &os) const
 
void forceConstant (void)
 
 GainHyperbolic (const std::string &name)
 
 GainHyperbolic (const std::string &name, const double &lambda)
 
 GainHyperbolic (const std::string &name, const double &valueAt0, const double &valueAtInfty, const double &tanAt0, const double &decal0)
 
virtual const std::string & getClassName (void) const
 
void init (void)
 
void init (const double &lambda)
 
void init (const double &valueAt0, const double &valueAtInfty, const double &tanAt0, const double &decal0)
 
- Public Member Functions inherited from dynamicgraph::Entity
std::ostream & displaySignalList (std::ostream &os) const
 
 Entity (const std::string &name)
 
const std::string & getCommandList () const
 
virtual std::string getDocString () const
 
LoggerVerbosity getLoggerVerbosityLevel ()
 
LoggerVerbosity getLoggerVerbosityLevel ()
 
const std::string & getName () const
 
command::CommandgetNewStyleCommand (const std::string &cmdName)
 
CommandMap_t getNewStyleCommandMap ()
 
SignalBase< int > & getSignal (const std::string &signalName)
 
const SignalBase< int > & getSignal (const std::string &signalName) const
 
SignalMap getSignalMap () const
 
double getStreamPrintPeriod ()
 
double getStreamPrintPeriod ()
 
double getTimeSample ()
 
double getTimeSample ()
 
bool hasSignal (const std::string &signame) const
 
Loggerlogger ()
 
Logger const & logger () const
 
Loggerlogger ()
 
Logger const & logger () const
 
void sendMsg (const std::string &msg, MsgType t=MSG_TYPE_INFO, const std::string &lineId="")
 
void sendMsg (const std::string &msg, MsgType t=MSG_TYPE_INFO, const std::string &lineId="")
 
void setLoggerVerbosityLevel (LoggerVerbosity lv)
 
void setLoggerVerbosityLevel (LoggerVerbosity lv)
 
bool setStreamPrintPeriod (double t)
 
bool setStreamPrintPeriod (double t)
 
bool setTimeSample (double t)
 
bool setTimeSample (double t)
 
virtual SignalBase< int > * test ()
 
virtual void test2 (SignalBase< int > *)
 
virtual std::ostream & writeCompletionList (std::ostream &os) const
 
virtual std::ostream & writeGraph (std::ostream &os) const
 
virtual ~Entity ()
 

Public Attributes

dynamicgraph::SignalPtr< dynamicgraph::Vector, int > errorSIN
 
dynamicgraph::SignalTimeDependent< double, int > gainSOUT
 

Static Public Attributes

static const std::string CLASS_NAME
 
static const double INFTY_DEFAULT = .1
 
static const double TAN_DEFAULT = 1
 
static const double ZERO_DEFAULT = .1
 

Protected Member Functions

doublecomputeGain (double &res, int t)
 
- Protected Member Functions inherited from dynamicgraph::Entity
void addCommand (const std::string &name, command::Command *command)
 
void entityDeregistration ()
 
void entityRegistration ()
 
void signalDeregistration (const std::string &name)
 
void signalRegistration (const SignalArray< int > &signals)
 

Protected Attributes

double coeff_a
 
double coeff_b
 
double coeff_c
 
double coeff_d
 
- Protected Attributes inherited from dynamicgraph::Entity
CommandMap_t commandMap
 
Logger logger_
 
std::string name
 
SignalMap signalMap
 

Additional Inherited Members

- Public Types inherited from dynamicgraph::Entity
typedef std::map< const std::string, command::Command *> CommandMap_t
 
typedef std::map< std::string, SignalBase< int > *> SignalMap
 

Detailed Description

Hyperbolic gain. It follows the law

\[ g(e) = a \frac{\tanh(-b(||e|| - d)) + 1}{2} + c \]

The default coefficients are:

Definition at line 53 of file gain-hyperbolic.hh.

Constructor & Destructor Documentation

◆ GainHyperbolic() [1/3]

GainHyperbolic::GainHyperbolic ( const std::string &  name)

Definition at line 41 of file gain-hyperbolic.cpp.

◆ GainHyperbolic() [2/3]

dynamicgraph::sot::GainHyperbolic::GainHyperbolic ( const std::string &  name,
const double lambda 
)

◆ GainHyperbolic() [3/3]

dynamicgraph::sot::GainHyperbolic::GainHyperbolic ( const std::string &  name,
const double valueAt0,
const double valueAtInfty,
const double tanAt0,
const double decal0 
)

Member Function Documentation

◆ computeGain()

double & GainHyperbolic::computeGain ( double res,
int  t 
)
protected

Definition at line 96 of file gain-hyperbolic.cpp.

◆ display()

void GainHyperbolic::display ( std::ostream &  os) const
virtual

Reimplemented from dynamicgraph::Entity.

Definition at line 82 of file gain-hyperbolic.cpp.

◆ forceConstant()

void GainHyperbolic::forceConstant ( void  )

Definition at line 76 of file gain-hyperbolic.cpp.

◆ getClassName()

virtual const std::string& dynamicgraph::sot::GainHyperbolic::getClassName ( void  ) const
inlinevirtual

Reimplemented from dynamicgraph::Entity.

Definition at line 63 of file gain-hyperbolic.hh.

◆ init() [1/3]

void dynamicgraph::sot::GainHyperbolic::init ( void  )
inline

Definition at line 81 of file gain-hyperbolic.hh.

◆ init() [2/3]

void dynamicgraph::sot::GainHyperbolic::init ( const double lambda)
inline

Definition at line 82 of file gain-hyperbolic.hh.

◆ init() [3/3]

void dynamicgraph::sot::GainHyperbolic::init ( const double valueAt0,
const double valueAtInfty,
const double tanAt0,
const double decal0 
)

Set the coefficients.

  • $ a = valueAt0 - valueAtInfty $,
  • $ b = \frac{tanAt0}{2*a} $, or $ b = 0 $ if $ a == 0 $,
  • $ c = valueAtInfty $,
  • $ d = decal0 $.

Member Data Documentation

◆ CLASS_NAME

const std::string dynamicgraph::sot::GainHyperbolic::CLASS_NAME
static

Definition at line 61 of file gain-hyperbolic.hh.

◆ coeff_a

double dynamicgraph::sot::GainHyperbolic::coeff_a
protected

Definition at line 68 of file gain-hyperbolic.hh.

◆ coeff_b

double dynamicgraph::sot::GainHyperbolic::coeff_b
protected

Definition at line 69 of file gain-hyperbolic.hh.

◆ coeff_c

double dynamicgraph::sot::GainHyperbolic::coeff_c
protected

Definition at line 70 of file gain-hyperbolic.hh.

◆ coeff_d

double dynamicgraph::sot::GainHyperbolic::coeff_d
protected

Definition at line 71 of file gain-hyperbolic.hh.

◆ errorSIN

dynamicgraph::SignalPtr<dynamicgraph::Vector, int> dynamicgraph::sot::GainHyperbolic::errorSIN

Definition at line 94 of file gain-hyperbolic.hh.

◆ gainSOUT

dynamicgraph::SignalTimeDependent<double, int> dynamicgraph::sot::GainHyperbolic::gainSOUT

Definition at line 95 of file gain-hyperbolic.hh.

◆ INFTY_DEFAULT

const double GainHyperbolic::INFTY_DEFAULT = .1
static

Definition at line 57 of file gain-hyperbolic.hh.

◆ TAN_DEFAULT

const double GainHyperbolic::TAN_DEFAULT = 1
static

Definition at line 58 of file gain-hyperbolic.hh.

◆ ZERO_DEFAULT

const double GainHyperbolic::ZERO_DEFAULT = .1
static

Definition at line 56 of file gain-hyperbolic.hh.


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


sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Wed Jun 21 2023 02:51:27