2 #include <boost/bind.hpp> 8 pnh_(pnh), it_(pnh), srv_(pnh) {
30 const sensor_msgs::CameraInfoConstPtr& info_msg) {
38 if (dbg_image !=
nullptr) {
43 catch (std::runtime_error& e) {
62 ROS_DEBUG(
"Unsubscribing from depth topic.");
68 [[maybe_unused]] uint32_t level) {
void setPublishDbgImgEnable(const bool enable)
setPublishDbgImgEnable
void setRangeLimits(const float rmin, const float rmax)
setRangeLimits sets depth sensor min and max ranges
void setOutputFrame(const std::string &frame)
setOutputFrame sets the frame to output laser scan
ros::NodeHandle pnh_
Private node handler used to generate the transport hints in the connectCb.
void setDepthImgRowStep(const int row_step)
setDepthImgRowStep
void setScanConfigurated(const bool configured)
setScanConfigurated sets the configuration status
void publish(const boost::shared_ptr< M > &message) const
void setTiltCompensation(const bool enable)
setTiltCompensation enables or disables the feature which compensates sensor tilt ...
sensor_msgs::ImageConstPtr getDbgImage() const
image_transport::ImageTransport it_
Subscribes to synchronized Image CameraInfo pairs.
LaserScanKinectNode(ros::NodeHandle &pnh)
LaserScanKinectNode constructor.
std::mutex connect_mutex_
Prevents the connectCb and disconnectCb from being called until everything is initialized.
CameraSubscriber subscribeCamera(const std::string &base_topic, uint32_t queue_size, const CameraSubscriber::Callback &callback, const ros::VoidPtr &tracked_object=ros::VoidPtr(), const TransportHints &transport_hints=TransportHints())
void setSensorTiltAngle(const float angle)
setSensorTiltAngle sets the sensor tilt angle (in degrees)
void reconfigureCb(laserscan_kinect::LaserscanKinectConfig &config, uint32_t level)
reconfigureCb is dynamic reconfigure callback
Publisher advertise(const std::string &base_topic, uint32_t queue_size, bool latch=false)
uint32_t getNumSubscribers() const
void connectCb()
connectCb is callback which is called when new subscriber connected.
void setThreadsNum(unsigned threads_num)
void setSensorMountHeight(const float height)
setSensorMountHeight sets the height of sensor mount (in meters)
#define ROS_ERROR_THROTTLE(rate,...)
image_transport::Publisher pub_dbg_img_
Publisher for image_transport.
dynamic_reconfigure::Server< laserscan_kinect::LaserscanKinectConfig > srv_
Dynamic reconfigure server.
void disconnectCb()
disconnectCb is called when a subscriber stop subscribing
ros::Publisher pub_
Publisher for output LaserScan messages.
void publish(const sensor_msgs::Image &message) const
void setGroundRemove(const bool enable)
setGroundRemove enables or disables the feature which remove ground from scan
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
laserscan_kinect::LaserScanKinect converter_
Object which convert depth image to laserscan and store all parameters.
sensor_msgs::LaserScanPtr getLaserScanMsg(const sensor_msgs::ImageConstPtr &depth_msg, const sensor_msgs::CameraInfoConstPtr &info_msg)
prepareLaserScanMsg converts depthimage and prepare new LaserScan message
bool getPublishDbgImgEnable() const
uint32_t getNumSubscribers() const
image_transport::CameraSubscriber sub_
Subscriber for image_transport.
void setCamModelUpdate(const bool enable)
setCamModelUpdate sets the camera parameters
void setScanHeight(const int scan_height)
setScanHeight sets height of depth image which will be used in conversion process ...
void setGroundMargin(const float margin)
setGroundMargin sets the floor margin (in meters)
void depthCb(const sensor_msgs::ImageConstPtr &depth_msg, const sensor_msgs::CameraInfoConstPtr &info_msg)
depthCb is callback which is called when new depth image appear