Building a ROS2 snap fails staging "no rosdep rule for pkg"

asked 2021-06-18 14:49:23 -0500

masynthetic gravatar image

I am working on making a snap of my ROS2 project just like this and currently it appears that my ROS packages build but after this staging fails. Apologies for the paste dump but the output looks like this:

updated cache in /root/.ros/rosdep/sources.cache
+ rosdep install --default-yes --ignore-packages-from-source --from-paths /root/parts/ros-garden/src
#All required rosdeps installed successfully
+ colcon build --base-paths /root/parts/ros-garden/src --build-base /root/parts/ros-garden/build --merge-install --install-base /root/parts/ros-garden/install --parallel-workers 2
Starting >>> garden_interfaces
Finished <<< garden_interfaces [2.67s]                   
Starting >>> garden_pkg
Starting >>> py_serial
Finished <<< py_serial [0.94s]                                       
Finished <<< garden_pkg [0.97s]
Starting >>> driver_pkg
Finished <<< driver_pkg [0.65s]          
Starting >>> garden_bringup
Finished <<< garden_bringup [0.54s]                  

Summary: 5 packages finished [5.00s]
+ env -i LANG=C.UTF-8 LC_ALL=C.UTF-8 PATH=/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin SNAP=/snap/snapcraft/6568 SNAP_ARCH=amd64 SNAP_NAME=snapcraft SNAP_VERSION=4.8.2 /snap/snapcraft/6568/usr/bin/python3 -I /snap/snapcraft/6568/lib/python3.6/site-packages/snapcraft/plugins/v2/_ros.py stage-runtime-dependencies --part-src /root/parts/ros-garden/src --part-install /root/parts/ros-garden/install --ros-distro foxy --target-arch amd64
Staging runtime dependencies...
Running ['rosdep', 'resolve', 'garden_pkg', '--rosdistro', 'foxy']
failed to run ['rosdep', 'resolve', 'garden_pkg', '--rosdistro', 'foxy']: b"ERROR: no rosdep rule for 'garden_pkg'\n"
Traceback (most recent call last):
  File "/snap/snapcraft/6568/lib/python3.6/site-packages/snapcraft/plugins/v2/_ros.py", line 198, in <module>
    plugin_cli()
  File "/snap/snapcraft/6568/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/snap/snapcraft/6568/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/snap/snapcraft/6568/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/snap/snapcraft/6568/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/snap/snapcraft/6568/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/snap/snapcraft/6568/lib/python3.6/site-packages/snapcraft/plugins/v2/_ros.py", line 171, in stage_runtime_dependencies
    dep, proc.stdout.decode().strip()
UnboundLocalError: local variable 'proc' referenced before assignment
Failed to build 'ros-garden'.

the main part of interest being

Running ['rosdep', 'resolve', 'garden_pkg', '--rosdistro', 'foxy']
failed to run ['rosdep', 'resolve', 'garden_pkg', '--rosdistro', 'foxy']: b"ERROR: no rosdep rule for 'garden_pkg'\n"

i'm just not sure where to start as it everything seems to be going well up to this point and I am not super familiar with these tools. my snapcraft.yaml part looks like this

parts:
 ros-garden:
   plugin: colcon
   source: https://github.com/masynthetic/rospacegarden.git
   build-packages: [make, gcc, g++]
   stage-packages: [ros-foxy-ros2launch]

the git repo is just the entire src directory from within my ROS workspace

this may be more of a snapcraft thing but I figured someone here may be able to get me pointed in the right direction as to what ... (more)

edit retag flag offensive close merge delete

Comments

The git repository doesn't seem to be available any more. Would it be possible to see the content of your package.xml?

GuillaumeB gravatar image GuillaumeB  ( 2022-03-04 04:39:22 -0500 )edit