Skip to content
54 changes: 54 additions & 0 deletions distros/humble/overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@ in with lib; {
];
});

dwb-critics = rosSuper.dwb-critics.overrideAttrs({
...
}: {
NIX_CFLAGS_COMPILE = toString [ "-Wno-error=maybe-uninitialized" ];
});

dwb-plugins = rosSuper.dwb-plugins.overrideAttrs({
...
}: {
NIX_CFLAGS_COMPILE = toString [ "-Wno-error=maybe-uninitialized" ];
});

# This is a newer version than the build system tries to download, but this
# version doesn't try to run host platform binaries on the build platform
# and fixes "Allocator foonathan::memory::memory_pool received invalid size"
Expand Down Expand Up @@ -105,6 +117,48 @@ in with lib; {
propagatedBuildInputs = propagatedBuildInputs ++ [ rosSelf.moveit-ros-planning ];
});

nav2-behaviors = rosSuper.nav2-behaviors.overrideAttrs({
...
}: {
NIX_CFLAGS_COMPILE = toString [ "-Wno-error=array-bounds" "-Wno-error=maybe-uninitialized" ];
});

nav2-behavior-tree = rosSuper.nav2-behavior-tree.overrideAttrs({
...
}: {
NIX_CFLAGS_COMPILE = toString [ "-Wno-error=array-bounds"];
});

nav2-costmap-2d = rosSuper.nav2-costmap-2d.overrideAttrs({
...
}: {
NIX_CFLAGS_COMPILE = toString [ "-Wno-error=array-bounds"];
});

nav2-mppi-controller = rosSuper.nav2-mppi-controller.overrideAttrs({
...
}: {
NIX_CFLAGS_COMPILE = toString [ "-Wno-error=array-bounds" ];
});

nav2-planner = rosSuper.nav2-planner.overrideAttrs({
...
}: {
NIX_CFLAGS_COMPILE = toString [ "-Wno-error=maybe-uninitialized" ];
});

nav2-smoother = rosSuper.nav2-smoother.overrideAttrs({
...
}: {
NIX_CFLAGS_COMPILE = toString [ "-Wno-error=maybe-uninitialized" ];
});

nav2-waypoint-follower = rosSuper.nav2-waypoint-follower.overrideAttrs({
...
}: {
NIX_CFLAGS_COMPILE = toString [ "-Wno-error=maybe-uninitialized" ];
});

novatel-oem7-driver = (patchExternalProjectGit rosSuper.novatel-oem7-driver {
url = "https://github.com/novatel/novatel_edie";
rev = "d02ccc2dfe531d642c1e2ca8a8c0f8205c856f23";
Expand Down
24 changes: 24 additions & 0 deletions distros/jazzy/overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,30 @@ in {
'';
});

nav2-behavior-tree = rosSuper.nav2-behavior-tree.overrideAttrs({
...
}: {
NIX_CFLAGS_COMPILE = toString [ "-Wno-error=array-bounds" ];
});

nav2-costmap-2d = rosSuper.nav2-costmap-2d.overrideAttrs({
...
}: {
NIX_CFLAGS_COMPILE = toString [ "-Wno-error=array-bounds" ];
});

nav2-rviz-plugins = rosSuper.nav2-rviz-plugins.overrideAttrs({
patches ? [], ...
}: {
patches = patches ++ [
(self.fetchpatch {
url = "https://github.com/ros-navigation/navigation2/commit/e6f500e5b7528737f4a883598293b62c72c83946.patch";
hash = "sha256-XFQjW9eb/CVF+wDgNTG+wyXoz1Hwa3qEU/cIXRcBY6Y=";
stripLen = 1;
})
];
});

rviz-ogre-vendor = lib.patchAmentVendorGit rosSuper.rviz-ogre-vendor {
tarSourceArgs.hook = let
version = "1.79";
Expand Down
26 changes: 26 additions & 0 deletions examples/ros2-turtlebot4-gz.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Environment containing basic ROS2 tools

{ pkgs ? import ../. {} }:
with pkgs;
with rosPackages.jazzy;

mkShell {
nativeBuildInputs = [
(buildEnv {
paths = [
ros-core
colcon
geometry-msgs
turtlebot4-desktop
turtlebot4-simulator
slam-toolbox
nav2-minimal-tb4-sim
nav2-minimal-tb3-sim
# rqt metapackages
rqt-common-plugins
rqt-tf-tree
tf2-tools
];
})
];
}
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
example-turtlebot3-gazebo = import ./examples/turtlebot3-gazebo.nix { inherit pkgs; };
example-ros2-basic = import ./examples/ros2-basic.nix { inherit pkgs; };
example-ros2-gz = import ./examples/ros2-gz.nix { inherit pkgs; };
example-ros2-turtlebot4-gz = import ./examples/ros2-turtlebot4-gz.nix { inherit pkgs; };

# Development environment for the custom GitHub action
nix-ros-build-action = pkgs.callPackage ./.github/actions/nix-ros-build-action/shell.nix { };
Expand Down