Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable to compile with OpenRTM-1.2.2 #1299

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions idl/HRPDataTypes.idl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module OpenHRP
struct SceneState
{
double time;
RTC::Time tm;
RobotStateSeq states;
};

Expand Down
6 changes: 6 additions & 0 deletions idl/Img.idl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ struct ImageData
sequence<octet> raw_data;
};

struct TimedImageData
{
RTC::Time tm;
ImageData data;
};


/* camera image */
struct CameraIntrinsicParameter
Expand Down
6 changes: 6 additions & 0 deletions idl/PCDLoaderService.idl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ module OpenHRP
};

typedef sequence<PCDOffset> PCDOffsetSeq;

struct TimedPCDOffsetSeq
{
RTC::Time tm;
PCDOffsetSeq data;
};

interface PCDLoaderService
{
Expand Down
8 changes: 5 additions & 3 deletions rtc/ImageData2CameraImage/ImageData2CameraImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ static const char* imagedata2cameraimage_spec[] =
ImageData2CameraImage::ImageData2CameraImage(RTC::Manager* manager)
: RTC::DataFlowComponentBase(manager),
// <rtc-template block="initializer">
m_dataIn("imageIn", m_data.data.image),
m_dataOut("imageOut", m_data),
m_dataIn("imageIn", m_tid),
m_dataOut("imageOut", m_tci),
// </rtc-template>
dummy(0)
{
Expand Down Expand Up @@ -68,7 +68,7 @@ RTC::ReturnCode_t ImageData2CameraImage::onInitialize()
// Set CORBA Service Ports

// </rtc-template>
m_data.error_code = 0;
m_tci.error_code = 0;

return RTC::RTC_OK;
}
Expand Down Expand Up @@ -112,6 +112,8 @@ RTC::ReturnCode_t ImageData2CameraImage::onExecute(RTC::UniqueId ec_id)
{
if (m_dataIn.isNew()){
m_dataIn.read();
m_tci.tm = m_tid.tm;
m_tci.data.image = m_tid.data;
m_dataOut.write();
}
return RTC::RTC_OK;
Expand Down
5 changes: 3 additions & 2 deletions rtc/ImageData2CameraImage/ImageData2CameraImage.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,12 @@ class ImageData2CameraImage

// </rtc-template>

Img::TimedCameraImage m_data;
Img::TimedImageData m_tid;
Img::TimedCameraImage m_tci;

// DataInPort declaration
// <rtc-template block="inport_declare">
InPort<Img::ImageData> m_dataIn;
InPort<Img::TimedImageData> m_dataIn;

// </rtc-template>

Expand Down
8 changes: 4 additions & 4 deletions rtc/PCDLoader/PCDLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ void PCDLoader::setCloudXYZRGB(PointCloudTypes::PointCloud& cloud, const pcl::Po
void PCDLoader::updateOffsetToCloudXYZ(void)
{
pcl::PointCloud<pcl::PointXYZ>::Ptr clouds(new pcl::PointCloud<pcl::PointXYZ>);
for (unsigned int i=0; i<m_offset.length(); i++){
const OpenHRP::PCDOffset& offset = m_offset[i];
for (unsigned int i=0; i<m_offset.data.length(); i++){
const OpenHRP::PCDOffset& offset = m_offset.data[i];
const std::string label(offset.label);
if( m_clouds_xyz.find(label) != m_clouds_xyz.end() ){
const hrp::Vector3 center(offset.center.x, offset.center.y, offset.center.z);
Expand Down Expand Up @@ -211,8 +211,8 @@ void PCDLoader::updateOffsetToCloudXYZ(void)
void PCDLoader::updateOffsetToCloudXYZRGB(void)
{
pcl::PointCloud<pcl::PointXYZRGB>::Ptr clouds(new pcl::PointCloud<pcl::PointXYZRGB>);
for (unsigned int i=0; i<m_offset.length(); i++){
const OpenHRP::PCDOffset& offset = m_offset[i];
for (unsigned int i=0; i<m_offset.data.length(); i++){
const OpenHRP::PCDOffset& offset = m_offset.data[i];
const std::string label(offset.label);
if( m_clouds_xyzrgb.find(label) != m_clouds_xyzrgb.end() ){
const hrp::Vector3 center(offset.center.x, offset.center.y, offset.center.z);
Expand Down
4 changes: 2 additions & 2 deletions rtc/PCDLoader/PCDLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@ class PCDLoader
// </rtc-template>

PointCloudTypes::PointCloud m_cloud;
OpenHRP::PCDOffsetSeq m_offset;
OpenHRP::TimedPCDOffsetSeq m_offset;
RTC::TimedBoolean m_isOutput;

// DataInPort declaration
// <rtc-template block="inport_declare">

InPort<OpenHRP::PCDOffsetSeq> m_offsetIn;
InPort<OpenHRP::TimedPCDOffsetSeq> m_offsetIn;

// </rtc-template>

Expand Down