ROS2 Package Wizard
ROS2 Package Wizard is a Visual Studio Code extension that helps you create clean, production-ready ROS 2 packages using an interactive wizard. It focuses on correct structure, good defaults, and ROS 2 best practices, without forcing rigid assumptions about your workspace layout.
✨ Features
- 📦 Create ROS 2 C++ packages from VS Code
- 🧭 Interactive wizard for:
- Package name
- Node name
- Dependencies (multi-select)
- Optional launch file generation
- 🧱 Generates a clean ROS 2 structure:
- Library-based node implementation
- Separate
main() entry point
- 🧩 Optional launch file (
launch/*.launch.py)
- 📚 Auto-generated Apache 2.0–compliant Doxygen headers
- 🛠 Idiomatic ament_cmake CMakeLists.txt
- 🎯 No assumptions about workspace layout (works even if you open
src/ directly)
📁 Generated Package Structure
<your-package>/
├── CMakeLists.txt
├── package.xml
├── include/<pkg>/<node>.hpp
├── src/
│ ├── <node>.cpp # Node implementation
│ └── <pkg>_node.cpp # main()
└── launch/ # (optional)
└── <pkg>.launch.py
This structure matches real-world ROS 2 and Nav2 codebases and is easy to extend later.
🚀 Usage
- Open a folder in VS Code (workspace root,
src/, or any subfolder)
- Open the Command Palette:
Ctrl + Shift + P
- Run:
ROS2: Create Package
- Follow the wizard prompts
- Build and run as usual:
colcon build
ros2 run <pkg> <pkg>_node
📦 Dependency Selection
- Choose from common ROS 2 dependencies via multi-select
- If none are selected, the wizard defaults to:
rclcpp
- Dependencies are:
- Added to
package.xml
- Declared once in CMake and reused
📄 Doxygen & Documentation
All generated source and header files include:
@file, @brief, and detailed descriptions
@ingroup <package>
- Author and year (from Git config)
- Apache License 2.0 header
This works seamlessly with:
- Doxygen
- rosdoc2
- Sphinx + Breathe
🎯 Design Philosophy
- Explicit is better than implicit
- No hidden assumptions about workspace layout
- Templates are simple, readable, and extensible
- Optimized for real ROS 2 development, not demos
This extension is intentionally minimal in v1 and designed to grow based on real usage.
🛣 Roadmap
Planned future enhancements:
- Python node templates
- Lifecycle / composable nodes
- Parameter YAML generation
- Remember user preferences
- rosdoc2 config generation
📜 License
Licensed under the Apache License, Version 2.0.
👤 Author
Anikesh Rajendran
ROS 2 | Navigation | Tooling
If you find this extension useful or have ideas for improvement, feel free to open an issue or contribute!