rqt_robot_steering: Could not find the Qt platform plugin "xcb" in ""
Hello!
I am running into an issue similar to #178, where I am trying to launch `rqt_robot_steering` via a launch (python) file (this launch file does work outside of nix) - I am getting the following error:
```
[rqt_robot_steering-6] Could not find the Qt platform plugin "xcb" in ""
[rqt_robot_steering-6] This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
```
I have tried implementing a wrapper similar to how it was done for the above issue (as well as both approaches [here](https://github.com/lopsided98/nix-ros-overlay/blob/81579f41d32e5c009a3682c63bf01b807792baa3/distros/distro-overlay.nix#L327-L342)
However, I am not having any luck - the below is my approach, I am not brilliant at using `nix`, so I may be missing something obvious!
```nix
{
inputs = {
nix-ros-overlay.url = "github:lopsided98/nix-ros-overlay/master";
nixpkgs.follows = "nix-ros-overlay/nixpkgs"; # IMPORTANT!!!
};
outputs =
{
nix-ros-overlay,
nixpkgs,
}:
nix-ros-overlay.inputs.flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
config.permittedInsecurePackages = [ "freeimage-3.18.0-unstable-2024-04-18" ];
overlays = [
nix-ros-overlay.overlays.default
];
};
in
{
devShells.default = pkgs.mkShell {
name = "Example project";
QT_QPA_PLATFORM = "xcb";
WAYLAND_DISPLAY = "";
packages = [
pkgs.colcon
(
with pkgs.rosPackages.jazzy;
buildEnv {
paths =
let
wrapped-rqt-robot-steering = rqt-robot-steering.overrideAttrs (old: {
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.qt5.wrapQtAppsHook ];
dontWrapQtApps = true;
});
in
[
wrapped-rqt-robot-steering
# Other packages
ros-core
ur
urdf
ros-core
ament-cmake-core
python-cmake-module
gz-sim-vendor
rviz2
ros-gz-bridge
ros-gz
gz-launch-vendor
nav2-minimal-tb4-sim
nav2-minimal-tb3-sim
rqt-common-plugins
rqt-tf-tree
tf2-tools
example-interfaces
sensor-msgs
slam-toolbox
];
}
)
];
};
}
);
}
```
Please let me know if you need any more details - I know I haven't provided a heap here - I am suspecting I am probably missing something pretty obvious!
Thanks for all your work on this overlay, it is much appreciated!
3 条评论