From e089045fdf9acca8984ff6e1f794986e2e6251ed Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Tue, 29 Sep 2020 20:19:50 -0700 Subject: [PATCH] Move installation instructions from README.md to Installation tutorial (#50) Signed-off-by: Ian Chen Co-authored-by: Louise Poubel --- README.md | 98 ++--------------------------------------- tutorials.md.in | 1 + tutorials/02_install.md | 75 +++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+), 95 deletions(-) create mode 100644 tutorials/02_install.md diff --git a/README.md b/README.md index 82cdd25c..f2d7027b 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Windows | [![Build Status](https://build.osrfoundation.org/buildStatus/ico Ignition Sensors, a component of [Ignition Robotics](https://ignitionrobotics.org), provides numerous sensor models -designed to generate realistic data from simulation environments. Ignition Sensors is used in conjunction with [Ignition Libraries](https://ignitionrobotics.org/libs), and especially relies on the rendering capabilities from [Ignition Rendering](https://ignitionrobotics.org/libs/rendering) and physics simulation from [Ignition Physics](https://ignitionrobotics.org/libs/physics). +designed to generate realistic data from simulation environments. Ignition Sensors is used in conjunction with [Ignition Libraries](https://ignitionrobotics/libs), and especially relies on the rendering capabilities from [Ignition Rendering](https://ignitionrobotics.org/libs/rendering) and physics simulation from [Ignition Physics](https://ignitionrobotics.org/libs/physics). # Table of Contents @@ -29,7 +29,7 @@ designed to generate realistic data from simulation environments. Ignition Senso * [Source Install](#source-install) * [Prerequisites](#prerequisites) - + * [Building from Source](#building-from-source) [Usage](#usage) @@ -57,99 +57,7 @@ models into sensor streams. # Install -We recommend following the [Binary Install](#binary-install) instructions to get up and running as quickly and painlessly as possible. - -The [Source Install](#source-install) instructions should be used if you need the very latest software improvements, you need to modify the code, or you plan to make a contribution. - -## Binary Install - -On Ubuntu systems, `apt-get` can be used to install `ignition-sensors`: - -**Ubuntu Bionic** - -1. Configure package repositories. - - ``` - sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' - ``` - - ``` - sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-prerelease `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-prerelease.list' - ``` - - ``` - wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add - - ``` - - ``` - sudo apt-get update - ``` - -``` -sudo apt install libignition-sensors-dev -``` - -At the time of this writing, there is only one released version of -ignition-sensors. It's possible that additional versions have been released, - in which case you can use add a numeral (2, 3, etc) to install a different - version. For example, to install version 2: - -``` -sudo apt-get install libignition-sensors2-dev -``` - -## Source Install - -Source installation can be performed in UNIX systems by first installing the -necessary prerequisites followed by building from source. - -### Prerequisites - -Ignition Sensors requires: - - * [Ubuntu Bionic](http://releases.ubuntu.com/18.04/) - * [Ignition CMake](https://ignitionrobotics.org/libs/cmake) - * [Ignition Math](https://ignitionrobotics.org/libs/math) - * [Ignition Common](https://ignitionrobotics.org/libs/common) - * [Ignition Transport](https://ignitionrobotics.org/libs/transport) - * [Ignition Rendering](https://ignitionrobotics.org/libs/rendering) - * [Ignition Msgs](https://ignitionrobotics.org/libs/msgs) - * [SDFormat](https://github.com/osrf/sdformat) - * [Protobuf3](https://developers.google.com/protocol-buffers/) - -### Building from source - -1. Make sure you are running [Ubuntu Bionic](http://releases.ubuntu.com/18.04/). - -2. Install the [Prerequisites](#prerequisites). - -3. Configure gcc8 - - ``` - sudo apt-get install g++-8 - ``` - - ``` - update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8 --slave /usr/bin/gcov gcov /usr/bin/gcov-8 - ``` - -4. Clone the repository - - ``` - git clone https://github.com/ignitionrobotics/ign-sensors - ``` - -5. Configure and build - - ``` - cd ign-sensors; mkdir build;cd build; cmake ..; make - ``` - -6. Optionally, install Ignition Common - - ``` - sudo make install - ``` +See the [installation tutorial](https://ignitionrobotics.org/api/sensors/4.0/installation.html). # Usage diff --git a/tutorials.md.in b/tutorials.md.in index 9950f3c2..8ae37358 100644 --- a/tutorials.md.in +++ b/tutorials.md.in @@ -7,6 +7,7 @@ Ignition @IGN_DESIGNATION_CAP@ library and how to use the library effectively. **The tutorials** 1. \subpage introduction "Introduction" +2. \subpage installation "Installation" ## License diff --git a/tutorials/02_install.md b/tutorials/02_install.md new file mode 100644 index 00000000..c9e1205e --- /dev/null +++ b/tutorials/02_install.md @@ -0,0 +1,75 @@ +\page installation Installation + +We recommend following the binary install instructions to get up and running as quickly and painlessly as possible. + +The source install instructions should be used if you need the very latest software improvements, you need to modify the code, or you plan to make a contribution. + +## Binary Install + +### Ubuntu + +1. Setup your computer to accept software from packages.osrfoundation.org: + +```{.sh} +sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' +wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add - +sudo apt-get update +``` + +1. Install Ignition Sensors + +```{.sh} +# This installs ign-sensors4. Change the number after libignition-sensors to the version you want +sudo apt install libignition-sensors4-dev +``` + +## Source Install + +Source installation can be performed in UNIX systems by first installing the +necessary prerequisites followed by building from source. + +### Prerequisites + +Ignition Sensors requires: + + * [Ignition CMake](https://ignitionrobotics.org/libs/cmake) + * [Ignition Math](https://ignitionrobotics.org/libs/math) + * [Ignition Common](https://ignitionrobotics.org/libs/common) + * [Ignition Transport](https://ignitionrobotics.org/libs/transport) + * [Ignition Rendering](https://ignitionrobotics.org/libs/rendering) + * [Ignition Msgs](https://ignitionrobotics.org/libs/msgs) + * [SDFormat](https://github.com/osrf/sdformat) + * [Protobuf3](https://developers.google.com/protocol-buffers/) + +### Building from source + +1. Make sure you are running [Ubuntu Bionic](http://releases.ubuntu.com/18.04/) or above. + +2. Install the [Prerequisites](#prerequisites). + +3. Configure to use gcc8 if that is not the default compiler + +```{.sh} +sudo apt-get install g++-8 +update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8 --slave /usr/bin/gcov gcov /usr/bin/gcov-8 +``` + +4. Clone the repository + +```{.sh} +git clone https://github.com/ignitionrobotics/ign-sensors +``` + +5. Configure and build + +```{.sh} +cd ign-sensors; mkdir build; cd build; cmake ..; make +``` + +6. Optionally, install the library + +```{.sh} +sudo make install +``` + +