ros-infrastructure / rosdoc2

Command-line tool for generating documentation for ROS 2 packages.
Apache License 2.0
29 stars 9 forks source link

message generation is picking up and documenting messages that are supposed to be hidden #82

Closed tfoote closed 3 months ago

tfoote commented 3 months ago

Packages like rclcpp have test content in sub folders which are not advertised messages. However they're being added to the package documentation.

image

rclcpp$ grep -rI LargeMessage 
test/rclcpp/test_publisher_with_type_adapter.cpp:struct TypeAdapter<std::string, rclcpp::msg::LargeMessage>
test/rclcpp/test_publisher_with_type_adapter.cpp:  using ros_message_type = rclcpp::msg::LargeMessage;
test/rclcpp/test_publisher_with_type_adapter.cpp:  using StringTypeAdapter = rclcpp::TypeAdapter<std::string, rclcpp::msg::LargeMessage>;
test/rclcpp/test_publisher_with_type_adapter.cpp:  using StringTypeAdapter = rclcpp::TypeAdapter<std::string, rclcpp::msg::LargeMessage>;
test/rclcpp/CMakeLists.txt:  ../msg/LargeMessage.msg

We should limit the discovery of messages to be in the msg directory.

rkent commented 3 months ago

I see the problem.

The Developer guide for package layout does not mention the location of messages, services, and actions, but it does give locations for /test and /doc. If I followed that specifically, I would exclude /test and /doc rather than only include /msg, /srv, and /action. Is there an official source that restricts these to specific named folders?

Note the test case full_package specifically includes a test case (for the service) that is outside the "official" location.

tfoote commented 3 months ago

The message generation processes will only look in those directories. I've opened a PR for https://github.com/ros2/ros2_documentation/pull/4246 to add it to the developer guide.