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,
117 const
Eigen::Vector4f& origin,
118 const
Eigen::Quaternionf& orientation) const = 0;
121 struct StereoGrabberImpl;
122 StereoGrabberImpl* impl_;
126template <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;
147template <
typename Po
intT>
149 const std::pair<std::string, std::string>& pair_files,
150 float frames_per_second,
158template <
typename Po
intT>
160 const std::vector<std::pair<std::string, std::string>>& files,
161 float frames_per_second,
169template <
typename Po
intT>
172 const Eigen::Vector4f& origin,
173 const Eigen::Quaternionf& orientation)
const
boost::signals2::signal< T > * createSignal()
Grabber()=default
Default ctor.
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
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 ...
std::string getName() const override
float getFramesPerSecond() const override
Returns the frames_per_second.
void start() override
Starts playing the list of Stereo images if frames_per_second is > 0.
~StereoGrabberBase() noexcept override
Virtual destructor.
virtual void rewind()
Rewinds to the first pair of files in the list.
virtual void trigger()
Triggers a callback with new data.
void stop() override
Stops playing the list of Stereo images if frames_per_second is > 0.
bool isRepeatOn() const
Returns whether the repeat flag is on.
StereoGrabberBase(const std::pair< std::string, std::string > &pair_files, float frames_per_second, bool repeat)
Constructor taking just one Stereo pair.
bool isRunning() const override
whether the grabber is started (publishing) or not.
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.