install_debs.sh 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/bash
  2. # Copyright 2016 The Cartographer Authors
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. set -o errexit
  16. set -o verbose
  17. # Install CMake, Ninja, stow.
  18. sudo apt-get update
  19. sudo apt-get install -y lsb-release cmake ninja-build stow
  20. # Install GMock library and header files for newer distributions.
  21. if [[ "$(lsb_release -sc)" = "focal" || "$(lsb_release -sc)" = "buster" ]]
  22. then
  23. sudo apt-get install -y libgmock-dev
  24. fi
  25. . /opt/ros/${ROS_DISTRO}/setup.sh
  26. cd catkin_ws
  27. # Install rosdep dependencies.
  28. rosdep update
  29. rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y
  30. # Update rosconsole-bridge to fix build issue with Docker image for Kinetic
  31. sudo apt-get install ros-${ROS_DISTRO}-rosconsole-bridge -y