Skip to content

Commit

Permalink
Adding image/depth +namespaces as params
Browse files Browse the repository at this point in the history
This works better for running the face_detector within a namespace and keeping it predictable
  • Loading branch information
ruffsl committed Feb 13, 2016
1 parent 8dc5a7e commit 9a77696
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions face_detector/src/face_detection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ class FaceDetector
local_nh.param("use_rgbd", use_rgbd_, false);
local_nh.param("queue_size", queue_size, 5);
local_nh.param("approximate_sync", approx, false);
local_nh.param("image_topic", image_image_, std::string("image_raw"));
local_nh.param("depth_topic", depth_image_, std::string("image_raw"));
local_nh.param("rgb_ns", rgb_ns_, std::string("rgb"));
local_nh.param("depth_ns", depth_ns_, std::string("depth"));

if (do_display_)
{
Expand All @@ -240,10 +244,6 @@ class FaceDetector
faces_->initFaceDetectionDepth(1, haar_filename_, face_size_min_m, face_size_max_m, max_face_z_m, face_sep_dist_m);

camera_ = nh_.resolveName("camera");
image_image_ = nh_.resolveName("image_topic");
depth_image_ = nh_.resolveName("depth_topic");
rgb_ns_ = nh_.resolveName("rgb_ns");
depth_ns_ = nh_.resolveName("depth_ns");
camera_topic_ = ros::names::clean(camera_ + "/" + rgb_ns_ + "/" + image_image_);
depth_topic_ = ros::names::clean(camera_ + "/" + depth_ns_ + "/" + depth_image_);
camera_info_topic_ = ros::names::clean(camera_ + "/" + rgb_ns_ + "/camera_info");
Expand Down

0 comments on commit 9a77696

Please sign in to comment.