36 #define BOOST_PARAMETER_MAX_ARITY 7 44 DiagnosticNodelet::onInit();
45 srv_ = boost::make_shared <dynamic_reconfigure::Server<Config> > (*pnh_);
46 typename dynamic_reconfigure::Server<Config>::CallbackType
f =
48 srv_->setCallback (f);
50 pub_ = advertise<jsk_recognition_msgs::PolygonArray>(*
pnh_,
"output", 1);
73 const jsk_recognition_msgs::PolygonArray::ConstPtr& msg)
78 jsk_recognition_msgs::PolygonArray ret_polygon_array = *msg;
80 for (
size_t i = 0; i < msg->polygons.size(); i++) {
88 if (!magnified_poly->isConvex()) {
89 ROS_WARN(
"Magnified polygon %ld is not convex.", i);
92 ret_polygon_array.polygons[i].polygon = magnified_poly->toROSMsg();
static ConvexPolygon fromROSMsg(const geometry_msgs::Polygon &polygon)
void publish(const boost::shared_ptr< M > &message) const
PLUGINLIB_EXPORT_CLASS(jsk_pcl_ros_utils::PolygonMagnifier, nodelet::Nodelet)
virtual Ptr magnify(const double scale_factor)
virtual void unsubscribe()
virtual Ptr magnifyByDistance(const double distance)
virtual void configCallback(Config &config, uint32_t level)
double magnify_scale_factor_
PolygonMagnifierConfig Config
virtual void magnify(const jsk_recognition_msgs::PolygonArray::ConstPtr &polygon_msg)
boost::shared_ptr< dynamic_reconfigure::Server< Config > > srv_