Install navigation2 for ROS2 Humble on Docker, Ubuntu 22.04
Hello, I am trying to create a create a docker container that contains ROS 2 Humble, ros1bridge, and nav2 to communicate with another ROS 1 noetic container. I have successful built the container with ros 2 humble and the ros1bridge, though I am having trouble building nav2.
Required Info:
- Operating System:
- Docker, Ubuntu 22.04
- ROS2 Version:
- Humble source
- Version or commit hash:
- 3bb9a95719539fcdfedf520c63339bc3157f80b4
Steps to reproduce issue
Here is my Dockerfile and devcontainer.json.zip for the ROS 2 container, im using vscode. Because of this, my docker file is the best way I've gotten it to build successfully. After it creates the container, I do in terminal:
mkdir -p ~/nav2_ws/src
cd ~/nav2_ws/src
git clone https://github.com/ros-planning/navigation2.git --branch humble
cd ~/nav2_ws
source /ros2_humble/install/setup.bash && colcon build
Expected behavior
Navigation 2 builds.
Actual behavior
--- stderr: nav2_util
CMake Error at CMakeLists.txt:17 (find_package):
By not providing "Findbondcpp.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "bondcpp", but
CMake did not find one.
Could not find a package configuration file provided by "bondcpp" with any
of the following names:
bondcppConfig.cmake
bondcpp-config.cmake
Add the installation prefix of "bondcpp" to CMAKE_PREFIX_PATH or set
"bondcpp_DIR" to a directory containing one of the above files. If
"bondcpp" provides a separate development package or SDK, be sure it has
been installed.
---
Failed <<< nav2_util [2.44s, exited with code 1]
Additional information
I have tried the following things,
1.
sudo apt update && sudo apt install ros-humble-bondcpp
which returns:
...
Selecting previously unselected package python3-catkin-pkg-modules.
(Reading database ... 102699 files and directories currently installed.)
Preparing to unpack .../00-python3-catkin-pkg-modules_0.5.2-1_all.deb ...
Unpacking python3-catkin-pkg-modules (0.5.2-1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-dCs1pi/00-python3-catkin-pkg-modules_0.5.2-1_all.deb (--unpack):
trying to overwrite '/usr/lib/python3/dist-packages/catkin_pkg/__init__.py', which is also in package python3-catkin-pkg 0.4.24-2
...
Selecting previously unselected package ros-humble-bondcpp.
Preparing to unpack .../78-ros-humble-bondcpp_3.0.2-3jammy.20230623.070535_amd64.deb ...
Unpacking ros-humble-bondcpp (3.0.2-3jammy.20230623.070535) ...
Errors were encountered while processing:
/tmp/apt-dpkg-install-67qYqC/00-python3-catkin-pkg-modules_0.5.2-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
2.
cd ~/nav2_ws && rosdep update && rosdep install -yrq --from-paths src --ignore-src --rosdistro humble
which returns:
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
nav2_mppi_controller: No definition of [xtensor] for OS version [Jammy Jellyfish]
nav2_lifecycle_manager: No definition of [diagnostic_updater] for OS version [Jammy Jellyfish]
nav2_behavior_tree: No definition of [behaviortree_cpp_v3] for OS version [Jammy Jellyfish]
nav2_waypoint_follower: No definition of [cv_bridge] for OS version [Jammy Jellyfish]
nav2_util: No definition of [bond] for OS version [Jammy Jellyfish]
nav2_smoother: No definition of [angles] for OS version [Jammy Jellyfish]
nav2_system_tests: No definition of [gazebo_ros_pkgs] for OS version [Jammy Jellyfish]
nav2_controller: No definition of [angles] for OS version [Jammy Jellyfish]
nav2_smac_planner: No definition of [angles] for OS version [Jammy Jellyfish]
nav2_bt_navigator: No definition of [behaviortree_cpp_v3] for OS version [Jammy Jellyfish]
dwb_critics: No definition of [angles] for OS version [Jammy Jellyfish]
dwb_plugins: No definition of [angles] for OS version [Jammy Jellyfish]
nav2_rotation_shim_controller: No definition of [angles] for OS version [Jammy Jellyfish]
nav2_constrained_smoother: No definition of [angles] for OS version [Jammy Jellyfish]
nav2_bringup: No definition of [slam_toolbox] for OS version [Jammy Jellyfish]
nav2_costmap_2d: No definition of [angles] for OS version [Jammy Jellyfish]
Continuing to install resolvable dependencies...
executing command [sudo -H apt-get install -y -qq libomp-dev]
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
executing command [sudo -H apt-get install -y -qq python3-zmq]
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
executing command [sudo -H apt-get install -y -qq lcov]
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
executing command [sudo -H apt-get install -y -qq libgraphicsmagick++1-dev]
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
executing command [sudo -H apt-get install -y -qq graphicsmagick-libmagick-dev-compat]
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
executing command [sudo -H apt-get install -y -qq libceres-dev]
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
ERROR: the following rosdeps failed to install
apt: command [sudo -H apt-get install -y -qq libomp-dev] failed
apt: command [sudo -H apt-get install -y -qq python3-zmq] failed
apt: command [sudo -H apt-get install -y -qq lcov] failed
apt: command [sudo -H apt-get install -y -qq libgraphicsmagick++1-dev] failed
apt: command [sudo -H apt-get install -y -qq graphicsmagick-libmagick-dev-compat] failed
apt: command [sudo -H apt-get install -y -qq libceres-dev] failed
apt: Failed to detect successful installation of [libomp-dev]
apt: Failed to detect successful installation of [python3-zmq]
apt: Failed to detect successful installation of [lcov]
apt: Failed to detect successful installation of [libgraphicsmagick++1-dev]
apt: Failed to detect successful installation of [graphicsmagick-libmagick-dev-compat]
apt: Failed to detect successful installation of [libceres-dev]
3.
sudo apt --fix-broken install
which returns:
The following additional packages will be installed:
python3-catkin-pkg-modules
The following NEW packages will be installed:
python3-catkin-pkg-modules
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
78 not fully installed or removed.
Need to get 43.2 kB of archives.
After this operation, 258 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://packages.ros.org/ros2/ubuntu jammy/main amd64 python3-catkin-pkg-modules all 0.5.2-1 [43.2 kB]
Fetched 43.2 kB in 0s (87.8 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 110302 files and directories currently installed.)
Preparing to unpack .../python3-catkin-pkg-modules_0.5.2-1_all.deb ...
Unpacking python3-catkin-pkg-modules (0.5.2-1) ...
dpkg: error processing archive /var/cache/apt/archives/python3-catkin-pkg-modules_0.5.2-1_all.deb (--unpack):
trying to overwrite '/usr/lib/python3/dist-packages/catkin_pkg/__init__.py', which is also in package python3-catkin-pkg 0.4.24-2
Errors were encountered while processing:
/var/cache/apt/archives/python3-catkin-pkg-modules_0.5.2-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Asked by Vishwa on 2023-06-30 15:59:42 UTC
Comments