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

Use std::cout/std::cerr/std::endl instead of just cout/cerr/end… #3327

Merged
Merged
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
14 changes: 7 additions & 7 deletions gpu/features/test/test_fpfh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ TEST(PCL_FeaturesGPU, fpfh_low_level)

source.estimateNormals();
source.findRadiusNeghbors();
cout << "max_radius_nn_size: " << source.max_nn_size << endl;
std::cout << "max_radius_nn_size: " << source.max_nn_size << std::endl;

std::vector<int> data;
source.getNeghborsArray(data);
Expand Down Expand Up @@ -119,7 +119,7 @@ TEST(PCL_FeaturesGPU, fpfh_high_level1)

//source.generateSurface();
//source.generateIndices();
cout << "!indices, !surface" << endl;
std::cout << "!indices, !surface" << std::endl;

PointCloud<Normal>::Ptr& normals = source.normals;

Expand Down Expand Up @@ -197,7 +197,7 @@ TEST(PCL_FeaturesGPU, fpfh_high_level2)

//source.generateSurface();
source.generateIndices();
cout << "indices, !surface" << endl;
std::cout << "indices, !surface" << std::endl;

PointCloud<Normal>::Ptr& normals = source.normals;

Expand Down Expand Up @@ -260,7 +260,7 @@ TEST(PCL_FeaturesGPU, fpfh_high_level2)

//ASSERT_NEAR(gpu.histogram[j], cpu.histogram[j], 0.03f);
}
//cout << i << "->"<< norm_diff/norm << endl;
//std::cout << i << "->"<< norm_diff/norm << std::endl;
if (norm != 0)
ASSERT_EQ(norm_diff/norm < 0.01f/FSize, true);
}
Expand All @@ -274,7 +274,7 @@ TEST(PCL_FeaturesGPU, fpfh_high_level3)

source.generateSurface();
//source.generateIndices();
cout << "!indices, surface" << endl;
std::cout << "!indices, surface" << std::endl;

PointCloud<Normal>::Ptr& normals = source.normals_surface;

Expand Down Expand Up @@ -337,7 +337,7 @@ TEST(PCL_FeaturesGPU, fpfh_high_level3)

//ASSERT_NEAR(gpu.histogram[j], cpu.histogram[j], 0.03f);
}
//cout << i << "->"<< norm_diff/norm << endl;
//std::cout << i << "->"<< norm_diff/norm << std::endl;
if (norm != 0)
ASSERT_EQ(norm_diff/norm < 0.01f/FSize, true);
}
Expand All @@ -352,7 +352,7 @@ TEST(PCL_FeaturesGPU, fpfh_high_level4)

source.generateSurface();
source.generateIndices();
cout << "indices, surface" << endl;
std::cout << "indices, surface" << std::endl;

PointCloud<Normal>::Ptr& normals = source.normals_surface;

