nix-ros-overlay icon indicating copy to clipboard operation
nix-ros-overlay copied to clipboard

How do I install rosdep too

Open conner-replogle opened this issue 1 year ago • 3 comments
trafficstars

I tried adding it as a ros package but to no avail. I keep getting bash: rosdep: command not found

conner-replogle avatar Sep 05 '24 04:09 conner-replogle

Why do you need to install rosdep? With Nix, it's almost not needed, because the packages in this overlay are already generated with the help of rosdep and depend on correct nixpkgs dependencies. Running rosdep install is therefore not needed on NixOS and would not be useful on non-NixOS distros.

If you really need it, you can try nix-env -f . -i -A python3Packages.rosdep.

wentasah avatar Sep 05 '24 05:09 wentasah

I'm using this to build realsense-ros are you saying there's a way to just make the flake hold all the dependencies it needs instead of rosdep?

conner-replogle avatar Sep 05 '24 14:09 conner-replogle

Sorry for delayed answer. Yes. It's possible. I was working on a tool that allows doing just that and uses rosdep under the hood. It's called ros2nix and now it's probably in state usable by others.

I tried it on realsense-ros:

git clone https://github.com/IntelRealSense/realsense-ros
ros2nix --output-as-nix-pkg-name --fetch --flake $(find -name package.xml)
nix build .#humble.realsense2-camera

And it complains about missing RealSense SDK. If you have a Nix expression for it, you can run:

ros2nix --output-as-nix-pkg-name --fetch --flake --extra-build-inputs realsense-sdk $(find -name package.xml_

and add your expression to the generated overlay.nix. It might then work.

wentasah avatar Sep 20 '24 14:09 wentasah