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

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 -0600

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: https://docs.px4.io/master/en/ros/mav...
But I faced these errors : https://pastebin.com/ybr0fVZV , 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/catkin.py", line 272, in main
    catkin_main(sysargs)
  File "/usr/lib/python2.7/dist-packages/catkin_tools/commands/catkin.py", line 267, in catkin_main
    sys.exit(args.main(args) or 0)
  File "/usr/lib/python2.7/dist-packages/catkin_tools/verbs/catkin_build/cli.py", 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/build.py", 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/packages.py", 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/packages.py", line 155, in find_packages_allowing_duplicates
    path_parsed_packages, warnings_lists = zip(*pool.map(parser, data))
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 251, in map
    return self.map_async(func, iterable, chunksize).get()
  File "/usr/lib/python2.7/multiprocessing/pool.py", 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
    uri: https://github.com/mavlink/mavlink-gbp-release.git
    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
    uri: https://github.com/ros/actionlib.git
    version: 1.11.16
- git:
    local-name: angles
    uri: https://github.com/ros/angles.git
    version: 1.9.12
- git:
    local-name: catkin
    uri: https://github.com/ros/catkin.git
    version: 0.7.29
- git:
    local-name: class_loader
    uri: https://github.com/ros/class_loader.git
    version: 0.3 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

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

Rika gravatar image

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

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 https://github.com/mavlink/mavros.git
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

Question Tools

Stats

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

Seen: 972 times

Last updated: May 25 '21