Skip to content

Create a Humble distribution compatible version of the main (Rolling)…#5017

Closed
MaciejGroszyk wants to merge 22 commits intoros-navigation:humble_mainfrom
MaciejGroszyk:humble_main
Closed

Create a Humble distribution compatible version of the main (Rolling)…#5017
MaciejGroszyk wants to merge 22 commits intoros-navigation:humble_mainfrom
MaciejGroszyk:humble_main

Conversation

@MaciejGroszyk
Copy link
Contributor

@MaciejGroszyk MaciejGroszyk commented Mar 25, 2025

… branch issue

There are still few unsolved issues:

  1. TransformListener::subscription_callback(msg, is_static) is private within this context. I moved it locally to public methods, like in jazzy and rolling.
  2. ‘spin_all’ is not a member of ‘rclcpp’. I changed it to spin_some
  3. ‘copy_all_parameter_values’ is not a member of ‘rclcpp’. I commented it.
  4. ‘geometry_msgs/msg/polygon_instance_stamped.hpp: No such file or directory‘. I backported it locally from rolling branch.
  5. ‘class nav2_collision_monitor::CollisionDetector’ has no member named ‘create_timer’'. I changed it to create_wall_timer.
  6. ‘nav2_waypoint_follower/include/nav2_waypoint_follower/waypoint_follower.hpp:211:45: error: wrong number of template arguments (2, should be 1)
    211 | std::shared_ptr<nav2_util::LifecycleNode>>> from_ll_to_map_client_; '. Can't fix that. I commented it so whole package is building successfully with above changes.

Basic Info

