ros-navigation / navigation2

ROS 2 Navigation Framework and System
https://nav2.org/
Other
2.52k stars 1.28k forks source link

"1 package failed: nav2_mppi_controller" while building Nav2 package #3898

Closed Rudresh172 closed 11 months ago

Rudresh172 commented 11 months ago

Bug report

Required Info:

Steps to reproduce issue

source /opt/ros/humble/setup.bash
sudo apt install \
  ros-$ROS_DISTRO-navigation2 \
  ros-$ROS_DISTRO-nav2-bringup \
  ros-$ROS_DISTRO-turtlebot3*

source /opt/ros/humble/setup.bash
mkdir -p ~/nav2_ws/src && cd ~/nav2_ws
git clone https://github.com/ros-planning/navigation2.git --branch $ROS_DISTRO ./src/navigation2
rosdep install -y \
  --from-paths ./src \
  --ignore-src
colcon build \
  --symlink-install

Expected behavior

All packages installed successfully

Actual behavior

Cloning into './src/navigation2'... remote: Enumerating objects: 39313, done. remote: Counting objects: 100% (1773/1773), done. remote: Compressing objects: 100% (845/845), done. remote: Total 39313 (delta 1136), reused 1265 (delta 862), pack-reused 37540 Receiving objects: 100% (39313/39313), 88.88 MiB | 5.46 MiB/s, done. Resolving deltas: 100% (26133/26133), done. executing command [sudo -H apt-get install -y ros-humble-test-msgs] [sudo] password for rudresh: Reading package lists... Done Building dependency tree... Done Reading state information... Done The following NEW packages will be installed: ros-humble-test-msgs 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 468 kB of archives. After this operation, 7,807 kB of additional disk space will be used. Get:1 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-test-msgs amd64 1.2.1-1jammy.20230919.204708 [468 kB] Fetched 468 kB in 6s (78.5 kB/s)
Selecting previously unselected package ros-humble-test-msgs. (Reading database ... 319302 files and directories currently installed.) Preparing to unpack .../ros-humble-test-msgs_1.2.1-1jammy.20230919.204708_amd64.deb ... Unpacking ros-humble-test-msgs (1.2.1-1jammy.20230919.204708) ... Setting up ros-humble-test-msgs (1.2.1-1jammy.20230919.204708) ... Processing triggers for libc-bin (2.35-0ubuntu3.4) ... executing command [sudo -H apt-get install -y python3-zmq] Reading package lists... Done Building dependency tree... Done Reading state information... Done The following NEW packages will be installed: python3-zmq 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 283 kB of archives. After this operation, 1,464 kB of additional disk space will be used. Get:1 http://be.archive.ubuntu.com/ubuntu jammy/universe amd64 python3-zmq amd64 22.3.0-1build1 [283 kB] Fetched 283 kB in 0s (852 kB/s)
Selecting previously unselected package python3-zmq. (Reading database ... 319751 files and directories currently installed.) Preparing to unpack .../python3-zmq_22.3.0-1build1_amd64.deb ... Unpacking python3-zmq (22.3.0-1build1) ... Setting up python3-zmq (22.3.0-1build1) ... executing command [sudo -H apt-get install -y lcov] Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: libcommon-sense-perl libgd-perl libjson-perl libjson-xs-perl libperlio-gzip-perl libtypes-serialiser-perl The following NEW packages will be installed: lcov libcommon-sense-perl libgd-perl libjson-perl libjson-xs-perl libperlio-gzip-perl libtypes-serialiser-perl 0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded. Need to get 454 kB of archives. After this operation, 1,452 kB of additional disk space will be used. Get:1 http://be.archive.ubuntu.com/ubuntu jammy/main amd64 libjson-perl all 4.04000-1 [81.8 kB] Get:2 http://be.archive.ubuntu.com/ubuntu jammy/main amd64 libperlio-gzip-perl amd64 0.19-1build8 [14.9 kB] Get:3 http://be.archive.ubuntu.com/ubuntu jammy/universe amd64 lcov all 1.15-1 [99.5 kB] Get:4 http://be.archive.ubuntu.com/ubuntu jammy/main amd64 libcommon-sense-perl amd64 3.75-2build1 [21.1 kB] Get:5 http://be.archive.ubuntu.com/ubuntu jammy/main amd64 libtypes-serialiser-perl all 1.01-1 [11.6 kB] Get:6 http://be.archive.ubuntu.com/ubuntu jammy/main amd64 libjson-xs-perl amd64 4.030-1build3 [87.2 kB] Get:7 http://be.archive.ubuntu.com/ubuntu jammy/main amd64 libgd-perl amd64 2.76-2build1 [138 kB] Fetched 454 kB in 1s (516 kB/s)
Selecting previously unselected package libjson-perl. (Reading database ... 319914 files and directories currently installed.) Preparing to unpack .../0-libjson-perl_4.04000-1_all.deb ... Unpacking libjson-perl (4.04000-1) ... Selecting previously unselected package libperlio-gzip-perl. Preparing to unpack .../1-libperlio-gzip-perl_0.19-1build8_amd64.deb ... Unpacking libperlio-gzip-perl (0.19-1build8) ... Selecting previously unselected package lcov. Preparing to unpack .../2-lcov_1.15-1_all.deb ... Unpacking lcov (1.15-1) ... Selecting previously unselected package libcommon-sense-perl:amd64. Preparing to unpack .../3-libcommon-sense-perl_3.75-2build1_amd64.deb ... Unpacking libcommon-sense-perl:amd64 (3.75-2build1) ... Selecting previously unselected package libtypes-serialiser-perl. Preparing to unpack .../4-libtypes-serialiser-perl_1.01-1_all.deb ... Unpacking libtypes-serialiser-perl (1.01-1) ... Selecting previously unselected package libjson-xs-perl. Preparing to unpack .../5-libjson-xs-perl_4.030-1build3_amd64.deb ... Unpacking libjson-xs-perl (4.030-1build3) ... Selecting previously unselected package libgd-perl. Preparing to unpack .../6-libgd-perl_2.76-2build1_amd64.deb ... Unpacking libgd-perl (2.76-2build1) ... Setting up libcommon-sense-perl:amd64 (3.75-2build1) ... Setting up libgd-perl (2.76-2build1) ... Setting up libtypes-serialiser-perl (1.01-1) ... Setting up libjson-perl (4.04000-1) ... Setting up libperlio-gzip-perl (0.19-1build8) ... Setting up libjson-xs-perl (4.030-1build3) ... Setting up lcov (1.15-1) ... Processing triggers for man-db (2.10.2-1) ...

