diff --git a/module.nix b/module.nix index 5889d55..38dab1b 100644 --- a/module.nix +++ b/module.nix @@ -350,6 +350,9 @@ in ; inherit (pkgs) panda-prosthesis mc-force-shoe-plugin sphinx-cmake; + + # Tools + inherit (pkgs) mc-robot-tools; } (lib.optionalAttrs (cfg.with-ros || superbuildCfg.withRos) { inherit (pkgs) mc-rtc-ticker; diff --git a/overlay.nix b/overlay.nix index e08d45a..5a88807 100644 --- a/overlay.nix +++ b/overlay.nix @@ -213,6 +213,14 @@ sphinx-cmake = prev.callPackage ./pkgs/sphinx-cmake.nix { }; + ########## + # TOOLS # + ########## + mc-robot-tools = prev.callPackage ./pkgs/mc-rtc/tools/mc-robot-tools.nix { }; + + ########## + # PYTHON # + ########## pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [ ( python-final: _python-prev: diff --git a/pkgs/mc-rtc/tools/mc-robot-tools.nix b/pkgs/mc-rtc/tools/mc-robot-tools.nix new file mode 100644 index 0000000..94911bb --- /dev/null +++ b/pkgs/mc-rtc/tools/mc-robot-tools.nix @@ -0,0 +1,55 @@ +{ + stdenv, + lib, + fetchFromGitHub, + cmake, + xacro, + mc-rtc, + mesh-sampling, + with-bota-sensor ? false, # missing bota_driver + with-ds4 ? true, # ok + with-plate ? true, # ok + with-realsense-camera ? true, # ok + # missing robotiq_gripper https://github.com/PickNikRobotics/ros2_robotiq_gripper + with-robotiq-gripper ? false, + with-screw ? true, +}: + +stdenv.mkDerivation { + pname = "mc-robot-tools"; + version = "0.0.0"; + + src = fetchFromGitHub { + owner = "isri-aist"; + repo = "mc_robot_tools"; + rev = "1c4c9ce4da400e48975fa491f27ff3fba2688fb9"; + hash = "sha256-91jH8Xx8C/vUFr7qwunHL49P11CEP/SslRLH8NVHySM="; + }; + + nativeBuildInputs = [ + cmake + xacro + ]; + propagatedBuildInputs = [ + mc-rtc + mesh-sampling + ]; + + cmakeFlags = [ + (lib.cmakeBool "WITH_BOTA_SENSOR" with-bota-sensor) + (lib.cmakeBool "WITH_DS4" with-ds4) + (lib.cmakeBool "WITH_PLATE" with-plate) + (lib.cmakeBool "WITH_REALSENSE_CAMERA" with-realsense-camera) + (lib.cmakeBool "WITH_ROBOTIQ_GRIPPER" with-robotiq-gripper) + (lib.cmakeBool "WITH_SCREW" with-screw) + ]; + + doCheck = false; + + meta = with lib; { + description = "All tool modules with mc-rtc framework"; + homepage = "https://github.com/isri-aist/mc_robot_tools"; + license = licenses.bsd2; + platforms = platforms.all; + }; +}