LIO-SAM icon indicating copy to clipboard operation
LIO-SAM copied to clipboard

ros2 galactic unknown Cmake command "rosidl_get_typesupport_target"

Open 123Bruceche opened this issue 1 year ago • 5 comments

when I colcon build at galactic 20.04 ,I got this mistake. please help

cmake Error Cmakelists.txt 43 (rosidl_get_typesupport_target): Unknown Cmake command rosidl_get_typesupport_target

123Bruceche avatar Dec 28 '23 11:12 123Bruceche

Did you solve?

cyhunblr avatar Jan 21 '24 20:01 cyhunblr

Hi!

I solved this issue. (foxy)

First, there's no rosidl_get_typesupport_target function in foxy. So, visit here, and replace the function to the raw code in CMakeLists.txt . (You should delete PARENT_SCOPE parameter in the code)

Second, in my case, tf2_eigen and tf2_geometry_msgs are .h, not .hpp. So, rewrite lib name in src/include/lio_sam/utility.hpp.

godic97 avatar Jan 26 '24 06:01 godic97

Hi @godic97 , how do you

replace the function to the raw code in CMakeLists.txt .

I just pasted the code from the link, after this line rosidl_generate_interfaces(${PROJECT_NAME} "msg/CloudInfo.msg" "srv/SaveMap.srv" DEPENDENCIES std_msgs sensor_msgs) and got the files name error. Once I made colcon build I got

fatal error: lio_sam/msg/cloud_info.hpp: No such file or directory

    2 | #include "lio_sam/msg/cloud_info.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

So... I think I did something wrong

Alexjgxt18 avatar Feb 08 '24 04:02 Alexjgxt18

Hi, I solve the issue with reference to @Alexjgxt18. (https://github.com/ros2/rosidl/blob/rolling/rosidl_cmake/cmake/rosidl_get_typesupport_target.cmake)

image

image

InguChoi avatar Apr 03 '24 00:04 InguChoi

Hi @godic97 , how do you

replace the function to the raw code in CMakeLists.txt .

I just pasted the code from the link, after this line rosidl_generate_interfaces(${PROJECT_NAME} "msg/CloudInfo.msg" "srv/SaveMap.srv" DEPENDENCIES std_msgs sensor_msgs) and got the files name error. Once I made colcon build I got

fatal error: lio_sam/msg/cloud_info.hpp: No such file or directory

    2 | #include "lio_sam/msg/cloud_info.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

So... I think I did something wrong

Hi @Alexjgxt18, I also met this issue. Have you solved it?

tang-nhan avatar Apr 24 '24 12:04 tang-nhan