pointcloud_to_stl.h
Go to the documentation of this file.
1 // -*- mode: C++ -*-
2 /*********************************************************************
3  * Software License Agreement (BSD License)
4  *
5  * Copyright (c) 2015, JSK Lab
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * * Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  * * Redistributions in binary form must reproduce the above
15  * copyright notice, this list of conditions and the following
16  * disclaimer in the documentation and/or other materials provided
17  * with the distribution.
18  * * Neither the name of the JSK Lab nor the names of its
19  * contributors may be used to endorse or promote products derived
20  * from this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33  * POSSIBILITY OF SUCH DAMAGE.
34  *********************************************************************/
35 
36 #ifndef JSK_PCL_ROS_UTILS_POINTCLOUD_TO_STL_H_
37 #define JSK_PCL_ROS_UTILS_POINTCLOUD_TO_STL_H_
38 
39 // ros
40 #include <ros/ros.h>
41 #include <ros/names.h>
42 #include <sensor_msgs/PointCloud2.h>
44 #include <jsk_recognition_msgs/SetPointCloud2.h>
45 #include <visualization_msgs/Marker.h>
46 
47 // pcl
48 #include <pcl_ros/pcl_nodelet.h>
49 #include <pcl/point_types.h>
50 #include <pcl/surface/organized_fast_mesh.h>
51 
52 namespace jsk_pcl_ros_utils
53 {
54  class PointCloudToSTL: public pcl_ros::PCLNodelet
55  {
56  public:
57  PointCloudToSTL(){}
58  protected:
59  virtual void onInit();
60  virtual void cloudCallback(const sensor_msgs::PointCloud2::ConstPtr& input);
61  virtual void exportSTL(const pcl::PointCloud<pcl::PointXYZRGB>::ConstPtr &cloud);
62  virtual bool createSTL(jsk_recognition_msgs::SetPointCloud2::Request &req,
63  jsk_recognition_msgs::SetPointCloud2::Response &res);
64 
68 
69  std::string frame_;
70  double search_radius_;
71  double mu_;
74  double minimum_angle_;
75  double maximum_angle_;
78 
79  double triangle_pixel_size_;
80  double max_edge_length_;
81  std::string file_name_;
82  std::string latest_output_path_;
83  pcl::OrganizedFastMesh<pcl::PointXYZRGB> ofm;
84 
85  private:
86  };
87 }
88 
89 #endif
jsk_pcl_ros_utils::PointCloudToSTL::mu_
double mu_
Definition: pointcloud_to_stl.h:135
jsk_pcl_ros_utils::PointCloudToSTL::frame_
std::string frame_
Definition: pointcloud_to_stl.h:133
jsk_pcl_ros_utils
Definition: add_point_indices.h:51
jsk_pcl_ros_utils::PointCloudToSTL::createSTL
virtual bool createSTL(jsk_recognition_msgs::SetPointCloud2::Request &req, jsk_recognition_msgs::SetPointCloud2::Response &res)
Definition: pointcloud_to_stl_nodelet.cpp:210
jsk_pcl_ros_utils::PointCloudToSTL::PointCloudToSTL
PointCloudToSTL()
Definition: pointcloud_to_stl.h:121
ros::Publisher
pcl_ros::PCLNodelet
jsk_pcl_ros_utils::PointCloudToSTL::normal_consistency_
bool normal_consistency_
Definition: pointcloud_to_stl.h:140
ros.h
jsk_pcl_ros_utils::PointCloudToSTL::file_name_
std::string file_name_
Definition: pointcloud_to_stl.h:145
jsk_pcl_ros_utils::PointCloudToSTL::maximum_surface_angle_
double maximum_surface_angle_
Definition: pointcloud_to_stl.h:137
jsk_pcl_ros_utils::PointCloudToSTL::minimum_angle_
double minimum_angle_
Definition: pointcloud_to_stl.h:138
jsk_pcl_ros_utils::PointCloudToSTL::exportSTL
virtual void exportSTL(const pcl::PointCloud< pcl::PointXYZRGB >::ConstPtr &cloud)
Definition: pointcloud_to_stl_nodelet.cpp:86
sample_camera_info_and_pointcloud_publisher.cloud
cloud
Definition: sample_camera_info_and_pointcloud_publisher.py:30
transform_broadcaster.h
ros::ServiceServer
pcl_nodelet.h
jsk_pcl_ros_utils::PointCloudToSTL::maximum_angle_
double maximum_angle_
Definition: pointcloud_to_stl.h:139
jsk_pcl_ros_utils::PointCloudToSTL::triangle_pixel_size_
double triangle_pixel_size_
Definition: pointcloud_to_stl.h:143
jsk_pcl_ros_utils::PointCloudToSTL::cloudCallback
virtual void cloudCallback(const sensor_msgs::PointCloud2::ConstPtr &input)
Definition: pointcloud_to_stl_nodelet.cpp:57
jsk_pcl_ros_utils::PointCloudToSTL::maximum_nearest_neighbors_
int maximum_nearest_neighbors_
Definition: pointcloud_to_stl.h:136
jsk_pcl_ros_utils::PointCloudToSTL::sub_input_
ros::Subscriber sub_input_
Definition: pointcloud_to_stl.h:130
jsk_pcl_ros_utils::PointCloudToSTL::create_stl_srv_
ros::ServiceServer create_stl_srv_
Definition: pointcloud_to_stl.h:131
jsk_pcl_ros_utils::PointCloudToSTL::max_edge_length_
double max_edge_length_
Definition: pointcloud_to_stl.h:144
jsk_pcl_ros_utils::PointCloudToSTL::onInit
virtual void onInit()
Definition: pointcloud_to_stl_nodelet.cpp:221
names.h
jsk_pcl_ros_utils::PointCloudToSTL::store_shadow_faces_
bool store_shadow_faces_
Definition: pointcloud_to_stl.h:141
jsk_pcl_ros_utils::PointCloudToSTL::ofm
pcl::OrganizedFastMesh< pcl::PointXYZRGB > ofm
Definition: pointcloud_to_stl.h:147
jsk_pcl_ros_utils::PointCloudToSTL::search_radius_
double search_radius_
Definition: pointcloud_to_stl.h:134
jsk_pcl_ros_utils::PointCloudToSTL::pub_mesh_
ros::Publisher pub_mesh_
Definition: pointcloud_to_stl.h:129
jsk_pcl_ros_utils::PointCloudToSTL::latest_output_path_
std::string latest_output_path_
Definition: pointcloud_to_stl.h:146
ros::Subscriber


jsk_pcl_ros_utils
Author(s): Yohei Kakiuchi
autogenerated on Fri May 16 2025 03:11:43