From ba815f3abcd9a4cc3a265aa6495198363ea7bc62 Mon Sep 17 00:00:00 2001 From: Louis-Guillaume DUBOIS Date: Wed, 22 Apr 2015 22:23:26 +0200 Subject: [PATCH] affichage sortie filtre --- hand_control/src/filtre.cpp | 12 ++++++++++++ hand_control/src/random_pcl_publisher.cpp | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/hand_control/src/filtre.cpp b/hand_control/src/filtre.cpp index c7fa069..ec6c88b 100644 --- a/hand_control/src/filtre.cpp +++ b/hand_control/src/filtre.cpp @@ -18,12 +18,24 @@ class Callback { // filtrage double zmax(0.); ros::param::getCached("zmax", zmax); + ROS_INFO("zmax : %f", zmax); z_filtre.setFilterLimits(0.0, zmax); z_filtre.setInputCloud(pcl); z_filtre.filter(*pcl); // publication publisher.publish(pcl); ROS_INFO("PointCloud published"); + ROS_INFO("filtered cloud :"); + for(int i = 0; i < pcl->points.size(); ++i) + { + ROS_INFO("\nx : %f\ny : %f\nz : %f\nr : %d\ng : %d\nb : %d", + pcl->points[i].x, + pcl->points[i].y, + pcl->points[i].z, + pcl->points[i].r, + pcl->points[i].g, + pcl->points[i].b); + } } Callback(ros::Publisher& pub) : publisher(pub), z_filtre() diff --git a/hand_control/src/random_pcl_publisher.cpp b/hand_control/src/random_pcl_publisher.cpp index 88089f7..ffdffa3 100644 --- a/hand_control/src/random_pcl_publisher.cpp +++ b/hand_control/src/random_pcl_publisher.cpp @@ -14,7 +14,7 @@ class Generator public: Generator(int l) : length(l), cgen() { - UGenerator::Parameters params(-100, 100,-1); + UGenerator::Parameters params(0, 900, -1); cgen.setParameters(params); }