<commit_before>/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 * Copyright Projet JRL-Japan, 2007
 *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 *
 * File:      JointLimitator.h
 * Project:   SOT
 * Author:    <NAME>
 *
 * Version control
 * ===============
 *
 *  $Id$
 *
 * Description
 * ============
 *
 *
 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/


#ifndef __SOT_FEATURE_JOINTLIMITS_HH__
#define __SOT_FEATURE_JOINTLIMITS_HH__

/* --------------------------------------------------------------------- */
/* --- INCLUDE --------------------------------------------------------- */
/* --------------------------------------------------------------------- */

/* Matrix */
#include <MatrixAbstractLayer/boost.h>
namespace ml = maal::boost;

/* SOT */
#include <dynamic-graph/entity.h>
#include <sot-core/exception-task.h>
#include <dynamic-graph/all-signals.h>
#include <sot-core/sot-core-api.h>

/* --------------------------------------------------------------------- */
/* --- CLASS ----------------------------------------------------------- */
/* --------------------------------------------------------------------- */


namespace sot {

namespace dg = dynamicgraph;

/*!
  \class JointLimitator
*/
class SOT_CORE_EXPORT JointLimitator
: public dg::Entity
{

 public: 
  static const std::string CLASS_NAME;
  virtual const std::string& getClassName( void ) const { return CLASS_NAME; }

 protected:
  
  double threshold;
  const static double THRESHOLD_DEFAULT; // = .99;

  /* --- SIGNALS ------------------------------------------------------------ */
 public:

  dg::SignalPtr< ml::Vector,int > jointSIN;
  dg::SignalPtr< ml::Vector,int > upperJlSIN;
  dg::SignalPtr< ml::Vector,int > lowerJlSIN;
  dg::SignalPtr< ml::Vector,int > controlSIN;
  dg::SignalTimeDependent< ml::Vector,int > controlSOUT;
  dg::SignalTimeDependent< ml::Vector,int > widthJlSINTERN;

 public:
  JointLimitator( const std::string& name );
  virtual ~JointLimitator( void ) {}

  virtual ml::Vector& computeControl( ml::Vector& res,int time ); 
  ml::Vector& computeWidthJl( ml::Vector& res,const int& time );<commit_msg>Revert "joint-limitator must use the API of sot-core"<commit_after>/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 * Copyright Projet JRL-Japan, 2007
 *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 *
 * File:      JointLimitator.h
 * Project:   SOT
 * Author:    <NAME>
 *
 * Version control
 * ===============
 *
 *  $Id$
 *
 * Description
 * ============
 *
 *
 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/


#ifndef __SOT_FEATURE_JOINTLIMITS_HH__
#define __SOT_FEATURE_JOINTLIMITS_HH__

/* --------------------------------------------------------------------- */
/* --- INCLUDE --------------------------------------------------------- */
/* --------------------------------------------------------------------- */

/* Matrix */
#include <MatrixAbstractLayer/boost.h>
namespace ml = maal::boost;

/* SOT */
#include <dynamic-graph/entity.h>
#include <sot-core/exception-task.h>
#include <dynamic-graph/all-signals.h>

/* --------------------------------------------------------------------- */
/* --- API ------------------------------------------------------------- */
/* --------------------------------------------------------------------- */

#if defined (WIN32) 
#  if defined (joint_limitator_EXPORTS)
#    define SOTJOINTLIMITATOR_EXPORT __declspec(dllexport)
#  else  
#    define SOTJOINTLIMITATOR_EXPORT __declspec(dllimport)
#  endif 
#else
#  define SOTJOINTLIMITATOR_EXPORT
#endif

/* --------------------------------------------------------------------- */
/* --- CLASS ----------------------------------------------------------- */
/* --------------------------------------------------------------------- */


namespace sot {

namespace dg = dynamicgraph;

/*!
  \class JointLimitator
*/
class SOTJOINTLIMITATOR_EXPORT JointLimitator
: public dg::Entity
{

 public: 
  static const std::string CLASS_NAME;
  virtual const std::string& getClassName( void ) const { return CLASS_NAME; }

 protected:
  
  double threshold;
  const static double THRESHOLD_DEFAULT; // = .99;

  /* --- SIGNALS ------------------------------------------------------------ */
 public:

  dg::SignalPtr< ml::Vector,int > jointSIN;
  dg::SignalPtr< ml::Vector,int > upperJlSIN;
  dg::SignalPtr< ml::Vector,int > lowerJlSIN;
  dg::SignalPtr< ml::Vector,int > controlSIN;
  dg::SignalTimeDependent< ml::Vector,int > controlSOUT;
  dg::SignalTimeDependent< ml::Vector,int > widthJlSINTERN;

 public:
  JointLimitator( const std::string& name );
  virtual ~JointLimitator( void ) {}

  virtual ml::Vector& computeControl( ml::Vector& res,int time ); 
  ml::Vector& computeWidthJl( ml::Vector& res,const int& time );
{'fraction_non_alphanumeric': 0.4212800987857584, 'fraction_numerical': 0.0028812512862728956, 'mean_word_length': 1.6940133037694014, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 26, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4992006', 'n_tokens_mistral': 1375, 'n_tokens_neox': 1260, 'n_words': 242}