Install navigation2 for ROS2 Humble on Docker, Ubuntu 22.04

asked 2023-06-30 15:59:42 -0500

Vishwa gravatar image

updated 2023-06-30 16:01:11 -0500

Hello, I am trying to create a create a docker container that contains ROS 2 Humble, ros1_bridge, and nav2 to communicate with another ROS 1 noetic container. I have successful built the container with ros 2 humble and the ros1_bridge, 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 ...
(more)
edit retag flag offensive close merge delete