12 #if __cplusplus >= 201103L 20 "implementation_id",
"RangeDataViewer",
21 "type_name",
"RangeDataViewer",
22 "description",
"range data viewer component",
23 "version", HRPSYS_PACKAGE_VERSION,
25 "category",
"example",
26 "activity_type",
"DataFlowComponent",
29 "lang_type",
"compile",
31 "conf.default.maxRange",
"2.0",
41 m_rangeIn(
"rangeIn", m_range),
56 std::cout <<
m_profile.instance_name <<
": onInitialize()" << std::endl;
109 std::cout <<
m_profile.instance_name<<
": onActivated(" << ec_id <<
")" << std::endl;
111 cvNamedWindow(
"Range",CV_WINDOW_AUTOSIZE);
117 std::cout <<
m_profile.instance_name<<
": onDeactivated(" << ec_id <<
")" << std::endl;
122 cvDestroyWindow(
"Range");
138 CvScalar
green = cvScalar(0,255,0);
141 std::cout <<
"minAngle:" <<
m_range.config.minAngle << std::endl;
142 std::cout <<
"maxAngle:" <<
m_range.config.maxAngle << std::endl;
143 std::cout <<
"angularRes:" <<
m_range.config.angularRes << std::endl;
144 std::cout <<
"minRange:" <<
m_range.config.minRange << std::endl;
145 std::cout <<
"maxRange:" <<
m_range.config.maxRange << std::endl;
146 std::cout <<
"rangeRes:" <<
m_range.config.rangeRes << std::endl;
147 std::cout <<
"frequency:" <<
m_range.config.frequency << std::endl;
148 std::cout <<
"ndata = " <<
m_range.ranges.length() << std::endl;
150 for (
unsigned int i=0;
i<
m_range.ranges.length();
i++){
152 if (isinf(d))
continue;
156 cvLine(
m_cvImage, center, cvPoint(x, y), green, 1, 8, 0);
210 RTC::Create<RangeDataViewer>,
211 RTC::Delete<RangeDataViewer>);
ComponentProfile m_profile
png_infop png_charpp int png_charpp profile
virtual RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id)
virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id)
coil::Properties & getProperties()
ExecutionContextHandle_t UniqueId
bool bindParameter(const char *param_name, VarType &var, const char *def_val, bool(*trans)(VarType &, const char *)=coil::stringTo)
RangeDataViewer(RTC::Manager *manager)
Constructor.
static const char * cameraimageviewercomponent_spec[]
void RangeDataViewerInit(RTC::Manager *manager)
InPort< RangeData > m_rangeIn
virtual RTC::ReturnCode_t onInitialize()
bool addInPort(const char *name, InPortBase &inport)
bool registerFactory(coil::Properties &profile, RtcNewFunc new_func, RtcDeleteFunc delete_func)
virtual ~RangeDataViewer()
Destructor.
virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id)