From fee3bf8b323f001cef560f2f6ab48e7c3f4d0b68 Mon Sep 17 00:00:00 2001 From: Mabel Zhang Date: Thu, 24 Dec 2020 09:56:26 -0500 Subject: [PATCH 1/4] add windows installation Signed-off-by: Mabel Zhang --- tutorials/02_install.md | 136 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 tutorials/02_install.md diff --git a/tutorials/02_install.md b/tutorials/02_install.md new file mode 100644 index 00000000..16c9d39d --- /dev/null +++ b/tutorials/02_install.md @@ -0,0 +1,136 @@ +\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: + +``` +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 + +``` +# This installs ign-sensors4. Change the number after libignition-sensors to the version you want +sudo apt install libignition-sensors4-dev +``` + +### Windows + +Binary install is pending ``ignition-rendering`` and ``ignition-sensors`` being added to conda-forge. + +## 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/) + +### Ubuntu + +1. Make sure you are running [Ubuntu Bionic](http://releases.ubuntu.com/18.04/) or above. + +2. Install the Prerequisites. + +3. Configure to use gcc8 if that is not the default compiler + +``` +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 the library + +``` +sudo make install +``` + +### Windows + +#### Install Prerequisites + +First, follow the [ign-cmake](https://github.com/ignitionrobotics/ign-cmake) tutorial for installing Conda, Visual Studio, CMake, etc., prerequisites, and creating a Conda environment. + +Navigate to ``condabin`` if necessary to use the ``conda`` command (i.e., if Conda is not in your `PATH` environment variable. You can find the location of ``condabin`` in Anaconda Prompt, ``where conda``). + +Create if necessary, and activate a Conda environment: + +``` +conda create -n ign-ws +conda activate ign-ws +``` + +Install Ignition dependencies, replacing `<#>` with the desired versions: + +``` +conda install libignition-cmake<#> libignition-common<#> libignition-math<#> libignition-transport<#> libignition-msgs<#> libignition-plugin<#> --channel conda-forge +``` + +Before [ign-rendering](https://github.com/ignitionrobotics/ign-rendering) becomes available on conda-forge, follow its tutorial to build it from source. + +#### Building from source + +1. Activate the Conda environment created in the prerequisites: + + ``` + conda activate ign-ws + ``` + +1. Navigate to where you would like to build the library, and clone the repository. + + ``` + # Optionally, append `-b ign-sensors#` (replace # with a number) to check out a specific version + git clone https://github.com/ignitionrobotics/ign-sensors.git + ``` + +1. Configure and build + + ``` + cd ign-sensors + mkdir build + cd build + ``` + + Before ``ign-rendering`` becomes available on conda-forge, we need to build it from source and specify the path containing ``ignition-rendering-config.cmake`` in ``CMAKE_PREFIX_PATH``, for cmake to find ``ign-rendering``. That path could be ``ign-rendering-install-path\lib\cmake\ignition-rendering4``, for example. + + ``` + cmake .. -DBUILD_TESTING=OFF -DCMAKE_PREFIX_PATH=path\containing\ignition-rendering-config # Optionally, -DCMAKE_INSTALL_PREFIX=path\to\install + cmake --build . --config Release + ``` + +1. Optionally, install + + ``` + cmake --install . --config Release + ``` From 5367379a9a6ed4587787923479c954633b47d1bf Mon Sep 17 00:00:00 2001 From: Mabel Zhang Date: Thu, 24 Dec 2020 12:01:38 -0500 Subject: [PATCH 2/4] small tweak Signed-off-by: Mabel Zhang --- tutorials/02_install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/02_install.md b/tutorials/02_install.md index 16c9d39d..5869b9c9 100644 --- a/tutorials/02_install.md +++ b/tutorials/02_install.md @@ -99,7 +99,7 @@ conda install libignition-cmake<#> libignition-common<#> libignition-math<#> lib Before [ign-rendering](https://github.com/ignitionrobotics/ign-rendering) becomes available on conda-forge, follow its tutorial to build it from source. -#### Building from source +#### Build from source 1. Activate the Conda environment created in the prerequisites: From 58f9a5b0fe5c5761cc02087624ae1766ad06edc3 Mon Sep 17 00:00:00 2001 From: John Shepherd Date: Wed, 20 Jan 2021 09:19:05 -0800 Subject: [PATCH 3/4] nits Signed-off-by: John Shepherd --- tutorials/02_install.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tutorials/02_install.md b/tutorials/02_install.md index 5869b9c9..4e2a99be 100644 --- a/tutorials/02_install.md +++ b/tutorials/02_install.md @@ -19,13 +19,13 @@ sudo apt-get update 1. Install Ignition Sensors ``` -# This installs ign-sensors4. Change the number after libignition-sensors to the version you want -sudo apt install libignition-sensors4-dev +# This installs ign-sensors3. Change the number after libignition-sensors to the version you want +sudo apt install libignition-sensors3-dev ``` ### Windows -Binary install is pending ``ignition-rendering`` and ``ignition-sensors`` being added to conda-forge. +Binary install is pending `ignition-rendering` and `ignition-sensors` being added to conda-forge. ## Source Install @@ -82,7 +82,7 @@ sudo make install First, follow the [ign-cmake](https://github.com/ignitionrobotics/ign-cmake) tutorial for installing Conda, Visual Studio, CMake, etc., prerequisites, and creating a Conda environment. -Navigate to ``condabin`` if necessary to use the ``conda`` command (i.e., if Conda is not in your `PATH` environment variable. You can find the location of ``condabin`` in Anaconda Prompt, ``where conda``). +Navigate to `condabin` if necessary to use the `conda` command (i.e., if Conda is not in your `PATH` environment variable. You can find the location of `condabin` in Anaconda Prompt, `where conda`). Create if necessary, and activate a Conda environment: @@ -122,14 +122,14 @@ Before [ign-rendering](https://github.com/ignitionrobotics/ign-rendering) become cd build ``` - Before ``ign-rendering`` becomes available on conda-forge, we need to build it from source and specify the path containing ``ignition-rendering-config.cmake`` in ``CMAKE_PREFIX_PATH``, for cmake to find ``ign-rendering``. That path could be ``ign-rendering-install-path\lib\cmake\ignition-rendering4``, for example. + Before `ign-rendering` becomes available on conda-forge, we need to build it from source and specify the path containing `ignition-rendering-config.cmake` in `CMAKE_PREFIX_PATH`, for cmake to find `ign-rendering`. That path could be `ign-rendering-install-path\lib\cmake\ignition-rendering4`, for example. ``` cmake .. -DBUILD_TESTING=OFF -DCMAKE_PREFIX_PATH=path\containing\ignition-rendering-config # Optionally, -DCMAKE_INSTALL_PREFIX=path\to\install cmake --build . --config Release ``` -1. Optionally, install +1. Optionally, install. You will likely need to run a terminal with admin privileges for this call to succeed. ``` cmake --install . --config Release From e44879f79ce23b47439bdbef0bed6623214e6d70 Mon Sep 17 00:00:00 2001 From: John Shepherd Date: Wed, 20 Jan 2021 14:17:41 -0800 Subject: [PATCH 4/4] move docs and testing to install Signed-off-by: John Shepherd --- README.md | 52 ---------------- tutorials/02_install.md | 132 ++++++++++++++++++++++++---------------- 2 files changed, 81 insertions(+), 103 deletions(-) diff --git a/README.md b/README.md index 26b07ccb..a2a40db8 100644 --- a/README.md +++ b/README.md @@ -34,10 +34,6 @@ designed to generate realistic data from simulation environments. Ignition Senso [Usage](#usage) -[Documentation](#documentation) - -[Testing](#testing) - [Folder Structure](#folder-structure) [Code of Conduct](#code-of-conduct) @@ -155,54 +151,6 @@ Ignition Sensors requires: Please refer to the [examples directory](https://github.com/ignitionrobotics/ign-sensors/raw/master/examples/). -# Documentation - -API and tutorials can be found at [https://ignitionrobotics.org/libs/sensors](https://ignitionrobotics.org/libs/sensors). - -You can also generate the documentation from a clone of this repository by following these steps. - -1. You will need Doxygen. On Ubuntu Doxygen can be installed using - - ``` - sudo apt-get install doxygen - ``` - -2. Clone the repository - - ``` - git clone https://github.com/ignitionrobotics/ign-sensors - ``` - -3. Configure and build the documentation. - - ``` - cd ign-sensors; mkdir build; cd build; cmake ../; make doc - ``` - -4. View the documentation by running the following command from the build directory. - - ``` - firefox doxygen/html/index.html - ``` - -# Testing - -Follow these steps to run tests and static code analysis in your clone of this repository. - -1. Follow the [source install instruction](#source-install). - -2. Run tests. - - ``` - make test - ``` - -3. Static code checker. - - ``` - make codecheck - ``` - # Folder Structure Refer to the following table for information about important directories and files in this repository. diff --git a/tutorials/02_install.md b/tutorials/02_install.md index 4e2a99be..498444be 100644 --- a/tutorials/02_install.md +++ b/tutorials/02_install.md @@ -9,19 +9,17 @@ The source install instructions should be used if you need the very latest softw ### Ubuntu 1. Setup your computer to accept software from packages.osrfoundation.org: - -``` -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 -``` + ``` + 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 - -``` -# This installs ign-sensors3. Change the number after libignition-sensors to the version you want -sudo apt install libignition-sensors3-dev -``` + ``` + # This installs ign-sensors3. Change the number after libignition-sensors to the version you want + sudo apt install libignition-sensors3-dev + ``` ### Windows @@ -52,29 +50,25 @@ Ignition Sensors requires: 2. Install the Prerequisites. 3. Configure to use gcc8 if that is not the default compiler - -``` -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 -``` + ``` + 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 -``` + ``` + git clone https://github.com/ignitionrobotics/ign-sensors + ``` 5. Configure and build - -``` -cd ign-sensors; mkdir build; cd build; cmake ..; make -``` + ``` + cd ign-sensors; mkdir build; cd build; cmake ..; make + ``` 6. Optionally, install the library - -``` -sudo make install -``` + ``` + sudo make install + ``` ### Windows @@ -102,35 +96,71 @@ Before [ign-rendering](https://github.com/ignitionrobotics/ign-rendering) become #### Build from source 1. Activate the Conda environment created in the prerequisites: - - ``` - conda activate ign-ws - ``` + ``` + conda activate ign-ws + ``` 1. Navigate to where you would like to build the library, and clone the repository. - - ``` - # Optionally, append `-b ign-sensors#` (replace # with a number) to check out a specific version - git clone https://github.com/ignitionrobotics/ign-sensors.git - ``` + ``` + # Optionally, append `-b ign-sensors#` (replace # with a number) to check out a specific version + git clone https://github.com/ignitionrobotics/ign-sensors.git + ``` 1. Configure and build - - ``` - cd ign-sensors - mkdir build - cd build - ``` + ``` + cd ign-sensors + mkdir build + cd build + ``` Before `ign-rendering` becomes available on conda-forge, we need to build it from source and specify the path containing `ignition-rendering-config.cmake` in `CMAKE_PREFIX_PATH`, for cmake to find `ign-rendering`. That path could be `ign-rendering-install-path\lib\cmake\ignition-rendering4`, for example. - - ``` - cmake .. -DBUILD_TESTING=OFF -DCMAKE_PREFIX_PATH=path\containing\ignition-rendering-config # Optionally, -DCMAKE_INSTALL_PREFIX=path\to\install - cmake --build . --config Release - ``` + ``` + cmake .. -DBUILD_TESTING=OFF -DCMAKE_PREFIX_PATH=path\containing\ignition-rendering-config # Optionally, -DCMAKE_INSTALL_PREFIX=path\to\install + cmake --build . --config Release + ``` 1. Optionally, install. You will likely need to run a terminal with admin privileges for this call to succeed. + ``` + cmake --install . --config Release + ``` + +# Documentation + +API and tutorials can be found at [https://ignitionrobotics.org/libs/sensors](https://ignitionrobotics.org/libs/sensors). + +You can also generate the documentation from a clone of this repository by following these steps. + +1. You will need Doxygen. On Ubuntu Doxygen can be installed using + ``` + sudo apt-get install doxygen + ``` + +2. Clone the repository + ``` + git clone https://github.com/ignitionrobotics/ign-sensors + ``` + +3. Configure and build the documentation. + ``` + cd ign-sensors; mkdir build; cd build; cmake ../; make doc + ``` + +4. View the documentation by running the following command from the build directory. + ``` + firefox doxygen/html/index.html + ``` + +# Testing + +Follow these steps to run tests and static code analysis in your clone of this repository. + +1. Run tests. + ``` + make test + ``` + +2. Static code checker. + ``` + make codecheck + ``` - ``` - cmake --install . --config Release - ```