Skip to content
This repository was archived by the owner on Sep 5, 2020. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 42 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Obtain a key, which should be named `mjkey.txt`, and place the key into the `mjp

**ROS Setup** (optional)

1. Install [ROS](http://ros.org), including the standard [PR2 packages](http://wiki.ros.org/Robots/PR2)
1. Install [ROS](http://ros.org), including the standard [PR2 packages](http://wiki.ros.org/Robots/PR2) and the [Universal Robot Stack](wiki.ros.org/Industrial/Install)

2. Set up paths by adding the following to your `~/.bashrc` file:

Expand Down Expand Up @@ -263,6 +263,47 @@ python python/gps/gps_main.py pr2_badmm_example

To learn how to make your own experiment and/or set your own initial and target positions, see [the next section](#running-a-new-experiment)

#### Simulated UR example

To run the code on a simulated UR be sure to first follow the instructions above for ROS setup.

You must also set an environmental variable UR_PATH that makes gps aware of the location of the installed universal_robot package. You can do this be adding the following to your .bashrc.

```sh
export UR_PATH=/path/to/universal_robot
```

After adding this line run:
```sh
source .bashrc
```

###### 1. Start the controller

Note: You may find it helpful early on to edit the default ur<5 or 10>.launch file in the ur_gazebo package by changing the -z argument in the spawn_gazebo_model node from .1 to a larger number like 5. This will place the simulated UR, 5 meters above the ground rather than .1 removing the potential for the robot to interact with the ground.

Launch gazebo and spawn a UR<5 or 10> inside of it.

```sh
roslaunch ur_gazebo ur<5 or 10>.launch
```

Now you're ready to run the examples via gps_main. This can be done on any machine as long as the variables are set appropriately.

The first example starts with a default initial controller and learns to move the end effector joint to a specified location.

Run the following from the gps directory:

```sh
python python/gps/gps_main.py ur_example
```

The second example trains a neural network policy to reach a goal pose from different starting positions, using guided policy search.

```sh
python python/gps/gps_main.py ur_caffe_example
```

#### Running a new experiment
1. Set up a new experiment directory by running:
```sh
Expand Down