-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to mix with python packages ? #7
Comments
When you say that you want to make a ROS package depend on a list of pip packages, what do you want to do with that dependency information? Do you want to automate installation or configuration of an environment? |
2 usecases, when working from source :
Then when building a deb package (ROS buildfarm), these dependencies are also packaged somehow (quite tricky) and when I install the package, I get the dependencies at the right version installed on my system, at least for that package... |
How are the two use cases different? Both sound to me like you want catkin packages to depend on specific verions of pip packages and then for those pip packages to automatically get installed and packaged. This sounds like "internal" use (i.e. with catkin), not external use (i.e. without catkin), which is what this repository is about. Supporting this in the gerneal does indeed seem tricky. For example, what would you expect to happen when you have a catkin workspace with two ROS package, one depending on pip package |
Interesting point about "internal" vs "external"... Context : I am working on web-related backend for robots. I need my package to:
Following your semantic :
So I m stuck between the two, trying to find the best compromise... About your question, I would expect each package to come along with its own dependencies, and using it when importing : package A uses its own
|
Thanks for the explanation. I think I almost got what exactly it is you want to do. I have the following questions:
|
|
After quite a lot of painful trials and error, I think I finally managed to find a part of the solution... I m working on a catkin extension https://github.com/asmodehn/catkin_pure_python that allows to retrieve pip packages into the workspace and define your current package as a package managed by pip ( and not default catkin ) but stills install it in the workspace. This way one can work with pip dependencies, with latest python packages, and have other packages find them and import them. And this works from catkin with workspaces. It works for me for the devel and the install space so far. I ll be using that for my development to find out how far this strategy can be used. |
Hello! Please try the beta of the new resolver in pip 20.2 and see whether that helps? |
pip 20.3 has the new dependency resolver on by default; please see the documentation on how to test and migrate in case it helps you address this problem. |
@brainwane Thanks for the update. ROS v2 is now up and running with a different system to manage dependencies (including python packages), see https://design.ros2.org/articles/ament.html for design and https://github.com/ament/ament_cmake for implementation. ROS v1 has a couple of tools addressing this problem in slightly different ways :
|
So looking at the readme, this is all very C++ centric.
I have been working on bridging ROS world with usual software world for a few months now, with python (since ROS supports python).
Perhaps I overlooked something but so far I couldn't find any simple way to make a ros package depending on a ( list of ) pip packages (versioned), or vice-versa make a pip package that depends on ros package.
It could simply be due to the fact that debs and pip have quite different usecases, and the closest I came to, was to use https://github.com/spotify/dh-virtualenv to embed all my pips in a venv. Still work in progress though...
So I was curious if there was any other way, or what would be your take on that problem.
The text was updated successfully, but these errors were encountered: