Skip to content

Remove use of ament_target_dependencies#3708

Open
nbbrooks wants to merge 3 commits intomoveit:mainfrom
nbbrooks:pr-remove-ament-target-dependencies
Open

Remove use of ament_target_dependencies#3708
nbbrooks wants to merge 3 commits intomoveit:mainfrom
nbbrooks:pr-remove-ament-target-dependencies

Conversation

@nbbrooks
Copy link
Copy Markdown
Contributor

@nbbrooks nbbrooks commented Mar 16, 2026

Description

Address removal of ament_target_dependencies in ament/ament_cmake#614

Checklist

  • Required by CI: Code is auto formatted using clang-format
  • Extend the tutorials / documentation reference
  • Document API changes relevant to the user in the MIGRATION.md notes
  • Create tests, which fail without this PR reference
  • Include a screenshot if changing a GUI
  • While waiting for someone to review your request, please help review another open pull request to support the maintainers

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (c154f94) to head (caf50c1).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #3708       +/-   ##
==========================================
- Coverage   46.22%   0.00%   -46.21%     
==========================================
  Files         726     515      -211     
  Lines       59503   46480    -13023     
  Branches     7623    6025     -1598     
==========================================
- Hits        27499       0    -27499     
- Misses      31836   46480    +14644     
+ Partials      168       0      -168     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@urfeex
Copy link
Copy Markdown

urfeex commented Mar 23, 2026

Thanks for the effort! I tested that branch locally and it compiled fine and was usable. (Tested the RViz path planning plugin with an existing moveit config).

@nbbrooks Do you need any help in finishing this?

@nbbrooks nbbrooks force-pushed the pr-remove-ament-target-dependencies branch from 0b98baf to caf50c1 Compare March 23, 2026 17:48
@nbbrooks
Copy link
Copy Markdown
Contributor Author

@urfeex let me see if this latest version rebased onto the Qt6 fixes from #3707 still passes and then I could use a sanity check from you again :)

@urfeex
Copy link
Copy Markdown

urfeex commented Mar 24, 2026

With the current version I get a different build error than the CI job:

--- stderr: moveit_ros_visualization
CMake Error at /opt/ros/rolling/share/rviz_rendering/cmake/rviz_renderingExport.cmake:61 (set_target_properties):
  The link interface of target "rviz_rendering::rviz_rendering" contains:

    Qt6::Widgets

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /opt/ros/rolling/share/rviz_rendering/cmake/ament_cmake_export_targets-extras.cmake:9 (include)
  /opt/ros/rolling/share/rviz_rendering/cmake/rviz_renderingConfig.cmake:41 (include)
  /opt/ros/rolling/share/rviz_common/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/rolling/share/rviz_common/cmake/rviz_commonConfig.cmake:41 (include)
  CMakeLists.txt:47 (find_package)

@nbbrooks
Copy link
Copy Markdown
Contributor Author

nbbrooks commented Mar 24, 2026

Interesting, what OS and version of ros2 are you on? I guess this would be ros2 rolling.

Are you building anything from source other than moveit2?

@urfeex
Copy link
Copy Markdown

urfeex commented Mar 25, 2026

Interesting, what OS and version of ros2 are you on? I guess this would be ros2 rolling.

Are you building anything from source other than moveit2?

I'm using Ubuntu 24.04 with Rolling. I have a ros2_control master-source build as an underlay, but I don't think, this is affecting this. My main assumption would be that this comes from the fact that I have both, Qt5 and Qt6 installed on my system (Which may be the case for many users, though not the build farm)

My workspace:

========= geometric_shapes =========
## ros2...origin/ros2
========= moveit2 =========
## pr-remove-ament-target-dependencies
========= moveit_msgs =========
## ros2...origin/ros2
========= moveit_resources =========
## ros2...origin/ros2
========= moveit_task_constructor =========
## ros2...origin/ros2
?? visualization/COLCON_IGNORE
========= srdfdom =========
## ros2...origin/ros2

@nbbrooks
Copy link
Copy Markdown
Contributor Author

Hmmm sounds like ros2/rviz#1689 but I thought I had some cmake code to cover that case in my moveit2 qt6 pr

@urfeex
Copy link
Copy Markdown

urfeex commented Mar 25, 2026

I thought so, as well looking at the changes and the previous version before the rebase also worked for me.

Edit:
https://github.com/moveit/moveit2/pull/3708/changes#diff-32b1b6c9a593167f8865334c0e4a5fcbd1af91d039af4ceb66077cf94179af22L30

You removed finding rviz2. This, the check for rviz2_version didn't work. That doesn't fix things for me, though:

