17 #include <sensor_msgs/PointCloud2.h> 33 std::string dump_file;
34 private_nh.
param(
"pcap", dump_file, std::string(
""));
38 const double diag_freq = 25;
41 ROS_INFO(
"expected frequency: %.3f (Hz)", diag_freq);
70 pcl::PointCloud<pcl::PointXYZI>::Ptr pc(
new pcl::PointCloud<pcl::PointXYZI>());
78 int rc =
input_->getPacket(*pc);
80 if (rc < 0)
return false;
84 ROS_DEBUG(
"Publishing a full O3M151 scan with %d points", pc->points.size());
87 pc->header.stamp = now.toNSec() / 1e3;
90 pc->width = pc->points.size();
boost::shared_ptr< diagnostic_updater::TopicDiagnostic > diag_topic_
O3M151Driver(ros::NodeHandle node, ros::NodeHandle private_nh)
void publish(const boost::shared_ptr< M > &message) const
std::string getPrefixParam(ros::NodeHandle &nh)
std::string frame_id_
tf frame ID
void setHardwareID(const std::string &hwid)
std::string resolve(const std::string &prefix, const std::string &frame_name)
boost::shared_ptr< Input > input_
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
#define ROS_DEBUG_STREAM(args)
diagnostic_updater::Updater diagnostics_