void PolygonToMaskImage::onInit()
 {
   DiagnosticNodelet::onInit();
   pub_ = advertise<sensor_msgs::Image>(
     *pnh_, "output", 1);
   onInitPostProcess();
 }
 void NormalDirectionFilter::onInit()
 {
   DiagnosticNodelet::onInit();
   pnh_->param("use_imu", use_imu_, false);
   if (!use_imu_) {
     std::vector<double> direction;
     if (!jsk_topic_tools::readVectorParameter(*pnh_, "direction", direction)) {
       NODELET_ERROR("You need to specify ~direction");
       return;
     }
     jsk_recognition_utils::pointFromVectorToVector<std::vector<double>, Eigen::Vector3f>(
     direction, static_direction_);
   }
   else {
     tf_listener_ = TfListenerSingleton::getInstance();
   }
   
   srv_ = boost::make_shared <dynamic_reconfigure::Server<Config> > (*pnh_);
   dynamic_reconfigure::Server<Config>::CallbackType f =
     boost::bind (
       &NormalDirectionFilter::configCallback, this, _1, _2);
   srv_->setCallback (f);
   pnh_->param("queue_size", queue_size_, 200);
   pub_ = advertise<PCLIndicesMsg>(*pnh_, "output", 1);
   onInitPostProcess();
 }
Example #3
0
 void ROIToRect::onInit()
 {
   DiagnosticNodelet::onInit();
   pub_ = advertise<geometry_msgs::PolygonStamped>(
     *pnh_, "output", 1);
   onInitPostProcess();
 }
 void FindObjectOnPlane::onInit()
 {
   DiagnosticNodelet::onInit();
   pub_min_area_rect_image_ = advertise<sensor_msgs::Image>(
     *pnh_, "debug/min_area_rect_image", 1);
   onInitPostProcess();
 }
 void ColorizeFloatImage::onInit()
 {
   DiagnosticNodelet::onInit();
   pub_ = advertise<sensor_msgs::Image>(*pnh_, "output", 1);
   pnh_->param("channel", channel_, 0);
   onInitPostProcess();
 }
 void ColorizeLabels::onInit()
 {
   DiagnosticNodelet::onInit();
   pub_ = advertise<sensor_msgs::Image>(
     *pnh_, "output", 1);
   onInitPostProcess();
 }
  void MarkerArrayVoxelToPointCloud::onInit()
  {
    DiagnosticNodelet::onInit();

    pub_ = advertise<sensor_msgs::PointCloud2>(*pnh_, "output", 1);
    onInitPostProcess();
  }
 void LabelToClusterPointIndices::onInit()
 {
   DiagnosticNodelet::onInit();
   pub_ = advertise<jsk_recognition_msgs::ClusterPointIndices>(*pnh_, "output", 1);
   pub_bg_ = advertise<pcl_msgs::PointIndices>(*pnh_, "output/bg_indices", 1);
   onInitPostProcess();
 }
  void RegionGrowingMultiplePlaneSegmentation::onInit()
  {
    DiagnosticNodelet::onInit();

    srv_ = boost::make_shared <dynamic_reconfigure::Server<Config> > (*pnh_);
    dynamic_reconfigure::Server<Config>::CallbackType f =
      boost::bind (
        &RegionGrowingMultiplePlaneSegmentation::configCallback, this, _1, _2);
    srv_->setCallback (f);

    pub_polygons_ = advertise<jsk_recognition_msgs::PolygonArray>(
      *pnh_, "output/polygons", 1);
    pub_inliers_ = advertise<jsk_recognition_msgs::ClusterPointIndices>(
      *pnh_, "output/inliers", 1);
    pub_coefficients_ = advertise<jsk_recognition_msgs::ModelCoefficientsArray>(
      *pnh_, "output/coefficients", 1);
    pub_clustering_result_ = advertise<jsk_recognition_msgs::ClusterPointIndices>(
      *pnh_, "output/clustering_result", 1);
    pub_latest_time_ = advertise<std_msgs::Float32>(
      *pnh_, "output/latest_time", 1);
    pub_average_time_ = advertise<std_msgs::Float32>(
      *pnh_, "output/average_time", 1);
    done_initialization_ = true;
    onInitPostProcess();
  }
Example #10
0
 void LabDecomposer::onInit()
 {
   DiagnosticNodelet::onInit();
   pub_l_ = advertise<sensor_msgs::Image>(*pnh_, "output/l", 1);
   pub_a_ = advertise<sensor_msgs::Image>(*pnh_, "output/a", 1);
   pub_b_ = advertise<sensor_msgs::Image>(*pnh_, "output/b", 1);
   onInitPostProcess();
 }
 void RectArrayToDensityImage::onInit()
 {
   DiagnosticNodelet::onInit();
   pnh_->param("approximate_sync", approximate_sync_, false);
   pnh_->param("queue_size", queue_size_, 100);
   pub_ = advertise<sensor_msgs::Image>(*pnh_, "output", 1);
   onInitPostProcess();
 }
 void MultiplyMaskImage::onInit()
 {
   DiagnosticNodelet::onInit();
   pnh_->param("approximate_sync", approximate_sync_, false);
   pub_ = advertise<sensor_msgs::Image>(
     *pnh_, "output", 1);
   onInitPostProcess();
 }
  void ConvexConnectedVoxels::onInit()
  {
     DiagnosticNodelet::onInit();
     pub_indices_ = advertise<
        jsk_recognition_msgs::ClusterPointIndices>(
           *pnh_, "output/indices", 1);
     onInitPostProcess();
 }
