13 #include <pcl/pcl_exports.h>
14 #include <pcl/console/print.h>
16 #include <pcl/io/grabber.h>
18 #include <pcl/point_cloud.h>
19 #include <boost/asio.hpp>
77 TimGrabber (
const boost::asio::ip::address& ipAddress,
const std::uint16_t port);
87 getName () const override;
90 isRunning () const override;
102 processTimPacket (std::
string const& packet);
107 updateLookupTables ();
115 constexpr static
float angle_start_ = - 1.0 *
M_PI / 4.0;
116 constexpr static
float angle_range_ = 2.0 *
M_PI * 3.0 / 4.0;
120 std::vector<
float> cos_dynamic_lookup_table_;
121 std::vector<
float> sin_dynamic_lookup_table_;
123 std::array<
char, 4000> received_packet_;
125 std::istringstream iss_;
127 std::
size_t amount_of_data_ = 811;
128 std::vector<
float> distances_;
130 boost::asio::ip::tcp::endpoint tcp_endpoint_;
131 boost::asio::io_context tim_io_service_;
132 boost::asio::ip::tcp::socket tim_socket_;
134 unsigned int wait_time_milliseconds_ = 0;
137 mutable std::mutex frequency_mutex_;
139 std::thread grabber_thread_;
140 bool is_running_ = false;
146 getFramesPerSecond () const override;
149 buildLookupTables ();
153 isValidPacket () const;
160 parsePacketHeader (std::
string const& header);
162 parsePacketBody (std::
string const& body);
A helper class to measure frequency of a certain event.
Grabber interface for PCL 1.x device drivers.
PointCloud represents the base class in PCL for storing collections of 3D points.
shared_ptr< const PointCloud< PointT > > ConstPtr
TimGrabber(const boost::asio::ip::address &ipAddress, const std::uint16_t port)
~TimGrabber() noexcept override
void(const pcl::PointCloud< pcl::PointXYZ >::ConstPtr &) sig_cb_sick_tim_scan_point_cloud_xyz
Defines all the PCL implemented PointT point type structures.
Define methods for measuring time spent in code blocks.
A point structure representing Euclidean xyz coordinates.