22 #define TIMESTEP 0.002 24 #define ANGLE_FILE "etc/Sample.pos" 25 #define VEL_FILE "etc/Sample.vel" 26 #define GAIN_FILE "etc/SR_PDgain.dat" 28 #define RARM_SHOULDER_P 6 29 #define RARM_SHOULDER_R 7 31 #define RARM_WRIST_Y 10 32 #define RARM_WRIST_R 12 42 "implementation_id",
"SampleController",
43 "type_name",
"SampleController",
44 "description",
"Sample component",
47 "category",
"Generic",
48 "activity_type",
"DataFlowComponent",
51 "lang_type",
"compile",
61 m_angleIn(
"angle", m_angle),
62 m_rhsensorIn(
"rhsensor", m_rhsensor),
63 m_torqueOut(
"torque", m_torque),
110 for (
int i=0;
i<
DOF;
i++){
114 cout << Pgain[
i] <<
" " << Dgain[
i] <<
" ";
122 cerr <<
GAIN_FILE <<
" not opened" << endl;
135 out.open(
"debug.log");
170 std::cout <<
"on Activated" << std::endl;
181 for(
int i=0;
i <
DOF; ++
i){
192 std::cout <<
"on Deactivated" << std::endl;
220 for (
int i=0;
i<
DOF;
i++){
293 for (
int i=0;
i<
DOF;
i++){
359 if (!
angle.is_open()){
360 std::cerr <<
ANGLE_FILE <<
" not opened" << std::endl;
365 std::cerr <<
VEL_FILE <<
" not opened" << std::endl;
389 RTC::Create<SampleController>,
390 RTC::Delete<SampleController>);
png_infop png_charpp int png_charpp profile
static const char * samplecontroller_spec[]
virtual RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id)
virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id)
InPort< TimedDoubleSeq > m_rhsensorIn
OutPort< TimedDoubleSeq > m_torqueOut
bool addOutPort(const char *name, OutPortBase &outport)
ExecutionContextHandle_t UniqueId
DLL_EXPORT void SampleControllerInit(RTC::Manager *manager)
TimedDoubleSeq m_rhsensor
virtual bool write(DataType &value)
bool addInPort(const char *name, InPortBase &inport)
bool registerFactory(coil::Properties &profile, RtcNewFunc new_func, RtcDeleteFunc delete_func)
virtual RTC::ReturnCode_t onFinalize()
InPort< TimedDoubleSeq > m_angleIn
virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id)
SampleController(RTC::Manager *manager)
virtual RTC::ReturnCode_t onInitialize()