How to have colcon bundle the correct version of dependencies

0

Intro: I'm able to do colcon build and bundle correctly on RoboMaker, and am able launch the simulation, but it fails when trying to find the correct armadillo library. error while loading shared libraries: libarmadillo.so.8: cannot open shared object file: No such file or directory I found out that bundle included the v6.5 armadillo library, whereas for my simulation to work it needs the v8.5 version of armadillo.

ROS version: Kinetic
Gazebo version: 9

Question: Is there a way for me to guide colcon bundle to get the version of armadillo I need?

My understanding of colcon bundle is that it looks into the package.xml of each ROS package and get their dependencies accordingly. With that in mind, I tried putting in my package.xml files:
1.

<depend version_eq="8.500.1">armadillo</depend
>```

2.

<depend version_gt="6" version_lt="9">armadillo</depend

<depend version_eq="1:8.500.1">armadillo</depend
>```

I also noticed this open issue https://github.com/colcon/colcon-bundle/issues/118 (that led me to https://github.com/colcon/colcon-bundle/pull/117), but wasn't sure how to apply them to solve my problem.  
 
Edited by: khaiyichin on Jan 9, 2020 3:38 PM  
 
Edited by: khaiyichin on Jan 9, 2020 4:21 PM
asked 4 years ago337 views
2 Answers
0

Thank you for your question. Please find the steps below:

  1. build colcon from the repo HEAD as the latest release doesn’t have the PR (e.g. pip3 install git+https://github.com/colcon/colcon-bundle@HEAD)

  2. Then create a local custom-rosdep.yaml file that overrides armadillo in the rosdep.yaml that specifies the version they need. See https://github.com/ros/rosdistro/blob/master/rosdep/base.yaml#L94-L99.

armadillo:
    ubuntu: [http://libarmadillo-dev=8.500.1]
  1. Point rosdep at this custom-rosdep.yaml file:
/etc/ros/rosdep/sources.list.d$ cat 00-overrides.list
yaml file:///.../custom-rosdep.yaml
  1. Run rosdep update to use the new dependencies.

Edited by: pdaws on Jan 15, 2020 4:54 PM

Edited by: pdaws on Jan 15, 2020 4:55 PM

Edited by: pdaws on Jan 15, 2020 4:56 PM

Edited by: pdaws on Jan 15, 2020 4:56 PM

Edited by: pdaws on Jan 15, 2020 4:57 PM

Edited by: pdaws on Jan 15, 2020 4:58 PM

answered 4 years ago
0

Thanks for the reply. I haven't yet been able to test the solution you provided, as I was able to find a way around that.

For anyone else interested:
Basically what I do is first create a bundle (which creates the cache folder), copy over the libraries needed from my local machine to the locations in the bundle cache folder, removing the dependency_hash* JSON files and then do the bundle again.

answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions