From 1429d8c2973de89f1da51bd7433de19f36d7d314 Mon Sep 17 00:00:00 2001
From: PepMS <jmarti@iri.upc.edu>
Date: Mon, 23 Nov 2020 11:31:40 +0100
Subject: [PATCH] documentation update

---
 README.md           |  5 ++++-
 docs/integration.md | 51 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+), 1 deletion(-)
 create mode 100644 docs/integration.md

diff --git a/README.md b/README.md
index 69dab88..368c301 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,6 @@
 # gauss_ros
 
-Package containing ROS messages for the european project GAUSS and some launch files
\ No newline at end of file
+Package containing ROS messages for the european project GAUSS and some launch files.
+
+## Integration tests
+If you are a partner of the Gauss Europen project landing here for the integration tests, please visit this [documentation page](./docs/integration.md).
\ No newline at end of file
diff --git a/docs/integration.md b/docs/integration.md
new file mode 100644
index 0000000..c20d82d
--- /dev/null
+++ b/docs/integration.md
@@ -0,0 +1,51 @@
+# Integration with ARATOS
+## Installation procedure
+### PC-NUC (ROS Side)
+In the PC side we require the OS Ubuntu 16.04 and its corresponding ROS installation with the Kinetic version.
+1. Install ROS as indicated in its [website](http://wiki.ros.org/kinetic/Installation/Ubuntu)
+2. Install [ROS-Bridge](http://wiki.ros.org/rosbridge_suite) using the terminal command: `sudo apt-get install ros-kinetic-rosbridge-server`
+
+### Raspberry PI side
+In the Raspberry Pi we require to have a Linux base OS running.
+1. Make sure Python 3 is installed. In a terminal type: `python3 --version`. The output of this command should indicate the Python version installed (`Python 3.7` most probably).
+2. Install [**roslibpy**](https://pypi.org/project/roslibpy/): `pip3 install --user roslibpy`
+3. You will probably need other third party libraries when running the python script. They all can be installed using pip3.
+
+### Preparing the hardware
+1. Connect both machines via the Ethernet connection
+2. Be sure that both machines can ping each other
+3. Be aware of each machine's IP address
+
+## Running an example
+Here we detail, with an example, how the connection between the PC running ROS and the Raspberry can be done.
+### PC-NUC (ROS side)
+Here we will launch a ROS-node example contained within the tutorials of ROS that comes along any ROS installation. This node will publish messages of type `/std_msgs/String` in a topic called `/chatter`. In order to launch this node do the following:
+#### Launch the publisher
+1. Check that the ROS installation has been sourced by doing: `roscd`. If the command does not work do: `source /opt/ros/kinetic/setup.bash`
+2. Check that the ROS-node example exists by doing `roscd roscpp_tutorials`. When doing this, the current folder should move to `/opt/ros/kinetic/share/roscpp_tutorials`. 
+3. Launch the node: `roslaunch roscpp_tutorials talker_listener.launch`
+#### Launch the ROSBridge node
+With the node running, in a separate terminal, launch the ROSbridge node: `roslaunch rosbridge_server rosbridge_websocket.launch`. 
+
+### Raspberry PI side
+1. Save the following code snippet as a python script, e.g. `/home/pi/gauss_tests/test_rospylib.py`:
+```python
+import roslibpy
+
+def callback_info(message):
+    print(message)
+client = roslibpy.Ros(host='169.254.204.78', port=9090)
+client.run()
+listener = roslibpy.Topic(client, '/chatter', 'std_msgs/String')
+listener.subscribe(callback_info)
+try:
+    while True:
+        pass
+except  KeyboardInterrupt:
+    client.terminate()
+```
+2. Edit the python script by editing the IP address and setting the one of your PC's
+3. Run the python script: `python3 /home/pi/gauss_tests/test_rospylib.py`
+If everything runs as expected, you should see the messages content in the same terminal where you have ran the python script.
+
+## Running the Gauss test
\ No newline at end of file
-- 
GitLab