Example #14
0
 void RGBDecomposer::onInit()
 {
   DiagnosticNodelet::onInit();
   pub_r_ = advertise<sensor_msgs::Image>(*pnh_, "output/red", 1);
   pub_g_ = advertise<sensor_msgs::Image>(*pnh_, "output/green", 1);
   pub_b_ = advertise<sensor_msgs::Image>(*pnh_, "output/blue", 1);
   onInitPostProcess();
 }
 void HSVDecomposer::onInit()
 {
   DiagnosticNodelet::onInit();
   pub_h_ = advertise<sensor_msgs::Image>(*pnh_, "output/hue", 1);
   pub_s_ = advertise<sensor_msgs::Image>(*pnh_, "output/saturation", 1);
   pub_v_ = advertise<sensor_msgs::Image>(*pnh_, "output/value", 1);
   onInitPostProcess();
 }
 void ImageResizer::onInit() {
   raw_width_ = 0;
   raw_height_ = 0;
   DiagnosticNodelet::onInit();
   initParams();
   initReconfigure();
   initPublishersAndSubscribers();
   onInitPostProcess();
 }
 void VoxelGridLargeScale::onInit()
 {
   DiagnosticNodelet::onInit();
   srv_ = boost::make_shared <dynamic_reconfigure::Server<Config> > (*pnh_);
   typename dynamic_reconfigure::Server<Config>::CallbackType f =
     boost::bind(&VoxelGridLargeScale::configCallback, this, _1, _2);
   srv_->setCallback(f);
   pub_ = advertise<sensor_msgs::PointCloud2>(*pnh_, "output", 1);
   onInitPostProcess();
 }
 void PolygonArrayAreaLikelihood::onInit()
 {
   DiagnosticNodelet::onInit();
   srv_ = boost::make_shared <dynamic_reconfigure::Server<Config> > (*pnh_);
   typename dynamic_reconfigure::Server<Config>::CallbackType f =
     boost::bind (&PolygonArrayAreaLikelihood::configCallback, this, _1, _2);
   srv_->setCallback (f);
   pub_ = advertise<jsk_recognition_msgs::PolygonArray>(*pnh_, "output", 1);
   onInitPostProcess();
 }
 void ColorBasedRegionGrowingSegmentation::onInit()
 {
   ConnectionBasedNodelet::onInit();
   srv_ = boost::make_shared <dynamic_reconfigure::Server<Config> > (*pnh_);
   dynamic_reconfigure::Server<Config>::CallbackType f=
     boost::bind (&ColorBasedRegionGrowingSegmentation::configCallback, this, _1, _2);
   srv_->setCallback (f);
   pub_ = advertise<jsk_recognition_msgs::ClusterPointIndices>(*pnh_, "output", 1);
   onInitPostProcess();
 }
 void HeightmapToPointCloud::onInit()
 {
   DiagnosticNodelet::onInit();
   pub_config_ = pnh_->advertise<jsk_recognition_msgs::HeightmapConfig>(
     "output/config", 1);
   sub_config_ = pnh_->subscribe(
     getHeightmapConfigTopic(pnh_->resolveName("input")), 1,
     &HeightmapToPointCloud::configCallback, this);
   pub_ = advertise<sensor_msgs::PointCloud2>(*pnh_, "output", 1);
   onInitPostProcess();
 }
Example #21
0
 void ColorHistogram::configCallback(Config &new_config, uint32_t level)
 {
   boost::mutex::scoped_lock lock(mutex_);
   b_hist_size_ = new_config.blue_histogram_bin;
   g_hist_size_ = new_config.green_histogram_bin;
   r_hist_size_ = new_config.red_histogram_bin;
   h_hist_size_ = new_config.hue_histogram_bin;
   s_hist_size_ = new_config.saturation_histogram_bin;
   i_hist_size_ = new_config.intensity_histogram_bin;
   onInitPostProcess();
 }
 void OrganizePointCloud::onInit(void)
 {
   ConnectionBasedNodelet::onInit();
   
   pub_ = advertise<sensor_msgs::PointCloud2>(*pnh_, "output", 1);
   pnh_->param<double>("angular_resolution", angular_resolution, 1.0);
   pnh_->param<double>("angle_width", angle_width, 120.0);
   pnh_->param<double>("angle_height", angle_height, 90.0);
   pnh_->param<int>("min_points", min_points, 1000);
   onInitPostProcess();
 }
