radar-lab/ti_mmwave_rospkg

catkin_make failure

CRalli1 opened this issue · 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

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

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. :'(

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.

Thanks for your help. That's good to know

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