Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>ros2-pkg-wizardNew to Visual Studio Code? Get it now.
ros2-pkg-wizard

ros2-pkg-wizard

AnikeshRajendran

|
23 installs
| (0) | Free
Create ROS2 packages from templates directly inside VS Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

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

  1. Open a folder in VS Code (workspace root, src/, or any subfolder)
  2. Open the Command Palette:
    Ctrl + Shift + P
    
  3. Run:
    ROS2: Create Package
    
  4. Follow the wizard prompts
  5. 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!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft