8 #include <sensor_msgs/Image.h> 9 #include <sensor_msgs/LaserScan.h> 30 sensor_msgs::LaserScanPtr
getLaserScanMsg(
const sensor_msgs::ImageConstPtr& depth_msg,
31 const sensor_msgs::CameraInfoConstPtr& info_msg);
131 template <
typename T>
136 template <
typename T>
139 sensor_msgs::ImagePtr
prepareDbgImage(
const sensor_msgs::ImageConstPtr& depth_msg,
140 const std::list<std::pair<int, int>>& min_dist_points_indices);
void setPublishDbgImgEnable(const bool enable)
setPublishDbgImgEnable
void setRangeLimits(const float rmin, const float rmax)
setRangeLimits sets depth sensor min and max ranges
void calcScanMsgIndexForImgCols(const sensor_msgs::ImageConstPtr &depth_msg)
calcScanMsgIndexForImgCols
void setOutputFrame(const std::string &frame)
setOutputFrame sets the frame to output laser scan
sensor_msgs::ImagePtr dbg_image_
void setDepthImgRowStep(const int row_step)
setDepthImgRowStep
void setScanConfigurated(const bool configured)
setScanConfigurated sets the configuration status
void setTiltCompensation(const bool enable)
setTiltCompensation enables or disables the feature which compensates sensor tilt ...
float getSmallestValueInColumn(const sensor_msgs::ImageConstPtr &depth_msg, int col)
getSmallestValueInColumn finds smallest values in depth image columns
unsigned scan_height_
Number of pixel rows used to scan computing.
bool publish_dbg_image_
Determines if debug image should be published.
sensor_msgs::ImageConstPtr getDbgImage() const
bool tilt_compensation_enable_
Determines if tilt compensation feature is on.
void setSensorTiltAngle(const float angle)
setSensorTiltAngle sets the sensor tilt angle (in degrees)
float sensor_tilt_angle_
Angle of sensor tilt.
float ground_margin_
Margin for floor remove feature (in meters)
bool is_scan_msg_configured_
Determines if laser scan message is configurated.
unsigned depth_img_row_step_
Row step in depth map processing.
std::list< std::pair< int, int > > min_dist_points_indices_
void setThreadsNum(unsigned threads_num)
void setSensorMountHeight(const float height)
setSensorMountHeight sets the height of sensor mount (in meters)
unsigned threads_num_
Determines threads number used in image processing.
~LaserScanKinect()=default
image_geometry::PinholeCameraModel cam_model_
Class for managing CameraInfo messages.
float range_min_
Stores the current minimum range to use.
std::mutex points_indices_mutex_
void setGroundRemove(const bool enable)
setGroundRemove enables or disables the feature which remove ground from scan
void convertDepthToPolarCoords(const sensor_msgs::ImageConstPtr &depth_msg)
convertDepthToPolarCoords converts depth map to 2D
bool cam_model_update_
If continously calibration update required.
std::vector< unsigned > scan_msg_index_
Calculated laser scan msg indexes for each depth image column.
sensor_msgs::ImagePtr prepareDbgImage(const sensor_msgs::ImageConstPtr &depth_msg, const std::list< std::pair< int, int >> &min_dist_points_indices)
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
std::vector< float > tilt_compensation_factor_
Calculated sensor tilt compensation factors.
int image_vertical_offset_
The vertical offset of image based on calibration data.
void setCamModelUpdate(const bool enable)
setCamModelUpdate sets the camera parameters
std::mutex scan_msg_mutex_
void calcGroundDistancesForImgRows(double vertical_fov)
calcGroundDistancesForImgRows calculate coefficients used in ground removing from scan ...
sensor_msgs::LaserScanPtr scan_msg_
Published scan message.
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)
std::string output_frame_id_
Output frame_id for laserscan message.
void calcTiltCompensationFactorsForImgRows(double vertical_fov)
calcTiltCompensationFactorsForImgRows calculate factors used in tilt compensation ...
float sensor_mount_height_
Height of sensor mount from ground.
std::vector< float > dist_to_ground_corrected
Calculated maximal distances for measurements not included as floor.
bool ground_remove_enable_
Determines if remove ground from output scan.
float range_max_
Stores the current maximum range to use.