37 #ifndef JSK_PCL_ROS_HEIGHTMAP_TIME_ACCUMULATION_H_ 38 #define JSK_PCL_ROS_HEIGHTMAP_TIME_ACCUMULATION_H_ 41 #include <jsk_recognition_msgs/HeightmapConfig.h> 42 #include <jsk_pcl_ros/HeightmapTimeAccumulationConfig.h> 43 #include <dynamic_reconfigure/server.h> 44 #include <sensor_msgs/PointCloud2.h> 45 #include <sensor_msgs/Image.h> 46 #include <opencv2/opencv.hpp> 52 #include <std_srvs/Empty.h> 55 #include <boost/accumulators/accumulators.hpp> 56 #include <boost/accumulators/statistics/mean.hpp> 57 #include <boost/accumulators/statistics/variance.hpp> 58 #include <boost/accumulators/statistics/count.hpp> 59 #include <boost/accumulators/statistics/stats.hpp> 70 typedef HeightmapTimeAccumulationConfig
Config;
71 typedef boost::accumulators::accumulator_set<
83 const sensor_msgs::Image::ConstPtr& new_heightmap);
85 const cv::Mat& heightmap,
const std_msgs::Header&
header);
86 virtual cv::Point
toIndex(
const PointType&
p,
const cv::Mat& map);
88 virtual bool isValidCell(
const cv::Point& index,
const cv::Mat& map);
90 const jsk_recognition_msgs::HeightmapConfig::ConstPtr&
config);
92 const sensor_msgs::PointCloud2::ConstPtr&
msg);
94 std_srvs::Empty::Response&
res);
96 cv::Mat &new_heightmap);
97 virtual void mergedAccmulation(pcl::PointCloud<PointType > &transformed_pointcloud,
98 cv::Mat &new_heightmap);
116 jsk_recognition_msgs::HeightmapConfig::ConstPtr
config_;
virtual void configTopicCallback(const jsk_recognition_msgs::HeightmapConfig::ConstPtr &config)
virtual bool resetCallback(std_srvs::Empty::Request &req, std_srvs::Empty::Response &res)
std::vector< OneDataStat::Ptr > stats
global variable to store stats.
boost::shared_ptr< HeightmapTimeAccumulation > Ptr
HeightmapTimeAccumulation()
ros::Publisher pub_output_
message_filters::Subscriber< sensor_msgs::Image > sub_heightmap_
jsk_recognition_msgs::HeightmapConfig::ConstPtr config_
virtual bool isValidCell(const cv::Point &index, const cv::Mat &map)
int bilateral_filter_size_
boost::shared_ptr< dynamic_reconfigure::Server< Config > > srv_
ros::ServiceServer srv_reset_
virtual void prevPointCloud(const sensor_msgs::PointCloud2::ConstPtr &msg)
pcl::PointCloud< PointType > prev_cloud_
double bilateral_sigma_space_
tf::TransformListener * tf_
virtual bool isValidIndex(const cv::Point &index, const cv::Mat &map)
virtual void configCallback(Config &config, uint32_t level)
virtual void overwriteAccmulation(pcl::PointCloud< PointType > &transformed_pointcloud, cv::Mat &new_heightmap)
virtual void mergedAccmulation(pcl::PointCloud< PointType > &transformed_pointcloud, cv::Mat &new_heightmap)
boost::accumulators::accumulator_set< float, boost::accumulators::stats< boost::accumulators::tag::variance, boost::accumulators::tag::count, boost::accumulators::tag::mean > > Accumulator
virtual cv::Point toIndex(const PointType &p, const cv::Mat &map)
ros::Subscriber sub_config_
virtual void publishHeightmap(const cv::Mat &heightmap, const std_msgs::Header &header)
cv::Mat accumulated_heightmap_
double bilateral_sigma_color_
HeightmapTimeAccumulationConfig Config
virtual void accumulate(const sensor_msgs::Image::ConstPtr &new_heightmap)
virtual void unsubscribe()
std::string center_frame_id_
boost::mutex mutex
global mutex.
ros::Publisher pub_config_
std::string fixed_frame_id_
double count(const OneDataStat &d)
wrapper function for count method for boost::function
Eigen::Affine3f prev_from_center_to_fixed_
boost::shared_ptr< tf::MessageFilter< sensor_msgs::Image > > tf_filter_
ros::Subscriber sub_previous_pointcloud_