Skip to content
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

Can't build moveit-ros-planning-interface #318

Open
tmayoff opened this issue Oct 13, 2023 · 7 comments
Open

Can't build moveit-ros-planning-interface #318

tmayoff opened this issue Oct 13, 2023 · 7 comments

Comments

@tmayoff
Copy link

tmayoff commented Oct 13, 2023

This is the error

error: builder for '/nix/store/ggqw3bamz3p7jrjhkf7paxab6hsl4xxk-ros-humble-moveit-kinematics-2.5.5-r1.drv' failed with exit code 1;
       last 10 log lines:
       >     moveit_ros_planningConfig.cmake
       >     moveit_ros_planning-config.cmake
       >
       >   Add the installation prefix of "moveit_ros_planning" to CMAKE_PREFIX_PATH
       >   or set "moveit_ros_planning_DIR" to a directory containing one of the above
       >   files.  If "moveit_ros_planning" provides a separate development package or
       >   SDK, be sure it has been installed.
       >
       >
       > -- Configuring incomplete, errors occurred!
       For full logs, run 'nix log /nix/store/ggqw3bamz3p7jrjhkf7paxab6hsl4xxk-ros-humble-moveit-kinematics-2.5.5-r1.drv'.
error: 1 dependencies of derivation '/nix/store/xhxnfjw53v5hx174mydxjm9g9xipywjg-ros-humble-moveit-ros-move-group-2.5.5-r1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ablw1xm27cirrbfhjc89dwh5y3f4z51p-ros-humble-moveit-ros-planning-interface-2.5.5-r1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/d9lnd12n4al52j3gsgwzb1wb0p536dvx-ros-devenv-env.drv' failed to build

This is my flake.

{
  description = "Testing ROS on NixOS";

  nixConfig = {
    substituters = [ 
      "https://nix-community.cachix.org"
	  "https://cache.nixos.org/"
      "https://ros.cachix.org"
     ];
    trusted-public-keys = [
	  "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
      "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
      "ros.cachix.org-1:dSyZxI8geDCJrwgvCOHDoAfOm5sV1wCPjBkKL+38Rvo="
    ];
  };

  inputs = {
    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
        system = "x86_64-linux";
        pkgs = import nixpkgs {
          inherit system;
          overlays = [ros-flake.overlays.default (import ./replace-ompl.nix)];
        };
      in
      {
        devShells.x86_64-linux.default = pkgs.mkShell {
          name = "ros devenv";
          buildInputs = with pkgs; with pkgs.rosPackages.humble; [
            pkg-config
            cairo
            eigen
            pcl
            pcl-conversions

            ament-cmake-core
            ros-core
            ros2run
            ros2launch
            rmw-cyclonedds-cpp
            xacro
            joint-state-publisher 
            rqt-tf-tree
            # rtabmap-ros
            # navigation2
            # nav2-bringup

            ros2-control
            ros2-controllers

            teleop-twist-keyboard
            joint-state-publisher-gui
            rqt-robot-steering
            rqt-joint-trajectory-controller

            # Gazebo
            # gz-fortress
            # ros-gz-bridge
            gazebo-ros

            # Image Pipeline
            image-pipeline

            # MoveIt
            pluginlib
            graph-msgs
            moveit-core
            moveit-ros-planning
            moveit-planners-ompl
            moveit-planners-chomp
            moveit-visual-tools
            moveit-ros-planning-interface
            # moveit
          ];
          RMW_IMPLEMENTATION = "rmw_cyclonedds_cpp";
        };
      };
    # );
}

Any help is appreciated.

@Educorreia932
Copy link

Educorreia932 commented Oct 13, 2023

Add moveit-ros-planning package to your buildInputs

@tmayoff
Copy link
Author

tmayoff commented Oct 13, 2023

It's already there

@Educorreia932
Copy link

It's already there

I'm sorry, I hadn't noticed. Then try to encapsulate your packages inside a buildEnv statement, like so:

buildInputs = with pkgs; with pkgs.rosPackages.humble; [
  (buildEnv {
    paths = [
      # packages
      # ...
    ];
  })
]

@tmayoff
Copy link
Author

tmayoff commented Oct 13, 2023

Still not working

{
  description = "Testing ROS on NixOS";

  nixConfig = {
    substituters = [ 
      "https://nix-community.cachix.org"
	  "https://cache.nixos.org/"
      "https://ros.cachix.org"
     ];
    trusted-public-keys = [
	  "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
      "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
      "ros.cachix.org-1:dSyZxI8geDCJrwgvCOHDoAfOm5sV1wCPjBkKL+38Rvo="
    ];
  };

  inputs = {
    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
        system = "x86_64-linux";
        pkgs = import nixpkgs {
          inherit system;
          overlays = [ros-flake.overlays.default (import ./replace-ompl.nix)];
        };
      in
      {
        devShells.x86_64-linux.default = pkgs.mkShell {
          name = "ros devenv";
          buildInputs = with pkgs; with pkgs.rosPackages.humble; [
            (buildEnv {
              paths = [
                pkg-config
                cairo
                eigen
                pcl
                pcl-conversions

                ament-cmake-core
                ros-core
                ros2run
                ros2launch
                rmw-cyclonedds-cpp
                xacro
                joint-state-publisher 
                rqt-tf-tree
                # rtabmap-ros
                # navigation2
                # nav2-bringup

                ros2-control
                ros2-controllers

                teleop-twist-keyboard
                joint-state-publisher-gui
                rqt-robot-steering
                rqt-joint-trajectory-controller

                # Gazebo
                # gz-fortress
                # ros-gz-bridge
                gazebo-ros

                # Image Pipeline
                image-pipeline

                # MoveIt
                pluginlib
                graph-msgs
                moveit-core
                moveit-ros-planning
                moveit-planners-ompl
                moveit-planners-chomp
                moveit-visual-tools
                moveit-ros-planning-interface
                # moveit
              ];
            })
          ];
          RMW_IMPLEMENTATION = "rmw_cyclonedds_cpp";
        };
      };
    # );
}

@movefasta
Copy link
Contributor

movefasta commented Oct 15, 2023

We also had some issues on building moveit here #244
Now we have a working devshell via flake with some overrides
https://gitlab.com/robossembler/nix-robossembler-overlay/-/blob/master/flake.nix?ref_type=heads#L39

Maybe it can helps.

@tmayoff
Copy link
Author

tmayoff commented Oct 15, 2023

That seems to have been it, thanks!

@movefasta
Copy link
Contributor

@lopsided98 i think we could close that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants