00001 #ifndef NJ_OA_COSTMAP_TWIST_HANDLER_H 00002 #define NJ_OA_COSTMAP_TWIST_HANDLER_H 00003 00004 #include <cmath> 00005 #include <string> 00006 00007 #include <geometry_msgs/Twist.h> 00008 #include <nav_msgs/OccupancyGrid.h> 00009 #include <sensor_msgs/LaserScan.h> 00010 #include <tf/transform_listener.h> 00011 00012 #include <map_ray_caster/map_ray_caster.h> 00013 #include <nj_oa_laser/twist_handler.h> 00014 00015 namespace nj_oa_costmap 00016 { 00017 00018 class TwistHandler : public nj_oa_laser::TwistHandler 00019 { 00020 public : 00021 00022 TwistHandler(const double robot_radius, const std::string& laser_frame); 00023 00024 geometry_msgs::Twist getTwist(const nav_msgs::OccupancyGrid& map); 00025 00026 std::string laser_frame; 00027 unsigned int fake_laser_beam_count; 00028 double range_max; 00029 00030 private: 00031 00032 map_ray_caster::MapRayCaster ray_caster_; 00033 tf::TransformListener tf_listerner_; 00034 }; 00035 00036 } // namespace nj_oa_costmap 00037 00038 #endif // NJ_OA_COSTMAP_TWIST_HANDLER_H