If software development is 10% writing code and 90% wrestling with environment variables, then ROS 2 development is 99% standing in front of a terminal screaming at CLI flags.


πŸ“¦ The Task

The objective was simple:

  1. Record a live telemetry stream from a robot chassis using ros2 bag record.
  2. Publish an update to @pyintel/arc dependency packages.
  3. Call it a day and go to sleep.

Total estimated time: 12 minutes.


πŸŒ€ The 3-Hour Dependency Loop

What actually happened:

  1. I ran ros2 bag record -a. ROS 2 immediately crashed because StoragePluginStatus failed to resolve mcap.
  2. I installed ros-humble-rosbag2-storage-mcap.
  3. Installing that package updated systemd dependencies, which silently broke my local Node.js environment paths.
  4. I tried to push @pyintel/arc via npm publish. NPM failed because GLIBCXX_3.4.30 was missing from the updated ROS library path.
  5. I tried to source ~/.bashrc again. The terminal printed 47 lines of conflicting Python site-packages warnings.
[ros2 bag record] ──> [Missing mcap] ──> [Apt Install] ──> [Broken Node Path]
       β–²                                                           β”‚
       └──────────────── (3 Hours of Pain) β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ’‘ The Takeaway

  • Modern robotics toolchains are complex towers of C++ libraries, Python bindings, ROS middleware, and system environment variables.
  • When a simple 1-line command fails, 9 times out of 10 it’s not your code β€” it’s a missing environment flag or conflicting LD_LIBRARY_PATH.
  • Containerize your ROS 2 recording environments so your system Node/NPM dependencies never have to fight your robotics libraries. πŸ› οΈ