ros2 / ros2_documentation

ROS 2 docs repository
https://docs.ros.org/en/rolling
Creative Commons Attribution 4.0 International
535 stars 1.06k forks source link

rosdep init required for package releasing #4696

Closed Jannkar closed 4 weeks ago

Jannkar commented 1 month ago

Hi!

Thank you for the detailed description for making the first release of a ROS 2 package in https://docs.ros.org/en/jazzy/How-To-Guides/Releasing/First-Time-Release.html

While following this guide for the first time, I ran into an error when running the bloom-release command:

bloom-release --new-track --rosdistro humble --track humble <my_repo>
Running 'rosdep update'...
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/bloom/generators/common.py", line 96, in update_rosdep
    rosdep2.catkin_support.update_rosdep()
  File "/usr/lib/python3/dist-packages/rosdep2/catkin_support.py", line 95, in update_rosdep
    call(('rosdep', 'update'), pipe=PIPE)
  File "/usr/lib/python3/dist-packages/rosdep2/catkin_support.py", line 49, in call
    raise CalledProcessError(retcode, command)
subprocess.CalledProcessError: Command '('rosdep', 'update')' returned non-zero exit status 1.

Failed to update rosdep, did you run 'rosdep init' first?
❌  Error running command '['/usr/bin/git-bloom-generate', '-y', 'rosdebian', '--prefix', 'release/humble', 'humble', '-i', '1', '--os-name', 'ubuntu']'
Release failed, exiting.

I'm creating the release on my local machine, where I don't have ROS 2 installed, as all the development happens within Docker containers. I ran the step sudo apt install python3-bloom python3-catkin-pkg from the guide, which I believe to also install the rosdep dependency. To get past this error, I had to run in addition:

sudo rosdep init
rosdep update  # Not sure if this was needed

This step doesn't exist in the docs, so could be good to add it?

clalancette commented 1 month ago

This step doesn't exist in the docs, so could be good to add it?

Yes, please feel free to open a PR to the docs adding in the sudo rosdep init step. Thanks!