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() Result
Returns:

Result 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: int | str) None

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

items: List[Tuple[str, str | int]]
name
class ros2doctor.api.Result

Bases: object

Stores check result.

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

Print all reports or reports of failed checks to terminal.

Returns:

list of Report objects

ros2doctor.api.get_service_names(skip_services: List[str] = []) List[str]

Get all service names using rclpy API.

ros2doctor.api.get_topic_names(skip_topics: List[str] = []) List[str]

Get all topic names using rclpy API.

ros2doctor.api.print_warning_notice() None
ros2doctor.api.run_checks(*, include_warnings: bool = False, exclude_packages: bool = 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)