rosapi.proxy module

rosapi.proxy.filter_action_servers(topics: list[str]) list[str]

Return a list of action servers.

rosapi.proxy.get_action_type(action_name: str) str

Return the type of the specified ROS action.

If the action does not exist, an empty string is returned.

rosapi.proxy.get_channel_info(channel: str, channels_glob: list[str], getter_function: Callable, include_hidden: bool = False) list[str]

Return a list of node names that are publishing on a specified channel.

A channel may include topic publishers, subscribers, or service providers.

Parameters:
  • channel (str) – The name of the channel to query.

  • channels_glob (list[str]) – A list of glob patterns to filter the channels.

  • getter_function (Callable) – A function to get the channel information for a given node.

  • include_hidden (bool) – Whether to include hidden nodes in the search.

Returns:

A list of node names that match the specified channel.

Return type:

list[str]

rosapi.proxy.get_interfaces() list[str]

Return a list of all the types in the ROS system.

rosapi.proxy.get_node_info(node_name: str, include_hidden: bool = False) tuple[list[str], list[str], list[str]] | None
rosapi.proxy.get_node_publications(node_name: str) list[str]

Return a list of topic names that are being published by the specified node.

rosapi.proxy.get_node_service_types(node_name: str) list[str]

Return a list of service types that are being hosted by the specified node.

rosapi.proxy.get_node_services(node_name: str) list[str]

Return a list of service names that are being hosted by the specified node.

rosapi.proxy.get_node_subscriptions(node_name: str) list[str]

Return a list of topic names that are being subscribed by the specified node.

rosapi.proxy.get_nodes(include_hidden: bool = False) list[str]

Return a list of all the nodes registered in the ROS system.

rosapi.proxy.get_publications_and_types(glob: list[str], getter_function: Callable, **include_hidden_publications: bool) tuple[list[str], list[str]]

Get a list of topic or service publications and their types.

Parameters:
  • glob (str) – A glob pattern to filter the publications.

  • getter_function (Callable) – A function to get the names and types of publications.

  • include_hidden_publications (dict) – Keyword arguments to specify whether to include hidden publications.

Returns:

A tuple of filtered publication names and their types.

Return type:

tuple

rosapi.proxy.get_publishers(topic: str, topics_glob: list[str], include_hidden: bool = False) list[str]

Return a list of node names that are publishing the specified topic.

rosapi.proxy.get_service_node(queried_type: str, services_glob: list[str], include_hidden: bool = False) str

Return the name of the node that is providing the given service, or empty string.

rosapi.proxy.get_service_providers(queried_type: str, services_glob: list[str], include_hidden: bool = False) list[str]

Return a list of node names that are advertising a service with the specified type.

rosapi.proxy.get_service_type(service: str, services_glob: list[str]) str

Return the type of the specified ROS service,.

rosapi.proxy.get_services(services_glob: list[str], include_hidden: bool = False) list[str]

Return a list of all the services advertised in the ROS system.

rosapi.proxy.get_services_and_types(services_glob: list[str], include_hidden: bool = False) tuple[list[str], list[str]]
rosapi.proxy.get_services_for_type(service_type: str, services_glob: list[str], include_hidden: bool = False) list[str]

Return a list of services as specific service type.

rosapi.proxy.get_subscribers(topic: str, topics_glob: list[str], include_hidden: bool = False) list[str]

Return a list of node names that are subscribing to the specified topic.

rosapi.proxy.get_topic_type(topic: str, topics_glob: list[str]) str

Return the type of the specified ROS topic.

rosapi.proxy.get_topics(topics_glob: list[str], include_hidden: bool = False) list[str]

Return a list of all the active topics in the ROS system.

rosapi.proxy.get_topics_and_types(topics_glob: list[str], include_hidden: bool = False) tuple[list[str], list[str]]
rosapi.proxy.get_topics_for_type(topic_type: str, topics_glob: list[str], include_hidden: bool = False) list[str]
rosapi.proxy.init(node: Node) None

Initialize proxy module with a rclpy.node.Node for further use.

This function has to be called before any other for the module to work.

Parameters:

node (Node) – The rclpy node to use for service calls.