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

Which version of Colcon should I be using with which version of ROS?

asked 2020-09-01 19:36:24 -0500

DanRose gravatar image

updated 2020-09-01 19:37:42 -0500

Colcon exists outside the ROS release cadence and the versions of its various packages are not indexed to ROS major releases or each other in any obvious way. It also doesn't have any stability declarations (like a semantic versioning guarantee).

  • What version of the various colcon-* packages should I generally be using? The versions on apt? The versions on PyPI?

  • Is Colcon expected to be backwards compatible with all past ROS versions or do I need to do something special to make sure to get Colcon for, e.g. Dashing?

  • Is Colcon expected to be forwards compatible with future ROS versions, e.g. H-Turtle?

  • How can I install a historical version of Colcon together with compatibly-versioned dependencies? e.g. colcon-core==0.4.5 with compatible versions of, e.g. colcon-cmake.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2020-09-02 10:33:46 -0500

Dirk Thomas gravatar image

The question / answer is not specific to colcon but applies to all Python packages, e.g. catkin_pkg, rosdistro, rosdep, bloom, etc.

What version ... should I generally be using? The versions on apt? The versions on PyPI?

On platforms which provide binary packages through the native package manager (on Ubuntu apt) you should use those. Only on platforms which don't have binary packages you should fall back to pip.

Is ... expected to be backwards compatible with all past ROS versions or do I need to do something special to make sure to get ... for, e.g. Dashing?

Generally each tool is compatible with all the distros it is being released into. If for whatever reason a Python package doesn't support an older distro then it is usually also not released for that platform anymore (in the case of binary packages). When installing them via pip such a constraint can't be implemented so if you are using an older distro you might need t double check that the latest version installed via pip is still compatible. Usually that is the case but I wouldn't guarantee that for already EOLed distros.

Is ... expected to be forwards compatible with future ROS versions, e.g. H-Turtle?

All Python package aim for being stable and not break API / behavior in the future. But for obvious reasons that can't be guaranteed since it is unknown what might happen / change in the future.

How can I install a historical version of Colcon together with compatibly-versioned dependencies? e.g. colcon-core==0.4.5 with compatible versions of, e.g. colcon-cmake.

The ROS apt repositories don't provide more than one version of a package so they will only contain the latest version. (That could be different per platform: e.g. Ubuntu Xenial could have a different version than Ubuntu Focal.)

Commonly Python packages don't pin exact versions of their dependencies. Simply because that would make it either impossible to get a new patch release of a dependency if all downstream packages pinned the previous version or would require all downstream packages to bump their pinned version of their dependency and rerelease.

I don't think there is a good way to achieve this (in the Python ecosystem). You could:

  • either collect all version numbers on a given date and assume that they will work well together
  • or pick a specific version (of e.g. colcon-core) and then install the latest version of packages which depend on it but don't declare a higher minimum version. (If the minimum version is specified correctly in all packages that should also result in a working set of packages.)
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-09-01 19:36:24 -0500

Seen: 553 times

Last updated: Sep 02 '20