From 4072d6ed51d9053d2cc85c0ec4f69884cc99f392 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernd=20M=C3=BCller?= Date: Wed, 12 Mar 2025 13:09:30 +0100 Subject: [PATCH] [add] example shell for turtlebot4 with gz-ros and nav2 --- examples/ros2-turtlebot4-gz.nix | 26 ++++++++++++++++++++++++++ flake.nix | 1 + 2 files changed, 27 insertions(+) create mode 100755 examples/ros2-turtlebot4-gz.nix diff --git a/examples/ros2-turtlebot4-gz.nix b/examples/ros2-turtlebot4-gz.nix new file mode 100755 index 0000000000..1b9032286a --- /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 bb8549f09a..481ea72f5e 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 { };