42 #include <sensor_msgs/LaserScan.h> 62 int concurrency_level =
private_nh_.
param(
"concurrency_level", concurrency_level);
65 if (concurrency_level == 1)
75 if (concurrency_level > 0)
85 if (!target_frame_.empty())
108 NODELET_INFO(
"Got a subscriber to cloud, starting laserscan subscriber");
118 NODELET_INFO(
"No subscibers to cloud, shutting down subscriber to laserscan");
128 <<
" at time " << scan_msg->header.stamp
129 <<
", reason: " << reason);
134 sensor_msgs::PointCloud2Ptr scan_cloud;
135 scan_cloud.reset(
new sensor_msgs::PointCloud2);
void projectLaser(const sensor_msgs::LaserScan &scan_in, sensor_msgs::PointCloud &cloud_out, double range_cutoff=-1.0, int channel_options=channel_option::Default)
laser_geometry::LaserProjection projector_
#define NODELET_WARN_STREAM_THROTTLE(rate,...)
unsigned int input_queue_size_
message_filters::Subscriber< sensor_msgs::LaserScan > sub_
void scanCallback(const sensor_msgs::LaserScanConstPtr &scan_msg)
ros::NodeHandle & getNodeHandle() const
ros::NodeHandle private_nh_
std::string target_frame_
uint32_t getNumPublishers() const
The PointCloudToLaserScanNodelet class to process incoming laserscans into pointclouds.
boost::shared_ptr< MessageFilter > message_filter_
ros::NodeHandle & getPrivateNodeHandle() const
boost::shared_ptr< tf2_ros::TransformListener > tf2_listener_
#define NODELET_ERROR_STREAM(...)
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
void publish(const boost::shared_ptr< M > &message) const
const ros::Subscriber & getSubscriber() const
boost::shared_ptr< tf2_ros::Buffer > tf2_
boost::mutex connect_mutex_
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
ros::NodeHandle & getMTNodeHandle() const
#define NODELET_INFO(...)
void subscribe(ros::NodeHandle &nh, const std::string &topic, uint32_t queue_size, const ros::TransportHints &transport_hints=ros::TransportHints(), ros::CallbackQueueInterface *callback_queue=0)
void failureCallback(const sensor_msgs::LaserScanConstPtr &scan_msg, tf2_ros::filter_failure_reasons::FilterFailureReason reason)
LaserScanToPointCloudNodelet()
uint32_t getNumSubscribers() const
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)
double transform_tolerance_
tf2_ros::MessageFilter< sensor_msgs::LaserScan > MessageFilter
Connection registerCallback(const C &callback)