Expand Down
38 changes: 19 additions & 19 deletions gpu/features/test/test_normals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ using namespace pcl::gpu;
TEST(PCL_FeaturesGPU, normals_lowlevel)
{
DataSource source;
cout << "Cloud size: " << source.cloud->points.size() << endl;
cout << "Radius: " << source.radius << endl;
cout << "K: " << source.k << endl;
std::cout << "Cloud size: " << source.cloud->points.size() << std::endl;
std::cout << "Radius: " << source.radius << std::endl;
std::cout << "K: " << source.k << std::endl;

//source.runCloudViewer();

Expand Down Expand Up @@ -99,11 +99,11 @@ TEST(PCL_FeaturesGPU, normals_lowlevel)
TEST(PCL_FeaturesGPU, normals_highlevel_1)
{
DataSource source;
cout << "Cloud size: " << source.cloud->points.size() << endl;
cout << "Radius: " << source.radius << endl;
cout << "Max_elems: " << source.max_elements << endl;
std::cout << "Cloud size: " << source.cloud->points.size() << std::endl;
std::cout << "Radius: " << source.radius << std::endl;
std::cout << "Max_elems: " << source.max_elements << std::endl;

cout << "!indices, !surface" << endl;
std::cout << "!indices, !surface" << std::endl;

//source.runCloudViewer();

Expand Down Expand Up @@ -163,11 +163,11 @@ TEST(PCL_FeaturesGPU, normals_highlevel_1)
TEST(PCL_FeaturesGPU, normals_highlevel_2)
{
DataSource source;
cout << "Cloud size: " << source.cloud->points.size() << endl;
cout << "Radius: " << source.radius << endl;
cout << "Max_elems: " << source.max_elements << endl;
std::cout << "Cloud size: " << source.cloud->points.size() << std::endl;
std::cout << "Radius: " << source.radius << std::endl;
std::cout << "Max_elems: " << source.max_elements << std::endl;

cout << "indices, !surface" << endl;
std::cout << "indices, !surface" << std::endl;

//source.runCloudViewer();

Expand Down Expand Up @@ -228,11 +228,11 @@ TEST(PCL_FeaturesGPU, normals_highlevel_2)
TEST(PCL_FeaturesGPU, normals_highlevel_3)
{
DataSource source;
cout << "Cloud size: " << source.cloud->points.size() << endl;
cout << "Radius: " << source.radius << endl;
cout << "Max_elems: " << source.max_elements << endl;
std::cout << "Cloud size: " << source.cloud->points.size() << std::endl;
std::cout << "Radius: " << source.radius << std::endl;
std::cout << "Max_elems: " << source.max_elements << std::endl;

cout << "!indices, surface" << endl;
std::cout << "!indices, surface" << std::endl;

//source.runCloudViewer();

Expand Down Expand Up @@ -302,11 +302,11 @@ TEST(PCL_FeaturesGPU, normals_highlevel_3)
TEST(PCL_FeaturesGPU, normals_highlevel_4)
{
DataSource source;
cout << "Cloud size: " << source.cloud->points.size() << endl;
cout << "Radius: " << source.radius << endl;
cout << "Max_elems: " << source.max_elements << endl;
std::cout << "Cloud size: " << source.cloud->points.size() << std::endl;
std::cout << "Radius: " << source.radius << std::endl;
std::cout << "Max_elems: " << source.max_elements << std::endl;

cout << "indices, surface" << endl;
std::cout << "indices, surface" << std::endl;

//source.runCloudViewer();

Expand Down
12 changes: 6 additions & 6 deletions gpu/features/test/test_pfh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ TEST(PCL_FeaturesGPU, pfh_low_level)

source.estimateNormals();
source.findRadiusNeghbors();
cout << "max_radius_nn_size: " << source.max_nn_size << endl;
std::cout << "max_radius_nn_size: " << source.max_nn_size << std::endl;

std::vector<int> data;
source.getNeghborsArray(data);
Expand Down Expand Up @@ -124,7 +124,7 @@ TEST(PCL_FeaturesGPU, pfh_high_level1)
//source.generateSurface();
//source.generateIndices();

cout << "!indices, !surface" << endl;
std::cout << "!indices, !surface" << std::endl;

PointCloud<Normal>::Ptr& normals = source.normals;

Expand Down Expand Up @@ -202,7 +202,7 @@ TEST(PCL_FeaturesGPU, pfh_high_level2)
//source.generateSurface();
source.generateIndices();

cout << "indices, !surface" << endl;
std::cout << "indices, !surface" << std::endl;

PointCloud<Normal>::Ptr& normals = source.normals;

Expand Down Expand Up @@ -280,7 +280,7 @@ TEST(PCL_FeaturesGPU, pfh_high_level3)
source.generateSurface();
//source.generateIndices();

cout << "!indices, surface" << endl;
std::cout << "!indices, surface" << std::endl;

PointCloud<Normal>::Ptr& normals = source.normals_surface;

Expand Down Expand Up @@ -358,7 +358,7 @@ TEST(PCL_FeaturesGPU, pfh_high_level4)
source.generateSurface();
source.generateIndices();

cout << "indices, surface" << endl;
std::cout << "indices, surface" << std::endl;

PointCloud<Normal>::Ptr& normals = source.normals_surface;

Expand Down Expand Up @@ -436,7 +436,7 @@ TEST(PCL_FeaturesGPU, pfhrgb)
//source.generateSurface();
//source.generateIndices();

cout << "!indices, !surface" << endl;
std::cout << "!indices, !surface" << std::endl;

PointCloud<Normal>::Ptr& normals = source.normals;

Expand Down
4 changes: 2 additions & 2 deletions gpu/kinfu/src/kinfu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ void
pcl::gpu::KinfuTracker::reset()
{
if (global_time_)
cout << "Reset" << endl;
std::cout << "Reset" << std::endl;

global_time_ = 0;
rmats_.clear ();
Expand Down Expand Up @@ -342,7 +342,7 @@ pcl::gpu::KinfuTracker::operator() (const DepthMap& depth_raw,

if (std::abs (det) < 1e-15 || std::isnan (det))
{
if (std::isnan (det)) cout << "qnan" << endl;
if (std::isnan (det)) std::cout << "qnan" << std::endl;

reset ();
return (false);
Expand Down
18 changes: 9 additions & 9 deletions gpu/kinfu/tools/evaluation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const float Evaluation::cy = 239.5f;

struct Evaluation::Impl {};

Evaluation::Evaluation(const std::string&) { cout << "Evaluation requires OpenCV. Please enable it in cmake-file" << endl; exit(0); }
Evaluation::Evaluation(const std::string&) { std::cout << "Evaluation requires OpenCV. Please enable it in cmake-file" << std::endl; exit(0); }
void Evaluation::setMatchFile(const std::string&) { }
bool Evaluation::grab (double stamp, pcl::gpu::PtrStepSz<const RGB>& rgb24) { return false; }
bool Evaluation::grab (double stamp, pcl::gpu::PtrStepSz<const unsigned short>& depth) { return false; }
Expand Down Expand Up @@ -80,7 +80,7 @@ Evaluation::Evaluation(const std::string& folder) : folder_(folder), visualizati
if (folder_[folder_.size() - 1] != '\\' && folder_[folder_.size() - 1] != '/')
folder_.push_back('/');

cout << "Initializing evaluation from folder: " << folder_ << endl;
std::cout << "Initializing evaluation from folder: " << folder_ << std::endl;
string depth_file = folder_ + "depth.txt";
string rgb_file = folder_ + "rgb.txt";

Expand All @@ -94,7 +94,7 @@ void Evaluation::setMatchFile(const std::string& file)
ifstream iff(full.c_str());
if(!iff)
{
cout << "Can't read " << file << endl;
std::cout << "Can't read " << file << std::endl;
exit(1);
}

Expand All @@ -115,7 +115,7 @@ void Evaluation::readFile(const string& file, std::vector< pair<double,string> >
ifstream iff(file.c_str());
if(!iff)
{
cout << "Can't read " << file << endl;
std::cout << "Can't read " << file << std::endl;
exit(1);
}

Expand Down Expand Up @@ -179,7 +179,7 @@ bool Evaluation::grab (double stamp, PtrStepSz<const unsigned short>& depth)

if (d_img.elemSize() != sizeof(unsigned short))
{
cout << "Image was not opend in 16-bit format. Please use OpenCV 2.3.1 or higher" << endl;
std::cout << "Image was not opend in 16-bit format. Please use OpenCV 2.3.1 or higher" << std::endl;
exit(1);
}

Expand All @@ -205,7 +205,7 @@ bool Evaluation::grab (double stamp, PtrStepSz<const unsigned short>& depth, Ptr
{
if (accociations_.empty())
{
cout << "Please set match file" << endl;
std::cout << "Please set match file" << std::endl;
exit(0);
}

Expand All @@ -223,7 +223,7 @@ bool Evaluation::grab (double stamp, PtrStepSz<const unsigned short>& depth, Ptr

if (d_img.elemSize() != sizeof(unsigned short))
{
cout << "Image was not opend in 16-bit format. Please use OpenCV 2.3.1 or higher" << endl;
std::cout << "Image was not opend in 16-bit format. Please use OpenCV 2.3.1 or higher" << std::endl;
exit(1);
}

Expand Down Expand Up @@ -259,7 +259,7 @@ void Evaluation::saveAllPoses(const pcl::gpu::KinfuTracker& kinfu, int frame_num

frame_number = std::min(frame_number, (int)kinfu.getNumberOfPoses());

cout << "Writing " << frame_number << " poses to " << logfile << endl;
std::cout << "Writing " << frame_number << " poses to " << logfile << std::endl;

ofstream path_file_stream(logfile.c_str());
path_file_stream.setf(ios::fixed,ios::floatfield);
Expand All @@ -274,7 +274,7 @@ void Evaluation::saveAllPoses(const pcl::gpu::KinfuTracker& kinfu, int frame_num

path_file_stream << stamp << " ";
path_file_stream << t[0] << " " << t[1] << " " << t[2] << " ";
path_file_stream << q.x() << " " << q.y() << " " << q.z() << " " << q.w() << endl;
path_file_stream << q.x() << " " << q.y() << " " << q.z() << " " << q.w() << std::endl;
}
}

Expand Down
Loading