diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..01d4b31 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,18 @@ +# Copyright 2016 The Cartographer Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +sudo: required +services: docker +install: true +script: docker build ${TRAVIS_BUILD_DIR} -t cartographer diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b5024c0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +# Copyright 2016 The Cartographer Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM ubuntu:trusty +COPY . cartographer +RUN cartographer/scripts/install_debs.sh && rm -rf /var/lib/apt/lists/* +RUN cartographer/scripts/install_ceres.sh && rm -rf ceres-solver +RUN cartographer/scripts/install_cartographer.sh && rm -rf cartographer diff --git a/README.rst b/README.rst index 2d65698..768286c 100644 --- a/README.rst +++ b/README.rst @@ -36,8 +36,8 @@ project provides Cartographer's ROS integration. Documentation ============= -You will find complete documentation for using Cartographer `our Read the Docs -site`_. +You will find complete documentation for using Cartographer at `our Read the +Docs site`_. .. _our Read the Docs site: https://google-cartographer.readthedocs.io diff --git a/docs/source/index.rst b/docs/source/index.rst index 49c305d..e6374a1 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -45,33 +45,17 @@ Getting Started without ROS On Ubuntu 14.04 (Trusty): - .. code-block:: bash +.. include:: ../../scripts/install_debs.sh + :code: bash + :number-lines: + :start-line: 19 - # Install the required libraries that are available as debs - sudo apt-get install \ - g++ \ - google-mock \ - libboost-all-dev \ - libgflags-dev \ - libgoogle-glog-dev \ - liblua5.2-dev \ - libprotobuf-dev \ - libsuitesparse-dev \ - libwebp-dev \ - ninja-build \ - protobuf-compiler \ - python-sphinx +.. include:: ../../scripts/install_ceres.sh + :code: bash + :number-lines: + :start-line: 19 - # Build and install Ceres - git clone https://ceres-solver.googlesource.com/ceres-solver - cd ceres-solver - mkdir build && cd build - cmake .. - make - sudo make install - - # Build Cartographer - cd cartographer - mkdir build && cd build - cmake .. -G Ninja - ninja +.. include:: ../../scripts/install_cartographer.sh + :code: bash + :number-lines: + :start-line: 19 diff --git a/scripts/install_cartographer.sh b/scripts/install_cartographer.sh new file mode 100755 index 0000000..94b3886 --- /dev/null +++ b/scripts/install_cartographer.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +# Copyright 2016 The Cartographer Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -o errexit +set -o verbose + +# Build and install Cartographer. +cd cartographer +mkdir build +cd build +cmake .. -G Ninja +ninja +ninja test +sudo ninja install diff --git a/scripts/install_ceres.sh b/scripts/install_ceres.sh new file mode 100755 index 0000000..5494992 --- /dev/null +++ b/scripts/install_ceres.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +# Copyright 2016 The Cartographer Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -o errexit +set -o verbose + +# Build and install Ceres. +git clone https://ceres-solver.googlesource.com/ceres-solver +cd ceres-solver +mkdir build +cd build +cmake .. -G Ninja +ninja +ninja test +sudo ninja install diff --git a/scripts/install_debs.sh b/scripts/install_debs.sh new file mode 100755 index 0000000..007b3e7 --- /dev/null +++ b/scripts/install_debs.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +# Copyright 2016 The Cartographer Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -o errexit +set -o verbose + +# Install the required libraries that are available as debs. +sudo apt-get update +sudo apt-get install -y \ + cmake \ + g++ \ + git \ + google-mock \ + libboost-all-dev \ + libeigen3-dev \ + libgflags-dev \ + libgoogle-glog-dev \ + liblua5.2-dev \ + libprotobuf-dev \ + libsuitesparse-dev \ + libwebp-dev \ + ninja-build \ + protobuf-compiler \ + python-sphinx diff --git a/utils/update_cmakelists.py b/scripts/update_cmakelists.py similarity index 100% rename from utils/update_cmakelists.py rename to scripts/update_cmakelists.py