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

Removing ROS #110

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a90f1f4
First pass at removing ros
Jun 2, 2013
8274492
Took out all USE_ROS references
Jun 2, 2013
a466b47
Removed FindROS call
Jun 2, 2013
9147f60
Took out add_ros_links macro
Jun 2, 2013
3128338
Added missing cloud_composer fix
Jun 2, 2013
52d17f5
Add PointXYZRGBNormal to PCL_ONLY_CORE_POINT_TYPES
jspricke Jun 23, 2013
781430b
Don't run the Brisk unit test when there is no SSE4.1 available
jspricke Jun 23, 2013
856c2f2
Simplify Travis build script
jspricke Jun 23, 2013
abc1e79
Added 3rd party library linking as user code might include our headers
rbrusu Jun 23, 2013
4ade034
Merge pull request #154 from rbrusu/master
jspricke Jun 23, 2013
2e254f1
Merge pull request #153 from jspricke/travis-cmake-test
jspricke Jun 23, 2013
8da08df
enable rgb extraction when texture saving is enabled
whatnick Jun 24, 2013
149d1af
Fix format string bug, thanks clang
jspricke Jun 24, 2013
2bf2c7b
Fixed build problem with vtkImageSlice in image_viewer.h
MOZGIII Jun 25, 2013
20927f5
Merge pull request #159 from MOZGIII/master
rbrusu Jun 25, 2013
667d1c5
Fixed typos, clarified a messy sentence, added wikipedia link
georgebrindeiro Jun 25, 2013
bdd87cb
Merge pull request #160 from georgebrindeiro/patch-1
rbrusu Jun 25, 2013
f761da5
Merge pull request #155 from whatnick/master
rbrusu Jun 25, 2013
853c7ce
Merge pull request #161 from andersgb1/master
rbrusu Jun 26, 2013
5927693
First pass at removing ros
Jun 2, 2013
a4603ab
Took out all USE_ROS references
Jun 2, 2013
ae764c0
Removed FindROS call
Jun 2, 2013
1e6daec
Took out add_ros_links macro
Jun 2, 2013
44a5d3e
Minor merge
Jul 2, 2013
957bee0
Removed accidental HEAD mark
Jul 2, 2013
95d90a4
pcl_sensor_msgs and pcl_std_msgs changed to pcl
Jul 2, 2013
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
11 changes: 2 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,8 @@ compiler:
- gcc
before_install:
- sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl -y
- sudo add-apt-repository ppa:nmi/vim-snapshots -y
- sudo apt-get update -d
- sudo apt-get install cmake libvtk5-qt4-dev libflann-dev libeigen3-dev libopenni-dev libqhull-dev libboost-filesystem1.53-dev libboost-iostreams1.53-dev libboost-thread1.53-dev
- sudo apt-get install cmake libvtk5-qt4-dev libflann-dev libeigen3-dev libopenni-dev libqhull-dev libboost-filesystem-dev libboost-iostreams-dev libboost-thread-dev
script:
- mkdir build && cd build
- cmake -DPCL_ONLY_CORE_POINT_TYPES=ON .. && make -j2 && make test
notifications:
recipients:
- julius@kammerl.com
email:
on_success: change
on_failure: always
- cmake -DCMAKE_C_FLAGS="-Wall -Wextra -Wabi -Wconversion -O2" -DCMAKE_CXX_FLAGS="-Wall -Wextra -Wabi -Wconversion -O2" -DPCL_ONLY_CORE_POINT_TYPES=ON .. && make -j2 && make test
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,6 @@ find_package(Qhull)
# Cuda
include(${PCL_SOURCE_DIR}/cmake/pcl_find_cuda.cmake)

