Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions semantic_inference_ros/app/closed_set_rosbag_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ CvImage::Ptr ClosedSetRosbagWriter::runSegmentation(const CvImage& image,
const auto derotated = rotator.derotate(result.labels);
auto labels = std::make_shared<cv_bridge::CvImage>();
labels->header = image.header;
labels->encoding = "16SC1"; // 16-bit signed, single channel
derotated.convertTo(labels->image, CV_16S);
return labels;
}
Expand Down
5 changes: 3 additions & 2 deletions semantic_inference_ros/launch/closed_set.launch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,14 @@ launch:
- node: # Remapping pre-recorded labels
if: $(var use_prerecorded)
pkg: semantic_inference_ros
exec: recolor_node
exec: relabel_node
name: semantic_inference
on_exit: shutdown
args: |
$(if $(not $(var verbose)) --disable-stdout-logs)
--config-utilities-file $(find-pkg-share semantic_inference_ros)/config/label_groupings/$(var labelspace_name).yaml
--config-utilities-file $(find-pkg-share semantic_inference_ros)/config/label_groupings/$(var labelspace_name).yaml@output/recolor
--config-utilities-yaml {worker: {max_queue_size: $(var max_image_queue_size), image_separation_s: $(var min_separation_s)}}
--config-utilities-yaml {output: {recolor: {colormap_path: $(var colormap_path)}}}
- arg: {name: run_backprojection, default: 'false', description: Triggers decompression for RGB stream}
- arg: {name: backprojection_config, default: '{}', description: Extra parameters for backprojection}
- node: # 2D semantic segmentation
Expand Down
7 changes: 6 additions & 1 deletion semantic_inference_ros/src/relabel_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* * -------------------------------------------------------------------------- */

#include <config_utilities/config_utilities.h>
#include <config_utilities/parsing/commandline.h>
#include <config_utilities/printing.h>
#include <config_utilities/validation.h>
#include <ianvs/image_subscription.h>
Expand Down Expand Up @@ -87,7 +89,10 @@ void declare_config(RelabelNode::Config& config) {
}

RelabelNode::RelabelNode(const rclcpp::NodeOptions& options)
: Node("recolor_node", options), color_sub_(*this), label_sub_(*this) {
: Node("recolor_node", options),
config_(config::fromCLI<Config>(options.arguments())),
color_sub_(*this),
label_sub_(*this) {
logging::Logger::addSink("ros", std::make_shared<RosLogSink>(get_logger()));
logging::setConfigUtilitiesLogger();

Expand Down