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

ros2 galactic unknown Cmake command "rosidl_get_typesupport_target" #468

Open
123Bruceche opened this issue Dec 28, 2023 · 5 comments
Open

Comments

@123Bruceche
Copy link

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

@cyhunblr
Copy link

Did you solve?

@godic97
Copy link

godic97 commented Jan 26, 2024

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.

@Alexjgxt18
Copy link

Alexjgxt18 commented Feb 8, 2024

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

@InguChoi
Copy link

InguChoi commented Apr 3, 2024

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

@tang-nhan
Copy link

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?

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

6 participants