<commit_before># Amazon Challenge Motion package #

BT nodes for executing motion plans on the PR2 for the Amazon Challenge.

## Arm position server ##

BT node that initializes the arm position depending on the bin we will grasp from

```
#!python

roslaunch amazon_challenge_motion arm_position_server.launch
```

## Saving joint position waypoints ##

Make sure you have downloaded [Francisco's branch of the moveit_commander package](https://github.com/fevb/moveit_commander/tree/hydro-devel-normalize-angles) (it is also in the **.rosinstall** file of the **amazon_challenge_install** package.


```
#!python

rosrun moveit_commander moveit_commander_cmdline.py
```

This will bring up an interactive command line

Then select e.g. the **left_arm** group, record different joint positions in variables **bin_A**, **bin_B** and **bin_C** and save all these poses to a text file:
```
#!python

use left_arm
record bin_A
record bin_B
record bin_C
save bin.txt
```

You can also use several different groups, such as the right_arm, torso, etc.

Then you can copy-paste the joint poses to the **.yaml** files in the **./config** folder of this package.


## Loading/reading pose dictionaries ##

Use the [ROS parameter server](http://wiki.ros.org/rosparam) and the [python interface](http://wiki.ros.org/rospy/Overview/Parameter%20Server).

The dictionaries are in the **./config/** folder. You can load them via roslaunch files (see for example  **launch/arm_position_server.launch**) or via the command line (make sure you have a running ROS core):

<commit_msg>README.md edited online with Bitbucket<commit_after># Amazon Challenge Motion package #

BT nodes for executing motion plans on the PR2 for the Amazon Challenge.

## Arm position server ##

BT node that initializes the arm position depending on the bin we will grasp from

```
#!python

roslaunch amazon_challenge_motion arm_position_server.launch
```

## Saving joint position waypoints ##

Make sure you have downloaded [Francisco's branch of the moveit_commander package](https://github.com/fevb/moveit_commander/tree/hydro-devel-normalize-angles) (it is also in the **.rosinstall** file of the **amazon_challenge_install** package.


```
#!python

rosrun moveit_commander moveit_commander_cmdline.py
```

This will bring up an interactive command line

Then select e.g. the **left_arm** group, record different joint positions in variables **bin_A**, **bin_B** and **bin_C** and save all these poses to a text file:
```
#!python

use left_arm
record bin_A
record bin_B
record bin_C
save left_arm_bin_A_B_C.txt
```

You can also use several different groups, such as the right_arm, torso, etc.

Then you can copy-paste the joint poses to the **.yaml** files in the **./config** folder of this package.


## Loading/reading pose dictionaries ##

Use the [ROS parameter server](http://wiki.ros.org/rosparam) and the [python interface](http://wiki.ros.org/rospy/Overview/Parameter%20Server).

The dictionaries are in the **./config/** folder. You can load them via roslaunch files (see for example  **launch/arm_position_server.launch**) or via the command line (make sure you have a running ROS core):


{'fraction_non_alphanumeric': 0.09753787878787878, 'fraction_numerical': 0.001893939393939394, 'mean_word_length': 4.890334572490707, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3122618', 'n_tokens_mistral': 985, 'n_tokens_neox': 907, 'n_words': 380}