Fix livox_ros_driver2 Jazzy CMake generation#7
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes ROS 2 Jazzy CMake generation/linking issues for the package’s generated custom messages by resolving and linking the correct C++ typesupport target (instead of reading INTERFACE_INCLUDE_DIRECTORIES, which can resolve to NOTFOUND on Jazzy), and suppresses a CMake developer warning via policy settings.
Changes:
- Resolve the generated custom message C++ typesupport target via
rosidl_get_typesupport_target()(with a fallback target name) and link it intolivox_ros_driver2. - Remove direct reliance on the generated target’s
INTERFACE_INCLUDE_DIRECTORIES, letting the typesupport target provide include paths transitively. - Set CMake policy
CMP0144toNEW(when available) to silence the PCL/FLANN developer warning during configure.
|
@ibrahimhroob I added CI for jazzy to test this properly |
|
seems the underlying driver needs fixing as well? https://github.com/jabasai/livox_ros_driver2/actions/runs/27510816413/job/81310418971?pr=7#step:6:316 |
|
It did build fine on the navstack jazzy image, this is the sdk install in our base image: https://github.com/jabasai/navstack_container_base/blob/7d413a086660dc138a20a45afdcfd7d0bc25b5dd/docker/Dockerfile#L85-L93 |
|
works now, I’ll merge. |
livox_ros_driver2build failure on ROS 2 Jazzy caused byLIVOX_INTERFACES_INCLUDE_DIRECTORIESresolving toNOTFOUND.rosidl_get_typesupport_target()to resolve and link the generated custom message C++ typesupport target.CMP0144defaults to suppress the PCL/FLANN developer warning during configuration.Validation:
colcon build --packages-select livox_ros_driver2