Hi, thank you for your contribution!
I think that this is an extremely important topic, could you provide examples of how your tool can be useful for documenting ROS 2 code (like a simple ROS 2 node snippet and the automatically generated documentation) and which features does it add over standard, non-ROS related tools?
I think that what would be extremely valuable here is to be able to automatically document the ROS 2 interfaces used by a system, i.e. which topics is a node subscribing, which topics is a node publishing to and which parameters are used by the node and can be customized by the user.
I think that this is an extremely important topic, could you provide examples of how your tool can be useful for documenting ROS 2 code (like a simple ROS 2 node snippet and the automatically generated documentation) and which features does it add over standard, non-ROS related tools?
Thanks!
This is very easy, all we have to do is just 4 thing.
This tool was just developed yesterday, so now we can generate very poor looking documentation. https://ouxt-polaris.github.io/color_names/
But I think we can generate much more good looking documentation in the near future.
Yes, it is extreamly valuable, but I think we cannot do this fully automatically.
This is because ROS2 can decide topic names/node names in runtime.
But we have to generate documentation in build time.
So, I integrate doxygen and make it easier to write detail documentation for ROS2 users.
It is not fully automated, but we can write documentation with much less effort.
Even if names are runtime arguments, from my experience most of the times a default name is known at compile time and then it’s eventually updated using ROS remapping command line interfaces.
Parsers and static analysis tools should be able to extract information from things like
using MyMsg = std_msgs::msg::FancyMsg;
std::string my_topic_name = "fancy_topic";
auto sub = this->create_subscription<MyMsg>(my_topic_name, QoS);
In the very limited cases where a default is not provided at compile time, the fact that a subscription to FancyMsg is present could still be extracted, leaving only the name to be written by the user.
Possibly… though an initiative I think is probably more promising is building this process into the ROS 2 index - e.g. generate pages on docs.ros2.org for bloom-released packages automatically. There exists currently the “API Docs” link - I’m not sure how it works, but it’s connected for some core ros packages.
Additionally, some packages (like slam_toolbox) above have links to the Wiki, but that only supports ROS1 packages.
Before trying to fork into an independently-maintained infrastructure via github actions, I think I’d first be more interested in seeing how we can assist Open Robotics in upgrading the ROS Index infrastructure to generate API / Wiki / Docs pages for ROS 2 packages in the index.
It seems… document generation tool is already integrated with ROS2 build farm?
I think there is no document generation tool integrated with ament_cmake.
For ROS1 there is http://wiki.ros.org/rosdoc_lite which is used by the buildfarm to generate documentation. It wraps tools like doxygen, sphinx, and epydoc.