[image_view] Add dynamic reconfigure to image_nodelet.cpp in melodic#504
Conversation
image_view/cfg/ImageView.cfg
Outdated
| ], "colormap") | ||
|
|
||
| gen.add('do_dynamic_scaling', bool_t, 0, 'Do dynamic scaling about pixel values or not', False) | ||
| gen.add('do_dynamic_scaling', bool_t, 0, 'Do dynamic scaling about pixel values or not', True) |
There was a problem hiding this comment.
Please turn back to false, don't change default behavior please
| { | ||
| // We want to scale floating point images so that they display nicely | ||
| bool do_dynamic_scaling = (msg->encoding.find("F") != std::string::npos); | ||
| bool do_dynamic_scaling = do_dynamic_scaling_ & (msg->encoding.find("F") != std::string::npos); |
There was a problem hiding this comment.
Do you intend to do a bitwise operation, or do you actually mean &&?
There was a problem hiding this comment.
If the message is asking for scaling because its a float image, shouldn't we always do it? Maybe the logic should be that it does scaling for floats, but then it checks the do_dynamic_scaling_ for non-float images to do scalling on those?
|
Thank you for your kind review. I understand that
I pushed an additional commit based on your advice. |
SteveMacenski
left a comment
There was a problem hiding this comment.
@JWhitleyWork take a look.
JWhitleyWork
left a comment
There was a problem hiding this comment.
Thank you for adding this functionality back to the node. LGTM.
I added dynamic reconfigure to image_nodelet.cpp in melodic, which is removed in #479 .
We can select
do_dynamic_scaling,colormap,min_image_valueandmax_image_value.The converted image is published as
~/outputtopic.