Capabilities: Mostly dependencies on Internal and util packages.
Rospy rependency in advertise_service.
Internal:
General dependencies on rospy (parameters, rostime, logs).
Dependency on roslib in message_conversion is not used; it can be removed.
Publishers.py:
Needs rospy.Publisher (straightforward)
Depends on rospy.SubscribeListener. This is used to avoid losing messages when publishing before subscribers have set up connections; might be solved using a proper QoS settings.
Depends on rostopic.get_topic_type.
Ros_loader.py:
Remove dependency on rospy
Needs roslib.launcher to import specific types→ maybe this can be replaced with ros2pkg. Note: This is used by rosapi package as well.
Services.py:
Needs services and resolve_name from rospy.
Needs rosservice.get_service_type (also used by rosapi).
Subscribers.py:
Needs rospy.Subscriber and logging (straightforward).
Needs rostopic.get_topic_type (also needed by rosapi).
This package exposes several ROS services that require some dependencies to fulfill the requests. They are listed below, separated in categories [ROS1 package and module used in brackets]:
Services requiring introspection over ROS system (as in rosservice, rostopic, etc). This functionality should be found in ros2cli:
Topics: active topics in system [rosgraph.masterapi] → ros2topic.api.get_topic_names.
Topics_for_type: list of topics of a given type [rosservice.get_topic_type].
Services: list of services being advertised [rosservice.get_service_list.
Services_for_type: services that are publishing a given type [rosservice.rosservice_find].
Nodes: List of all registered nodes [rosnode.get_node_names].
Action_servers: List of action servers [same as Topics service, nothing new].
Topic_type: returns the type of a given topic [rostopic.get_topic_type].
Service_type: returns the type of a given service [rosservice.get_service_type].
Publishers: returns list of node names publishing to a given topic [rosgraph.masterapi].
Subscribers: returns list of node names subscribing to a given topic [rosgraph.masterapi].
Service_providers: returns a list of node names that are advertising a service with the specified type [rosgraph.masterapi].
Service_node: returns name of the node providing a given service [rosservice.get_service_node].
Service_host: returns the name of the machine that is hosting the given service [rosservice.get_service_uri].
Services depending on roslib via rosbridge_library.internal (roslib.launcher.load_manifest, which internally depends on RosPack):
Message_details: returns typedef for a message type.
Service_request_details: returns typedef for a service request type.
Service_response_details: returns typedef for a service response type.
Parameter handling services; needs parameter adaptation to ROS2 (parameters are associated to nodes in ROS2 as opposed to ROS1, which may result in slight changes wrt. current API):
Set_param
Get_param
Has_param
Search_param
Delete_param
Get_param_names
Misc
Get_time: equivalent to rospy.get_rostime().
The idea to start with is to depend on packages in ros2clirepository and make use of its functionality as it is (mainly inside api python packages). As a second step, one possibility would be to refactor ros2cli (repository) a bit to extract the functionality to be reused here from the command line part of the code (i.e. don't depend on ros2cli package itself). This shall be analyzed throughout the implementation.