ti_mmwave_rospkg icon indicating copy to clipboard operation
ti_mmwave_rospkg copied to clipboard

catkin_make failure

Open CRalli1 opened this issue 4 years ago • 5 comments

Hi I am trying to install your repo on Ubuntu 20.04 with ROS Noetic and catkin_make is failing. It seems to be to do with also having the common_msgs package in the src folder. Several of the errors shown below come up relating to the different message types in common_msgs.

CMake Error at /home/charlie/catkin_ws/build/common_msgs/sensor_msgs/cmake/sensor_msgs-genmsg.cmake:343 (add_custom_target): add_custom_target cannot create target "sensor_msgs_generate_messages_cpp" because another target with the same name already exists. The existing target is a custom target created in source directory "/home/charlie/catkin_ws/src/ti_mmwave_rospkg". See documentation for policy CMP0002 for more details. Call Stack (most recent call first): /opt/ros/noetic/share/genmsg/cmake/genmsg-extras.cmake:307 (include) common_msgs/sensor_msgs/CMakeLists.txt:46 (generate_messages)

However, if i remove common_msgs from the folder I get this error:

CMake Error at /home/charlie/catkin_ws/devel/share/sensor_msgs/cmake/sensor_msgsConfig.cmake:113 (message): Project 'sensor_msgs' specifies '/home/charlie/catkin_ws/src/common_msgs/sensor_msgs/include' as an include dir, which is not found. It does neither exist as an absolute directory nor in '/home/charlie/catkin_ws/src/common_msgs/sensor_msgs//home/charlie/catkin_ws/src/common_msgs/sensor_msgs/include'. Check the website 'http://ros.org/wiki/sensor_msgs' for information and consider reporting the problem. Call Stack (most recent call first): /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package) ti_mmwave_rospkg/CMakeLists.txt:10 (find_package)

I was wondering if there is a workaround or if my setup is wrong. Looks like the repo will be really useful when it works! Cheers, Charlie

CRalli1 avatar Jan 20 '21 16:01 CRalli1

Try to enable C++14 support in your cmake file: add_definitions(-std=c++14) It worked for me.

johnnyfox87 avatar Jan 21 '21 08:01 johnnyfox87

Thanks for your help. Is that at the top of .../src/ti_mmwave_rospkg/CMakeLists.txt? I just tried adding it where it says add_definitions(-std=c++11) and I'm still getting the same error. :'(

CRalli1 avatar Jan 21 '21 09:01 CRalli1

Yes that's what I did, but apparently I had a different issue. At least I can tell you that it is running for me on Ubuntu 20.04 with ROS Noetic.

johnnyfox87 avatar Jan 21 '21 09:01 johnnyfox87

Thanks for your help. That's good to know

CRalli1 avatar Jan 22 '21 09:01 CRalli1

Is this issue resolved? Please mark this as closed if the problem no longer persists.

senguptaa avatar May 04 '21 16:05 senguptaa