-
Notifications
You must be signed in to change notification settings - Fork 82
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
Difficulty running turtlebot examples #343
Comments
Probably the locked nixpkgs version is too old. cc @hacker1024 |
Ah yep, sorry about that! We should maybe start using I'm not sure how that can be implemented in rosdistro, though - we might just need to split on the period in Super Flore. |
A silly workaround for immediate use would be to add an self: super:
{
opencv = super.opencv.override ({ passthru ? { }, ... }: self.lib.optionalAttrs (!super.opencv ? cxxdev) {
passthru = passthru // { cxxdev = self.opencv; };
});
} |
@hacker1024 I assume its |
By chance, is it possible to easily fix this? If i just override opencv, my computer has to rebuild a lot of packages. |
I updated nixpkgs. Probably will break 10 new things though... |
Build is fixed now, but Gazebo just seems to hang without ever opening a window when I tested it. |
I've seen this happen when the pinned Nixpkgs gets too old in comparison to the revision used to build NixOS. |
Is it related to this? #323 I patched my devshell with this and it stopped roscore from hanging, not sure if it is the same issue. |
Here I have similar problems. I was using flakes to build the project and it succeeded. However, when I tried to run the launch file, it gave me the same outcome as shown in the second case of the original post. The same thing happened when I simply ran 'roscore' from the terminal. |
It looks like this is in fact the issue. It originates from this issue in ros_comm which is fixed by this pull request: which is where the patch in #323 originates from. |
@grnnja can you share the last working commit of this repo (nix-ros-overlay) that you were using before making this issue? |
Hi all, having the same issue with roscore hanging with the following versions: I can also provide a minimal example if that's helpful |
@MatthewCroughan @taylorpool I don't have the exact commit where nix-ros-overlay worked for me, but I have it working right now after applying the rosgraph patch I mentioned here #343 (comment). Here is a minimal flake and the patch.
{
description = "A basic flake with a shell";
inputs =
{
nixpkgs.url = "github:lopsided98/nixpkgs/nix-ros";
flake-utils.url = "github:numtide/flake-utils";
ros-flake.url = "github:lopsided98/nix-ros-overlay";
};
outputs = { self, nixpkgs, flake-utils, ros-flake }:
flake-utils.lib.eachDefaultSystem (system:
let
# fixes roscore hanging
# https://github.com/lopsided98/nix-ros-overlay/issues/323
fix-ros-logging = (final: prev: {
rosPackages.noetic = prev.rosPackages.noetic.overrideScope (rosSelf: rosSuper: {
rosgraph = rosSuper.rosgraph.overrideAttrs ({ patches ? [ ], ... }: {
patches = patches ++ [
./rosgraph.patch
];
});
});
});
pkgs = import nixpkgs
{
inherit system;
overlays = [
ros-flake.overlays.default
fix-ros-logging
];
};
ros = pkgs.rosPackages.noetic;
in
{
devShell = pkgs.mkShell
{
buildInputs = with pkgs; [
ros.ros-core
];
};
});
# I had to add myself as a trusted user in my nixos config for this to work
# https://discourse.nixos.org/t/nix-build-trying-to-build-basic-tools-for-all-packages-from-scratch/11097/4
nixConfig = {
substituters = "https://cache.nixos.org https://ros.cachix.org";
trusted-public-keys = "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= ros.cachix.org-1:dSyZxI8geDCJrwgvCOHDoAfOm5sV1wCPjBkKL+38Rvo=";
};
}
diff --git a/ros_comm-release-release-noetic-rosgraph-1.16.0-1/src/rosgraph/roslogging.py b/ros_comm-release-release-noetic-rosgraph-1.16.0-1-patched/src/rosgraph/roslogging.py
index 9ecc121..5adc95f 100644
--- a/src/rosgraph/roslogging.py
+++ b/src/rosgraph/roslogging.py
@@ -69,6 +69,8 @@ class RospyLogger(logging.getLoggerClass()):
break
if f.f_back:
f = f.f_back
+ else: # Reached the last stack frame and found no matching one.
+ raise ValueError("Could not find function [%s] on the framestack"%func_name)
# Jump up two more frames, as the logger methods have been double wrapped.
if f is not None and f.f_back and f.f_code and f.f_code.co_name == '_base_logger': |
That worked! Thank you so much! |
Hi! I'm having difficulty running the example turtlebot flake command. It tries to find
opencv.cxxdev
but can't. Not sure if this is a problem on my end.with the nix shell example, it pulls the packages and compiles successfully but I am unable to run the demo. I let it sit for a few minutes and nothing happened before I ctrl+c'd the process. Again I'm not sure if this is a problem on my end or not.
The text was updated successfully, but these errors were encountered: