19 #ifndef MAPPER_MAPPER_NODELET_H_
20 #define MAPPER_MAPPER_NODELET_H_
23 #include <sensor_msgs/PointCloud2.h>
24 #include <pcl/point_cloud.h>
25 #include <pcl/point_types.h>
26 #include <pcl/common/transforms.h>
27 #include <pcl/kdtree/kdtree_flann.h>
31 #include <ros/publisher.h>
32 #include <ros/subscriber.h>
33 #include <tf/transform_listener.h>
34 #include <visualization_msgs/MarkerArray.h>
35 #include <tf/transform_broadcaster.h>
36 #include <std_srvs/Trigger.h>
39 #include <boost/filesystem.hpp>
40 #include <boost/range/iterator_range_core.hpp>
41 #include <pluginlib/class_list_macros.h>
51 #include <ff_msgs/Hazard.h>
52 #include <ff_msgs/GetMap.h>
55 #include <ff_msgs/SetFloat.h>
56 #include <ff_msgs/GetFloat.h>
59 #include <std_msgs/Empty.h>
71 #include "ff_msgs/Segment.h"
72 #include "ff_msgs/ControlState.h"
87 namespace fs = boost::filesystem;
125 ff_msgs::SetFloat::Response &res);
128 ff_msgs::GetFloat::Response &res);
132 ff_msgs::SetFloat::Response &res);
135 ff_msgs::GetFloat::Response &res);
139 ff_msgs::SetFloat::Response &res);
142 ff_msgs::GetFloat::Response &res);
145 bool ResetMap(std_srvs::Trigger::Request &req,
146 std_srvs::Trigger::Response &res);
150 ff_msgs::GetMap::Response& res);
154 ff_msgs::GetMap::Response& res);
158 void FadeTask(ros::TimerEvent
const& event);
170 ros::NodeHandle *nh_;
171 bool disable_mapper_ =
false;
181 bool use_haz_cam_, use_perch_cam_;
182 ros::Subscriber segment_sub_, reset_sub_;
185 ros::ServiceServer set_resolution_srv_, set_memory_time_srv_, set_collision_distance_srv_;
186 ros::ServiceServer get_resolution_srv_, get_memory_time_srv_, get_collision_distance_srv_;
187 ros::ServiceServer reset_map_srv_;
190 double octomap_update_rate_, tf_update_rate_, fading_memory_update_rate_;
197 ros::ServiceServer get_free_map_srv_;
198 ros::ServiceServer get_obstacle_map_srv_;
203 std::shared_ptr<tf2_ros::TransformListener> listener_;
204 tf2_ros::Buffer buffer_;
207 ros::Publisher hazard_pub_;
208 ros::Publisher obstacle_marker_pub_;
209 ros::Publisher free_space_marker_pub_;
210 ros::Publisher obstacle_cloud_pub_;
211 ros::Publisher free_space_cloud_pub_;
212 ros::Publisher inflated_obstacle_marker_pub_;
213 ros::Publisher inflated_free_space_marker_pub_;
214 ros::Publisher inflated_obstacle_cloud_pub_;
215 ros::Publisher inflated_free_space_cloud_pub_;
216 ros::Publisher path_marker_pub_;
217 ros::Publisher cam_frustum_pub_;
218 ros::Publisher map_keep_in_out_pub_;
223 #endif // MAPPER_MAPPER_NODELET_H_