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

Install includes to ${PROJECT_NAME} folder and use modern CMake #58

Merged
merged 3 commits into from
Jan 22, 2022

Conversation

sloretz
Copy link

@sloretz sloretz commented Jan 5, 2022

Targeting foxy-devel and not ros2 because the former seems to be marked as the upstream development branch, but I would strongly recommend releasing this change only to ROS Rolling. Maybe it's time to fast-forward ros2 to foxy-devel and change the ROS Rolling branch to ros2? Targeting ros2 now 🎉

https://index.ros.org/p/depthimage_to_laserscan/#rolling
Part of ros2/ros2#1150

This installs includes to include/${PROJECT_NAME} to mitigate include directory search order issues when overriding packages in desktop.

Part of ament/ament_cmake#365

This exports modern CMake targets and removes ament_export_libraries and ament_export_include_directories as they're redundant with the exported CMake targets. Edit: Added back to minimize disruption

Part of ament/ament_cmake#292

This replaces ament_target_dependencies() calls with target_link_libraries().

I also reduced the dependency on OpenCV from all of it, to just the core library as that's all that appears to be used.

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
@sloretz sloretz self-assigned this Jan 5, 2022
@clalancette
Copy link
Contributor

Maybe it's time to fast-forward ros2 to foxy-devel and change the ROS Rolling branch to ros2?

Yeah, totally agreed on that. I'll go ahead and do that.

@clalancette
Copy link
Contributor

ros/rosdistro#31688 is now merged in, so Rolling targets ros2. I'm thus going to retarget this PR to the 'ros2' branch.

@clalancette clalancette changed the base branch from foxy-devel to ros2 January 5, 2022 21:38
@clalancette
Copy link
Contributor

@ros-pull-request-builder retest this please

@sloretz
Copy link
Author

sloretz commented Jan 5, 2022

13:27:47 CMake Error at CMakeLists.txt:53 (add_executable):
13:27:47   Target "depthimage_to_laserscan_node" links to target
13:27:47   "image_geometry::image_geometry" but the target was not found.  Perhaps a
13:27:47   find_package() call is missing for an IMPORTED target, or an ALIAS target
13:27:47   is missing?

Ah, this probably requires the vision_opencv PR I'm about to open up

@clalancette
Copy link
Contributor

Ah, this probably requires the vision_opencv PR I'm about to open up

I was just going to mention that :).

Copy link

@audrow audrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me with green CI.

Signed-off-by: Shane Loretz <sloretz@openrobotics.org>
Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor thing to fix, then this is good to go.

CMakeLists.txt Outdated
target_link_libraries(DepthImageToLaserScanROS PUBLIC
rclcpp::rclcpp)
target_link_libraries(DepthImageToLaserScanROS PRIVATE
rcutils::rcutils
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this isn't of your doing, but DepthImageToLaserScanROS.cpp doesn't actually need to include rcutils, and hence doesn't need to directly link against it. So I'd be in favor of removing that unnecessary include, and removing this.

(rcutils also isn't properly exposed as a dependency in package.xml or CMakeLists.txt)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed traces of rcutils in 9926f09

Signed-off-by: Shane Loretz <sloretz@openrobotics.org>
Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks for iterating.

We should be able to get the Rpr job working in a couple of hours, assuming the current Rolling rebuild on https://build.ros2.org is successful 🤞

@sloretz
Copy link
Author

sloretz commented Jan 21, 2022

Looks like vision-opencv is still 2.2.1 in http://repo.ros2.org/status_page/rolling_default.html?q=vision because the Rolling packages haven't been sync'd to testing yet.. I'll wait a bit longer to rerun the PR job.

@clalancette
Copy link
Contributor

@ros-pull-request-builder retest this please

@clalancette clalancette merged commit ad0c4bd into ros2 Jan 22, 2022
@clalancette clalancette deleted the sloretz__easy_idso_part1 branch January 22, 2022 13:38
YBachmann pushed a commit to YBachmann/depthimage_to_laserscan that referenced this pull request Jul 29, 2024
…perception#58)

* Install includes to ${PROJECT_NAME} folder and use modern CMake

* Remove traces of rcutils

Signed-off-by: Shane Loretz <sloretz@openrobotics.org>
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

Successfully merging this pull request may close these issues.

3 participants