Skip to content
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

patch rosdep to work with conda-forge/robostack packages #41

Closed
chisarie opened this issue Feb 16, 2021 · 18 comments
Closed

patch rosdep to work with conda-forge/robostack packages #41

chisarie opened this issue Feb 16, 2021 · 18 comments
Labels
enhancement New feature or request

Comments

@chisarie
Copy link

Hi,
thank you very much for this project! I am trying it out to see if I can finally use ROS in a conda environment :).
I had a question: I am trying to run a moveit example from their documentation, and I am asked to run rosdep in order to install the missing dependencies:
rosdep install -y --from-paths . --ignore-src --rosdistro noetic

Unfortunately it seems to me that it is not able to find the missing packages, since I get errors similar to
ERROR: the following packages/stacks could not have their rosdep keys resolved to system dependencies: moveit_tutorials: Cannot locate rosdep definition for [pcl_conversions]

Installing all the packages individually with conda install ros-noetic-my-package works, so this is what I am doing now, but I am wondering if there is a way to make rosdep work with your system.

Thank you in advance for your help!
Eugenio

@Tobias-Fischer
Copy link
Collaborator

Hi @chisarie, many thanks for opening this issue! Unfortunately we don't have a solution for this yet, but we have been talking about this previously as it would be a great feature. Stay tuned, it's on our to-do list.

@Tobias-Fischer Tobias-Fischer added the enhancement New feature or request label Feb 16, 2021
@chisarie
Copy link
Author

Thank you very much for letting me know. Keep up with the great work!

@wolfv
Copy link
Member

wolfv commented Feb 17, 2021

I think we can leave this open until we have some solution (either in rosdep, or as a seperate tool).

How did everything work for you @chisarie ?

@wolfv wolfv reopened this Feb 17, 2021
@chisarie
Copy link
Author

Ok let's leave it open then.
I was unfortunately not able to get the moveit tutorial running, but it might be that the problem has to do with my system.
I am using Ubuntu 18.04 and I already have a system wide installation of ROS melodic. I then installed in a conda environment ros-noetic from RoboStack, I was able to complete the installation and get the basic ros command working (roscore, rostopic list, etc.). But then I tried building the tutorial from moveit (noetic version), and I was getting build errors. I didn't investigate much, since I didn't have much time.
It is worth noticing that the problem could be from different reason:

  1. My system wide ros-melodic installation was interfering with the RoboStack ros-noetic
  2. The noetic branch of moveit is their developement branch, so it's not stable. Maybe the errors had nothing to do with Robostack then.

I might try again in the next weeks if I have more time. If you have the chance to try using Moveit in ros-noetic while on Ubuntu 18.04, I would be interested to hear how it goes for you :).
Thank you again!

@Tobias-Fischer
Copy link
Collaborator

Hi @chisarie, many thanks for your feedback! I tried running the moveit tutorials (or at least the very basic one) and it was working fine with me, with an almost identical setup. The only thing to do with a system wide ROS installation is to not source the setup.sh, as otherwise the Python path of the system installation is conflicting with the conda installation.

When you have more time it would be great if you could report the precise issue you were running into, so we can fix potential issues.

@traversaro
Copy link
Member

traversaro commented Feb 18, 2021

Another possible source of difference is whether you were using the system compilers and build tools, or the conda-forge provided ones (i.e. conda install compilers cmake pkg-config make ninja ). This can be easy checked by running conda list in the environment and reporting the result.

@Tobias-Fischer
Copy link
Collaborator

That's a good point! I think we should add installing these packages in the readme, at least optionally.

@chisarie
Copy link
Author

@Tobias-Fischer Hi, thank you for letting me know that it works for you! I will try again next week and let you know how it goes. @traversaro Yes you are right, I was probably using the system compilers and build tools. I could also try with conda installed ones next time.

@traversaro
Copy link
Member

An interesting related PR is ros-infrastructure/rosdep#697, that added support in rosdep for nix, that similarly to robostack is used in https://github.com/lopsided98/nix-ros-overlay to mantain a user-level distribution mechanism for ROS.

@Tobias-Fischer Tobias-Fischer changed the title rosdep alternative? patch rosdep to work with conda-forge/robostack packages May 2, 2021
@Tobias-Fischer
Copy link
Collaborator

Tobias-Fischer commented May 3, 2021

I think I got it working :). I think there are some improvements that can be made, but overall it should be a good start. It would be great if you could have a look @wolfv @traversaro.

You can test the new functionality by applying the PRs, adding /path/to/robostack.yaml to your /path/to/envs/robostackenv/etc/ros/rosdep/sources.list.d/20-default.list then rosdep init and rosdep update.

@Tobias-Fischer
Copy link
Collaborator

Nice, thanks for the reviews @wolfv! Now I think we need to rebuild the rospkg, rosdep & rosdistro packages with the patches from the respective PRs applied. Some might not apply cleanly .. will have to check.

@wolfv
Copy link
Member

wolfv commented May 3, 2021

I think it would be good to also make upstream PRs, and use them as reference in the patches.

@Tobias-Fischer
Copy link
Collaborator

Tobias-Fischer commented May 3, 2021

Ok. So I opened an upstream PR in ros-infrastructure/rospkg#224

As soon as that's merged, we can tackle rosdep.

I don't think that they'll merge the rosdistro changes and it might be inconvenient for us to have the mapping robostack.yaml file upstream, so I suggest to patch that locally instead.

I also opened a conda-forge PR in the rospkg-feedstock: ros-infrastructure/rospkg#224
Similarly, as soon as that's merged, we can tackle rosdep-feedstock (which needs conda-forge/rosdep-feedstock#13 first).

@wolfv
Copy link
Member

wolfv commented May 4, 2021

rosdep and rospkg in the feedstocks are merged :)

@Tobias-Fischer
Copy link
Collaborator

Tobias-Fischer commented May 4, 2021

Nice! It would be great if someone could test whether this works okay on Windows. I can give it a try on OSX tomorrow.

I think it's easiest to do in a fresh environment.

@Tobias-Fischer
Copy link
Collaborator

If that works, we can modify the moveit CI PR to make use of this functionality - that would be amazing!

@wolfv
Copy link
Member

wolfv commented May 4, 2021

good idea re. the moveit PR.

@Tobias-Fischer
Copy link
Collaborator

Done - let's close this :)

nuclearsandwich pushed a commit to ros-infrastructure/rospkg that referenced this issue Feb 24, 2022
We are currently adding rosdep functionality to the RoboStack project which builds ROS binaries with Conda. The first step towards this aim is adding an OsDetector here. Locally, we already have a working version of rosdep that makes use of the new RoboStack OsDetector, and would like to merge as many changes as possible upstream. See RoboStack/ros-noetic#41 for more information

This modification was inspired by #171. In that case, Nix could be used either as the package manager of the NixOs operating system, as a "user" package manager on any Linux distribution, a bit similar to how conda works.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants