Ask Your Question

catkin_pkg.package.InvalidPackage: Error(s) in package '/home/user/catkin_ws/src/mavlink/patch/package.xml': Package version ":{version}" does not follow version conventions

asked 2021-05-24 06:15:53 -0500

Rika gravatar image

Hello everyone, Hope you are having a great time. I'm kind of new to ROS and recently I have been tasked with building an old ROS project.
Since the project uses the old kinetic version, I also opt out to use Ubuntu 16.04 and installed the same version of ROS. When it came to install mavlink and mavros, I first tried the binary packages provided here:
But I faced these errors : , then I though maybe I need to build from source because of this issue. so I went ahead and followed the instructions at px4 documentation and tried to build and install the mavlink/mavros from source.

However at the very final end, it fails with the following error message :

Workspace configuration appears valid.
Traceback (most recent call last):
  File "/usr/bin/catkin", line 11, in <module>
    load_entry_point('catkin-tools==0.6.1', 'console_scripts', 'catkin')()
  File "/usr/lib/python2.7/dist-packages/catkin_tools/commands/", line 272, in main
  File "/usr/lib/python2.7/dist-packages/catkin_tools/commands/", line 267, in catkin_main
    sys.exit(args.main(args) or 0)
  File "/usr/lib/python2.7/dist-packages/catkin_tools/verbs/catkin_build/", line 422, 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 87, 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 155, in find_packages_allowing_duplicates
    path_parsed_packages, warnings_lists = zip(*, data))
  File "/usr/lib/python2.7/multiprocessing/", line 251, in map
    return self.map_async(func, iterable, chunksize).get()
  File "/usr/lib/python2.7/multiprocessing/", line 567, in get
    raise self._value
catkin_pkg.package.InvalidPackage: Error(s) in package '/home/user/catkin_ws/src/mavlink/patch/package.xml':
Package version ":{version}" does not follow version conventions

I have installed Python 2.7.12 (using Anaconda and my GCC version is gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609. What is wrong and how should I fix this ? By the way here is the full log that ends up with the posted error message.

ser@ubuntu:~/catkin_ws$ rosinstall_generator --rosdistro kinetic mavlink | tee /tmp/mavros.rosinstall
- git:
    local-name: mavlink
    version: release/kinetic/mavlink/2021.3.3-1

user@ubuntu:~/catkin_ws$ rosinstall_generator --upstream mavros --deps | tee -a /tmp/mavros.rosinstall
Using ROS_DISTRO: kinetic
The following repositories with an unknown upstream will be ignored: rosbag_migration_rule
- git:
    local-name: actionlib
    version: 1.11.16
- git:
    local-name: angles
    version: 1.9.12
- git:
    local-name: catkin
    version: 0.7.29
- git:
    local-name: class_loader
    version: 0.3 ...
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2021-05-25 00:55:04 -0500

Rika gravatar image

updated 2021-05-25 00:57:34 -0500

I went a completely different path. what I did was to git clone the mavros and then build it manually.
The catch here was that that it seems only the 1.4.0 version works with kenetic on my ubuntu 16.04. (see git issues #1483 and #1474
so I simply navigated to my catkin workspace and git cloned the mavros repo and build it like this:

user@ubuntu:~/catkin_ws$ cd src/
user@ubuntu:~/catkin_ws$ git clone
user@ubuntu:~/catkin_ws$ cd mavros
user@ubuntu:~/catkin_ws$ git checkout 1.4.0
user@ubuntu:~/catkin_ws$ cd ../../
user@ubuntu:~/catkin_ws$ catkin build

which builds successfully:
Finished  <<< test_mavros                  [ 10.8 seconds ]                                                                                                             
[build] Summary: All 5 packages succeeded!                                                                                                                              
[build]   Ignored:   None.                                                                                                                                              
[build]   Warnings:  1 packages succeeded with warnings.                                                                                                                
[build]   Abandoned: None.                                                                                                                                              
[build]   Failed:    None.                                                                                                                                              
[build] Runtime: 14.0 seconds total.

Side note, during the build process your tests fail because of the error "Could not find the required component 'control_toolbox'. " simply do a :

sudo apt-get install ros-kinetic-control-toolbox

and do a catkin build and you'll be fine.

Hope this comes handy to someone out there.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools


Asked: 2021-05-24 06:15:53 -0500

Seen: 281 times

Last updated: May 25 '21