18 "implementation_id",
"Range2PointCloud",
19 "type_name",
"Range2PointCloud",
20 "description",
"range2pointcloud component",
21 "version", HRPSYS_PACKAGE_VERSION,
23 "category",
"example",
24 "activity_type",
"DataFlowComponent",
27 "lang_type",
"compile",
37 m_rangeIn(
"range", m_range),
38 m_cloudOut(
"cloud", m_cloud),
52 std::cout <<
m_profile.instance_name <<
": onInitialize()" << std::endl;
81 m_cloud.fields[0].data_type = PointCloudTypes::FLOAT32;
85 m_cloud.fields[1].data_type = PointCloudTypes::FLOAT32;
89 m_cloud.fields[2].data_type = PointCloudTypes::FLOAT32;
123 std::cout <<
m_profile.instance_name<<
": onActivated(" << ec_id <<
")" << std::endl;
129 std::cout <<
m_profile.instance_name<<
": onDeactivated(" << ec_id <<
")" << std::endl;
148 float *
ptr = (
float *)
m_cloud.data.get_buffer() + npoint*4;
149 Pose3D &pose =
m_range.geometry.geometry.pose;
156 for (
unsigned int i=0;
i<
m_range.ranges.length();
i++){
160 relP << -d*sin(th), 0, -d*cos(th);
161 absP = sensorP + sensorR*relP;
171 std::cout <<
"Range2PointCloud: processed " << nlines <<
" lines, " 172 << npoint <<
" points" << std::endl;
225 RTC::Create<Range2PointCloud>,
226 RTC::Delete<Range2PointCloud>);
ComponentProfile m_profile
png_infop png_charpp int png_charpp profile
void Range2PointCloudInit(RTC::Manager *manager)
PointCloudTypes::PointCloud m_cloud
virtual RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id)
coil::Properties & getProperties()
OutPort< PointCloudTypes::PointCloud > m_cloudOut
bool addOutPort(const char *name, OutPortBase &outport)
virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id)
Matrix33 rotFromRpy(const Vector3 &rpy)
range2pointcloud component
virtual ~Range2PointCloud()
Destructor.
static const char * range2pointcloud_spec[]
ExecutionContextHandle_t UniqueId
InPort< RangeData > m_rangeIn
virtual bool write(DataType &value)
bool addInPort(const char *name, InPortBase &inport)
Range2PointCloud(RTC::Manager *manager)
Constructor.
bool registerFactory(coil::Properties &profile, RtcNewFunc new_func, RtcDeleteFunc delete_func)
virtual RTC::ReturnCode_t onInitialize()
virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id)