0
$\begingroup$

Rosanswers logo

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/mavros_installation.html#binary-installation-debian-ubuntu
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.

This code block was moved to the following github gist: https://gist.github.com/answers-se-migration-openrobotics/947bee1f9d2a80a7fabe6e4d63c8061d


Originally posted by Rika on ROS Answers with karma: 72 on 2021-05-24

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Rika with karma: 72 on 2021-05-25

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.