Skip to content

Action graph functions can be exposed as free functions in the _rclpy_pybind11 C extension module. #1479

@fujitatomoya

Description

@fujitatomoya

Description

Service/Topic graph functions (like get_service_names_and_types_by_node) are implemented as free functions in C++ rclpy/src/rclpy/graph.cpp and exposed to Python as free functions in the _rclpy_pybind11 C extension module. but action graph functions (like get_action_client_names_and_types_by_node) are implemented as methods of the rclpy::Node C++ class rclpy/src/rclpy/node.cpp and exposed on the Node's handle.

I do not think this is bug, but it would be probably nice to keep the consistent interfaces with action as well.

Motivation

better user-friendly and consistent interfaces.

Design / Implementation Considerations

https://github.com/ros2/rclpy/blob/rolling/rclpy/rclpy/action/__init__.py, those are the target APIs to be moved to graph C implementation, and to be exposed to Python as free functions in the _rclpy_pybind11 C extension module.

Additional Information

Probably we need to give them deprecation warning to this API replacement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions