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

Unsure how to modify CMakeLists.txt to use moveit_drake #65

Open
Jakeisthesnake opened this issue Jan 20, 2025 · 4 comments
Open

Unsure how to modify CMakeLists.txt to use moveit_drake #65

Jakeisthesnake opened this issue Jan 20, 2025 · 4 comments

Comments

@Jakeisthesnake
Copy link

Jakeisthesnake commented Jan 20, 2025

I am trying to write a simpe pendulum demo that uses the moveit_drake package. However, I am having trouble building the package containing the demo. What should I add to my CMakeLists.txt file so that it can find drake? Since there are multiple levels of CMakeLists files, I wonder if I need to modify all of them?

File structure

build_dir
-> src
-->moveit_drake
-->moveit2_tutorials
--->motion_planning_pipeline
---->CMakeLists.txt #for motion_planning_pipeline
--->CMakeLists.txt #for moveit2_tutorials

Build error:

jake@jake-Blade:~/moveit2_ws_main$ colcon build --packages-select moveit2_tutorials
Starting >>> moveit2_tutorials
--- stderr: moveit2_tutorials                          
CMake Error at /home/jake/moveit2_ws_main/install/moveit_drake/share/moveit_drake/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package):
  By not providing "Finddrake::drake.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "drake::drake", but CMake did not find one.

  Could not find a package configuration file provided by "drake::drake" with
  any of the following names:

    drake::drakeConfig.cmake
    drake::drake-config.cmake

  Add the installation prefix of "drake::drake" to CMAKE_PREFIX_PATH or set
  "drake::drake_DIR" to a directory containing one of the above files.  If
  "drake::drake" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  /home/jake/moveit2_ws_main/install/moveit_drake/share/moveit_drake/cmake/moveit_drakeConfig.cmake:41 (include)
  motion_planning_pipeline/CMakeLists.txt:5 (find_package)


gmake: *** [Makefile:268: cmake_check_build_system] Error 1
---
Failed   <<< moveit2_tutorials [9.33s, exited with code 2]

Summary: 0 packages finished [10.0s]
  1 package failed: moveit2_tutorials
  1 package had stderr output: moveit2_tutorials

link to CMakeLists.txt file for motion_planning_pipeline folder
https://github.com/Jakeisthesnake/Moveit_drake_adapter/blob/main/src/moveit2_tutorials/motion_planning_pipeline/CMakeLists.txt

@Jakeisthesnake Jakeisthesnake changed the title Unsure how to modify CMakeList.txt to use moveit_drake Unsure how to modify CMakeLists.txt to use moveit_drake Jan 20, 2025
@Jakeisthesnake
Copy link
Author

I tried adding set(drake_DIR "opt/drake/lib/cmake") to my CMakeLists file, but that hasn't changed the error message.

@sea-bass
Copy link
Contributor

Did you install Drake?

The Dockerfile shows some steps here:

wget -qO- https://drake-apt.csail.mit.edu/drake.asc | gpg --dearmor - \
| sudo tee /etc/apt/trusted.gpg.d/drake.gpg >/dev/null && \
echo "deb [arch=amd64] https://drake-apt.csail.mit.edu/$(lsb_release -cs) $(lsb_release -cs) main" \
| sudo tee /etc/apt/sources.list.d/drake.list >/dev/null && \

Which is the steps listed on here: https://drake.mit.edu/apt.html#stable-releases

@Jakeisthesnake
Copy link
Author

Yes, I am able to run the moveit_drake demo.

@Jakeisthesnake
Copy link
Author

Just realized that I didn't update my package.xml file. That said, adding <depend>moveit_drake</depend> didn't resolve the build error.

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

2 participants