# Find ROS
include(${PCL_SOURCE_DIR}/cmake/pcl_find_ros.cmake)
# Find QT4
find_package(Qt4)
if (QT4_FOUND)
Expand Down
4 changes: 3 additions & 1 deletion PCLConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ macro(find_VTK)
endif(PCL_ALL_IN_ONE_INSTALLER)
find_package(VTK ${QUIET_})
if (VTK_FOUND AND NOT ANDROID)
set(VTK_LIBRARIES vtkCommon vtkRendering vtkHybrid)
set(VTK_LIBRARIES vtkCommon vtkRendering vtkHybrid vtkCharts)
endif(VTK_FOUND AND NOT ANDROID)
endmacro(find_VTK)

Expand Down Expand Up @@ -671,6 +671,8 @@ endif(NOT "${PCL_DEFINITIONS}" STREQUAL "")

pcl_remove_duplicate_libraries(PCL_LIBRARIES PCL_DEDUP_LIBRARIES)
set(PCL_LIBRARIES ${PCL_DEDUP_LIBRARIES})
# Add 3rd party libraries, as user code might include our .HPP implementations
list(APPEND PCL_LIBRARIES ${BOOST_LIBRARIES} ${QHULL_LIBRARIES} ${OPENNI_LIBRARIES} ${FLANN_LIBRARIES} ${VTK_LIBRARIES})