Example #23
0
  void GaussianBlur::onInit()
  {
    DiagnosticNodelet::onInit();
    srv_ = boost::make_shared <dynamic_reconfigure::Server<Config> > (*pnh_);
    dynamic_reconfigure::Server<Config>::CallbackType f =
      boost::bind (&GaussianBlur::configCallback, this, _1, _2);
    srv_->setCallback (f);

    pub_ = advertise<sensor_msgs::Image>(*pnh_, "output", 1);
    onInitPostProcess();
  }
  void ClusterPointIndicesToPointIndices::onInit()
  {
    DiagnosticNodelet::onInit();
    // dynamic_reconfigure
    srv_ = boost::make_shared <dynamic_reconfigure::Server<Config> > (*pnh_);
    dynamic_reconfigure::Server<Config>::CallbackType f =
      boost::bind(&ClusterPointIndicesToPointIndices::configCallback, this, _1, _2);
    srv_->setCallback(f);

    pub_ = advertise<PCLIndicesMsg>(*pnh_, "output", 1);
    onInitPostProcess();
  }
 // Do nothing
 void ExtractCuboidParticlesTopN::onInit()
 {
   DiagnosticNodelet::onInit();
   srv_ = boost::make_shared <dynamic_reconfigure::Server<Config> > (*pnh_);
   typename dynamic_reconfigure::Server<Config>::CallbackType f =
     boost::bind (&ExtractCuboidParticlesTopN::configCallback, this, _1, _2);
   srv_->setCallback (f);
   pub_ = advertise<pcl_msgs::PointIndices>(*pnh_, "output", 1);
   pub_pose_array_ = advertise<jsk_recognition_msgs::WeightedPoseArray>(*pnh_, "output/pose_array", 1);
   pub_box_array_ = advertise<jsk_recognition_msgs::BoundingBoxArray>(*pnh_, "output/box_array", 1);
   onInitPostProcess();
 }
 void ApplyMaskImage::onInit()
 {
   DiagnosticNodelet::onInit();
   pnh_->param("approximate_sync", approximate_sync_, false);
   pnh_->param("clip", clip_, true);
   pnh_->param("mask_black_to_transparent", mask_black_to_transparent_, false);
   pnh_->param("queue_size", queue_size_, 100);
   pub_image_ = advertise<sensor_msgs::Image>(
     *pnh_, "output", 1);
   pub_mask_ = advertise<sensor_msgs::Image>(
     *pnh_, "output/mask", 1);
   onInitPostProcess();
 }
 void FilterMaskImageWithSize::onInit()
 {
   DiagnosticNodelet::onInit();
   pnh_->param("approximate_sync", approximate_sync_, false);
   pnh_->param("queue_size", queue_size_, 100);
   pnh_->param("use_reference", use_reference_, false);
   srv_ = boost::make_shared <dynamic_reconfigure::Server<Config> >(*pnh_);
   dynamic_reconfigure::Server<Config>::CallbackType f =
     boost::bind(&FilterMaskImageWithSize::configCallback, this, _1, _2);
   srv_->setCallback(f);
   pub_ = advertise<sensor_msgs::Image>(*pnh_, "output", 1);
   onInitPostProcess();
 }
  void ProjectImagePoint::onInit()
  {
    DiagnosticNodelet::onInit();
    srv_ = boost::make_shared <dynamic_reconfigure::Server<Config> > (*pnh_);
    dynamic_reconfigure::Server<Config>::CallbackType f =
      boost::bind (&ProjectImagePoint::configCallback, this, _1, _2);
    srv_->setCallback (f);

    pub_ = advertise<geometry_msgs::PointStamped>(*pnh_, "output", 1);
    pub_vector_ = advertise<geometry_msgs::Vector3Stamped>(
      *pnh_, "output/ray", 1);
    onInitPostProcess();
 }
  void OctreeVoxelGrid::onInit(void)
  {
    DiagnosticNodelet::onInit();
    srv_ = boost::make_shared <dynamic_reconfigure::Server<Config> > (*pnh_);
    dynamic_reconfigure::Server<Config>::CallbackType f =
      boost::bind (&OctreeVoxelGrid::configCallback, this, _1, _2);
    srv_->setCallback (f);

    pub_cloud_ = advertise<sensor_msgs::PointCloud2>(*pnh_, "output", 1);
    pub_marker_ = advertise<visualization_msgs::Marker>(*pnh_, "output_marker", 1);
    pub_octree_resolution_ = advertise<std_msgs::Float32>(*pnh_, "output_resolution", 1);

    onInitPostProcess();
  }
  void CloudOnPlane::onInit()
  {
    DiagnosticNodelet::onInit();
    pcl::console::setVerbosityLevel(pcl::console::L_ALWAYS);
    srv_ = boost::make_shared <dynamic_reconfigure::Server<Config> > (*pnh_);
    dynamic_reconfigure::Server<Config>::CallbackType f =
      boost::bind (
        &CloudOnPlane::configCallback, this, _1, _2);
    srv_->setCallback (f);

    pub_ = advertise<jsk_recognition_msgs::BoolStamped>(*pnh_, "output", 1);

    onInitPostProcess();
  }