compilation.rst 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. .. Copyright 2018 The Cartographer Authors
  2. .. Licensed under the Apache License, Version 2.0 (the "License");
  3. you may not use this file except in compliance with the License.
  4. You may obtain a copy of the License at
  5. .. http://www.apache.org/licenses/LICENSE-2.0
  6. .. Unless required by applicable law or agreed to in writing, software
  7. distributed under the License is distributed on an "AS IS" BASIS,
  8. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  9. See the License for the specific language governing permissions and
  10. limitations under the License.
  11. ==========================
  12. Compiling Cartographer ROS
  13. ==========================
  14. System Requirements
  15. ===================
  16. The Cartographer ROS requirements are the same as `the ones from Cartographer`_.
  17. The following `ROS distributions`_ are currently supported:
  18. * Indigo
  19. * Kinetic
  20. * Lunar
  21. * Melodic
  22. .. _the ones from Cartographer: https://google-cartographer.readthedocs.io/en/latest/#system-requirements
  23. .. _ROS distributions: http://wiki.ros.org/Distributions
  24. Building & Installation
  25. =======================
  26. In order to build Cartographer ROS, we recommend using `wstool <http://wiki.ros.org/wstool>`_ and `rosdep
  27. <http://wiki.ros.org/rosdep>`_. For faster builds, we also recommend using
  28. `Ninja <https://ninja-build.org>`_.
  29. .. code-block:: bash
  30. sudo apt-get update
  31. sudo apt-get install -y python-wstool python-rosdep ninja-build
  32. Create a new cartographer_ros workspace in 'catkin_ws'.
  33. .. code-block:: bash
  34. mkdir catkin_ws
  35. cd catkin_ws
  36. wstool init src
  37. wstool merge -t src https://raw.githubusercontent.com/googlecartographer/cartographer_ros/master/cartographer_ros.rosinstall
  38. wstool update -t src
  39. Install cartographer_ros' dependencies (proto3 and deb packages).
  40. The command 'sudo rosdep init' will print an error if you have already executed it since installing ROS. This error can be ignored.
  41. .. code-block:: bash
  42. src/cartographer/scripts/install_proto3.sh
  43. sudo rosdep init
  44. rosdep update
  45. rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y
  46. Build and install.
  47. .. code-block:: bash
  48. catkin_make_isolated --install --use-ninja