Skip to content

Commit

Permalink
Clarify with auto_beta for auto beta settings
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Mar 19, 2017
1 parent a0d7e84 commit 655f10b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cfg/AddingImages.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ gen = ParameterGenerator()
gen.add("use_camera_info", bool_t, 0, "Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.", True)

gen.add("alpha", double_t, 0, "weight of the first array elements.", 0.5, 0.0, 1.0)
gen.add("use_beta", bool_t, 0, "True: Automatically set beta weight as 1 - alpha, False: Use user defined beta weight", False)
gen.add("auto_beta", bool_t, 0, "True: Automatically set beta weight as 1 - alpha, False: Use user defined beta weight", True)
gen.add("beta", double_t, 0, "weight of the second array elements.", 0.5, 0.0, 1.0)
gen.add("gamma", double_t, 0, "scalar added to each sum.", 0, 0, 255)

Expand Down
6 changes: 3 additions & 3 deletions src/nodelet/adding_images_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ namespace adding_images {
boost::mutex::scoped_lock lock(mutex_);
config_ = config;
alpha_ = config.alpha;
if ( config.use_beta ) {
beta_ = config.beta;
} else {
if ( config.auto_beta ) {
beta_ = 1.0 - alpha_;
config.beta = beta_;
} else {
beta_ = config.beta;
}
gamma_ = config.gamma;
}
Expand Down

0 comments on commit 655f10b

Please sign in to comment.