Skip to content

Updater::add to take ownership of FunctionDiagnosticTask #309

@russkel

Description

@russkel

I believe this should probably be supported:

  diagnostic_updater::FunctionDiagnosticTask helm_diag(
          "Helm", [&helm_report](diagnostic_updater::DiagnosticStatusWrapper & stat) {
              stat.add("Modes", helm_report.getModeSummary());
              stat.add("Halted", helm_report.getHalted());
          });

  diag_updater->add(std::move(helm_diag));

Unfortunately, this doesn't work and segfaults when helm_diag goes out of scope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs more workSomeone has worked on this but more work is neededros2PR tackling a ROS2 branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions