Skip to content

Commit

Permalink
Merge pull request #1 from uchile-robotics-forks/master
Browse files Browse the repository at this point in the history
doc
  • Loading branch information
mpavezb authored Dec 22, 2018
2 parents d7a776b + 9ff0ede commit 72cea99
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 174 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
install/mongo-cxx-driver/

# Created by https://www.gitignore.io/api/c++,ros,python,jetbrains

Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
# LTM - Long Term Memory for Robots

Long Term Memory for robots using ROS. Thesis project.
Long Term Memory for robots using ROS.

## Overview

The episodic LTM (EpLTM) is a very relevant challenge for service robotics, it allows us to enhance human-robot interaction (HRI), robot understanding about the environment, and the way in which it can handle tasks. This repository holds the ROS implementation code for the LTM project developed by Matías Pavez in his final C.Sc and E.E Thesis. See also [the thesis repository](https://github.com/mpavezb/memoria).

The episodic LTM (EpLTM) is a very relevant challenge for service robotics, it allows us to enhance human-robot interaction (HRI), robot understanding about the environment, and the way in which it can handle tasks. This repository holds the ROS implementation code for the LTM project developed by Matías Pavez in his [C.Sc and E.E Thesis](https://github.com/mpavezb/memoria).

This projects provides a LTM implementation with Episodic, Semantic and Emotional components. Episodic information relates to *What* happened, *When* it happened, and *Where*. The *What* relates to the Semantic Memory, which can contain any kind of information, while this is defined through ROS messages. Stored episodes count with historical and emotional relevances, to give better tools for episode retrieval queries.


The robot location (*Where*), the Semantic Memory (*What*) and emotion information is collected through plugins defined by the user. So some plugins must be implemented following a *pluginlib* API.

Some plugins are already defined on the `ltm_addons` and `ltm_samples` ROS packages. The `ltm_addons` package also provides a SMACH interface to the LTM server, which allows the collection of SMACH states as LTM episodes.

Some plugins are already defined on the `ltm_addons` and `ltm_samples` ROS packages. The `ltm_addons` package also provides a SMACH interface to the LTM server, which allows the collection of SMACH states as LTM episodes.
The project is built over ROS and MongoDB. ROS works as the robotics framework which enables the communication between robot components, while MongoDB stores all episodic and semantic information.

The project is built on ROS and MongoDB. ROS works as the robotics framework which enables the communication between robot components, while MongoDB stores all episodic and semantic information.

## Documentation

## Related ROS packages:
- [Installation](doc/installation.md)
- [LTM for the Bender robot](https://github.com/uchile-robotics/bender_ltm)
- [Thesis](https://github.com/mpavezb/memoria) (in spanish)
- [Future Work](doc/proposed.md)

- [ltm_addons](https://github.com/mpavezb/ltm_addons)
- [ltm_samples](https://github.com/mpavezb/ltm_samples)

## LTM Suite - ROS packages:

## Documentation

- [Thesis](https://github.com/mpavezb/memoria) (in spanish).
- [Installation guide](doc/installation.md)
- [Tutorials](doc/tutorials.md)
- [ltm](https://github.com/mpavezb/ltm)
- [ltm_addons](https://github.com/mpavezb/ltm_addons)
- [ltm_samples](https://github.com/mpavezb/ltm_samples)
- [ltm_db](https://github.com/mpavezb/ltm_db)
60 changes: 0 additions & 60 deletions doc/cloc.txt

This file was deleted.

91 changes: 8 additions & 83 deletions doc/installation.md
Original file line number Diff line number Diff line change
@@ -1,90 +1,15 @@
# Installation Guide
# Installation instructions

The LTM system was developed under ROS kinetic on Ubuntu 16.04. The only dependencies are the following:

## Prerequisites
- Python and C++ standard lbraries.
- MongoDB server and driver for C++.

- OS: Ubuntu 16.04
- ROS:
- ROS kinetic
Also, the `ltm_addons` package depends on the SMACH ROS packages.


### Install mongodb server

```bash
sudo apt-get install mongodb-server
```

### Install C++ drivers

```bash
# get mongodb C++ drivers
git clone -b 26compat https://github.com/mongodb/mongo-cxx-driver.git

# compile it using scons
sudo apt-get install scons
cd mongo-cxx-driver
sudo scons --prefix=/usr/local/ --full --use-system-boost --disable-warnings-as-errors
```

Now, you should now be able to compile the packages using catkin.


### Install mongo python library

See [the python API](https://api.mongodb.com/python/current/) for PyMongo.

```bash
sudo apt install python-pip
python -m pip install pymongo
```

### Installation: Warehouse ROS mongo

The deb install is not complete and does not provide the required plugin for mongo, so this has to be installed from source. See also the [official github repository](https://github.com/ros-planning/warehouse_ros_mongo).
These dependencies can be installed using:

```bash
# get warehouse_ros_mongo repo
git clone https://github.com/mpavezb/warehouse_ros_mongo.git

# dependency for warehouse_ros_mongo
sudo apt-get install ros-kinetic-warehouse-ros
```


#### Verify installation

```bash
roscd && cd ..

# set up server
catkin_make
rosrun warehouse_ros_mongo mongo_wrapper_ros.py
roslaunch warehouse_ros_mongo warehouse.launch --screen

# run tests
catkin_make tests
rosrun warehouse_ros_mongo test_warehouse_ros_mongo_cpp
```

## Useful Commands

```bash
# look for process using a specific
sudo lsof -i | grep <port>
kill -9 <pid>

# kill mongodb server
kill -9 $(pidof mongod)
```

### Install LTM repository

```bash
# download
roscd && cd ../src
git clone https://github.com/mpavezb/ltm.git

# compile
roscd && cd ..
catkin_make
roscd ltm
bash install/install.bash
```
37 changes: 20 additions & 17 deletions doc/proposed.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,33 @@
# Proposed work for future releases

# Lista de trabajo propuesto a futuro.

## Documentation

### Representación episódica
- Inline documentation for methods.
- ROS API documentation.
- Pluginlib documentation.

- Where: Crear submensaje para Where.msg, que almacene: location, area, time
- Where: Soportar más de 1 lugar semántico y coordenado para hijos.
- Where: agregar soporte a más de un frame/mapa
- Where: Crear submensaje para Where.msg, que represente ubicación coordenada múltiple
- Optimización: condición de que hijos son ordenados por tiempo de inicio
- Asignación creciente de IDS para episodios, streams y entidades.

### Funcionalidad
## Usability

- Modificación de la estructura de mensajes semánticos
- como manejar contextos, pues se puede requerir su información, incluso durante el mismo episodio!!.. deben ser almacenados una vez inscritos y ser cerrados manualmente.
- Clean up terminology for methods and API.
- Manage Where.msg information as an entity. The location message should be defined by the user, and kept on its own collection.


### API ROS
## Functionality

- Quitar servicios incompletos..
- Database migration for updated entities (avoid losing old DB entries).
- Automatical updates for the historical and generical relevances.
- Server with warnings when resource usage reaches the available limits.


### API plugins
## Maintainability

### Herramientas
- Migrate the `ltm_db` and `ltm` mongo interface from the legacy C++ driver to the latest version (v3.3 at the moment).

- Server con warning si mensaje a almacenar pesa más del límite!.
- LTM server con warning en texto y notificación inotify cuando quede poco espacio de disco (menor a X%) (o se ha ocupado más de X GB) debido al server... configurable por usuario...

## Scalability and Efficiency

- Disk usage mitigation.
- Streams degradation.
- MongoDB queries analysis.
44 changes: 44 additions & 0 deletions install/install.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash
#
# Run me like this
# > bash install.sh
#

INSTALL_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"


# Prerequisites
# -------------------------------------------

# - MongoDB server
# - scons compiler tool
# - python pip
sudo apt-get install mongodb-server scons python-pip


# MongoDB C++ drivers
# -------------------------------------------

cd ${INSTALL_DIR}

# official driver (legacy version!)
if [[ ! -d mongo-cxx-driver ]]; then
git clone https://github.com/mongodb/mongo-cxx-driver.git
fi
cd mongo-cxx-driver
git checkout 26compat

# compile it using scons
# sudo scons --prefix=/usr/local/ --full --use-system-boost --disable-warnings-as-errors


# MongoDB Python driver
# -------------------------------------------
python -m pip install pymongo


# ltm_addons
# -------------------------------------------
sudo apt-get install ros-kinetic-smach ros-kinetic-smach-viewer ros-kinetic-video-stream-opencv ros-kinetic-image-view
pip install faker

0 comments on commit 72cea99

Please sign in to comment.