find_package_handle_standard_args(PCL DEFAULT_MSG PCL_LIBRARIES PCL_INCLUDE_DIRS)
mark_as_advanced(PCL_LIBRARIES PCL_INCLUDE_DIRS PCL_LIBRARY_DIRS)
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pcl::cloud_composer::CloudItem::printNumPoints () const
template <typename PointT> pcl::cloud_composer::CloudItem*
pcl::cloud_composer::CloudItem::createCloudItemFromTemplate (const QString name, typename PointCloud<PointT>::Ptr cloud_ptr)
{
sensor_msgs::PointCloud2::Ptr cloud_blob = boost::make_shared <sensor_msgs::PointCloud2> ();
pcl::PCLPointCloud2::Ptr cloud_blob = boost::make_shared <pcl::PCLPointCloud2> ();
toROSMsg (*cloud_ptr, *cloud_blob);
CloudItem* cloud_item = new CloudItem ( name, cloud_blob, Eigen::Vector4f (), Eigen::Quaternionf (), false);
cloud_item->setData (QVariant::fromValue(cloud_ptr), ItemDataRole::CLOUD_TEMPLATED);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pcl::cloud_composer::MergeSelection::performTemplatedAction (QList <const CloudC

//Eigen::Vector4f source_origin = input_cloud_item->data (ItemDataRole::ORIGIN).value<Eigen::Vector4f> ();
//Eigen::Quaternionf source_orientation = input_cloud_item->data (ItemDataRole::ORIENTATION).value<Eigen::Quaternionf> ();
//sensor_msgs::PointCloud2::Ptr cloud_blob = boost::make_shared <sensor_msgs::PointCloud2> ();;
//pcl::PCLPointCloud2::Ptr cloud_blob = boost::make_shared <pcl::PCLPointCloud2> ();;
//toROSMsg (*original_minus_indices, *cloud_blob);
//CloudItem* new_cloud_item = new CloudItem (input_cloud_item->text ()
//, cloud_blob
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
#include <pcl/search/kdtree.h>

//Typedefs to make things sane
typedef pcl::visualization::PointCloudGeometryHandler<sensor_msgs::PointCloud2> GeometryHandler;
typedef pcl::visualization::PointCloudColorHandler<sensor_msgs::PointCloud2> ColorHandler;
typedef pcl::visualization::PointCloudGeometryHandler<pcl::PCLPointCloud2> GeometryHandler;
typedef pcl::visualization::PointCloudColorHandler<pcl::PCLPointCloud2> ColorHandler;

namespace pcl
{
Expand All @@ -71,7 +71,7 @@ namespace pcl
EIGEN_MAKE_ALIGNED_OPERATOR_NEW

CloudItem (const QString name,
const sensor_msgs::PointCloud2::Ptr cloud_ptr,
const pcl::PCLPointCloud2::Ptr cloud_ptr,
const Eigen::Vector4f& origin = Eigen::Vector4f (),
const Eigen::Quaternionf& orientation = Eigen::Quaternionf (),
bool make_templated_cloud = true);
Expand Down Expand Up @@ -125,7 +125,7 @@ namespace pcl
private:

//These are just stored for convenience
sensor_msgs::PointCloud2::Ptr cloud_blob_ptr_;
pcl::PCLPointCloud2::Ptr cloud_blob_ptr_;
ColorHandler::ConstPtr color_handler_;
GeometryHandler::ConstPtr geometry_handler_;

Expand Down Expand Up @@ -176,7 +176,7 @@ namespace pcl
}

//Add PointCloud types to QT MetaType System
Q_DECLARE_METATYPE (sensor_msgs::PointCloud2::ConstPtr);
Q_DECLARE_METATYPE (pcl::PCLPointCloud2::ConstPtr);
Q_DECLARE_METATYPE (GeometryHandler::ConstPtr);
Q_DECLARE_METATYPE (ColorHandler::ConstPtr);
Q_DECLARE_METATYPE (Eigen::Vector4f);
Expand Down
2 changes: 1 addition & 1 deletion apps/cloud_composer/src/cloud_composer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pcl::cloud_composer::ComposerMainWindow::ComposerMainWindow (QWidget *parent)
this->setCorner (Qt::BottomRightCorner, Qt::RightDockWidgetArea);

//Register types in Qt
qRegisterMetaType<sensor_msgs::PointCloud2::Ptr> ("PointCloud2Ptr");
qRegisterMetaType<pcl::PCLPointCloud2::Ptr> ("PCLPointCloud2Ptr");
qRegisterMetaType<GeometryHandler::ConstPtr> ("GeometryHandlerConstPtr");
qRegisterMetaType<ColorHandler::ConstPtr> ("ColorHandlerConstPtr");
qRegisterMetaType<Eigen::Vector4f> ("EigenVector4f");
Expand Down
18 changes: 9 additions & 9 deletions apps/cloud_composer/src/items/cloud_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <pcl/apps/cloud_composer/impl/cloud_item.hpp>

pcl::cloud_composer::CloudItem::CloudItem (QString name,
sensor_msgs::PointCloud2::Ptr cloud_ptr,
pcl::PCLPointCloud2::Ptr cloud_ptr,
const Eigen::Vector4f& origin,
const Eigen::Quaternionf& orientation,
bool make_templated_cloud)
Expand All @@ -25,15 +25,15 @@ pcl::cloud_composer::CloudItem::CloudItem (QString name,

// qDebug () << "Cloud size after passthrough : "<<cloud_filtered->width<<"x"<<cloud_filtered->height;
cloud_blob_ptr_ = cloud_ptr;
sensor_msgs::PointCloud2::ConstPtr const_cloud_ptr = cloud_ptr;
pcl::PCLPointCloud2::ConstPtr const_cloud_ptr = cloud_ptr;
this->setData (QVariant::fromValue (const_cloud_ptr), ItemDataRole::CLOUD_BLOB);
this->setData (QVariant::fromValue (origin_), ItemDataRole::ORIGIN);
this->setData (QVariant::fromValue (orientation_), ItemDataRole::ORIENTATION);

//Create a color and geometry handler for this cloud
color_handler_.reset (new pcl::visualization::PointCloudColorHandlerRGBField<sensor_msgs::PointCloud2> (cloud_ptr));
color_handler_.reset (new pcl::visualization::PointCloudColorHandlerRGBField<pcl::PCLPointCloud2> (cloud_ptr));
this->setData (QVariant::fromValue (color_handler_), ItemDataRole::COLOR_HANDLER);
geometry_handler_.reset (new pcl::visualization::PointCloudGeometryHandlerXYZ<sensor_msgs::PointCloud2> (cloud_ptr));
geometry_handler_.reset (new pcl::visualization::PointCloudGeometryHandlerXYZ<pcl::PCLPointCloud2> (cloud_ptr));
this->setData (QVariant::fromValue (geometry_handler_), ItemDataRole::GEOMETRY_HANDLER);

properties_->addCategory ("Core Properties");
Expand All @@ -56,7 +56,7 @@ pcl::cloud_composer::CloudItem::CloudItem (QString name,
pcl::cloud_composer::CloudItem*
pcl::cloud_composer::CloudItem::clone () const
{
sensor_msgs::PointCloud2::Ptr cloud_copy (new sensor_msgs::PointCloud2 (*cloud_blob_ptr_));
pcl::PCLPointCloud2::Ptr cloud_copy (new pcl::PCLPointCloud2 (*cloud_blob_ptr_));
//Vector4f and Quaternionf do deep copies using constructor
CloudItem* new_item = new CloudItem (this->text (), cloud_copy, origin_,orientation_);

Expand Down Expand Up @@ -114,8 +114,8 @@ pcl::cloud_composer::CloudItem::setTemplateCloudFromBlob ()
if (! template_cloud_set_ )
{
int num_fields = cloud_blob_ptr_->fields.size ();
std::vector<sensor_msgs::PointField>::iterator end = cloud_blob_ptr_->fields.end ();
std::vector<sensor_msgs::PointField>::iterator itr = cloud_blob_ptr_->fields.begin ();
std::vector<pcl::PCLPointField>::iterator end = cloud_blob_ptr_->fields.end ();
std::vector<pcl::PCLPointField>::iterator itr = cloud_blob_ptr_->fields.begin ();
QStringList field_names;
for ( itr = cloud_blob_ptr_->fields.begin () ; itr != end; ++itr)
{
Expand Down Expand Up @@ -194,8 +194,8 @@ pcl::cloud_composer::CloudItem::checkIfFinite ()
if (! cloud_blob_ptr_)
return false;

sensor_msgs::PointCloud2::Ptr cloud_filtered = boost::make_shared<sensor_msgs::PointCloud2> ();
pcl::PassThrough<sensor_msgs::PointCloud2> pass_filter;
pcl::PCLPointCloud2::Ptr cloud_filtered = boost::make_shared<pcl::PCLPointCloud2> ();
pcl::PassThrough<pcl::PCLPointCloud2> pass_filter;
pass_filter.setInputCloud (cloud_blob_ptr_);
pass_filter.setKeepOrganized (false);
pass_filter.filter (*cloud_filtered);
Expand Down
2 changes: 1 addition & 1 deletion apps/cloud_composer/src/items/normals_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pcl::cloud_composer::NormalsItem::paintView (boost::shared_ptr<pcl::visualizatio
if (parent ()->type () == CLOUD_ITEM)
{
QVariant cloud_ptr = parent ()->data (ItemDataRole::CLOUD_BLOB);
sensor_msgs::PointCloud2::ConstPtr cloud_blob = cloud_ptr.value<sensor_msgs::PointCloud2::ConstPtr> ();
pcl::PCLPointCloud2::ConstPtr cloud_blob = cloud_ptr.value<pcl::PCLPointCloud2::ConstPtr> ();
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
pcl::fromROSMsg (*cloud_blob, *cloud);
double scale = properties_->getProperty ("Scale").toDouble ();
Expand Down
16 changes: 8 additions & 8 deletions apps/cloud_composer/src/merge_selection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,22 @@ pcl::cloud_composer::MergeSelection::performAction (ConstItemList input_data, Po
}
}

pcl::ExtractIndices<sensor_msgs::PointCloud2> filter;
sensor_msgs::PointCloud2::Ptr merged_cloud (new sensor_msgs::PointCloud2);
pcl::ExtractIndices<pcl::PCLPointCloud2> filter;
pcl::PCLPointCloud2::Ptr merged_cloud (new pcl::PCLPointCloud2);
foreach (const CloudItem* input_cloud_item, selected_item_index_map_.keys ())
{
//If this cloud hasn't been completely selected
if (!input_data.contains (input_cloud_item))
{
sensor_msgs::PointCloud2::ConstPtr input_cloud = input_cloud_item->data (ItemDataRole::CLOUD_BLOB).value <sensor_msgs::PointCloud2::ConstPtr> ();
pcl::PCLPointCloud2::ConstPtr input_cloud = input_cloud_item->data (ItemDataRole::CLOUD_BLOB).value <pcl::PCLPointCloud2::ConstPtr> ();
qDebug () << "Extracting "<<selected_item_index_map_.value(input_cloud_item)->indices.size() << " points out of "<<input_cloud->width;
filter.setInputCloud (input_cloud);
filter.setIndices (selected_item_index_map_.value (input_cloud_item));
sensor_msgs::PointCloud2::Ptr original_minus_indices = boost::make_shared <sensor_msgs::PointCloud2> ();
pcl::PCLPointCloud2::Ptr original_minus_indices = boost::make_shared <pcl::PCLPointCloud2> ();
filter.setNegative (true);
filter.filter (*original_minus_indices);
filter.setNegative (false);
sensor_msgs::PointCloud2::Ptr selected_points (new sensor_msgs::PointCloud2);
pcl::PCLPointCloud2::Ptr selected_points (new pcl::PCLPointCloud2);
filter.filter (*selected_points);

qDebug () << "Original minus indices is "<<original_minus_indices->width;
Expand All @@ -79,7 +79,7 @@ pcl::cloud_composer::MergeSelection::performAction (ConstItemList input_data, Po
, source_origin
, source_orientation);
output.append (new_cloud_item);
sensor_msgs::PointCloud2::Ptr temp_cloud = boost::make_shared <sensor_msgs::PointCloud2> ();
pcl::PCLPointCloud2::Ptr temp_cloud = boost::make_shared <pcl::PCLPointCloud2> ();
concatenatePointCloud (*merged_cloud, *selected_points, *temp_cloud);
merged_cloud = temp_cloud;
}
Expand All @@ -89,9 +89,9 @@ pcl::cloud_composer::MergeSelection::performAction (ConstItemList input_data, Po
//Just concatenate for all fully selected clouds
foreach (const CloudComposerItem* input_item, input_data)
{
sensor_msgs::PointCloud2::ConstPtr input_cloud = input_item->data (ItemDataRole::CLOUD_BLOB).value <sensor_msgs::PointCloud2::ConstPtr> ();
pcl::PCLPointCloud2::ConstPtr input_cloud = input_item->data (ItemDataRole::CLOUD_BLOB).value <pcl::PCLPointCloud2::ConstPtr> ();

sensor_msgs::PointCloud2::Ptr temp_cloud = boost::make_shared <sensor_msgs::PointCloud2> ();
pcl::PCLPointCloud2::Ptr temp_cloud = boost::make_shared <pcl::PCLPointCloud2> ();
concatenatePointCloud (*merged_cloud, *input_cloud, *temp_cloud);
merged_cloud = temp_cloud;
}
Expand Down
4 changes: 2 additions & 2 deletions apps/cloud_composer/src/project_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ pcl::cloud_composer::ProjectModel::insertNewCloudFromFile ()
last_directory_ = file_info.absoluteDir ();
}

sensor_msgs::PointCloud2::Ptr cloud_blob (new sensor_msgs::PointCloud2);
pcl::PCLPointCloud2::Ptr cloud_blob (new pcl::PCLPointCloud2);
Eigen::Vector4f origin;
Eigen::Quaternionf orientation;
int version;
Expand Down Expand Up @@ -377,7 +377,7 @@ pcl::cloud_composer::ProjectModel::saveSelectedCloudToFile ()
last_directory_ = file_info.absoluteDir ();
}

sensor_msgs::PointCloud2::ConstPtr cloud = cloud_to_save->data (ItemDataRole::CLOUD_BLOB).value <sensor_msgs::PointCloud2::ConstPtr> ();
pcl::PCLPointCloud2::ConstPtr cloud = cloud_to_save->data (ItemDataRole::CLOUD_BLOB).value <pcl::PCLPointCloud2::ConstPtr> ();
Eigen::Vector4f origin = cloud_to_save->data (ItemDataRole::ORIGIN).value <Eigen::Vector4f> ();
Eigen::Quaternionf orientation = cloud_to_save->data (ItemDataRole::ORIENTATION).value <Eigen::Quaternionf> ();
int result = pcl::io::savePCDFile (filename.toStdString (), *cloud, origin, orientation );
Expand Down
8 changes: 4 additions & 4 deletions apps/cloud_composer/tools/euclidean_clustering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pcl::cloud_composer::EuclideanClusteringTool::performAction (ConstItemList input
int min_cluster_size = parameter_model_->getProperty ("Min Cluster Size").toInt();
int max_cluster_size = parameter_model_->getProperty ("Max Cluster Size").toInt();

sensor_msgs::PointCloud2::ConstPtr input_cloud = input_item->data (ItemDataRole::CLOUD_BLOB).value <sensor_msgs::PointCloud2::ConstPtr> ();
pcl::PCLPointCloud2::ConstPtr input_cloud = input_item->data (ItemDataRole::CLOUD_BLOB).value <pcl::PCLPointCloud2::ConstPtr> ();
//Get the cloud in template form
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
pcl::fromROSMsg (*input_cloud, *cloud);
Expand All @@ -72,7 +72,7 @@ pcl::cloud_composer::EuclideanClusteringTool::performAction (ConstItemList input
//Put found clusters into new cloud_items!
qDebug () << "Found "<<cluster_indices.size ()<<" clusters!";
int cluster_count = 0;
pcl::ExtractIndices<sensor_msgs::PointCloud2> filter;
pcl::ExtractIndices<pcl::PCLPointCloud2> filter;
for (std::vector<pcl::PointIndices>::const_iterator it = cluster_indices.begin (); it != cluster_indices.end (); ++it)
{
filter.setInputCloud (input_cloud);
Expand All @@ -82,7 +82,7 @@ pcl::cloud_composer::EuclideanClusteringTool::performAction (ConstItemList input
extracted_indices->insert (extracted_indices->end (), it->indices.begin (), it->indices.end ());
//This means remove the other points
filter.setKeepOrganized (false);
sensor_msgs::PointCloud2::Ptr cloud_filtered (new sensor_msgs::PointCloud2);
pcl::PCLPointCloud2::Ptr cloud_filtered (new pcl::PCLPointCloud2);
filter.filter (*cloud_filtered);

qDebug() << "Cluster has " << cloud_filtered->width << " data points.";
Expand All @@ -94,7 +94,7 @@ pcl::cloud_composer::EuclideanClusteringTool::performAction (ConstItemList input
++cluster_count;
}
//We copy input cloud over for special case that no clusters found, since ExtractIndices doesn't work for 0 length vectors
sensor_msgs::PointCloud2::Ptr remainder_cloud (new sensor_msgs::PointCloud2(*input_cloud));
pcl::PCLPointCloud2::Ptr remainder_cloud (new pcl::PCLPointCloud2(*input_cloud));
if (cluster_indices.size () > 0)
{
//make a cloud containing all the remaining points
Expand Down
2 changes: 1 addition & 1 deletion apps/cloud_composer/tools/fpfh_estimation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pcl::cloud_composer::FPFHEstimationTool::performAction (ConstItemList input_data

double radius = parameter_model_->getProperty("Radius").toDouble();

sensor_msgs::PointCloud2::ConstPtr input_cloud = input_item->data (ItemDataRole::CLOUD_BLOB).value <sensor_msgs::PointCloud2::ConstPtr> ();
pcl::PCLPointCloud2::ConstPtr input_cloud = input_item->data (ItemDataRole::CLOUD_BLOB).value <pcl::PCLPointCloud2::ConstPtr> ();
//Get the cloud in template form
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
pcl::fromROSMsg (*input_cloud, *cloud);
Expand Down
4 changes: 2 additions & 2 deletions apps/cloud_composer/tools/normal_estimation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ pcl::cloud_composer::NormalEstimationTool::performAction (ConstItemList input_da
}
input_item = input_data.value (0);

sensor_msgs::PointCloud2::ConstPtr input_cloud;
pcl::PCLPointCloud2::ConstPtr input_cloud;
if (input_item->type () == CloudComposerItem::CLOUD_ITEM)
{
double radius = parameter_model_->getProperty("Radius").toDouble();
qDebug () << "Received Radius = " <<radius;
sensor_msgs::PointCloud2::ConstPtr input_cloud = input_item->data (ItemDataRole::CLOUD_BLOB).value <sensor_msgs::PointCloud2::ConstPtr> ();
pcl::PCLPointCloud2::ConstPtr input_cloud = input_item->data (ItemDataRole::CLOUD_BLOB).value <pcl::PCLPointCloud2::ConstPtr> ();
qDebug () << "Got cloud size = "<<input_cloud->width;
//////////////// THE WORK - COMPUTING NORMALS ///////////////////
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
Expand Down
6 changes: 3 additions & 3 deletions apps/cloud_composer/tools/sanitize_cloud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@ pcl::cloud_composer::SanitizeCloudTool::performAction (ConstItemList input_data,

if (input_item->type () == CloudComposerItem::CLOUD_ITEM )
{
sensor_msgs::PointCloud2::ConstPtr input_cloud = input_item->data (ItemDataRole::CLOUD_BLOB).value <sensor_msgs::PointCloud2::ConstPtr> ();
pcl::PCLPointCloud2::ConstPtr input_cloud = input_item->data (ItemDataRole::CLOUD_BLOB).value <pcl::PCLPointCloud2::ConstPtr> ();

bool keep_organized = parameter_model_->getProperty("Keep Organized").toBool ();

//////////////// THE WORK - FILTERING NANS ///////////////////
// Create the filtering object
pcl::PassThrough<sensor_msgs::PointCloud2> pass_filter;
pcl::PassThrough<pcl::PCLPointCloud2> pass_filter;
pass_filter.setInputCloud (input_cloud);
pass_filter.setKeepOrganized (keep_organized);

//Create output cloud
sensor_msgs::PointCloud2::Ptr cloud_filtered = boost::make_shared<sensor_msgs::PointCloud2> ();
pcl::PCLPointCloud2::Ptr cloud_filtered = boost::make_shared<pcl::PCLPointCloud2> ();
//Filter!
pass_filter.filter (*cloud_filtered);

Expand Down
6 changes: 3 additions & 3 deletions apps/cloud_composer/tools/statistical_outlier_removal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,20 @@ pcl::cloud_composer::StatisticalOutlierRemovalTool::performAction (ConstItemList

if (input_item->type () == CloudComposerItem::CLOUD_ITEM )
{
sensor_msgs::PointCloud2::ConstPtr input_cloud = input_item->data (ItemDataRole::CLOUD_BLOB).value <sensor_msgs::PointCloud2::ConstPtr> ();
pcl::PCLPointCloud2::ConstPtr input_cloud = input_item->data (ItemDataRole::CLOUD_BLOB).value <pcl::PCLPointCloud2::ConstPtr> ();

int mean_k = parameter_model_->getProperty("Mean K").toInt ();
double std_dev_thresh = parameter_model_->getProperty ("Std Dev Thresh").toDouble ();

//////////////// THE WORK - FILTERING OUTLIERS ///////////////////
// Create the filtering object
pcl::StatisticalOutlierRemoval<sensor_msgs::PointCloud2> sor;
pcl::StatisticalOutlierRemoval<pcl::PCLPointCloud2> sor;
sor.setInputCloud (input_cloud);
sor.setMeanK (mean_k);
sor.setStddevMulThresh (std_dev_thresh);

//Create output cloud
sensor_msgs::PointCloud2::Ptr cloud_filtered (new sensor_msgs::PointCloud2);
pcl::PCLPointCloud2::Ptr cloud_filtered (new pcl::PCLPointCloud2);
//Filter!
sor.filter (*cloud_filtered);

Expand Down
Loading