I’m working on POC ROS2 project to understand the basic concepts and see what is feasible. An important metric is that I want to be able to version my packages, especially my ROS interfaces.

I realize I can set the version in the package.xml file and use the <build_depend> attributes while building the other packages to depend a specific version. REP140

But in terms of structuring my workspace, how would this go, given I want to have more than one version of the package to be built and used in the project at any given time. Is there a clean way to clump all the versions of the package under one directory?


├── versioned_package
│   ├── src
│   ├── CMakeLists.txt
│   └── package.xml
├── package_a (depends on 0.1 of versioned_package)
└── package_b (depends on 0.2 of versioned_package)

Where do I put the src code for 0.1 and 0.2 of versioned_package and what will the corresponding package.xml files look like?

I understand that I could do as shown below, but that seems defeat the version field in the package.xml. Also not preferable since we might have more than a few versions for many packages and this could clutter the workspace

├── versioned_package_v01
├── versioned_package_v02
├── package_a (depends on versioned_package_v01)
└── package_b (depends on versioned_package_v02)

I get using version control to store past versions. But for my case, I want to understand what it means to update an interface package for one dependent package but let the other packages use the older version of the interface.



Your Answer

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

Browse other questions tagged or ask your own question.