diff --git a/distros/humble/overrides.nix b/distros/humble/overrides.nix index cc74b7332ba..a6b54aa131a 100644 --- a/distros/humble/overrides.nix +++ b/distros/humble/overrides.nix @@ -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" @@ -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"; diff --git a/distros/jazzy/overrides.nix b/distros/jazzy/overrides.nix index ccc384acac2..110c473c1e6 100644 --- a/distros/jazzy/overrides.nix +++ b/distros/jazzy/overrides.nix @@ -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"; diff --git a/examples/ros2-turtlebot4-gz.nix b/examples/ros2-turtlebot4-gz.nix new file mode 100755 index 00000000000..1b9032286a4 --- /dev/null +++ b/examples/ros2-turtlebot4-gz.nix @@ -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 + ]; + }) + ]; +} diff --git a/flake.nix b/flake.nix index bb8549f09a9..481ea72f5ee 100644 --- a/flake.nix +++ b/flake.nix @@ -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 { };