TorqueFilter.h
Go to the documentation of this file.
1 // -*- C++ -*-
10 #ifndef TORQUE_FILTER_H
11 #define TORQUE_FILTER_H
12 
13 #include <rtm/idl/BasicDataType.hh>
14 #include <rtm/Manager.h>
15 #include <rtm/DataFlowComponentBase.h>
16 #include <rtm/CorbaPort.h>
17 #include <rtm/DataInPort.h>
18 #include <rtm/DataOutPort.h>
19 #include <rtm/idl/BasicDataTypeSkel.h>
20 
21 #include <hrpModel/Body.h>
22 #include <hrpModel/Link.h>
23 #include <hrpModel/JointPath.h>
24 
25 // Service implementation headers
26 // <rtc-template block="service_impl_h">
27 // #include "TorqueFilter_impl.h"
28 
29 #include "IIRFilter.h"
30 
31 // </rtc-template>
32 
33 // Service Consumer stub headers
34 // <rtc-template block="consumer_stub_h">
35 
36 // </rtc-template>
37 
38 using namespace RTC;
39 
45 {
46  public:
55  virtual ~TorqueFilter();
56 
57  // The initialize action (on CREATED->ALIVE transition)
58  // formaer rtc_init_entry()
59  virtual RTC::ReturnCode_t onInitialize();
60 
61  // The finalize action (on ALIVE->END transition)
62  // formaer rtc_exiting_entry()
63  // virtual RTC::ReturnCode_t onFinalize();
64 
65  // The startup action when ExecutionContext startup
66  // former rtc_starting_entry()
67  // virtual RTC::ReturnCode_t onStartup(RTC::UniqueId ec_id);
68 
69  // The shutdown action when ExecutionContext stop
70  // former rtc_stopping_entry()
71  // virtual RTC::ReturnCode_t onShutdown(RTC::UniqueId ec_id);
72 
73  // The activated action (Active state entry action)
74  // former rtc_active_entry()
75  virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id);
76 
77  // The deactivated action (Active state exit action)
78  // former rtc_active_exit()
79  virtual RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id);
80 
81  // The execution action that is invoked periodically
82  // former rtc_active_do()
83  virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id);
84 
85  // The aborting action when main logic error occurred.
86  // former rtc_aborting_entry()
87  // virtual RTC::ReturnCode_t onAborting(RTC::UniqueId ec_id);
88 
89  // The error action in ERROR state
90  // former rtc_error_do()
91  // virtual RTC::ReturnCode_t onError(RTC::UniqueId ec_id);
92 
93  // The reset action that is invoked resetting
94  // This is same but different the former rtc_init_entry()
95  // virtual RTC::ReturnCode_t onReset(RTC::UniqueId ec_id);
96 
97  // The state update action that is invoked after onExecute() action
98  // no corresponding operation exists in OpenRTm-aist-0.2.0
99  // virtual RTC::ReturnCode_t onStateUpdate(RTC::UniqueId ec_id);
100 
101  // The action that is invoked when execution context's rate is changed
102  // no corresponding operation exists in OpenRTm-aist-0.2.0
103  // virtual RTC::ReturnCode_t onRateChanged(RTC::UniqueId ec_id);
104 
105 
106  protected:
107  // Configuration variable declaration
108  // <rtc-template block="config_declare">
109 
110  // </rtc-template>
111  TimedDoubleSeq m_qCurrent;
112  TimedDoubleSeq m_tauIn;
113  TimedDoubleSeq m_tauOut;
114 
115  // DataInPort declaration
116  // <rtc-template block="inport_declare">
119 
120  // </rtc-template>
121 
122  // DataOutPort declaration
123  // <rtc-template block="outport_declare">
125 
126  // </rtc-template>
127 
128  // CORBA Port declaration
129  // <rtc-template block="corbaport_declare">
130 
131  // </rtc-template>
132 
133  // Service declaration
134  // <rtc-template block="service_declare">
135  //RTC::CorbaPort m_TorqueFilterServicePort;
136 
137  // </rtc-template>
138 
139  // Consumer declaration
140  // <rtc-template block="consumer_declare">
141  //TorqueFilterService_impl m_TorqueFilterService;
142 
143  // </rtc-template>
144 
145  private:
146 
147  double m_dt;
149  unsigned int m_debugLevel;
150  std::vector<double> m_torque_offset;
151  std::vector<IIRFilter> m_filters;
153 };
154 
155 
156 extern "C"
157 {
159 };
160 
161 #endif // TORQUE_FILTER_H
ec_id
bool m_is_gravity_compensation
Definition: TorqueFilter.h:152
TimedDoubleSeq m_tauOut
Definition: TorqueFilter.h:113
InPort< TimedDoubleSeq > m_tauInIn
Definition: TorqueFilter.h:118
manager
hrp::BodyPtr m_robot
Definition: TorqueFilter.h:148
sample RT component which has one data input port and one data output port
Definition: TorqueFilter.h:43
ExecutionContextHandle_t UniqueId
std::vector< IIRFilter > m_filters
Definition: TorqueFilter.h:151
InPort< TimedDoubleSeq > m_qCurrentIn
Definition: TorqueFilter.h:117
OutPort< TimedDoubleSeq > m_tauOutOut
Definition: TorqueFilter.h:124
unsigned int m_debugLevel
Definition: TorqueFilter.h:149
std::vector< double > m_torque_offset
Definition: TorqueFilter.h:150
TimedDoubleSeq m_tauIn
Definition: TorqueFilter.h:112
void TorqueFilterInit(RTC::Manager *manager)
TimedDoubleSeq m_qCurrent
Definition: TorqueFilter.h:111


hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Thu May 6 2021 02:41:51