Skip to content

dendros init

dendros init scaffolds a config/dendROS.yaml from a package's launch files automatically.


Basic usage

cd ~/ros2_ws/src/my_bringup
dendros init

DendROS scans every .py and .xml file in launch/, extracts all Node() / ComposableNode() / <node/> declarations, groups them by source package, and writes config/dendROS.yaml. It also patches CMakeLists.txt / setup.py / setup.cfg to install the config.

dendros init

dendros init

Generated config:

groups:
  my_bringup:
    color: blue
    label: ""          # ← fill in manually (or use --labels)
    nodes:
      - my_node
      - another_node
      - third_node

defaults:
  color_mode: tag_only
  show_group_tag: true
  unmatched_color: null

Recursive mode

dendros init --recursive   # or: dendros init -r

Follows IncludeLaunchDescription / <include> references into external packages (BFS, cycle-safe).

Package lookup order:

  1. ros2 pkg prefix <pkg> → installed packages
  2. Scan AMENT_PREFIX_PATH entries
  3. Sibling directory in the same src/ folder (packages in source but not yet built)
dendros init --recursive
[dendROS] package: my_bringup [dendROS] scanning (recursive) launch files… [dendROS] main.launch.py: 2 node(s) [dendROS] found references: nav2_bringup, slam_toolbox, xsens_driver [dendROS] nav2_bringup [install]: 8 node(s) [dendROS] slam_toolbox [source]: 1 node(s) [dendROS] xsens_driver: not found [dendROS] found 11 node(s) in 3 group(s) [dendROS] created config/dendROS.yaml

Auto-generate labels

dendros init --labels   # or: dendros init -l
dendros init -r -l      # recursive + labels
Package name Generated label
slam_toolbox ST
nav2_bringup NB
robot_state_publisher RSP

Without --labels, every group gets label: "" as a placeholder.


Behavior options

All options are configurable via dendros configInit settings:

Setting Values Description
init_on_existing abort (default) / merge / overwrite What to do if the config already exists. merge adds new nodes only.
init_modify_build on (default) / off Auto-patch CMakeLists.txt / setup.py / setup.cfg.
init_color palette (default) / null Assign cycling colors or leave as color: null.
init_color_bold off (default) / on Prefix every palette color with bold.
init_label off (default) / on Auto-generate labels (same as --labels).

Iterative development

Set init_on_existing: merge to safely re-run dendros init as your launch files evolve — new nodes are appended without touching existing groups.