ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Could not find package after building moveit from source

asked 2023-07-15 08:17:58 -0600

JohnDoe gravatar image

updated 2023-07-16 21:14:20 -0600

Hi!

I have built MoveIt from source and in ws_moveit workspace.

However, when I include related Moveit header files in another workspace

#include <moveit_visual_tools/moveit_visual_tools.h>

, I met this error

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

     moveit_visual_toolsConfig.cmake
     moveit_visual_tools-config.cmake

    Add the installation prefix of "moveit_visual_tools" to CMAKE_PREFIX_PATH
    or set "moveit_visual_tools_DIR" to a directory containing one of the above
    files.  If "moveit_visual_tools" provides a separate development package or
    SDK, be sure it has been installed.

I have tried find_package(moveit_visual_tools REQUIRED) and <depend>moveit_visual_tools</depend>, but this error didn't disappear.

I think this error is caused by CMAKE_PREFIX_PATH.

Some related questions, such as this, are answered with a sudo apt-get install ros- solution, but I want to build moveit from source for trying to contribute new features.

I'm not sure if I'm on the right point. Could you give me some advice on how to solve this error?

Thanks!

edit retag flag offensive close merge delete

Comments

If you close a question, please provide the solution.

Better yet: don't close it, but post your own answer and accept that answer.

gvdhoorn gravatar image gvdhoorn  ( 2023-07-17 01:55:15 -0600 )edit

Sure @gvdhoorn, could you help me reopen the answer and I post my solution? I don't have enough points.

JohnDoe gravatar image JohnDoe  ( 2023-07-17 02:42:56 -0600 )edit

Done.

You probably won't be able to accept your own answer either, but if you let me know when you've done that, I'll accept it for you.

gvdhoorn gravatar image gvdhoorn  ( 2023-07-17 03:28:57 -0600 )edit

I assume this is also you: ros-planning/moveit#3476?

Cross-posting like this is not very nice.

gvdhoorn gravatar image gvdhoorn  ( 2023-07-17 10:15:21 -0600 )edit

I'm so sorry I didn't realize that cross-post was not a nice behavior.

I'll be very mindful of such behavior in the future.

Thanks for the reminder and the help from you. I will ensure that this does not happen again.

JohnDoe gravatar image JohnDoe  ( 2023-07-17 19:40:44 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-07-17 03:40:47 -0600

JohnDoe gravatar image

I added list(APPEND CMAKE_PREFIX_PATH "/home/ws_moveit/devel") before find_package.

The above solution works for me. But so far, I'm still confused about why CMAKE_PREFIX_PATH only contains /opt/ros/noetic and the devel folder path of my current workspace but not /home/ws_moveit/devel.

Please comment below if you know the reason.

edit flag offensive delete link more

Comments

Not what you want to hear perhaps, but this should not be needed and is definitely not a solution.

However, when I include related Moveit header files in another workspace

did you source the devel/setup.bash of that other workspace before trying to build your own package?

Failure to do so would be one of the most common causes of the issue you report.

gvdhoorn gravatar image gvdhoorn  ( 2023-07-17 07:03:56 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2023-07-15 08:17:58 -0600

Seen: 301 times

Last updated: Jul 17 '23