15 #include <sensor_msgs/Image.h> 16 #include <sensor_msgs/LaserScan.h> 20 #include <pcl/point_types.h> 21 #include <pcl/sample_consensus/ransac.h> 22 #include <pcl/sample_consensus/sac_model_plane.h> 23 #include <pcl/sample_consensus/method_types.h> 24 #include <pcl/sample_consensus/model_types.h> 25 #include <pcl/segmentation/sac_segmentation.h> 52 const sensor_msgs::CameraInfoConstPtr& info_msg);
157 double angleBetweenRays(
const cv::Point3d& ray1,
const cv::Point3d& ray2)
const;
167 double xc,
double yc,
double x2,
double y2 );
180 std::vector<double>& distances);
184 pcl::PointCloud<pcl::PointXYZ>::Ptr& points,
185 std::list<std::pair<unsigned, unsigned>>& points_indices);
188 double& tilt_angle,
double& height);
190 sensor_msgs::ImagePtr
prepareDbgImage(
const sensor_msgs::ImageConstPtr& depth_msg,
191 const std::list<std::pair<unsigned, unsigned>>& ground_points_indices);
DepthSensorPose()=default
void getGroundPoints(const sensor_msgs::ImageConstPtr &depth_msg, pcl::PointCloud< pcl::PointXYZ >::Ptr &points, std::list< std::pair< unsigned, unsigned >> &points_indices)
std::vector< double > delta_row_
float ransacDistanceThresh_
void setUsedDepthHeight(const unsigned height)
setUsedDepthHeight
std::vector< double > dist_to_ground_min_
std::vector< double > dist_to_ground_max_
float mount_height_min_
Min height of sensor mount from ground.
float groundDistTolerance_
Class for managing sensor_msgs/CameraInfo messages.
float tilt_angle_min_
Min angle of sensor tilt in degrees.
image_geometry::PinholeCameraModel camera_model_
sensor_msgs::ImagePtr dbg_image_
void calcGroundDistancesForImgRows(double mount_height, double tilt_angle, std::vector< double > &distances)
Calculates distances to ground for every row of depth image.
~DepthSensorPose()=default
float tilt_angle_max_
Max angle of sensor tilt in degrees.
bool cam_model_update_
Determines if continuously cam model update is required.
sensor_msgs::ImagePtr prepareDbgImage(const sensor_msgs::ImageConstPtr &depth_msg, const std::list< std::pair< unsigned, unsigned >> &ground_points_indices)
void setRansacMaxIter(const unsigned u)
void setRangeLimits(const float rmin, const float rmax)
void setReconfParamsUpdated(bool updated)
setReconfParamsUpdated
void calcDeltaAngleForImgRows(double vertical_fov)
TFSIMD_FORCE_INLINE tfScalar angle(const Quaternion &q1, const Quaternion &q2)
float range_min_
Stores the current minimum range to use.
unsigned depth_image_step_col_
Columns step in depth processing (px).
void fieldOfView(double &min, double &max, double x1, double y1, double xc, double yc, double x2, double y2)
float mount_height_max_
Max height of sensor mount from ground.
float getSensorTiltAngle() const
sensor_msgs::ImageConstPtr getDbgImage() const
bool reconf_serv_params_updated_
double angleBetweenRays(const cv::Point3d &ray1, const cv::Point3d &ray2) const
void estimateParams(const sensor_msgs::ImageConstPtr &depth_msg, const sensor_msgs::CameraInfoConstPtr &info_msg)
float getSensorMountHeight() const
double lengthOfVector(const cv::Point3d &vec) const
double min(double a, double b)
void setSensorMountHeightMin(const float height)
setSensorMountHeight sets the height of sensor mount (in meters) from ground
void setDepthImgStepCol(const int step)
setDepthImgStepCol
void setDepthImgStepRow(const int step)
setDepthImgStepRow
void setCamModelUpdate(const bool u)
setCamModelUpdate
void sensorPoseCalibration(const sensor_msgs::ImageConstPtr &depth_msg, double &tilt_angle, double &height)
unsigned used_depth_height_
Used depth height from img bottom (px)
void setGroundMaxPoints(const unsigned u)
void setRansacDistanceThresh(const float u)
void setSensorTiltAngleMax(const float angle)
setSensorTiltAngle sets the sensor tilt angle (in degrees)
unsigned depth_image_step_row_
Rows step in depth processing (px).
void setSensorMountHeightMax(const float height)
setSensorMountHeight sets the height of sensor mount (in meters) from ground
float range_max_
Stores the current maximum range to use.
double max(double a, double b)
bool publish_depth_enable_
Determines if debug image should be published.
bool getPublishDepthEnable() const
getPublishDepthEnable
unsigned max_ground_points_
void setSensorTiltAngleMin(const float angle)
setSensorTiltAngle sets the sensor tilt angle (in degrees)
void setPublishDepthEnable(const bool enable)
setPublishDepthEnable
DepthSensorPose & operator=(const DepthSensorPose &)=delete