rosparam fails, rqt_reconfigure works with image_transport
This is a strange one on Kinetic; I have an image_transport topic being published in a nodelet, and if I do at the command-line (deleting compressedDepth
and theora
):
$ rosparam get /repub/front/image_raw/
compressed: {format: jpeg, jpeg_quality: 80, png_level: 9}
rosparam set -v /repub/front/image_raw/compressed/jpeg_quality 5
set parameter [/repub/front/image_raw/compressed/jpeg_quality] to [5]
$ rosparam get /repub/front/image_raw/
compressed: {format: jpeg, jpeg_quality: 5, png_level: 9}
But if I run rostopic bw /repub/front/image_raw/compressed
, it reports around 100KB per frame, which is the same value as before running the rosparam set
command.
If I then run rqt_configure
, the value of jpeg_quality
remains at 80
. However, if I type in 9
, the bandwidth drops down to about 16KB per frame, which reflects the lower quality value. If I then do:
$ rosparam get /repub/front/image_raw/
compressed: {format: jpeg, jpeg_quality: 9, png_level: 9}
I notice that the jpeg_quality
reflects the value from rqt_configure
, so it's not just a typo. Can anyone explain what might be going on?
One factor might be that I'm using a nodelet and as <remap>
doesn't work out of the box, I do this to initialise:
std::string outTopic = ros::names::resolve(nh.getNamespace(), std::string("out_topic"));
auto const &outRemapped = getRemappingArgs().find(outTopic);
if (outRemapped != getRemappingArgs().end())
{
ROS_INFO("Remapped %s to %s", outTopic.c_str(), outRemapped->second.c_str());
outTopic = outRemapped->second.c_str();
}
image_transport::ImageTransport it(nh);
m_pub = it.advertise(outTopic, 1);
ROS2 seems to have the concept of both "namespace" and "effective namespace" - is there something similar going on here?