--- stderr: moveit_ros_visualization
moveit_ros_visualization: You did not request a specific build type: Choosing 'Release' for maximum performance
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt6Core/Qt6CoreVersionlessTargets.cmake:42 (message):
  Some (but not all) targets in this export set were already defined.

  Targets Defined: Qt::Core

  Targets not yet defined: Qt::CorePrivate

Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/Qt6Core/Qt6CoreConfig.cmake:65 (include)
  /usr/share/cmake-3.28/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
  /usr/lib/x86_64-linux-gnu/cmake/Qt6/QtPublicDependencyHelpers.cmake:108 (find_dependency)
  /usr/lib/x86_64-linux-gnu/cmake/Qt6Widgets/Qt6WidgetsDependencies.cmake:39 (_qt_internal_find_qt_dependencies)
  /usr/lib/x86_64-linux-gnu/cmake/Qt6Widgets/Qt6WidgetsConfig.cmake:50 (include)
  /usr/lib/x86_64-linux-gnu/cmake/Qt6/Qt6Config.cmake:167 (find_package)
  CMakeLists.txt:38 (find_package)


CMake Warning at /usr/lib/x86_64-linux-gnu/cmake/Qt6/Qt6Config.cmake:167 (find_package):
  Found package configuration file:

    /usr/lib/x86_64-linux-gnu/cmake/Qt6Widgets/Qt6WidgetsConfig.cmake

  but it set Qt6Widgets_FOUND to FALSE so package "Qt6Widgets" is considered
  to be NOT FOUND.
Call Stack (most recent call first):
  CMakeLists.txt:38 (find_package)

Which seems like something, I have seen before.

@nbbrooks
Copy link
Copy Markdown
Contributor Author

nbbrooks commented Mar 25, 2026

I thought so, as well looking at the changes and the previous version before the rebase also worked for me.

That is ....odd. I would have expected qt5 v. qt6 issues in the version before the rebase. Do you think it was compiling for Qt5 in that version, despite the rviz2 change?

@urfeex
Copy link
Copy Markdown

urfeex commented Mar 27, 2026

I did a clean build today with the version from fe0fc9d and it compiled and was usable :-)

I noticed, that using the dropdown menus for selecting a start / goal state in the MotionPlanning RViz plugin did not work, though. That might be Qt6-related, hence I am mentioning it here.


Edit: I noticed the following output

[rviz2-3] qt.core.qobject.connect: QObject::connect: No such signal QComboBox::activated(QString)
[rviz2-3] qt.core.qobject.connect: QObject::connect:  (sender name:   'start_state_combo_box')
[rviz2-3] qt.core.qobject.connect: QObject::connect:  (receiver name: 'MotionPlanningUI')
[rviz2-3] qt.core.qobject.connect: QObject::connect: No such signal QComboBox::activated(QString)
[rviz2-3] qt.core.qobject.connect: QObject::connect:  (sender name:   'goal_state_combo_box')
[rviz2-3] qt.core.qobject.connect: QObject::connect:  (receiver name: 'MotionPlanningUI')
[rviz2-3] qt.core.qobject.connect: QObject::connect: No such signal QComboBox::currentIndexChanged(QString)
[rviz2-3] qt.core.qobject.connect: QObject::connect:  (sender name:   'planning_group_combo_box')
[rviz2-3] qt.core.qobject.connect: QObject::connect:  (receiver name: 'MotionPlanningUI')

Edit 2: This solved it for me:

diff --git a/moveit_ros/visualization/motion_planning_rviz_plugin/src/motion_planning_frame.cpp b/moveit_ros/visualization/motion_planning_rviz_plugin/src/motion_planning_frame.cpp
index 81ba5e291..b187078c4 100644
--- a/moveit_ros/visualization/motion_planning_rviz_plugin/src/motion_planning_frame.cpp
+++ b/moveit_ros/visualization/motion_planning_rviz_plugin/src/motion_planning_frame.cpp
@@ -119,9 +119,9 @@ MotionPlanningFrame::MotionPlanningFrame(MotionPlanningDisplay* pdisplay, rviz_c
   connect(ui_->execute_button, SIGNAL(clicked()), this, SLOT(executeButtonClicked()));
   connect(ui_->plan_and_execute_button, SIGNAL(clicked()), this, SLOT(planAndExecuteButtonClicked()));
   connect(ui_->stop_button, SIGNAL(clicked()), this, SLOT(stopButtonClicked()));
-  connect(ui_->start_state_combo_box, SIGNAL(activated(QString)), this, SLOT(startStateTextChanged(QString)));
-  connect(ui_->goal_state_combo_box, SIGNAL(activated(QString)), this, SLOT(goalStateTextChanged(QString)));
-  connect(ui_->planning_group_combo_box, SIGNAL(currentIndexChanged(QString)), this,
+  connect(ui_->start_state_combo_box, SIGNAL(textActivated(QString)), this, SLOT(startStateTextChanged(QString)));
+  connect(ui_->goal_state_combo_box, SIGNAL(textActivated(QString)), this, SLOT(goalStateTextChanged(QString)));
+  connect(ui_->planning_group_combo_box, SIGNAL(currentTextChanged(QString)), this,
           SLOT(planningGroupTextChanged(QString)));
   connect(ui_->database_connect_button, SIGNAL(clicked()), this, SLOT(databaseConnectButtonClicked()));
   connect(ui_->save_scene_button, SIGNAL(clicked()), this, SLOT(saveSceneButtonClicked()));

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.

2 participants