10 #include <rtm/idl/BasicDataType.hh> 11 #include <rtm/idl/ExtendedDataTypes.hh> 12 #include "hrpsys/util/VectorConvert.h" 19 "implementation_id",
"Joystick2Velocity2D",
20 "type_name",
"Joystick2Velocity2D",
21 "description",
"joystick output to velocity converter",
22 "version", HRPSYS_PACKAGE_VERSION,
24 "category",
"example",
25 "activity_type",
"DataFlowComponent",
28 "lang_type",
"compile",
30 "conf.default.debugLevel",
"0",
31 "conf.default.axesIds",
"0,1,2",
32 "conf.default.scales",
"1.0,1.0,1.0",
33 "conf.default.neutrals",
"0.0,0.0,0.0",
41 m_axesIn(
"axes", m_axes),
42 m_velOut(
"vel", m_vel),
83 for (
unsigned int i=0;
i<
m_axes.data.length();
i++){
126 std::cout <<
m_profile.instance_name<<
": onExecute(" << ec_id <<
")" 136 printf(
"velocity command: %5.2f %5.2f %5.2f",
188 RTC::Create<Joystick2Velocity2D>,
189 RTC::Delete<Joystick2Velocity2D>);
ComponentProfile m_profile
png_infop png_charpp int png_charpp profile
InPort< TimedFloatSeq > m_axesIn
joystick out to velocity converter
std::vector< unsigned int > m_axesIds
~Joystick2Velocity2D()
Destructor.
std::vector< double > m_neutrals
bool addOutPort(const char *name, OutPortBase &outport)
static const char * joystick2velocity_spec[]
Joystick2Velocity2D(RTC::Manager *manager)
Constructor.
ExecutionContextHandle_t UniqueId
bool bindParameter(const char *param_name, VarType &var, const char *def_val, bool(*trans)(VarType &, const char *)=coil::stringTo)
std::vector< double > m_scales
void Joystick2Velocity2DInit(RTC::Manager *manager)
OutPort< TimedVelocity2D > m_velOut
virtual RTC::ReturnCode_t onInitialize()
virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id)
virtual bool write(DataType &value)
virtual RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id)
bool addInPort(const char *name, InPortBase &inport)
bool registerFactory(coil::Properties &profile, RtcNewFunc new_func, RtcDeleteFunc delete_func)
virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id)