40 #include <pcl/common/time_trigger.h>
41 #include <pcl/io/grabber.h>
42 #include <pcl/stereo/stereo_matching.h>
43 #include <pcl/conversions.h>
44 #include <pcl/point_cloud.h>
60 float frames_per_second,
72 float frames_per_second,
96 isRunning() const override;
100 getName() const override;
108 getFramesPerSecond() const override;
117 const
Eigen::Vector4f& origin,
118 const
Eigen::Quaternionf& orientation) const = 0;
121 struct StereoGrabberImpl;
122 StereoGrabberImpl* impl_;
126 template <typename
PointT>
129 StereoGrabber(
const std::pair<std::string, std::string>& pair_files,
130 float frames_per_second = 0,
131 bool repeat =
false);
132 StereoGrabber(
const std::vector<std::pair<std::string, std::string>>& files,
133 float frames_per_second = 0,
134 bool repeat =
false);
139 const Eigen::Vector4f& origin,
140 const Eigen::Quaternionf& orientation)
const override;
147 template <
typename Po
intT>
149 const std::pair<std::string, std::string>& pair_files,
150 float frames_per_second,
158 template <
typename Po
intT>
160 const std::vector<std::pair<std::string, std::string>>& files,
161 float frames_per_second,
169 template <
typename Po
intT>
172 const Eigen::Vector4f& origin,
173 const Eigen::Quaternionf& orientation)
const
180 signal_->operator()(cloud);
Grabber interface for PCL 1.x device drivers.
boost::signals2::signal< T > * createSignal()
PointCloud represents the base class in PCL for storing collections of 3D points.
Eigen::Quaternionf sensor_orientation_
Sensor acquisition pose (rotation).
Eigen::Vector4f sensor_origin_
Sensor acquisition pose (origin/translation).
shared_ptr< PointCloud< PointT > > Ptr
shared_ptr< const PointCloud< PointT > > ConstPtr
Base class for Stereo file grabber.
~StereoGrabberBase() noexcept override
Virtual destructor.
StereoGrabberBase(const std::vector< std::pair< std::string, std::string >> &files, float frames_per_second, bool repeat)
Constructor taking a list of paths to Stereo pair files, that are played in the order they appear in ...
StereoGrabberBase(const std::pair< std::string, std::string > &pair_files, float frames_per_second, bool repeat)
Constructor taking just one Stereo pair.
StereoGrabber(const std::pair< std::string, std::string > &pair_files, float frames_per_second=0, bool repeat=false)
void publish(const pcl::PCLPointCloud2 &blob, const Eigen::Vector4f &origin, const Eigen::Quaternionf &orientation) const override
boost::signals2::signal< void(const typename pcl::PointCloud< PointT >::ConstPtr &)> * signal_
void fromPCLPointCloud2(const pcl::PCLPointCloud2 &msg, pcl::PointCloud< PointT > &cloud, const MsgFieldMap &field_map, const std::uint8_t *msg_data)
Convert a PCLPointCloud2 binary data blob into a pcl::PointCloud<T> object using a field_map.
A point structure representing Euclidean xyz coordinates, and the RGB color.