Go to the documentation of this file.
25 #define TIMESTEP 0.002
27 #define GAIN_FILE "etc/PDgain.dat"
31 const bool CONTROLLER_BRIDGE_DEBUG =
false;
39 "implementation_id",
"SampleLF",
40 "type_name",
"SampleLF",
41 "description",
"Sample LF component",
44 "category",
"Generic",
45 "activity_type",
"DataFlowComponent",
48 "lang_type",
"compile",
56 :
RTC::DataFlowComponentBase(manager),
58 m_angleIn(
"angle", m_angle),
59 m_torqueInL(
"r_torque_out",m_torqueL),
60 m_torqueInR(
"l_torque_out",m_torqueR),
61 m_torqueOut(
"torque", m_torque),
68 if( CONTROLLER_BRIDGE_DEBUG )
70 std::cout <<
"SampleLF::SampleLF" << std::endl;
96 if( CONTROLLER_BRIDGE_DEBUG )
98 std::cout <<
"onInitialize" << std::endl;
115 for (
int i=0;
i<
DOF;
i++){
121 std::cerr <<
GAIN_FILE <<
" not opened" << std::endl;
156 std::cout <<
"on Activated" << std::endl;
166 for(
int i=0;
i <
DOF; ++
i){
177 std::cout <<
"on Deactivated" << std::endl;
186 if( CONTROLLER_BRIDGE_DEBUG )
188 std::cout <<
"SampleLF::onExecute" << std::endl;
204 double q_ref, dq_ref;
205 double threshold = 30.0;
304 angle1.open(
"etc/LFangle1.dat");
306 std::cerr <<
"etc/LFangle1.dat not opened" << std::endl;
309 angle2.open(
"etc/LFangle2.dat");
311 std::cerr <<
"etc/LFangle2.dat not opened" << std::endl;
314 vel1.open(
"etc/LFvel1.dat");
315 if (!
vel1.is_open()){
316 std::cerr <<
"etc/LFvel1.dat not opened" << std::endl;
319 vel2.open(
"etc/LFvel2.dat");
320 if (!
vel2.is_open()){
321 std::cerr <<
"etc/LFvel2.dat not opened" << std::endl;
335 if(
vel1.is_open() ){
339 if(
vel2.is_open() ){
353 manager->registerFactory(
profile,
354 RTC::Create<SampleLF>,
355 RTC::Delete<SampleLF>);
static const char * samplepd_spec[]
OutPort< TimedDoubleSeq > m_torqueOut
InPort< TimedDoubleSeq > m_torqueInR
virtual RTC::ReturnCode_t onInitialize()
std::vector< double > qold
virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id)
InPort< TimedDoubleSeq > m_torqueInL
DLL_EXPORT void SampleLFInit(RTC::Manager *manager)
png_infop png_charpp int png_charpp profile
std::vector< double > qref_old
InPort< TimedDoubleSeq > m_angleIn
virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id)
SampleLF(RTC::Manager *manager)
virtual RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id)
openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Wed Sep 7 2022 02:51:04