27 #define STEERING_FILE "etc/steer.dat" 29 #define STEERING_P_GAIN 100.0 30 #define STEERING_D_GAIN 1.0 31 #define WHEEL_P_GAIN 100.0 32 #define WHEEL_D_GAIN 0.5 33 #define WHEEL_REF_VEL 6.28 // [rad/s] 35 #define TIMESTEP 0.002 38 const bool CONTROLLER_BRIDGE_DEBUG =
false;
46 "implementation_id",
"SampleSV",
47 "type_name",
"SampleSV",
48 "description",
"Sample SV component",
51 "category",
"Generic",
52 "activity_type",
"DataFlowComponent",
55 "lang_type",
"compile",
65 m_steerIn(
"steer", m_steer),
66 m_velIn(
"vel", m_vel),
68 m_rangeIn(
"range", m_range),
70 m_torqueOut(
"torque", m_torque),
75 if( CONTROLLER_BRIDGE_DEBUG )
77 std::cout <<
"SampleSV::SampleSV" << std::endl;
100 if( CONTROLLER_BRIDGE_DEBUG )
102 std::cout <<
"onInitialize" << std::endl;
118 m_vel.data.length(2);
148 std::cout <<
"on Activated" << std::endl;
164 std::cout <<
"on Deactivated" << std::endl;
173 if( CONTROLLER_BRIDGE_DEBUG )
175 std::cout <<
"SampleSV::onExecute" << std::endl;
187 std::cout <<
"received range data(" <<
m_range.data.length() <<
")" << std::endl;
247 if (!
steer.is_open())
253 if(
steer.is_open() )
268 RTC::Create<SampleSV>,
269 RTC::Delete<SampleSV>);
png_infop png_charpp int png_charpp profile
SampleSV(RTC::Manager *manager)
DLL_EXPORT void SampleSVInit(RTC::Manager *manager)
virtual RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id)
virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id)
InPort< TimedDoubleSeq > m_steerIn
bool addOutPort(const char *name, OutPortBase &outport)
virtual RTC::ReturnCode_t onInitialize()
OutPort< TimedDoubleSeq > m_torqueOut
ExecutionContextHandle_t UniqueId
virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id)
InPort< TimedFloatSeq > m_rangeIn
virtual bool write(DataType &value)
bool addInPort(const char *name, InPortBase &inport)
static const char * samplepd_spec[]
bool registerFactory(coil::Properties &profile, RtcNewFunc new_func, RtcDeleteFunc delete_func)
InPort< TimedDoubleSeq > m_velIn