All required rosdeps installed successfully

[0.908s] WARNING:colcon.colcon_core.package_selection:Some selected packages are already built in one or more underlay workspaces: 'nav2_bringup' is in: /opt/ros/humble 'navigation2' is in: /opt/ros/humble 'nav2_map_server' is in: /opt/ros/humble If a package in a merged underlay workspace is overridden and it installs headers, then all packages in the overlay must sort their include directories by workspace order. Failure to do so may result in build failures or undefined behavior at run time. If the overridden package is used by another package in any underlay, then the overriding package in the overlay must be API and ABI compatible or undefined behavior at run time may occur.

If you understand the risks and want to override a package anyways, add the following to the command line: --allow-overriding nav2_bringup nav2_map_server navigation2

This may be promoted to an error in a future release of colcon-override-check. Starting >>> nav2_common Starting >>> nav_2d_msgs Finished <<< nav2_common [0.79s]
Starting >>> nav2_msgs Starting >>> nav2_voxel_grid
Finished <<< nav_2d_msgs [5.63s]
Starting >>> dwb_msgs Finished <<< nav2_voxel_grid [17.9s]
Finished <<< dwb_msgs [16.0s]
Finished <<< nav2_msgs [32.9s]
Starting >>> nav2_util Starting >>> nav2_simple_commander --- stderr: nav2_simple_commander
/usr/lib/python3/dist-packages/setuptools/command/easy_install.py:158: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools. warnings.warn( /usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn(

Finished <<< nav2_simple_commander [0.84s] Finished <<< nav2_util [23.7s]
Starting >>> nav_2d_utils Starting >>> nav2_behavior_tree Starting >>> nav2_lifecycle_manager Starting >>> nav2_map_server Starting >>> nav2_amcl
Starting >>> nav2_velocity_smoother Finished <<< nav_2d_utils [21.9s]
Finished <<< nav2_lifecycle_manager [25.0s]
Starting >>> nav2_rviz_plugins Finished <<< nav2_velocity_smoother [36.4s]
Finished <<< nav2_map_server [40.0s]
Starting >>> nav2_costmap_2d Finished <<< nav2_amcl [46.0s]
Finished <<< nav2_rviz_plugins [35.5s]
[Processing: nav2_behavior_tree, nav2_costmap_2d] [Processing: nav2_behavior_tree, nav2_costmap_2d] [Processing: nav2_behavior_tree, nav2_costmap_2d] [Processing: nav2_behavior_tree, nav2_costmap_2d] Finished <<< nav2_costmap_2d [2min 28s]
Starting >>> nav2_core Starting >>> costmap_queue Starting >>> nav2_collision_monitor
Finished <<< nav2_behavior_tree [3min 10s]
Finished <<< nav2_core [3.41s]
Starting >>> dwb_core Starting >>> nav2_controller Starting >>> nav2_regulated_pure_pursuit_controller
Starting >>> nav2_behaviors Starting >>> nav2_bt_navigator Starting >>> nav2_constrained_smoother
Starting >>> nav2_mppi_controller Starting >>> nav2_navfn_planner
Starting >>> nav2_planner Starting >>> nav2_smac_planner
Starting >>> nav2_smoother Starting >>> nav2_theta_star_planner Starting >>> nav2_waypoint_follower
[Processing: costmap_queue, dwb_core, nav2_behaviors, nav2_bt_navigator, nav2_collision_monitor, nav2_constrained_smoother, nav2_controller, nav2_mppi_controller, nav2_navfn_planner, nav2_planner, nav2_regulated_pure_pursuit_controller, nav2_smac_planner, nav2_smoother, nav2_theta_star_planner, nav2_waypoint_follower] Finished <<< costmap_queue [1min 3s]
Finished <<< nav2_theta_star_planner [1min 8s] Finished <<< nav2_navfn_planner [1min 8s]
Finished <<< dwb_core [1min 8s]
Starting >>> dwb_critics Starting >>> dwb_plugins
Finished <<< nav2_regulated_pure_pursuit_controller [1min 32s] Finished <<< nav2_bt_navigator [1min 33s]
Finished <<< nav2_constrained_smoother [1min 47s] Finished <<< nav2_planner [1min 48s]
Finished <<< nav2_collision_monitor [2min 15s] Finished <<< dwb_plugins [1min 5s]
Finished <<< nav2_smoother [2min 21s]
Finished <<< nav2_waypoint_follower [2min 28s] Finished <<< dwb_critics [1min 47s]
Starting >>> nav2_dwb_controller Finished <<< nav2_dwb_controller [2.00s]
Finished <<< nav2_controller [3min 5s]
Starting >>> nav2_rotation_shim_controller Finished <<< nav2_behaviors [3min 22s]
Finished <<< nav2_smac_planner [3min 45s]
--- stderr: nav2_mppi_controller
/home/rudresh/nav2_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp: In member function ‘virtual void NoiseGeneratorTest_NoiseGeneratorLifecycle_Test::TestBody()’: /home/rudresh/nav2_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:45:32: error: ‘rclcpp_lifecycle’ was not declared in this scope 45 | auto node = std::make_shared("node"); | ^~~~ /home/rudresh/nav2_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:45:20: error: parse error in template argument list 45 | auto node = std::make_shared("node"); | ^~~~~~~~~~~~ /home/rudresh/nav2_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:45:64: error: no matching function for call to ‘make_shared< >(const char [5])’ 45 | auto node = std::make_shared("node"); | ~~~~~~~~~~~^~ In file included from /usr/include/c++/11/memory:77, from /opt/ros/humble/src/gtest_vendor/include/gtest/gtest.h:57, from /home/rudresh/nav2_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:18: /usr/include/c++/11/bits/shared_ptr.h:875:5: note: candidate: ‘template<class _Tp, class ... _Args> std::shared_ptr<_Tp> std::make_shared(_Args&& ...)’ 875 | make_shared(_Args&&... args) | ^~~ /usr/include/c++/11/bits/shared_ptr.h:875:5: note: template argument deduction/substitution failed: /home/rudresh/nav2_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:45:64: error: template argument 1 is invalid 45 | auto node = std::make_shared("node"); | ~~~~~~~~~~~^~ /home/rudresh/nav2_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:47:3: error: ‘ParametersHandler’ was not declared in this scope 47 | ParametersHandler handler(node); | ^~~~~ /home/rudresh/nav2_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:49:55: error: ‘handler’ was not declared in this scope 49 | generator.initialize(settings, false, "test_name", &handler); | ^~~ /home/rudresh/nav2_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp: In member function ‘virtual void NoiseGeneratorTest_NoiseGeneratorMain_Test::TestBody()’: /home/rudresh/nav2_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:57:32: error: ‘rclcpp_lifecycle’ was not declared in this scope 57 | auto node = std::make_shared("node"); | ^~~~ /home/rudresh/nav2_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:57:20: error: parse error in template argument list 57 | auto node = std::make_shared("node"); | ^~~~~~~~~~~~ /home/rudresh/nav2_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:57:64: error: no matching function for call to ‘make_shared< >(const char [5])’ 57 | auto node = std::make_shared("node"); | ~~~~~~~~~~~^~ In file included from /usr/include/c++/11/memory:77, from /opt/ros/humble/src/gtest_vendor/include/gtest/gtest.h:57, from /home/rudresh/nav2_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:18: /usr/include/c++/11/bits/shared_ptr.h:875:5: note: candidate: ‘template<class _Tp, class ... _Args> std::shared_ptr<_Tp> std::make_shared(_Args&& ...)’ 875 | make_shared(_Args&&... args) | ^~~ /usr/include/c++/11/bits/shared_ptr.h:875:5: note: template argument deduction/substitution failed: /home/rudresh/nav2_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:57:64: error: template argument 1 is invalid 57 | auto node = std::make_shared("node"); | ~~~~~~~~~~~^~ /home/rudresh/nav2_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:59:3: error: ‘ParametersHandler’ was not declared in this scope 59 | ParametersHandler handler(node); | ^~~~~ /home/rudresh/nav2_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:81:55: error: ‘handler’ was not declared in this scope 81 | generator.initialize(settings, false, "test_name", &handler); | ^~~ gmake[2]: [test/CMakeFiles/noise_generator_test.dir/build.make:76: test/CMakeFiles/noise_generator_test.dir/noise_generator_test.cpp.o] Error 1 gmake[1]: [CMakeFiles/Makefile2:334: test/CMakeFiles/noise_generator_test.dir/all] Error 2 gmake[1]: Waiting for unfinished jobs.... gmake: [Makefile:146: all] Error 2

Failed <<< nav2_mppi_controller [3min 47s, exited with code 2] Aborted <<< nav2_rotation_shim_controller [53.6s]

Summary: 33 packages finished [8min 8s] 1 package failed: nav2_mppi_controller 1 package aborted: nav2_rotation_shim_controller 2 packages had stderr output: nav2_mppi_controller nav2_simple_commander 3 packages not processed

Additional information

I followed instructions from - https://navigation.ros.org/development_guides/build_docs/index.html https://docs.ros.org/en/humble/Installation/Alternatives/Ubuntu-Development-Setup.html#install-development-tools-and-ros-tools

SteveMacenski commented 11 months ago

Clean rebuild by deleting your install / build spaces and trying again clean. If you have binaries installed, remove them when building MPPI from source until the next sync comes about.

Rudresh172 commented 11 months ago

Thanks for the quick response, removing binaries and rebuilding worked! Thanks!

ymei commented 9 months ago

I encountered the same problem on identical Ubuntu and ROS2 versions. My observation is that packages installed via apt: ros-$ROS_DISTRO-nav2-*, need to be removed from the system in order for local compilation of the git repo (the humble branch) to succeed.