ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Catkin issue - error when I am initializing a ws

asked 2019-02-07 09:32:22 -0500

fabriceN gravatar image

Never happen before but If I create a directory mkdir -p catkin_ws/src and then enter catkin build I have the following error:

emeric@emeric-desktop:~/catkin_plan_ws$ catkin build
Profile:                     default
Extending:             [env] /opt/ros/kinetic
Workspace:                   /home/emeric
Source Space:       [exists] /home/emeric/src
Log Space:         [missing] /home/emeric/logs
Build Space:        [exists] /home/emeric/build
Devel Space:        [exists] /home/emeric/devel
Install Space:      [unused] /home/emeric/install
DESTDIR:            [unused] None
Devel Space Layout:          linked
Install Space Layout:        None
Additional CMake Args:       DCMAKE_BUILT_TYPE=Release
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
Whitelisted Packages:        None
Blacklisted Packages:        None
Workspace configuration appears valid.

NOTE: Forcing CMake to run for each package.
Traceback (most recent call last):
  File "/usr/bin/catkin", line 9, in <module>
    load_entry_point('catkin-tools==0.4.4', 'console_scripts', 'catkin')()
  File "/usr/lib/python2.7/dist-packages/catkin_tools/commands/", line 267, in main
  File "/usr/lib/python2.7/dist-packages/catkin_tools/commands/", line 262, in catkin_main
    sys.exit(args.main(args) or 0)
  File "/usr/lib/python2.7/dist-packages/catkin_tools/verbs/catkin_build/", line 420, in main
    summarize_build=opts.summarize  # Can be True, False, or None
  File "/usr/lib/python2.7/dist-packages/catkin_tools/verbs/catkin_build/", line 283, in build_isolated_workspace
    workspace_packages = find_packages(context.source_space_abs, exclude_subspaces=True, warnings=[])
  File "/usr/lib/python2.7/dist-packages/catkin_pkg/", line 86, in find_packages
    packages = find_packages_allowing_duplicates(basepath, exclude_paths=exclude_paths, exclude_subspaces=exclude_subspaces, warnings=warnings)
  File "/usr/lib/python2.7/dist-packages/catkin_pkg/", line 146, in find_packages_allowing_duplicates
    xml, filename=filename, warnings=warnings)
  File "/usr/lib/python2.7/dist-packages/catkin_pkg/", line 509, in parse_package_string
    raise InvalidPackage('The manifest must contain a single "package" root tag')
catkin_pkg.package.InvalidPackage: The manifest must contain a single "package" root tag

Besides the build and devel folders are created in my home directory not in the catkin one.

I guess I messed up something but I do not what and thus how to fix it.

Thank you for your help

edit retag flag offensive close merge delete



The error message is saying there is more than one package tag in the package.xml file of one of your packages. Have you looked into this?

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-02-07 09:58:33 -0500 )edit

@PeteBlakerThe3rd - thank you for your answer. How is it possible because the catkin ws is empty, and I want to initialize it, so there is no package.xml at all. And I do not understand why the devel and build folders are not created under the catkin workspace...

fabriceN gravatar image fabriceN  ( 2019-02-07 10:07:43 -0500 )edit
gvdhoorn gravatar image gvdhoorn  ( 2019-02-07 10:49:01 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-02-07 10:26:00 -0500

gvdhoorn gravatar image

updated 2019-02-07 10:40:49 -0500

The output shows:

Source Space:       [exists] /home/emeric/src
Log Space:         [missing] /home/emeric/logs
Build Space:        [exists] /home/emeric/build
Devel Space:        [exists] /home/emeric/devel

which suggests there is a .catkin_tools dir in $HOME.

It's likely that you forgot to cd catkin_ws after having run mkdir -p catkin_ws/src.

edit flag offensive delete link more


@gvdhoorn Yes that's right, I mean There was a .catkin_tools i my home directory and this is why catkin build issued an error because in the home_dir/src I have some standard c++ files. I removed the .catkin_tools and everything is working fine Thank you very much for your help

fabriceN gravatar image fabriceN  ( 2019-02-07 10:37:17 -0500 )edit

Question Tools

1 follower


Asked: 2019-02-07 09:32:22 -0500

Seen: 2,877 times

Last updated: Feb 07 '19