lopsided98 / nix-ros-overlay

ROS overlay for the Nix package manager
Apache License 2.0
174 stars 68 forks source link

ROS2 having a hard time getting rqt plugins working #403

Closed Pleune closed 2 months ago

Pleune commented 2 months ago

I see this output, and no plugins show in the dropdown.

> rqt
Could not import "pyqt" bindings of qt_gui_cpp library - so C++ plugins will not be available:
Traceback (most recent call last):
  File "/nix/store/zy3lld0q1iwqfnqpscjv9xjdf08529ra-ros-env/lib/python3.11/site-packages/qt_gui_cpp/cpp_binding_helper.py", line 43, in <module>
    from . import libqt_gui_cpp_sip
ImportError: cannot import name 'libqt_gui_cpp_sip' from 'qt_gui_cpp' (/nix/store/zy3lld0q1iwqfnqpscjv9xjdf08529ra-ros-env/lib/python3.11/site-packages/qt_gui_cpp/__init__.py)

flake, with all of the extra packages I have tried - none seem to make any difference.

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
    flake-utils.url = "github:numtide/flake-utils";
    nix-ros-overlay.url = "github:lopsided98/nix-ros-overlay";
  };

  outputs =
    {
      self,
      nixpkgs,
      flake-utils,
      nix-ros-overlay,
    }:
    flake-utils.lib.eachDefaultSystem (
      system:
      let
        pkgs = import nixpkgs {
          inherit system;
          overlays = [ nix-ros-overlay.overlays.default ];
          config = {
            allowUnfree = true;
            cudaSupport = true;
            cudnnSupport = true;
          };
        };

        ros = pkgs.rosPackages.iron;
      in
      {
        devShells.default = pkgs.mkShell {
          buildInputs = with pkgs; [
            colcon
            (
              # install all ros packages via a single environment to prevent weird issues
              with ros;
              buildEnv {
                paths = [
                  ros-environment
                  ros-core
                  ros2bag

                  rqt
                  rqt-gui
                  rqt-gui-py
                  rqt-gui-cpp
                  rqt-py-common
                  rqt-image-view
                  rqt-common-plugins
                  qt-gui-cpp
                  qt-gui-app
                  qt-gui-core
                  qt-gui-cpp
                  qt-gui-py-common
                  qt-dotgraph
                  python-qt-binding

                  qt5ct
                  qt5.qtwayland
                ];
              }
            )
          ];
        };
      }
    );
}

Just using pkgs.rosPackages.iron.desktop or pkgs.rosPackages.himble.desktop has the same issue.

Pleune commented 2 months ago

I would just like to add, pinning nixpkgs to the version from the overlay does not help either.

Pleune commented 2 months ago

Ah, all I needed to do was pass --force-discover one time, due to my incremental installing of packages.