Info Please fill out this column
Ticket(s) this addresses (add tickets here #1)
Primary OS tested on (Ubuntu, MacOS, Windows)
Robotic platform tested on (Steve's Robot, gazebo simulation of Tally, hardware turtlebot)
Does this PR contain AI generated software? (No; Yes and it is marked inline in the code)

Description of contribution in a few bullet points

Create a Humble distribution compatible version of the main (Rolling) branch issue PR.

Description of documentation updates required from your changes

target_link_libraries changed to ament_target_dependencies in CMakeLists.txt.
service QoS resolved with get_rmw_qos_profile

Description of how this change was tested

It was successfully built with colcon build --symlink-install command.


Future work that may be required in bullet points

Refer to unsolved issues described at the beginning.

For Maintainers:

  • Check that any new parameters added are updated in docs.nav2.org
  • Check that any significant change is added to the migration guide
  • Check that any new features OR changes to existing behaviors are reflected in the tuning guide
  • Check that any new functions have Doxygen added
  • Check that any new features have test coverage
  • Check that any new plugins is added to the plugins page
  • If BT Node, Additionally: add to BT's XML index of nodes for groot, BT package's readme table, and BT library lists

… branch issue

Signed-off-by: MaciejGroszyk <maciekgroszyk12@gmail.com>
@mergify
Copy link
Contributor

mergify bot commented Mar 25, 2025

@MaciejGroszyk, all pull requests must be targeted towards the main development branch.
Once merged into main, it is possible to backport to @humble_main, but it must be in main
to have these changes reflected into new distributions.

@SteveMacenski
Copy link
Member

SteveMacenski commented Mar 25, 2025

Huge thanks for taking this on, that's a big help to maintainers!

TransformListener::subscription_callback(msg, is_static) is private within this context. I moved it locally to public methods, like in jazzy and rolling.

This program's cmake should be commented out so that it is not compiled. This is not possible to be used with Humble

‘spin_all’ is not a member of ‘rclcpp’. I changed it to spin_some

LGTM

‘copy_all_parameter_values’ is not a member of ‘rclcpp’. I commented it.

Nav2 had a version of that in our nav2_util that I removed once the rclcpp version was merged. Add this to nav2_util again from rclcpp and reuse it! 😄

‘geometry_msgs/msg/polygon_instance_stamped.hpp: No such file or directory‘. I backported it locally from rolling branch.

Please open that PR against Humble to add to geometry_msgs

‘class nav2_collision_monitor::CollisionDetector’ has no member named ‘create_timer’'. I changed it to create_wall_timer.

Is that equal? I don't recall that API change in rclcpp.

‘nav2_waypoint_follower/include/nav2_waypoint_follower/waypoint_follower.hpp:211:45: error: wrong number of template arguments (2, should be 1). 211 | std::shared_ptr<nav2_util::LifecycleNode>>> from_ll_to_map_client_; '. Can't fix that. I commented it so whole package is building successfully with above changes.

Why not? R_L doesn't have the LL to map service in Humble?

…ter_values added back to nav2_util, clean up comments in CMakeLists.txt

Signed-off-by: MaciejGroszyk <maciekgroszyk12@gmail.com>
Signed-off-by: MaciejGroszyk <maciekgroszyk12@gmail.com>
@MaciejGroszyk
Copy link
Contributor Author

The PR to geometry_msgs is ready ros2/common_interfaces#273.
I pushed changes according to your comments. Not sure why ci/circleci: release_build is failing.

Copy link
Member

@SteveMacenski SteveMacenski left a comment

Choose a reason for hiding this comment

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

Massive thanks, this is really helpful for many users!

I think beyond the comments above there are 2 final bits:

  • Can you run colcon test and make sure everything is running properly while on Humble? Minor linting issues I don't care about for this case, but any functional issues are important
  • Can you run the basic nav2 demos in nav2_bringup and make sure those work?

Thanks!

PS: I expect CI build to fail since that's based on rolling and the APIs you updated here support Humble :-)

Signed-off-by: MaciejGroszyk <maciekgroszyk12@gmail.com>
Signed-off-by: MaciejGroszyk <maciekgroszyk12@gmail.com>
@SteveMacenski
Copy link
Member

I think the functional / testing are all that's left, except for the R_L questions on the WPF

Signed-off-by: MaciejGroszyk <maciekgroszyk12@gmail.com>
… fix error: too many argument nav2_util::ServiceClient

Signed-off-by: MaciejGroszyk <maciekgroszyk12@gmail.com>
@MaciejGroszyk
Copy link
Contributor Author

A FromLL service is in Humble. Error is related to casting nav2_util::LifecycleNode ptr to rclcpp::Node ptr. I just use std::dynamic_pointer_cast to handle that. Is it ok?

Colcon test-result is: Summary: 3866 tests, 102 errors, 261 failures, 815 skipped

ros2 launch nav2_bringup tb3_simulation_launch.py returns:
[ERROR] [launch]: Caught exception in launch (see debug for traceback): cannot import name 'PushROSNamespace' from 'launch_ros.actions' (/opt/ros/humble/lib/python3.10/site-packages/launch_ros/actions/init.py)
[ERROR] [launch]: Caught exception in launch (see debug for traceback): [Errno 2] No such file or directory: '/tmp/nav2_lqcdcwp_.sdf'

@SteveMacenski
Copy link
Member

Sounds like there are alot of issues - can you look into them? It may be N tests failing for the exact same reasons, I doubt there's actually 261 unique issues. I know that launch issue you mention below is probably causing every nav2_system_test to fail launching Nav2 itself 😄

cannot import name 'PushROSNamespace' from 'launch_ros.actions'

That may not be available in Humble and we need to use another action type (I think it was just renamed or something)

…n with PythonExpression

Signed-off-by: MaciejGroszyk <maciekgroszyk12@gmail.com>
Copy link
Member

@SteveMacenski SteveMacenski left a comment

Choose a reason for hiding this comment

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

How did your testing with colcon and functional testing go? Any other issues or failures?

from launch.substitutions import LaunchConfiguration, PythonExpression
from launch_ros.actions import Node
from launch_ros.actions import PushROSNamespace
# from launch_ros.actions import PushROSNamespace
Copy link
Member

Choose a reason for hiding this comment

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

I think the name just changed from PushRosNamspace to PushROSNamespace. I think can use the former

@MaciejGroszyk
Copy link
Contributor Author

How did your testing with colcon and functional testing go? Any other issues or failures?

Summary: 4049 tests, 42 errors, 108 failures, 815 skipped

tb3_simulation_launch.py and tb4_simulation.
is like:
[rviz2-5] [INFO] [1743460548.285302040] [rviz2]: Setting estimate pose: Frame:map, Position(-0.715973, -0.522278, 0), Orientation(0, 0, 0.229364, 0.973341) = Angle: 0.462848
[ERROR] [component_container_isolated-6]: process has died [pid 736726, exit code -11, cmd '/home/user/ros2_humble/install/rclcpp_components/lib/rclcpp_components/component_container_isolated --ros-args --log-level info --ros-args -r __node:=nav2_container -r __ns:=/ --params-file /tmp/launch_params_lmqyuldm --params-file /tmp/launch_params_54lusmph -r /tf:=tf -r /tf_static:=tf_static'].
[rviz2-5] Start navigation
[rviz2-5] [INFO] [1743460552.563475347] [rviz_navigation_dialog_action_client]: NavigateToPose will be called using the BT Navigator's default behavior tree.
[rviz2-5] [ERROR] [1743460552.666514681] [rviz_navigation_dialog_action_client]: Send goal call failed

ros2 launch nav2_bringup cloned_multi_tb3_simulation_launch.py

  • ImportError: cannot import name 'ForEach' from 'launch.actions'

@SteveMacenski
Copy link
Member

Ah, ForEach is not in Humble, I think the multi-robot style of launch files currently in Humble needs to be used in this case

Signed-off-by: MaciejGroszyk <maciekgroszyk12@gmail.com>
Signed-off-by: MaciejGroszyk <maciekgroszyk12@gmail.com>
Signed-off-by: MaciejGroszyk <maciekgroszyk12@gmail.com>
Signed-off-by: MaciejGroszyk <maciekgroszyk12@gmail.com>
Signed-off-by: MaciejGroszyk <maciekgroszyk12@gmail.com>
Signed-off-by: MaciejGroszyk <maciekgroszyk12@gmail.com>
@SteveMacenski
Copy link
Member

Let me know when I should take a look again! :-)

Signed-off-by: MaciejGroszyk <maciekgroszyk12@gmail.com>
@MaciejGroszyk
Copy link
Contributor Author

Hi, progress is going really slow. Right now it is Summary: 4175 tests, 35 errors, 196 failures, 815 skipped.

After launching tb3_loopback_simulation.launch.py I have a issue with:
[component_container_isolated-6] [INFO] [1743620489.691084840] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
Do you have any tip how to solve that?

In parallel I tried to create a devcontainer and I am struggling with:
[2025-04-02T16:02:35.777Z] --- stderr: nav2_voxel_grid
CMake Error at /opt/ros/humble/share/ament_cmake_gtest/cmake/ament_cmake_gtest-extras.cmake:85 (add_subdirectory):
add_subdirectory given source "/opt/ros/rolling/src/gtest_vendor" which is
not an existing directory.
Call Stack (most recent call first):
/opt/ros/humble/share/ament_cmake_gtest/cmake/ament_find_gtest.cmake:33 (_ament_cmake_gtest_find_gtest)
CMakeLists.txt:39 (ament_find_gtest)

CMake Error at /opt/ros/humble/share/ament_cmake_gtest/cmake/ament_cmake_gtest-extras.cmake:89 (set_target_properties):
set_target_properties Can not find target to add properties to: gtest
Call Stack (most recent call first):
/opt/ros/humble/share/ament_cmake_gtest/cmake/ament_find_gtest.cmake:33 (_ament_cmake_gtest_find_gtest)
CMakeLists.txt:39 (ament_find_gtest)

@SteveMacenski
Copy link
Member

35 failures from 108? I think that's pretty fast in my opinion! 😄

[component_container_isolated-6] [INFO] [1743620489.691084840] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist

Are you only seeing it with that one launch file (not TB4, not with Gazebo)? Usually means something along the lines that the odometry isn't being published, usually because the simulator isn't up yet. Its OK if that happens for a short while while the system is coming up, but if its indefinite then that's an issue.

add_subdirectory given source "/opt/ros/rolling/src/gtest_vendor" which is

That's itneresting. Its trying to find rolling rather than humble. Have you accidentally mixed sourcing both humble and rolling installs in the same terminal that you're compiling your workspace?

I checked and gtest_vendor appears in both Rolling and Humble, so that shouldn't be an issue in terms of Humble availability.

Signed-off-by: MaciejGroszyk <maciekgroszyk12@gmail.com>
Signed-off-by: MaciejGroszyk <maciekgroszyk12@gmail.com>
Signed-off-by: MaciejGroszyk <maciekgroszyk12@gmail.com>
…iRobotPose to fix launch nav2_bringup unique_multi_tb3_simulation_launch.py

Signed-off-by: MaciejGroszyk <maciekgroszyk12@gmail.com>
Signed-off-by: MaciejGroszyk <maciekgroszyk12@gmail.com>
@MaciejGroszyk
Copy link
Contributor Author

colcon test --packages-skip nav2_minimal_tb3_sim nav2_minimal_tb4_description nav2_minimal_tb4_sim
Summary: 4164 tests, 17 errors, 22 failures, 815 skipped and basic nav2 demos in nav2_bringup works.

I reverted commit 2cd166f without parameters.key >>-v32, return ParseMultiRobotPose to fix launch nav2_bringup unique_multi_tb3_simulation_launch.py

@SteveMacenski
Copy link
Member

I reverted commit 2cd166f

Makes sense! Any other questions I can help answer? What are the remaining error's nature?

Signed-off-by: MaciejGroszyk <maciekgroszyk12@gmail.com>
Signed-off-by: MaciejGroszyk <maciekgroszyk12@gmail.com>
@MaciejGroszyk
Copy link
Contributor Author

I reverted commit 2cd166f

Makes sense! Any other questions I can help answer? What are the remaining error's nature?

Remaining errors are only in nav2_system_test.
Tests from nav2_system_test stop at waiting for transform:
23: [controller_server-8] [INFO] [1744144114.725688284] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist

@SteveMacenski
Copy link
Member

Those are usually simulator not runnign related. You probably want to revert the modern Gazebo PR and use Gazebo Classic for Humble in these

@SteveMacenski
Copy link
Member

@MaciejGroszyk hey, just checking back in, how's it going? :-)

@SteveMacenski SteveMacenski mentioned this pull request Apr 29, 2025
7 tasks
@SteveMacenski
Copy link
Member

PR superseded! Should be merged in soon!

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