.. _installation:
Installation
============
Prerequisites
-------------
OpenMETA Model Exploration and Artifact Generation Machine:
* Windows
* Git
* `Java `_
* CREO Parametric 3.0 (required for CAD-to-URDF workflows)
ROS Deployment and(or) Gazebo Simulation Machine:
* Ubuntu 16.04.3 LTS
* `NVIDIA Graphics Chipset `_
OpenMETA
--------
*On Windows machine:*
#. Download the latest version of OpenMETA from https://www.metamorphsoftware.com/openmeta/.
#. Open the installer.
#. Agree to the license terms and conditions.
#. Left-click :guilabel:`Install`.
#. Note: If this is your first time using OpenMETA, we recommend that you complete the `PET Tutorial `_ to develop a basic understanding of the tools!
TASCK Models and Workflows
--------------------------
*On Windows machine:*
1. Create a directory named ``tasck``.
2. Clone the ``tasck-core-models`` repository into ``tasck``:
.. code-block:: bash
git clone https://github.com/metamorph-inc/tasck-core-models
2. Clone the ``openmeta-ros-core-workflows`` repository into ``tasck``:
.. code-block:: bash
git clone https://github.com/metamorph-inc/openmeta-ros-core-workflows
PyYAML Dependency
-----------------
1. Open Window Command Prompt in Administrator Mode
2. Install ``pyyaml`` dependecy
.. code-block:: bash
"C:\Program Files (x86)\META\bin\Python27\Scripts\python.exe" -m pip install pyyaml
SSH
---
*On Windows machine:*
Many TASCK workflows require a transfer of files and commands between the Windows (OpenMETA) and Linux (ROS & Gazebo) machines via SSH.
1. Generate a SSH key named ``gazebo_ros_machine``
.. code-block:: bash
ssh-keygen
2. Copy SSH Public Key to Linux machine
.. code-block:: bash
scp ~/.ssh/gazebo_ros_machine.pub [LINUX_USER]@[LINUX_IP/LINUX_HOSTNAME]:~/.ssh/authorized_keys
.. note:: Alternatively, you can manually append the contents of ``gazebo_ros_machine.pub`` to the ``authorized_keys`` file on the Linux machine.
3. Create/edit config file in user's .ssh directory (e.g. ``C:\Users\metamorph\.ssh\config``)
.. code-block:: bash
Host openmeta-gazebo-ros-machine
HostName 192.168.1.133
User metamorph
IdentityFile "C:/Users/metamorph/.ssh/gazebo_ros_machine"
StrictHostKeyChecking no
ROS and Gazebo
--------------
*On Ubuntu 16.04.3 LTS machine:*
Install Updates:
.. code-block:: bash
sudo apt-get update
sudo apt-get install
sudo apt-get dist-upgrade
`Install ROS Kinetic/Gazebo 7.0 `_:
1. Configure Ubuntu repositories to allow "restricted," "universe," and "multiverse" following the `Ubuntu guide `_.
2. Setup computer to accept software from package.ros.org:
.. code-block:: bash
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
3. Setup your keys:
.. code-block:: bash
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
4.
.. code-block:: bash
sudo apt-get update --include-eol-distros
5.
.. code-block:: bash
sudo apt-get install ros-kinetic-desktop-full -y
6. Initialize rosdep:
.. code-block:: bash
sudo rosdep init
rosdep update
7. Setup environment:
.. code-block:: bash
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
Building ROS Workspace
++++++++++++++++++++++
*On Ubuntu 16.04.3 LTS machine:*
1.
.. code-block:: bash
sudo apt-get install python-wstool -y
2.
.. code-block:: bash
mkdir -p ~/tasck/catkin_ws
3.
.. code-block:: bash
wget --header="Authorization: token " -O ~/tasck/tasck_core_models.rosinstall https://raw.githubusercontent.com/metamorph-inc/tasck-core-models/master/tasck_core_models.rosinstall
.. note::
You must have GitHub access to the tasck-core-models repository. To use the wget command above, you also need a GitHub personal access token. See https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
4.
.. code-block:: bash
cd ~/tasck/catkin_ws
5.
.. code-block:: bash
wstool init src ~/tasck/tasck_core_models.rosinstall
6.
.. code-block:: bash
wstool update -t src
7.
.. code-block:: bash
rosdep install --from-paths src --ignore-src -r -y
8.
.. code-block:: bash
catkin_make
Test Bench Executor
-------------------
*On Ubuntu 16.04.3 LTS machine:*
Some TASCK workflows require the OpenMETA testbenchexecutor to be installed on the Linux machine.
1. Install testbenchexecutor to Linux machine
.. code-block:: bash
python -m pip install --extra-index-url https://pypi.metamorphsoftware.com/ testbenchexecutor
.. note:: You may need to use ``sudo.``