We would like to present our newly open-sourced ROS 2 Package Generator, simply called ros2-pkg-create. It supports C++ and Python nodes as well as advanced features such as C++ components or lifecycle nodes.
Instantly try it out by running:
pip install ros2-pkg-create
ros2-pkg-create --template ros2_cpp_pkg .
Given the recent interest in Turtle Nest, we felt it’s about time to open-source our own take at a ROS 2 package generator, which use for all of our new packages at Institute for Automotive Engineering (ika) at RWTH Aachen University.
ros2-pkg-create is an interactive CLI tool for quickly generating ROS 2 packages from basic pub/sub nodes to complex lifecycle components. It is meant to replace the official ros2 pkg create
command.
You can either directly control all options through command-line arguments or use the interactive questionnaire to walk through. No more memorization of available options for such a generation tool.
ros2-pkg-create can generate ROS 2 C++ Packages, Python Packages, and Interfaces Packages. The supported features include:
- C++ Package: publisher, subscriber, parameter loading, launch file, service server, action server, timer callback, component, lifecycle node, docker-ros
- Python Package: publisher, subscriber, parameter loading, launch file, service server, action server, timer callback, docker-ros
- Interfaces Package: message, service, action
Under the hood, the templates are implemented using the Jinja templating engine, which allows for easy customizability.
We are very much looking forward to your feedback!
Best,
Lennart from Aachen