Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move installation instructions from README.md to Installation tutorial #50

Merged
merged 3 commits into from
Sep 30, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 1 addition & 93 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions tutorials.md.in
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
75 changes: 75 additions & 0 deletions tutorials/02_install.md
Original file line number Diff line number Diff line change
@@ -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
```