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 <boost/circular_buffer.hpp> 31 #include <dynamic-graph/signal-helper.h> 32 #include <sot/core/matrix-geometry.hh> 34 #include <sot/core/stop-watch.hh> 48 DYNAMIC_GRAPH_ENTITY_DECL();
51 DECLARE_SIGNAL_IN(x, dynamicgraph::Vector);
52 DECLARE_SIGNAL_OUT(x_filtered, dynamicgraph::Vector);
53 DECLARE_SIGNAL_OUT(dx, dynamicgraph::Vector);
54 DECLARE_SIGNAL_OUT(ddx, dynamicgraph::Vector);
64 DECLARE_SIGNAL_INNER(x_dx_ddx, dynamicgraph::Vector);
81 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
95 void init(
const double& timestep,
const int& sigSize,
const double& delay,
const int& polyOrder);
98 void sendMsg(
const std::string& msg, MsgType t = MSG_TYPE_INFO,
const char* =
"",
int = 0) {
99 logger_.stream(t) << (
"[" + name +
"] " + msg) <<
'\n';
103 virtual void display(std::ostream& os)
const;
111 #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)