Ask Your Question

How to create a catkin ws and build packahes with catkin build

asked 2019-02-04 07:26:58 -0600

fabriceN gravatar image

updated 2019-02-04 07:52:32 -0600

Dear All,

I tried to create a catkin ws using catkin init then enter catkin build and I got the following error:

ls src hector_navigation  waypoint_ctl
catkin build
Profile:                            default
Extending:             [env]  /home/emeric/catkin_wsp/devel:/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.
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, 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 I do not understand why the workspace is set to /home/emeric and not /home/emeric/catkin_planning_ws ? Because the build and devel directories are created in /home/emeric.

Can you tell me what I am missing here?

Thank you very much

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-02-04 08:16:38 -0600

I'm not sure if I got your problem, but, you can init a catkin workspace using this:

First, create a folder where it'll be your workspace folder and your source folder:

$ mkdir -p my_workspace/src

After that, go to my_workspace folder and run it:

$ catkin_make

And done. Now it is just going to src folder and run it:

$ catkin_create_pkg pkg_name roscpp rospy etc
edit flag offensive delete link more


@Teo Cardoso, thank you for your answer, but actually what I do not understand is even if I am using catkin_make, when I look at the messages, I have a workspace : /home/emeric and not /home/emeric/catkin_planning_ws (in my case) - so I have a build and devel space created on my home directory...

fabriceN gravatar image fabriceN  ( 2019-02-04 08:27:46 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-02-04 07:26:58 -0600

Seen: 138 times

Last updated: Feb 04 '19