Go to the documentation of this file.
36 #ifndef JSK_PCL_ROS_ENVIRONMENT_PLANE_MODELING_H_
37 #define JSK_PCL_ROS_ENVIRONMENT_PLANE_MODELING_H_
41 #include <pcl/kdtree/kdtree_flann.h>
45 #include <dynamic_reconfigure/server.h>
47 #include <jsk_recognition_msgs/PolygonArray.h>
48 #include <jsk_recognition_msgs/ModelCoefficientsArray.h>
49 #include <jsk_recognition_msgs/ClusterPointIndices.h>
50 #include <sensor_msgs/PointCloud2.h>
51 #include <jsk_recognition_msgs/EnvironmentLock.h>
52 #include <jsk_recognition_msgs/PolygonOnEnvironment.h>
55 #include <jsk_pcl_ros/EnvironmentPlaneModelingConfig.h>
60 #include <std_srvs/Empty.h>
62 #include <jsk_topic_tools/time_accumulator.h>
65 #include <jsk_recognition_msgs/SimpleOccupancyGridArray.h>
66 #include <jsk_recognition_msgs/BoundingBoxArray.h>
67 #include <jsk_topic_tools/diagnostic_nodelet.h>
80 class EnvironmentPlaneModeling:
public jsk_topic_tools::DiagnosticNodelet
83 typedef EnvironmentPlaneModelingConfig
Config;
86 sensor_msgs::PointCloud2,
87 sensor_msgs::PointCloud2,
88 jsk_recognition_msgs::PolygonArray,
89 jsk_recognition_msgs::ModelCoefficientsArray,
90 jsk_recognition_msgs::ClusterPointIndices >
SyncPolicy;
115 const sensor_msgs::PointCloud2::ConstPtr& cloud_msg,
116 const sensor_msgs::PointCloud2::ConstPtr& full_cloud_msg,
117 const jsk_recognition_msgs::PolygonArray::ConstPtr& polygon_msg,
118 const jsk_recognition_msgs::ModelCoefficientsArray::ConstPtr& coefficients_msg,
119 const jsk_recognition_msgs::ClusterPointIndices::ConstPtr& indices_msg);
122 const sensor_msgs::PointCloud2::ConstPtr& cloud_msg,
123 const sensor_msgs::PointCloud2::ConstPtr& full_cloud_msg,
124 const jsk_recognition_msgs::PolygonArray::ConstPtr& polygon_msg,
125 const jsk_recognition_msgs::ModelCoefficientsArray::ConstPtr& coefficients_msg,
126 const jsk_recognition_msgs::ClusterPointIndices::ConstPtr& indices_msg);
130 const sensor_msgs::PointCloud2::ConstPtr& cloud_msg,
131 const sensor_msgs::PointCloud2::ConstPtr& full_cloud_msg,
132 const jsk_recognition_msgs::PolygonArray::ConstPtr& polygon_msg,
133 const jsk_recognition_msgs::ModelCoefficientsArray::ConstPtr& coefficients_msg,
134 const jsk_recognition_msgs::ClusterPointIndices::ConstPtr& indices_msg);
137 const pcl::PointCloud<pcl::PointNormal>::Ptr& cloud,
138 const jsk_recognition_msgs::ClusterPointIndices::ConstPtr& indices_msg,
139 const jsk_recognition_msgs::ModelCoefficientsArray::ConstPtr& coefficients_msg);
143 const std_msgs::Header&
header,
144 std::vector<jsk_recognition_utils::ConvexPolygon::Ptr>& convexes);
158 const std_msgs::Header&
header,
159 std::vector<jsk_recognition_utils::ConvexPolygon::Ptr>& convexes);
167 const std_msgs::Header&
header,
168 std::vector<GridPlane::Ptr>& grids);
174 virtual std::vector<jsk_recognition_utils::ConvexPolygon::Ptr>
magnifyConvexes(
175 std::vector<jsk_recognition_utils::ConvexPolygon::Ptr>& convexes);
182 pcl::PointCloud<pcl::PointNormal>::Ptr& cloud,
183 std::vector<jsk_recognition_utils::ConvexPolygon::Ptr> convexes,
184 std::set<int>& non_plane_indices);
187 std::vector<GridPlane::Ptr>& raw_grid_maps);
190 const jsk_recognition_msgs::BoundingBox::ConstPtr& box_array);
193 const std_msgs::Header&
header,
194 std::vector<GridPlane::Ptr>& grid_maps);
197 std::vector<GridPlane::Ptr>& grid_maps);
200 const std::string& footprint_frame_id,
const std_msgs::Header&
header,
201 const std::vector<GridPlane::Ptr>& grid_maps);
204 const Eigen::Affine3f& pose,
const std::vector<GridPlane::Ptr>& grid_maps);
207 const jsk_recognition_msgs::BoundingBox::ConstPtr&
box,
208 const std_msgs::Header&
header,
212 const geometry_msgs::PoseStamped::ConstPtr&
msg);
virtual std::vector< GridPlane::Ptr > erodeFiltering(std::vector< GridPlane::Ptr > &grid_maps)
double footprint_plane_angular_threshold_
message_filters::Subscriber< sensor_msgs::PointCloud2 > sub_full_cloud_
message_filters::Subscriber< jsk_recognition_msgs::ClusterPointIndices > sub_indices_
virtual bool isValidFrameIds(const sensor_msgs::PointCloud2::ConstPtr &cloud_msg, const sensor_msgs::PointCloud2::ConstPtr &full_cloud_msg, const jsk_recognition_msgs::PolygonArray::ConstPtr &polygon_msg, const jsk_recognition_msgs::ModelCoefficientsArray::ConstPtr &coefficients_msg, const jsk_recognition_msgs::ClusterPointIndices::ConstPtr &indices_msg)
ros::Publisher pub_grid_map_
tf::TransformListener * tf_listener_
message_filters::sync_policies::ExactTime< sensor_msgs::PointCloud2, sensor_msgs::PointCloud2, jsk_recognition_msgs::PolygonArray, jsk_recognition_msgs::ModelCoefficientsArray, jsk_recognition_msgs::ClusterPointIndices > SyncPolicy
ros::Publisher pub_debug_magnified_polygons_
virtual std::vector< GridPlane::Ptr > buildGridPlanes(pcl::PointCloud< pcl::PointNormal >::Ptr &cloud, std::vector< jsk_recognition_utils::ConvexPolygon::Ptr > convexes, std::set< int > &non_plane_indices)
make GridPlane from jsk_recognition_utils::ConvexPolygon and PointCloud
ros::Publisher pub_debug_convex_point_cloud_
virtual std::vector< GridPlane::Ptr > morphologicalFiltering(std::vector< GridPlane::Ptr > &raw_grid_maps)
virtual std::vector< jsk_recognition_utils::ConvexPolygon::Ptr > magnifyConvexes(std::vector< jsk_recognition_utils::ConvexPolygon::Ptr > &convexes)
Magnify jsk_recognition_utils::ConvexPolygons according to maginify_distance_ parameter.
boost::shared_ptr< message_filters::Synchronizer< SyncPolicy > > sync_
std_msgs::Header latest_global_header_
ros::Subscriber sub_move_base_simple_goal_
jsk_recognition_msgs::BoundingBox::ConstPtr latest_leg_bounding_box_
virtual ~EnvironmentPlaneModeling()
EnvironmentPlaneModeling()
ros::Publisher pub_debug_noeroded_grid_map_
std::vector< GridPlane::Ptr > latest_grid_maps_
virtual void boundingBoxCallback(const jsk_recognition_msgs::BoundingBox::ConstPtr &box_array)
ros::Publisher pub_debug_plane_coords_
virtual void inputCallback(const sensor_msgs::PointCloud2::ConstPtr &cloud_msg, const sensor_msgs::PointCloud2::ConstPtr &full_cloud_msg, const jsk_recognition_msgs::PolygonArray::ConstPtr &polygon_msg, const jsk_recognition_msgs::ModelCoefficientsArray::ConstPtr &coefficients_msg, const jsk_recognition_msgs::ClusterPointIndices::ConstPtr &indices_msg)
main callback function
bool complete_footprint_region_
virtual int lookupGroundPlaneForFootprint(const std::string &footprint_frame_id, const std_msgs::Header &header, const std::vector< GridPlane::Ptr > &grid_maps)
virtual void publishGridMaps(ros::Publisher &pub, const std_msgs::Header &header, std::vector< GridPlane::Ptr > &grids)
Publish array of GridPlane::Ptr by using specified publisher.
message_filters::Subscriber< jsk_recognition_msgs::PolygonArray > sub_polygons_
virtual void printInputData(const sensor_msgs::PointCloud2::ConstPtr &cloud_msg, const sensor_msgs::PointCloud2::ConstPtr &full_cloud_msg, const jsk_recognition_msgs::PolygonArray::ConstPtr &polygon_msg, const jsk_recognition_msgs::ModelCoefficientsArray::ConstPtr &coefficients_msg, const jsk_recognition_msgs::ClusterPointIndices::ConstPtr &indices_msg)
virtual std::vector< GridPlane::Ptr > completeFootprintRegion(const std_msgs::Header &header, std::vector< GridPlane::Ptr > &grid_maps)
virtual void publishConvexPolygonsBoundaries(ros::Publisher &pub, const std_msgs::Header &header, std::vector< jsk_recognition_utils::ConvexPolygon::Ptr > &convexes)
message_filters::Subscriber< sensor_msgs::PointCloud2 > sub_cloud_
virtual void unsubscribe()
unsubscription callback function of jsk_topic_tools::DiagnosticNodelet. This method is empty method b...
virtual void configCallback(Config &config, uint32_t level)
Callback method of dynamic reconfigure.
int morphological_filter_size_
ros::Publisher pub_debug_raw_grid_map_
ros::Publisher pub_debug_magnified_plane_coords_
virtual void subscribe()
subscription callback function of jsk_topic_tools::DiagnosticNodelet. This method is empty method bec...
boost::shared_ptr< dynamic_reconfigure::Server< Config > > srv_
message_filters::Subscriber< jsk_recognition_msgs::ModelCoefficientsArray > sub_coefficients_
virtual void publishConvexPolygons(ros::Publisher &pub, const std_msgs::Header &header, std::vector< jsk_recognition_utils::ConvexPolygon::Ptr > &convexes)
Publish array of jsk_recognition_utils::ConvexPolygon::Ptr by using specified publisher.
virtual void moveBaseSimpleGoalCallback(const geometry_msgs::PoseStamped::ConstPtr &msg)
boost::mutex mutex
global mutex.
double footprint_plane_distance_threshold_
double distance_threshold_
std::vector< std::string > footprint_frames_
ros::Publisher pub_non_plane_indices_
ros::Publisher pub_snapped_move_base_simple_goal_
EnvironmentPlaneModelingConfig Config
virtual std::vector< jsk_recognition_utils::ConvexPolygon::Ptr > convertToConvexPolygons(const pcl::PointCloud< pcl::PointNormal >::Ptr &cloud, const jsk_recognition_msgs::ClusterPointIndices::ConstPtr &indices_msg, const jsk_recognition_msgs::ModelCoefficientsArray::ConstPtr &coefficients_msg)
ros::Subscriber sub_leg_bbox_
virtual GridPlane::Ptr completeGridMapByBoundingBox(const jsk_recognition_msgs::BoundingBox::ConstPtr &box, const std_msgs::Header &header, GridPlane::Ptr grid_map)
jsk_pcl_ros
Author(s): Yohei Kakiuchi
autogenerated on Tue Jan 7 2025 04:05:44