ros2doctor.api package

Submodules

Module contents

class ros2doctor.api.DoctorCheck

Bases: object

Abstract base class of ros2doctor check.

category() str
Returns:

string linking checks and reports.

check() bool
Returns:

boolean indicating result of checks.

class ros2doctor.api.DoctorReport

Bases: object

Abstract base class of ros2doctor report.

category() str
Returns:

string linking checks and reports.

report() Report
Returns:

Report object storing report content.

class ros2doctor.api.Report(name: str)

Bases: object

Stores report name and content.

add_to_report(item_name: str, item_info: str) None

Add report content to items list (list of string tuples).

items
name
class ros2doctor.api.Result

Bases: object

Stores check result.

add_error()
add_warning()
error
warning
ros2doctor.api.generate_reports(*, categories=None, exclude_packages=False) List[Report]

Print all reports or reports of failed checks to terminal.

Returns:

list of Report objects

ros2doctor.api.get_topic_names(skip_topics: List = ()) List

Get all topic names using rclpy API.

ros2doctor.api.run_checks(*, include_warnings=False, exclude_packages=False) Tuple[Set[str], int, int]

Run all checks and return check results.

Returns:

3-tuple (categories of failed checks, number of failed checks, total number of checks)