Introducing Turtle Nest: GUI for ROS 2 package creation

Hi everyone,

I’m here to announce Turtle Nest - a GUI application to create ROS 2 packages.

I started this project recently to make ROS 2 package creation easier and to reduce the likelihood of user-made errors. I believe Turtle Nest will help the beginners to get started faster with ROS 2, while also helping professional developers to create new packages.

For instance, I often found myself reviewing the documentation to refresh my memory of ros2 pkg create command and its possible options. I also needed to check how to create new nodes and launch files, and how to add them to CMakeLists.txt or setup.py files. This whole process has many potential pitfalls and places for possible mistakes, especially for new users.

With Turtle Nest, you can just simply run turtle-nest command and let the application guide you through the package creation.

Here are some key advantages of using Turtle Nest instead of the ‘ros2 pkg create’ command:

  • Easy to use - no need to dig through the ROS 2 documentation for the right commands or manually add things to CMakeLists.txt or setup.py.
  • Create C++ and/or Python nodes - which are ready for further development.
  • Automatically adds necessary dependencies - rclpy, rclcpp, and std_msgs.
  • Option to create a launch file - that launches the created node.
  • Create C++ and Python nodes within the same package - combine languages that typically require separate packages.
  • Naming conventions enforced - no more failing builds due to incorrect package or node names.
  • Remembers the important details - workspace path, maintainer name, and maintainer email for the future packages.

Future enhancements may include:

  • Easy creation of _msgs -packages
  • Adding parameter files
  • Including more dependencies
  • Adding nodes, launch files, etc., to existing packages

I plan to release this package via apt, but before that I wanted to post it here to hear your thoughts and have you try it out first. All feedback is greatly appreciated!

:link: GitHub - Jannkar/turtle_nest: Ros 2 Package Creator

21 Likes

Oh please don’t make GUI the only interface.

Will it create a template node of the chosen language?

Great work! Maybe it could include the ability to add sub/pubs for user provided topic names. I see it as an efficiency tool that could even possibly be integrated into code editors through an extension (like the Arduino or PlatformIO VSCode extensions). Would be interested in contributing to whatever you have planned for it :slight_smile:

1 Like

Fortunately, there already is a CLI tool by default:

https://docs.ros.org/en/jazzy/Tutorials/Beginner-Client-Libraries/Creating-Your-First-ROS2-Package.html#create-a-package

However it doesn’t provide the kind of guidance that a GUI tool can. If you can think of additional options to add to it, please implement them and send in a PR! It’s not that hard to add additional options.

2 Likes

Love it! Creating a package is something that my brain always forgets the exact terminal line and I (shamefully) always have to go to the ROSdocs to copy paste😅 so a gui would indeed help out here for us forgetful people.

And the picture is adorably🥹

2 Likes

Yep, as @gbiggs said, the ROS 2 CLI is always there to do these things over the command line.

The GUI will create the template node with the chosen language, if the user provides a node name. It can create both Cpp and Python nodes at the same time.

The difference to CLI is that the CLI currently only provides a Cpp or Python file that has a main function to print the hello world, while Turtle Nest provides an actual ROS 2 Node that is spinning and printing a hello world. This gives a faster starting point for the users to start adding their custom subscribers, publishers, etc.

Thank you, I really appreciate it!

Interesting that you mentioned the code editor extensions. This is actually something I was also thinking about in the very beginning of the development, if this tool should instead be an extension to an editor. But I decided to make it as a standalone application not to tie it into a single editor, as users tend to have different preferences :smile:

I will definitely think about adding the subs/pubs based on user input. Adding new features will be a lot of balancing on having the UI as simple as possible vs. adding as much as helpful options for the package creation as possible. Adding subscribers and publishers might be one of the features that could end up being somewhat difficult to add, considering all the possible options user might need to customise (custom message types, qos, etc.). But I’ll see what can be done. Thanks for the suggestion!

Contributions to the package are definitely welcome. You can open a new issue in the package, where we can discuss the new feature to plan it before the implementation. For example one of the next things I would like to have is Windows support for the package.

Thanks @jak for the contribution! This will definitely be very helpful.

But I am wondering why is the code written in C++? Using python with a template library like Jinja2 would have made it more flexible and easier to extend.

1 Like

Thank you!

C++ as a coding language was more of a personal preference, as one of the motivations for the project was to learn something new; to use Qt on C++ :grin:

I checked out Jinja2, I hadn’t heard of it before. It looks like a handy tool! And seems to be available on C++ as well. There would be definitely a place for improvement what comes to the code generation. I also learned today that ros2cli uses Python em library to achieve the same thing.

3 Likes

Yes some of the ROS core libraries and also MoveIt! I believe use em

1 Like

ROS uses em in many places, but don’t consider that an endorsement that em is currently the best one to use. ROS has been using it for over a decade now, and there may be better libraries that have appeared since then.

2 Likes

Good job.
I thought, only I have the problem of forgetting the commands and it’s format, but it seems its normal because I see many mates are on the same page with me. :laughing:

3 Likes

Great job, @jak
I loved the user experience and the interface, simple and easy to use.
Looking forward to its upcoming improvements!

1 Like

Really great initiative!
Can’t wait to see the future evolution of the project.

1 Like

There is now an update available for the Turtle Nest, adding an option to create a parameter file for your new packages :tada:

Choosing this option creates a new parameter file to “config” folder, with example parameters for the created Nodes. These parameters are automatically passed to the Nodes from the created launch file.

2 Likes

Cool Concept ! , i like how it makes it easy for newbies

1 Like

Great job @jak ! To creat a new package I always need to see the tutorials again, :sweat_smile:

1 Like

Turtle Nest is now available for all major distributions — Humble, Iron, and Jazzy — via apt!

To celebrate this, I’ve created a short tutorial on its usage. The tutorial walks through the process step by step, including the package building process and how to run the newly created node.

4 Likes

As a new ROS user, thanks a lot. This would make my life easier.
will be following the updates.

1 Like