Package templates for enhancing the developer experience

I would love to use more complete version of ros2 pkg create. For me currently it seems very bare bones. Below are my thoughts on topics @rgov listed
Note: i use humble, but just in-case doc links are iron

  • General
  • Unit tests (and other kinds of tests):
    • a test related area is added to cmakelist in there lint checks are avaliable but need to add other tests. maybe something like this in docs could be added.
  • CMakeLists.txt and package.xml:
    • adding two executables is not supported (or i failed to do so :smiley: )
    • generated cmake uses some extra elements that are not in tutorials, so sometimes implementing part of a tutorial to generated project got confusing. To be more specific target_include_directories and target_compile_features are generated but not in tutorials. target_include_directories is used to add “include” directory. I would love it if both cli and tutorials are more similiar to encoruge best practices.
  • Launch scripts:
    • no launch script, maybe something can be generated as in docs with a new --launch-version flag that has options like none,yml,xml,python and default could be none. generated launch file could include a basic launch file if pkg has executable
  • Dev containers
    • docs says it is community contributed and instructions are for workspace level and not pkg level. Also i generally dont use it on pkg level, but it might be usefull?
  • Integrated linter / code formatter:
    • pkg create generates lint test. to auto lint cpp i use ament_uncrustify --reformat src but I handle cmake and package.xml errors manually and i think error messages are not beginner friendly enough. for example I fix package.xml errors by changeing order of elements, but errors say “unecpected element xxxx”
  • Continuous integration (GitHub CI, ROS Build Farm): no idea, but a flag on ros2 pkg create could allow to chose ci type and basic ci could be added to run tests, check builds etc.
  • Python 3 (no clue in general)
    • With setup.py
    • Both sync and async templates
    • Using type hints
  • C++
    • Using modern C++1x or 2x
      • dont know it is related but target_compile_features(main PUBLIC c_std_99 cxx_std_17) # Require C99 and C++17 is added in cmake
  • Packaging
    • Building .deb packages
      • would love to know how to do this, Can you explain or link a tutorial on how to do this ?. Also examples I see online are generally of snap packaging rather than debian.
    • Building container images
      • I think this can be be one liner by using osrf desktop image, volumeing current dir, workspaceing to parent dir etc, @rgov Do you have more specific thing in mind ?
  • Other client libraries or implementations: Roslib.js, micro-ROS, “raw” DDS (no clue)
  • Common (basic) patterns
    • Subscribers, publishers, actions, services
    • State machines
    • Message filters
      • I also want to add parameters, but probably use cases are too divergent to define best practices

I would love some auto doc generation.
Also there are probably other related thread about this like: How do you structure your projects and workspaces?

I search nav2, moveit, BT.ros2 etc. But generally wing it :pensive: