Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Rosdep experienced an error: [Errno 2] No such file or directory: '/home/rosdev/ws_moveit2/install/rviz_marker_tools/share/rviz_marker_tools/package.xml' #894

Open
enriLoniterp opened this issue Sep 12, 2022 · 6 comments

Comments

@enriLoniterp
Copy link

Hi, rosdep initied this projetct and got this error telling me to report on bug features.

ERROR: Rosdep experienced an error: [Errno 2] No such file or directory: '/home/rosdev/ws_moveit2/install/rviz_marker_tools/share/rviz_marker_tools/package.xml'
Please go to the rosdep page [1] and file a bug report with the stack trace below.
[1] : http://www.ros.org/wiki/rosdep

rosdep version: 0.22.1

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/rosdep2/main.py", line 146, in rosdep_main
    exit_code = _rosdep_main(args)
  File "/usr/lib/python3/dist-packages/rosdep2/main.py", line 446, in _rosdep_main
    return _package_args_handler(command, parser, options, args)
  File "/usr/lib/python3/dist-packages/rosdep2/main.py", line 555, in _package_args_handler
    return command_handlers[command](lookup, packages, options)
  File "/usr/lib/python3/dist-packages/rosdep2/main.py", line 764, in command_install
    uninstalled, errors = installer.get_uninstalled(packages, implicit=options.recursive, verbose=options.verbose)
  File "/usr/lib/python3/dist-packages/rosdep2/installers.py", line 445, in get_uninstalled
    resolutions, errors = self.lookup.resolve_all(resources, installer_context, implicit=implicit)
  File "/usr/lib/python3/dist-packages/rosdep2/lookup.py", line 406, in resolve_all
    rosdep_keys = self.get_rosdeps(resource_name, implicit=implicit)
  File "/usr/lib/python3/dist-packages/rosdep2/lookup.py", line 324, in get_rosdeps
    return self.loader.get_rosdeps(resource_name, implicit=implicit)
  File "/usr/lib/python3/dist-packages/rosdep2/rospkg_loader.py", line 144, in get_rosdeps
    if resource_name in self.get_catkin_paths():
  File "/usr/lib/python3/dist-packages/rosdep2/rospkg_loader.py", line 133, in get_catkin_paths
    self._catkin_packages_cache = dict(find_catkin_paths(self._rospack))
  File "/usr/lib/python3/dist-packages/rosdep2/rospkg_loader.py", line 132, in find_catkin_paths
    filter(lambda x: src.get_manifest(x).is_catkin, src.list())]
  File "/usr/lib/python3/dist-packages/rospkg/rospack.py", line 196, in list
    self._update_location_cache()
  File "/usr/lib/python3/dist-packages/rospkg/rospack.py", line 188, in _update_location_cache
    list_by_path(self._manifest_name, path, cache)
  File "/usr/lib/python3/dist-packages/rospkg/rospack.py", line 71, in list_by_path
    root = ElementTree(None, os.path.join(d, PACKAGE_FILE))
  File "/usr/lib/python3.10/xml/etree/ElementTree.py", line 540, in __init__
    self.parse(file)
  File "/usr/lib/python3.10/xml/etree/ElementTree.py", line 569, in parse
    source = open(source, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '/home/rosdev/ws_moveit2/install/rviz_marker_tools/share/rviz_marker_tools/package.xml'
@nuclearsandwich
Copy link
Contributor

Thanks for the report. Could you also share the rosdep command that you were running when you encountered the error.

@enriLoniterp
Copy link
Author

yes of course,

I was running

sudo apt update && rosdep install -r --from-paths . --ignore-src --rosdistro $ROS_DISTRO -y

@nuclearsandwich
Copy link
Contributor

I had started to write a bunch more directed questions but each of them has an assumption about what your setup is.

In addition to the command could you provide some additional context. Are you building moveit2? Using a pre-build moveit2 workspace to build more on top or just trying to use it? Are you following any specific guides or tutorials.

Was the current path the workspace root (I'm guessing /home/rosdev/ws_moveit2 from the stacktrace) or was it performed from the src subdirectory of the workspace root?

Is there a file at /home/rosdev/ws_moveit2/install/rviz_marker_tools/share/rviz_marker_tools/package.xml?

In short, I'm rather confused by this error since it appears to be a disconnect between the detection of a catkin package and the presence of a package.xml where one is expected so figuring out the environment that replicates this issue will be what helps us diagnose it.

@enriLoniterp
Copy link
Author

hi, i'm just following the tutorial to build moveit project as described in the official page.
But it second time i used rosdep command in the root of my workspace.

Thank you for the suggestion, i've seen that package.xml is a link broken:
Link (broken) (inode/symlink).

Could it be something usefull?

Hope i'm helping!

@ralwing
Copy link

ralwing commented Apr 19, 2023

I just faced the same problem:

 apt-get update -y     && rosdep update &&   rosdep install --from-paths /ws/src --ignore-packages-from-source -y --skip-keys "as_ros_test_utils"
Hit:1 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64  InRelease
Hit:2 http://archive.ubuntu.com/ubuntu jammy InRelease              
Hit:3 http://packages.ros.org/ros2/ubuntu jammy InRelease           
Hit:4 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:5 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:6 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Reading package lists... Done
reading in sources list data from /etc/ros/rosdep/sources.list.d
Warning: running 'rosdep update' as root is not recommended.
  You should run 'sudo rosdep fix-permissions' and invoke 'rosdep update' again without sudo.
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
Skip end-of-life distro "ardent"
Skip end-of-life distro "bouncy"
Skip end-of-life distro "crystal"
Skip end-of-life distro "dashing"
Skip end-of-life distro "eloquent"
Add distro "foxy"
Skip end-of-life distro "galactic"
Skip end-of-life distro "groovy"
Add distro "humble"
Skip end-of-life distro "hydro"
Skip end-of-life distro "indigo"
Skip end-of-life distro "jade"
Skip end-of-life distro "kinetic"
Skip end-of-life distro "lunar"
Add distro "melodic"
Add distro "noetic"
Add distro "rolling"
updated cache in /root/.ros/rosdep/sources.cache

ERROR: Rosdep experienced an error: [Errno 2] No such file or directory: '/ws/src/as_drive_nodes/install/as_ros_test_utils/share/as_ros_test_utils/package.xml'
Please go to the rosdep page [1] and file a bug report with the stack trace below.
[1] : http://www.ros.org/wiki/rosdep

rosdep version: 0.22.2

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/rosdep2/main.py", line 146, in rosdep_main
    exit_code = _rosdep_main(args)
  File "/usr/lib/python3/dist-packages/rosdep2/main.py", line 446, in _rosdep_main
    return _package_args_handler(command, parser, options, args)
  File "/usr/lib/python3/dist-packages/rosdep2/main.py", line 555, in _package_args_handler
    return command_handlers[command](lookup, packages, options)
  File "/usr/lib/python3/dist-packages/rosdep2/main.py", line 765, in command_install
    uninstalled, errors = installer.get_uninstalled(packages, implicit=options.recursive, verbose=options.verbose)
  File "/usr/lib/python3/dist-packages/rosdep2/installers.py", line 445, in get_uninstalled
    resolutions, errors = self.lookup.resolve_all(resources, installer_context, implicit=implicit)
  File "/usr/lib/python3/dist-packages/rosdep2/lookup.py", line 406, in resolve_all
    rosdep_keys = self.get_rosdeps(resource_name, implicit=implicit)
  File "/usr/lib/python3/dist-packages/rosdep2/lookup.py", line 324, in get_rosdeps
    return self.loader.get_rosdeps(resource_name, implicit=implicit)
  File "/usr/lib/python3/dist-packages/rosdep2/rospkg_loader.py", line 144, in get_rosdeps
    if resource_name in self.get_catkin_paths():
  File "/usr/lib/python3/dist-packages/rosdep2/rospkg_loader.py", line 133, in get_catkin_paths
    self._catkin_packages_cache = dict(find_catkin_paths(self._rospack))
  File "/usr/lib/python3/dist-packages/rosdep2/rospkg_loader.py", line 132, in find_catkin_paths
    filter(lambda x: src.get_manifest(x).is_catkin, src.list())]
  File "/usr/lib/python3/dist-packages/rospkg/rospack.py", line 196, in list
    self._update_location_cache()
  File "/usr/lib/python3/dist-packages/rospkg/rospack.py", line 188, in _update_location_cache
    list_by_path(self._manifest_name, path, cache)
  File "/usr/lib/python3/dist-packages/rospkg/rospack.py", line 71, in list_by_path
    root = ElementTree(None, os.path.join(d, PACKAGE_FILE))
  File "/usr/lib/python3.10/xml/etree/ElementTree.py", line 540, in __init__
    self.parse(file)
  File "/usr/lib/python3.10/xml/etree/ElementTree.py", line 569, in parse
    source = open(source, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '/ws/src/as_drive_nodes/install/as_ros_test_utils/share/as_ros_test_utils/package.xml'

This is kind of strange because it happens only on my computer, running this on our CI works fine.

@ralwing
Copy link

ralwing commented Apr 19, 2023

Seems like the problem lies in existance of install folder under the src folder. The as_ros_test_utils is then seen twice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants