Closed traverseda closed 4 months ago
Try adding your ROS packages to a buildEnv
. This ensures that all binaries are properly wrapped and all needed environment variables are set. The following works for me:
{ pkgs, ... }:
let
ros = builtins.getFlake "github:lopsided98/nix-ros-overlay";
in
{
home.packages = [
(with ros.legacyPackages.x86_64-linux.noetic; pkgs.lowPrio (buildEnv {
paths = [
rostopic
rqt-gui
rqt-gui-py
rqt
];
}))
];
}
Note that I had to add pkgs.lowPrio
to avoid collisions with some other packages in my home-manager environment. If you don't have collisions, you can remove it.
A question is whether it is a good idea to have rqt in your global environment. Fox example, if you need to switch between ROS and ROS 2 projects, having a ROS version installed globally can cause problems in ROS 2 projects. Personally, I prefer having a per-project development environment and using it via nix develop
/nix-shell
or direnv
.
Yep that works. Thanks a lot
Sorry about posting this in an issue, it's the last thing keeping me from moving to nix full-time professionally. I'm pretty new to nix, so apologies if this is something basic I'm just missing.
I'm having a hard time getting rqt to run from home manager, here's a simplified example of my home-mananger config
And when I try to run rqt I get
Any thoughts?