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

Configure whether to use debian or source package

asked 2019-11-05 09:07:18 -0500

Tal Ma gravatar image

Hi, I'm using my ros package which I cloned from GIT. I also package it as debian. If I install the debian ROS still use the source package checked using

rospack list | grep my-package

Can I reconfigure ROS to switch between the installed deb package and the source package? If I remove the source repo ROS knows to look at /opt/ros/$DISTRO/share/ but I would like to avoid this hack.

Thank you, Tal

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-11-05 09:33:45 -0500

This is usually handled by the setup.bashfiles included with the distribution, and built in each workspace. When you create a workspace that overlays a base install, the setup.bash built in that workspace will setup your environment such that ROS packages included in your workspace are found before any duplicate packages in the base install.

So to directly answer your question: if you want to use the version you cloned from Git, you'll want to source the setup.bash from your workspace that contains that package. If you want to use the version installed from apt, source the setup.bash from /opt/ros/DISTRO/. If you need to combine packages from a workspace with the base install and still be able to toggle between an apt and source version of a package, then I'd recommend workspace overlaying. You could have the source package overlay your normal workspace such that sourcing the overlay will find the source version of the target package, and sourcing the underlay will find the apt version.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2019-11-05 09:07:18 -0500

Seen: 185 times

Last updated: Nov 05 '19