point_cloud_xyz.h
Go to the documentation of this file.
1 
8 #ifndef POINT_CLOUD_XYZ_H
9 #define POINT_CLOUD_XYZ_H
10 
11 #include <nodelet/nodelet.h>
12 #include <image_transport/image_transport.h>
13 #include <sensor_msgs/Image.h>
14 #include <boost/thread.hpp>
15 #include <ros/ros.h>
16 #include <pcl_ros/point_cloud.h>
18 #include <sensor_msgs/PointCloud2.h>
19 #include <image_geometry/pinhole_camera_model.h>
20 
25 typedef sensor_msgs::PointCloud2 PointCloudMsg;
26 
33 namespace pses_kinect_utilities
34 {
35 
40 typedef std::shared_ptr<DepthImageToPCL> DepthConvPtr;
41 
48 class PointCloudXYZNodelet : public nodelet::Nodelet
49 {
50 private:
52  std::string tf_frame_;
53  std::string cl_file_path_;
54  PointCloudMsg::Ptr current_cloud_;
55  DepthConvPtr pcl_conversion_;
56  image_geometry::PinholeCameraModel camera_model_;
58  // Subscriptions
59  boost::shared_ptr<image_transport::ImageTransport> it_;
60  image_transport::CameraSubscriber sub_depth_;
61  // Publications
62  boost::mutex connect_mutex_;
63  ros::Publisher pub_cloud_;
68  virtual void onInit();
69 
73  void connectCb();
74 
80  void depthCb(const sensor_msgs::ImageConstPtr& depth_msg,
81  const sensor_msgs::CameraInfoConstPtr& info_msg);
82 };
83 }
84 
85 #endif // POINT_CLOUD_XYZ_H
image_geometry::PinholeCameraModel camera_model_
Class of the PointCloudXYZNodelet nodelet, which converts a depth image into a point cloud containing...
virtual void onInit()
This function is called by the initialization of the nodelet and acts as a constructor.
image_transport::CameraSubscriber sub_depth_
void depthCb(const sensor_msgs::ImageConstPtr &depth_msg, const sensor_msgs::CameraInfoConstPtr &info_msg)
Callback function that is called whenever a new depth image is received.
void connectCb()
Callback function that is called whenever anyone is subscribed to the output point cloud...
boost::shared_ptr< image_transport::ImageTransport > it_
sensor_msgs::PointCloud2 PointCloudMsg
Shortcut for a PointCloud2 ROS message.
std::shared_ptr< DepthImageToPCL > DepthConvPtr
Shortcut for a Pointer to a DepthImageToPCL Object.
This namespace is used by the nodelets inside our package pses_kinect_utilities.


pses_kinect_utilities
Author(s): Nicolas Acero
autogenerated on Sun Nov 26 2017 19:23:52