diff --git a/docs/source/installing.rst b/docs/source/installing.rst index e4ac580f..492b23c3 100644 --- a/docs/source/installing.rst +++ b/docs/source/installing.rst @@ -4,82 +4,80 @@ Installing ====================== -.. contents:: :local: +.. dropdown:: From ROS 2 repositories + :open: + :icon: download + **Recommended**: This is the easiest way to install MOLA. -From ROS 2 repositories ------------------------- + In Debian/Ubuntu systems, activate your ROS environment (``setup.bash``) if not done automatically + in your ``~./bashrc`` file, then just run: -**Recommended**: This is the easiest way to install MOLA. + .. code-block:: bash -In Debian/Ubuntu systems, activate your ROS environment (``setup.bash``) if not done automatically -in your ``~./bashrc`` file, then just run: + sudo apt install ros-$ROS_DISTRO-mola -.. code-block:: bash + Check the `build status table `_ to find out + what MOLA version is available for your ROS distribution. - sudo apt install ros-$ROS_DISTRO-mola -Check the `build status table `_ to find out -what MOLA version is available for your ROS distribution. +.. dropdown:: Build from sources + :icon: code-square -Build from sources ----------------------- + Building tools + ~~~~~~~~~~~~~~~~~ + MOLA uses ``colcon`` so you need to `install it first `_. -Building tools -~~~~~~~~~~~~~~~~~ -MOLA uses ``colcon`` so you need to `install it first `_. + Get the sources + ~~~~~~~~~~~~~~~~~ -Get the sources -~~~~~~~~~~~~~~~~~ + Clone the git repositories, including the submodules: -Clone the git repositories, including the submodules: + .. code-block:: bash -.. code-block:: bash + mkdir ~/ros2_mola_ws/src/ + cd ~/ros2_mola_ws/src/ + # Get MRPT2 (until we get the latest version on rosdistro) + git clone https://github.com/MRPT/mrpt.git mrpt2 --recursive - mkdir ~/ros2_mola_ws/src/ - cd ~/ros2_mola_ws/src/ - # Get MRPT2 (until we get the latest version on rosdistro) - git clone https://github.com/MRPT/mrpt.git mrpt2 --recursive + # Main MOLA modules: + git clone https://github.com/MOLAorg/mola_common.git + git clone https://github.com/MOLAorg/mp2p_icp.git --recursive + git clone https://github.com/MOLAorg/mola.git --recursive - # Main MOLA modules: - git clone https://github.com/MOLAorg/mola_common.git - git clone https://github.com/MOLAorg/mp2p_icp.git --recursive - git clone https://github.com/MOLAorg/mola.git --recursive + # MOLA lidar odometry package: + # not published yet! + #git clone https://github.com/MOLAorg/mola_lidar_odometry.git --recursive - # MOLA lidar odometry package: - # not published yet! - #git clone https://github.com/MOLAorg/mola_lidar_odometry.git --recursive + Dependencies + ~~~~~~~~~~~~~~~~~ -Dependencies -~~~~~~~~~~~~~~~~~ + Make sure you have all dependencies installed (make sure of having `rosdep already installed `_): -Make sure you have all dependencies installed (make sure of having `rosdep already installed `_): + .. code-block:: bash -.. code-block:: bash + cd ~/ros2_mola_ws/ + rosdep install --from-paths src --ignore-src -r -y - cd ~/ros2_mola_ws/src/ - rosdep install --from-paths src --ignore-src -r -y + Build and test + ~~~~~~~~~~~~~~~~~ -Build and test -~~~~~~~~~~~~~~~~~ + Now, compile as usual with colcon: -Now, compile as usual with colcon: + .. code-block:: bash -.. code-block:: bash + cd ~/ros2_mola_ws/ + colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release - cd ~/ros2_mola_ws/src/ - colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release + Next, activate the new environment and check if all new modules are visible: -Next, activate the new environment and check if all new modules are visible: + .. code-block:: bash -.. code-block:: bash - - cd ~/ros2_mola_ws/src/ - . install/setup.bash - - # For example, let's launch the mm map viewer: - mm-viewer + cd ~/ros2_mola_ws/ + . install/setup.bash + # For example, let's launch the mm map viewer: + mm-viewer