|
| 1 | + |
| 2 | +.. _build_and_install: |
| 3 | + |
| 4 | +================= |
| 5 | +Build & Install |
| 6 | +================= |
| 7 | + |
| 8 | +This page explains how to install and build the **EasyNavigation (EasyNav)** framework. |
| 9 | +If you are new here, start with :doc:`../getting_started/index` for a high‑level overview, |
| 10 | +then return to this guide to set up your development environment. |
| 11 | + |
| 12 | +.. contents:: On this page |
| 13 | + :local: |
| 14 | + :depth: 2 |
| 15 | + |
| 16 | +Supported platforms |
| 17 | +------------------- |
| 18 | + |
| 19 | +EasyNav targets modern Linux distributions and ROS 2 releases: |
| 20 | + |
| 21 | +- **Ubuntu 24.04 (Noble)** — ROS 2 *kilted* (primary CI target) |
| 22 | +- **Ubuntu 24.04 (Noble)** — ROS 2 *rolling* |
| 23 | +- Other platforms may work but are not actively tested. |
| 24 | + |
| 25 | +.. note:: |
| 26 | + If you are using a different distribution or ROS 2 release, contributions to extend |
| 27 | + the support matrix are very welcome. |
| 28 | + |
| 29 | +Prerequisites |
| 30 | +------------- |
| 31 | + |
| 32 | + |
| 33 | +1. ROS 2 (kilted or rolling) |
| 34 | + |
| 35 | + Follow the official ROS 2 installation instructions for your platform. |
| 36 | + Ensure your ROS 2 environment is sourced before building EasyNav. |
| 37 | + |
| 38 | + .. code-block:: bash |
| 39 | +
|
| 40 | + # Example (adjust to your ROS 2 distro): |
| 41 | + source /opt/ros/kilted/setup.bash |
| 42 | +
|
| 43 | +2. ROS dependencies |
| 44 | + |
| 45 | + .. code-block:: bash |
| 46 | +
|
| 47 | + sudo rosdep init |
| 48 | + rosdep update |
| 49 | +
|
| 50 | +Install from binaries (APT) |
| 51 | +--------------------------- |
| 52 | + |
| 53 | +Binary packages will be provided via APT for Ubuntu + ROS 2 as they become available. |
| 54 | + |
| 55 | +.. admonition:: Coming soon |
| 56 | + :class: hint |
| 57 | + |
| 58 | + Prebuilt Debian packages are planned. Once published, you will be able to run: |
| 59 | + |
| 60 | + .. code-block:: bash |
| 61 | +
|
| 62 | + sudo apt update |
| 63 | + sudo apt install ros-kilted-easynav |
| 64 | +
|
| 65 | +Build from source |
| 66 | +----------------- |
| 67 | + |
| 68 | +Workspace layout |
| 69 | +~~~~~~~~~~~~~~~~ |
| 70 | + |
| 71 | +We recommend a standard ROS 2 workspace: |
| 72 | + |
| 73 | +.. code-block:: bash |
| 74 | +
|
| 75 | + mkdir -p ~/ros/ros2/easynav_ws/src |
| 76 | + cd ~/ros/ros2/easynav_ws |
| 77 | +
|
| 78 | +Clone sources |
| 79 | +~~~~~~~~~~~~~ |
| 80 | + |
| 81 | +You can retrieve EasyNav sources either by cloning the monorepo(s) you need: |
| 82 | + |
| 83 | +.. code-block:: bash |
| 84 | +
|
| 85 | + cd ~/ros/ros2/easynav_ws/src |
| 86 | + # Core/meta repositories (examples — adjust to your needs) |
| 87 | + git clone https://github.com/EasyNavigation/EasyNavigation.git |
| 88 | + git clone https://github.com/EasyNavigation/easynav_plugins.git |
| 89 | + git clone https://github.com/EasyNavigation/NavMap.git |
| 90 | +
|
| 91 | +
|
| 92 | +Install dependencies |
| 93 | +~~~~~~~~~~~~~~~~~~~~ |
| 94 | + |
| 95 | +From the workspace root, resolve all package dependencies with rosdep: |
| 96 | + |
| 97 | +.. code-block:: bash |
| 98 | +
|
| 99 | + cd ~/ros/ros2/easynav_ws |
| 100 | + rosdep install --from-paths src --ignore-src -y -r |
| 101 | +
|
| 102 | +Configure and build |
| 103 | +~~~~~~~~~~~~~~~~~~~ |
| 104 | + |
| 105 | +Use colcon to build the workspace. You may enable symlink-install for faster iteration. |
| 106 | + |
| 107 | +.. code-block:: bash |
| 108 | +
|
| 109 | + cd ~/ros/ros2/easynav_ws |
| 110 | + colcon build --symlink-install |
| 111 | +
|
| 112 | +Source the overlay |
| 113 | +~~~~~~~~~~~~~~~~~~ |
| 114 | + |
| 115 | +.. code-block:: bash |
| 116 | +
|
| 117 | + # Source ROS 2 first (kilted / rolling) |
| 118 | + source /opt/ros/kilted/setup.bash |
| 119 | + # Then source the workspace |
| 120 | + source ~/ros/ros2/easynav_ws/install/setup.bash |
| 121 | +
|
| 122 | +Run tests (optional) |
| 123 | +~~~~~~~~~~~~~~~~~~~~ |
| 124 | + |
| 125 | +.. code-block:: bash |
| 126 | +
|
| 127 | + cd ~/ros/ros2/easynav_ws |
| 128 | + colcon test --ctest-args -R easynav # run EasyNav-related tests |
| 129 | + colcon test-result --verbose |
| 130 | +
|
| 131 | +Common options |
| 132 | +-------------- |
| 133 | + |
| 134 | +- **Release build:** ``--cmake-args -DCMAKE_BUILD_TYPE=Release`` |
| 135 | +- **Verbose build:** ``--event-handlers console_cohesion+`` |
| 136 | +- **Single package:** ``--packages-select <pkg_name>`` |
| 137 | +- **Parallel jobs:** ``--parallel-workers $(nproc)`` |
| 138 | + |
| 139 | +Troubleshooting |
| 140 | +--------------- |
| 141 | + |
| 142 | +- **Missing rosdep keys** |
| 143 | + |
| 144 | + Run ``rosdep check --from-paths src --ignore-src`` to diagnose. If a dependency |
| 145 | + is truly missing on your platform, consider opening an issue with details. |
| 146 | + |
| 147 | +- **CMake not finding ROS packages** |
| 148 | + |
| 149 | + Ensure you have sourced the correct ROS 2 distro and your workspace install |
| 150 | + before building or running executables. |
| 151 | + |
| 152 | + .. code-block:: bash |
| 153 | +
|
| 154 | + source /opt/ros/kilted/setup.bash |
| 155 | + source ~/ros/ros2/easynav_ws/install/setup.bash |
| 156 | +
|
| 157 | +- **ABI / compiler issues** |
| 158 | + |
| 159 | + Remove the build, install, and log folders and rebuild: |
| 160 | + |
| 161 | + .. code-block:: bash |
| 162 | +
|
| 163 | + cd ~/ros/ros2/easynav_ws |
| 164 | + rm -rf build install log |
| 165 | + colcon build --merge-install |
| 166 | +
|
| 167 | +Uninstall / clean |
| 168 | +----------------- |
| 169 | + |
| 170 | +Since this is a workspace overlay, you can remove it safely: |
| 171 | + |
| 172 | +.. code-block:: bash |
| 173 | +
|
| 174 | + rm -rf ~/ros/ros2/easynav_ws |
| 175 | +
|
| 176 | +Next steps |
| 177 | +---------- |
| 178 | + |
| 179 | +- :doc:`../getting_started/index` — quick start with simulation and first launch |
| 180 | +- :doc:`../howtos/index` — step-by-step guides for mapping, navigation, and deployment |
| 181 | +- :doc:`../developer_guide/index` — in-depth documentation for developers and contributors |
| 182 | + |
| 183 | +.. toctree:: |
| 184 | + :hidden: |
0 commit comments