Skip to content
Sean Trott edited this page Jun 16, 2016 · 26 revisions

The ROS workspace to run ECG demos. This is basically a wrapper GIT repository to collect all required repositories as submodules for running the ECG workbench demos. All code is supposed to run under ROS indigo and tested with Ubuntu 14.04. Everything is tested with Python 2.7.6 only, Python 3.X will probably not work.

You'll need to follow everything starting from this high-level repository: https://github.com/icsi-berkeley/ros_catkin_ecg_ws

NOTE: This tutorial is geared towards a standalone network of repositories using git submodules, to allow easy integration of a language understanding system for ROS researchers. If you've already done the rest of the tutorials and have ecg_framework_code, etc. installed, you can add a symbolic link (Symlink) to your existing installation).

System Requirements

The system has been tested on OSX and Linux environments.

The following packages are required:

You will also need the following repository from GitHub:

  • ecg-grammars
    • Note: the analyzer.sh script assumes this is installed in the same directory as framework_code

Note: Once you clone the , you'll also want to set your PYTHONPATH in your bash_profile to point to:

{INSTALL_PATH}/ecg_framework_code/src/main

You'll also need to point PYTHONPATH to:

{INSTALL_PATH}/ecg_robot_code/src/main

Installation and Dependencies

The installation notes are based on the following tutorial for DARwin-OP: http://www.generationrobots.com/en/content/83-carry-out-simulations-and-make-your-darwin-op-walk-with-gazebo-and-ros

Install ROS indigo, as well as the prerequisites for the gazebo_darwin packages and do:

sudo apt-get install git ros-indigo-desktop-full ros-indigo-gazebo-plugins ros-indigo-gazebo-ros ros-indigo-gazebo-ros-control ros-indigo-hector-gazebo ros-indigo-hector-gazebo-plugins ros-indigo-effort-controllers ros-indigo-joint-state-controller ros-indigo-joint-state-publisher ros-indigo-turtlebot-teleop ros-indigo-catkin ros-indigo-pr2-*

Then clone this git repository. Its root folder is a new catkin workspace, which we assume to be ~/ros_catkin_ecg_ws. You'll execute most other commands in these instructions from there.

git clone https://github.com/icsi-berkeley/ros_catkin_ecg_ws.git ~/ros_catkin_ecg_ws

Next, you need to initialize and update the submodules within this repository. The submodules contain the ROS code for the darwin robot and the ECG workbench. Cd into ~/ros_catkin_ecg_ws and do the following:

cd ~/ros_catkin_ecg_ws
git submodule update --init --recursive	

NOTE: If you've already installed the ecg_interface system elsewhere on your computer, you can just add a Symlink to this path.

Now you need to build the workspace. Do this by

cd ~/ros_catkin_ecg_ws
catkin_make
catkin_make install

Next you need to source come setup file. We recommend to do this automatically by doing that in your .bashrc.

echo "source ~/ros_catkin_ecg_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc

Next we setup the ECG NLU system. Make sure you've installed all the packages listed here.

You also have to install a python module called ipaddress using pip:

sudo pip install ipaddress

Next, you have to set the PYTHON for the ECG framework code. Add the following to your .bashrc:

export PYTHONPATH=~/ros_catkin_ecg_ws/src/ros_ecgworkbench/src/ecg/ecg_interface/ecg_robot_code/src/main:~/ros_catkin_ecg_ws/src/ros_ecgworkbench/src/ecg/ecg_interface/ecg_framework_code/src/main:$PYTHONPATH

Source it again:

source ~/.bashrc

You can test if the transport installation worked by opening two terminals, and in the first do:

python ~/ros_catkin_ecg_ws/src/ros_ecgworkbench/src/ecg/ecg_interface/ecg_framework_code/src/tests/transport_test.py chat1 chat2

In the second do:

python ~/ros_catkin_ecg_ws/src/ros_ecgworkbench/src/ecg/ecg_interface/ecg_framework_code/src/tests/transport_test.py chat2 chat1

Now, if you enter text in one terminal, it should show up in the other terminal, too.

Starting Gazebo and Related Modules

Before starting gazebo the first time, I recommend downloading all 3d models for gazebo, since this speeds up the starting processes. To do so, execute the script (takes ~5 minutes, depending on your internet connection):

./download_gazebo_models.sh

You can now start gazebo, which should bring up an indoor environment that we use for our experiments:

roslaunch ros_cqi run_gazebo_darwin_kitchen.launch
roslaunch ros_cqi spawn_darwin.launch

Now press the "play" button at the lower left of the simulator window.

To have the robot walking, execute the test walking script that comes with darwin. I recommend to have a look at that script to see how the walking behaviour is executed. You can find it uner src/darwin_gazebo/src/.

rosrun darwin_gazebo walker_demo.py

Alternatively run the pickup pen scenario from the paper. To get started with our system, you'll want to start the CQI. Do so by entering:

rosrun ros_cqi run_interface.py

Take a look at all files under the folder src/ros_cqi to understand how it works.

Then start the NLU system. Do the following (unfortunately, you have to start the script from the scripts-folder, due to some path problems that we have not resolved so far...):

cd ros_catkin_ecg_ws/src/ros_ecgworkbench/scripts/
rosrun ros_ecgworkbench run_nlu.py 

Now, enter the following in the text input console which should have come up, to move the robot to coordinates 1 1:

Robot1, move to location 1 1!

An error may show up in the window, but the robot will move. This is to be fixed in the future...

Troubleshooting

If there are problems with gazebo, especially the downloading of the world models, try the following before starting it:

export LC_NUMERIC=C

3D modeling

Gazebo comes with its own sdf model database. However, we'll probably want to also have our own 3d models. Therefore we need to provide an additional model database. Details on how this can be done can be found here:

http://gazebosim.org/tutorials?tut=model_structure&cat=