-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document topics, services and actions #53
Comments
The tool is meant to document public APIs (generally from header files) based on user provided docstrings. Internally this tool calls Having it parse translational units or other source implementations which implement your ROS 2 node, and look for instantiations of topics, service and actions is not-trivial and also out of scope since it's not documenting public facing API. Moreover, we need this to be a capability in Having said that I think you can still use this tool to document names of topics, services and actions by creating a separate header file (or class) with endpoint names defined. Then have your implementations import this header/class and replace any hardcoded strings with member variables that define the endpoints. Then, this tool will be able to document the header file with the endpoint definitions. |
Still, as discussed in here https://discourse.ros.org/t/documentation-generation-tools-for-ros2/15511 I have a feeling that topics services and actions are part of a public API in the ROS world. Most of the ROS2 packages, need this kind of information and nowadays is made manually. Anyway, thanks for the alternative solution. |
While this isn't exactly what you asked about, I think it would be good to have |
This issue has been mentioned on ROS Discourse. There might be relevant details there: https://discourse.ros.org/t/growing-issue-with-ros-documentation/36075/44 |
PR #76 added basic file listings for message, service, and action files which is close to what @clalancette's comments suggests. What still needs to be done is to figure out how to allow linking to those documentations from other documentation. I've experimented with automatically generating a class link there, but I was not totally happy with the results. In any case, I'm not really sure what more is needed to fulfill this issue. Is this asking for an automatic link from the python or c++ api of a node to the message definition? |
This is a great first step.
I'm not entirely sure what the original reporter had in mind, but to me to complete this issue we would also need to generate documentation for the C++ and Python API used to access a class. In other words, a message file like:
Also generates a C++ class, something like (very heavily edited for brevity and clarity):
(it also generates an equivalent Python class) I think we want rosdoc2 to eventually be able to document those classes, though it is unclear how to do that without first building the package. One thing we could potentially do is to have rosdoc2 directly call the |
That's a very different class of problem than I wanted to solve. What I thought was important is, viewing the package documentation for a package that uses a particular message, I should be able to click on the message type, and it would redirect to the documentation for that message type. You can see an example of this in my demo. From https://rosdabbler.github.io/fqdemo/fqdemo_nodes/generated/python/fqdemo_nodes.PySubPub.html you can go down to:
You can click on the message there, and it will go to the message documentation. I did not include that kind of link in what was landed here, but I might suggest it later. |
I think that is also valuable. |
For documenting the ROS API of a node (which topics, services actions, topics, QoS), I proposed here we leverage AsyncAPI: I also asked eProsima what their customers use to document DDS API's, and they didn't have any official tools from DDS. |
It would be great to document also, the topics, services and actions for each class with the default name and ros interface type
The text was updated successfully, but these errors were encountered: