6 #ifndef __sot_torque_control_NumericalDifference_H__ 7 #define __sot_torque_control_NumericalDifference_H__ 13 #if defined(numerical_difference_EXPORTS) 14 #define SOTNUMERICALDIFFERENCE_EXPORT __declspec(dllexport) 16 #define SOTNUMERICALDIFFERENCE_EXPORT __declspec(dllimport) 19 #define SOTNUMERICALDIFFERENCE_EXPORT 30 #include <dynamic-graph/signal-helper.h> 32 #include <boost/circular_buffer.hpp> 33 #include <sot/core/matrix-geometry.hh> 34 #include <sot/core/stop-watch.hh> 50 :
public ::dynamicgraph::Entity {
51 DYNAMIC_GRAPH_ENTITY_DECL();
54 DECLARE_SIGNAL_IN(x, dynamicgraph::Vector);
55 DECLARE_SIGNAL_OUT(x_filtered, dynamicgraph::Vector);
56 DECLARE_SIGNAL_OUT(dx, dynamicgraph::Vector);
57 DECLARE_SIGNAL_OUT(ddx, dynamicgraph::Vector);
69 DECLARE_SIGNAL_INNER(x_dx_ddx, dynamicgraph::Vector);
86 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
101 void init(
const double& timestep,
const int& sigSize,
const double& delay,
102 const int& polyOrder);
105 void sendMsg(
const std::string& msg, MsgType t = MSG_TYPE_INFO,
106 const char* =
"",
int = 0) {
107 logger_.stream(t) << (
"[" + name +
"] " + msg) <<
'\n';
111 virtual void display(std::ostream& os)
const;
119 #endif // #ifndef __sot_torque_control_NumericalDifference_H__ std::vector< double > m_x_filter_std
1st derivative
#define SOTNUMERICALDIFFERENCE_EXPORT
double m_delay
sampling timestep of the input signal
std::vector< double > m_x_std
filtered output
std::vector< double > m_dx_filter_std
2nd derivative
PolyEstimator * m_filter
x signal
int x_size
delay introduced by the estimation
std::vector< double > m_ddx_filter_std
void sendMsg(const std::string &msg, MsgType t=MSG_TYPE_INFO, const char *="", int=0)