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

feat: use exported targets #69

Merged
merged 8 commits into from Aug 15, 2022

Conversation

wep21
Copy link
Contributor

@wep21 wep21 commented Jun 25, 2022

  • revert the changes for ament cmake auto and use exported targets instead.

Daisuke Nishimatsu added 2 commits June 25, 2022 12:12
Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>
@wep21
Copy link
Contributor Author

wep21 commented Jun 25, 2022

@clalancette @hidmic Could anyone review this PR?

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.

I think this is the right direction to go.

I've left a few fairly minor things to fixed. Once those are good, I'm happy to approve.

CMakeLists.txt Outdated Show resolved Hide resolved
INSTALL_TO_SHARE
launch
)
ament_package()
Copy link
Contributor

Choose a reason for hiding this comment

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

We are missing the export of the dependencies. This should be something like:

ament_export_dependencies(laser_geometry message_filters rclcpp sensor_msgs tf2_ros)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@clalancette I added missing ament_export_dependencies in be9226b.

CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Show resolved Hide resolved
wep21 and others added 4 commits June 27, 2022 23:21
Co-authored-by: Chris Lalancette <clalancette@gmail.com>
Co-authored-by: Chris Lalancette <clalancette@gmail.com>
Co-authored-by: Chris Lalancette <clalancette@gmail.com>
Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>
@wep21 wep21 requested a review from clalancette June 27, 2022 15:10
CMakeLists.txt Outdated
Comment on lines 30 to 31
# use exported target after https://github.com/ros2/geometry2/pull/536 is merged
# tf2_sensor_msgs::tf2_sensor_msgs
Copy link
Contributor

Choose a reason for hiding this comment

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

So when I tried to build this, it failed with:

pc_to_laserscan_ws/src/pointcloud_to_laserscan/src/pointcloud_to_laserscan_node.cpp:52:10: fatal error: tf2_sensor_msgs/tf2_sensor_msgs.h: No such file or directory
   52 | #include "tf2_sensor_msgs/tf2_sensor_msgs.h"

A workaround would be to add ${tf2_sensor_msgs_INCLUDE_DIRS} to the target_include_directories. We can either do that, or we can wait for ros2/geometry2#536 to be merged. I leave the decision to you, either is fine with me.

Copy link
Contributor Author

@wep21 wep21 Jun 28, 2022

Choose a reason for hiding this comment

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

@clalancette I decided to add workaround until ros2/geometry2#536 is merged. f4e8781
Thank you for letting me know.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@clalancette friendly ping

Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>
@wep21 wep21 requested a review from clalancette June 28, 2022 13:26
@wep21
Copy link
Contributor Author

wep21 commented Jul 15, 2022

@clalancette friendly ping

1 similar comment
@wep21
Copy link
Contributor Author

wep21 commented Aug 15, 2022

@clalancette friendly ping

Now that we merged in the geometry2 PR, we can use the
target as appropriate.  Also fix a warning when building
against rolling.

Signed-off-by: Chris Lalancette <clalancette@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.

@wep21 I ended up going back to the tf2_sensor_msg::tf2_sensor_msgs target, as we've merged in the geometry2 PR in the meantime. I also fixes a warning when building. This now looks good to me, thank you!

@clalancette
Copy link
Contributor

@ros-pull-request-builder retest this please

@clalancette clalancette merged commit 272ca4d into ros-perception:rolling Aug 15, 2022
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.

None yet

2 participants