10 #include <rtm/idl/BasicDataType.hh> 11 #include <rtm/idl/ExtendedDataTypes.hh> 12 #include "hrpsys/util/VectorConvert.h" 19 "implementation_id",
"Joystick2Velocity3D",
20 "type_name",
"Joystick2Velocity3D",
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.scalesTranslation",
"1.0,1.0,1.0",
33 "conf.default.scalesRotation",
"1.0,1.0,1.0",
34 "conf.default.rotateModeButton",
"9",
42 m_axesIn(
"axes", m_axes),
43 m_buttonsIn(
"buttons", m_buttons),
44 m_velOut(
"vel", m_vel),
45 m_mirroredVelOut(
"mirroredVel", m_mirroredVel),
93 for (
unsigned int i=0;
i<
m_axes.data.length();
i++){
125 std::cout <<
"Joystick2Velocity3D::onActivated(" << ec_id <<
")" << std::endl;
131 std::cout <<
"Joystick2Velocity3D::onDeactivated(" << ec_id <<
")" << std::endl;
138 std::cout <<
m_profile.instance_name<<
": onExecute(" << ec_id <<
")" 145 bool isPushed =
false;
146 for(
unsigned int i = 0 ;
i <
m_buttons.data.length() ;
i++ )
159 }
else if( !isPushed ){
171 printf(
"velocity command: %5.2f %5.2f %5.2f %5.2f %5.2f %5.2f\n",
225 RTC::Create<Joystick2Velocity3D>,
226 RTC::Delete<Joystick2Velocity3D>);
ComponentProfile m_profile
png_infop png_charpp int png_charpp profile
InPort< TimedFloatSeq > m_axesIn
virtual RTC::ReturnCode_t onInitialize()
~Joystick2Velocity3D()
Destructor.
bool addOutPort(const char *name, OutPortBase &outport)
OutPort< TimedVelocity3D > m_velOut
ExecutionContextHandle_t UniqueId
Joystick2Velocity3D(RTC::Manager *manager)
Constructor.
bool bindParameter(const char *param_name, VarType &var, const char *def_val, bool(*trans)(VarType &, const char *)=coil::stringTo)
virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id)
virtual RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id)
OutPort< TimedVelocity3D > m_mirroredVelOut
std::vector< double > m_scalesRotation
joystick out to velocity converter
void Joystick2Velocity3DInit(RTC::Manager *manager)
std::vector< double > m_scalesTranslation
virtual bool write(DataType &value)
TimedBooleanSeq m_buttons
TimedVelocity3D m_mirroredVel
virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id)
InPort< TimedBooleanSeq > m_buttonsIn
bool addInPort(const char *name, InPortBase &inport)
std::vector< unsigned int > m_axesIds
bool registerFactory(coil::Properties &profile, RtcNewFunc new_func, RtcDeleteFunc delete_func)
static const char * joystick2velocity_spec[]