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

moveit2: fix move_group plugins not found issue #516

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions distros/jazzy/overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ in {

gazebo = self.gazebo_11;

geometric-shapes = rosSuper.geometric-shapes.overrideAttrs({
postPatch ? "", ...
}: {
postPatch = postPatch + ''
substituteInPlace CMakeLists.txt --replace-fail 'find_package(octomap 1.9.7...<1.10.0 REQUIRED)' 'find_package(octomap REQUIRED)'
'';
});

google-benchmark-vendor = lib.patchExternalProjectGit rosSuper.google-benchmark-vendor {
url = "https://github.com/google/benchmark.git";
rev = "344117638c8ff7e239044fd0fa7085839fc03021";
Expand Down Expand Up @@ -184,6 +192,64 @@ in {
hash = "sha256-Qaz26F11VWxkQH8HfgVJLTHbHwmeByQu8ENkuyk5rPE=";
};

moveit-core = rosSuper.moveit-core.overrideAttrs({
postPatch ? "", ...
}: {
postPatch = postPatch + ''
substituteInPlace CMakeLists.txt --replace-fail 'find_package(octomap 1.9.7...<1.10.0 REQUIRED)' 'find_package(octomap REQUIRED)'
'';
});

moveit-ros-move-group = rosSuper.moveit-ros-move-group.overrideAttrs({
postFixup ? "", ...
}: {
postFixup = postFixup + ''
patchelf --add-needed libmoveit_move_group_default_capabilities.so $out/lib/moveit_ros_move_group/move_group
patchelf --add-needed libmoveit_move_group_default_capabilities.so $out/lib/moveit_ros_move_group/list_move_group_capabilities

# TODO(anyone): Replace platform and Python version with what's actually in use
# patchelf --add-needed libmoveit_move_group_default_capabilities.so $out/lib/python3.11/site-packages/moveit/core.cpython-311-x86_64-linux-gnu.so
# patchelf --add-needed libmoveit_move_group_default_capabilities.so $out/lib/python3.11/site-packages/moveit/planning.cpython-311-x86_64-linux-gnu.so
'';
});

moveit-ros-occupancy-map-monitor = rosSuper.moveit-ros-occupancy-map-monitor.overrideAttrs({
postPatch ? "", ...
}: {
postPatch = postPatch + ''
substituteInPlace CMakeLists.txt --replace-fail 'find_package(octomap 1.9.7...<1.10.0 REQUIRED)' 'find_package(octomap REQUIRED)'
'';
});

osqp-vendor = lib.pipe rosSuper.osqp-vendor [
# Make CMakeLists.txt amenable to automatic patching by the next step.
(pkg: pkg.overrideAttrs ({ prePatch ? "", ... }: {
prePatch = prePatch + ''
sed -i 's/GIT_TAG.*/GIT_TAG v0.6.2/' CMakeLists.txt
'';
}))

(pkg: lib.patchExternalProjectGit pkg {
url = "https://github.com/osqp/osqp.git";
rev = "v0.6.2";
fetchgitArgs = {
hash = "sha256-0BbUe1J9qzvyKDBLTz+pAEmR3QpRL+hnxZ2re/3mEvs=";
leaveDotGit = true;
};
})

# osqp installs into both lib/cmake/ and lib64/cmake/ which is problematic
# because moveLib64 doesn't attempt to merge overlapping directories but
# fails instead. Here we do the merge manually.
(pkg: pkg.overrideAttrs ({ preInstall ? "", ... }: {
preInstall = preInstall + ''
mkdir -p ./osqp_install/lib/cmake/osqp
mv ./osqp_install/lib64/cmake/osqp/* ./osqp_install/lib/cmake/osqp
rm -r ./osqp_install/lib64/cmake
'';
}))
];

rviz-ogre-vendor = lib.patchAmentVendorGit rosSuper.rviz-ogre-vendor {
url = "https://github.com/OGRECave/ogre.git";
rev = "v1.12.10";
Expand Down