ros2 / examples

Example packages for ROS 2
Apache License 2.0
714 stars 316 forks source link

Restructure rclcpp folders #264

Closed maryaB-osr closed 4 years ago

maryaB-osr commented 4 years ago

This isn't very important, but the way the rclpy packages are organized makes a nice landing place for the tutorials to point to based on the topic.

So in the python pub/sub tutorial for example, we can link right to rclpy/topics and the reader will see exactly what they need to see and nothing extra. Whereas if I wanted to do the same for the c++ pub/sub tutorial, I have to link to just rclcpp and the reader is bombarded by all these other packages they don't need to see. That's my reasoning, but again, it's not super important.

Also I wasn't sure if minimal_composition, minimal_timer and multithreaded_executor could all be placed in one folder or what that folder would be called.

Signed-off-by: maryaB-osr marya@openrobotics.org

clalancette commented 4 years ago

So in the python pub/sub tutorial for example, we can link right to rclpy/topics and the reader will see exactly what they need to see and nothing extra. Whereas if I wanted to do the same for the c++ pub/sub tutorial, I have to link to just rclcpp and the reader is bombarded by all these other packages they don't need to see. That's my reasoning, but again, it's not super important.

Looking at this, I actually agree with your reasoning. Putting in the subdirectories gives it a bit of extra clarity that I like.

Also I wasn't sure if minimal_composition, minimal_timer and multithreaded_executor could all be placed in one folder or what that folder would be called.

No, they all deal with different aspects of what rclcpp can do. Going with this new structure, I think the directory structure should be something like this:

- rclcpp
    - actions
        - minimal_action_client
        - minimal_action_server
    - composition
        - minimal_composition
    - executors
        - multithreaded_executor
    - services
        - minimal_client
        - minimal_service
    - timers
        - minimal_timer
    - topics
        - minimal_publisher
        - minimal_subscriber

Separately we should add a "timer" tutorial to the rclpy stuff, but that is follow-up work.

@maryaB-osr Does that make sense to you?

maryaB-osr commented 4 years ago

@clalancette Yup that makes sense to me. "Time", "executors/spinners" and "composition" are all on the list for new tutorials :)

clalancette commented 4 years ago

CI: