Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new prototype for ui interface #48

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
3fc68ba
new prototype for ui interface
jashlu Nov 4, 2024
e0c95f0
Merge branch 'main' into refactor-experiment-ui
jashlu Nov 4, 2024
e13040c
test new resource json file
jashlu Nov 4, 2024
f786816
Merge branch 'main' into refactor-experiment-ui
jashlu Nov 13, 2024
783f558
merged in updates from atomic_mutations, initial merging of two
jashlu Nov 14, 2024
9a8e7b1
remove py_tree and replace with in house behaviour tree class
jashlu Nov 19, 2024
0f8067d
add composite class and update behavior class and atomic_mutations.py
jashlu Nov 20, 2024
b2f5494
clean up repo
jashlu Nov 26, 2024
445c0b6
configs:wq
jashlu Nov 26, 2024
acd1789
revert project.toml
jashlu Nov 26, 2024
3470d21
update structuring
jashlu Nov 26, 2024
ca3cd33
update import path
jashlu Nov 26, 2024
5af0d05
remove colorama
jashlu Nov 27, 2024
c3a016e
fix import
jashlu Nov 27, 2024
4641e36
add prompt_toolkit to pyproject dependencies
jashlu Nov 27, 2024
0a9a442
update resource file input
jashlu Nov 27, 2024
ca8bd16
readadd social_norms_tree path
jashlu Nov 27, 2024
7961f9f
fix packaging for examples and social_norms_trees
jashlu Nov 27, 2024
9720c6a
update styling and introduce all resource files
jashlu Nov 27, 2024
e548b49
use atomic_mutations
jashlu Nov 27, 2024
4a181c3
update wording
jashlu Nov 27, 2024
1b2891c
additional styling
jashlu Nov 27, 2024
03c9999
run black
jashlu Nov 27, 2024
fd22841
black
jashlu Nov 27, 2024
c4a0cca
update font color for interactive_ui
jashlu Dec 3, 2024
654d7ee
readd social_norms_trees
jashlu Dec 3, 2024
2abf8e9
reformat
jashlu Dec 3, 2024
8487085
update README for example resources
jashlu Dec 6, 2024
e619c9a
Update README.md
jashlu Dec 6, 2024
8f19d38
update readme text
jashlu Dec 6, 2024
e313a69
update font color for interactiveu ui
jashlu Dec 6, 2024
1680cbb
readd social_norms_Trees
jashlu Dec 6, 2024
ff175df
catch errors
jashlu Dec 7, 2024
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
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"editor.formatOnSave": true,
"black-formatter.importStrategy": "fromEnvironment",
"python.testing.pytestArgs": [
"."
".",
"--doctest-modules"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
}
}
}
114 changes: 112 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,113 @@
# Example Experiments
# Experiment Resources

This guide provides instructions for creating and structuring resource-file.json, which is used to define the behavior tree and experiment flow for robots. Currently, there are three robots with custom contexts:

1. Atlas
2. Digit
3. Optimus




## Breakdown of {robot}-resource-file.json

Resource files are JSON files made up of key-value pairs. The keys represent subgoals, and their values define the subgoal's context, children, behavior library, and interruptions.

Here’s an example template:


```json
{
"subgoal_A": {
"context": "...",
"children": [],
"behavior_library": [
{
"id": "...",
"name": "...",
"in_behavior_bank": false
},
{
"id": "...",
"name": "...",
"in_behavior_bank": true
}
],
"interruptions": {}
},
"subgoal_B": {
"context": "...",
"children": [],
"behavior_library": [
{
"id": "...",
"name": "...",
"in_behavior_bank": false
},
{
"id": "...",
"name": "...",
"in_behavior_bank": true
}
],
"interruptions": {}
}
}
```

## Subgoal Structure Breakdown
- Each subgoal is represented by a unique key (e.g., "subgoal_A") with the following fields:


### Context
- A string describing the subgoal's background and objectives.

Example:
```json
"context": "Atlas is assigned to retrieve medicine A from the medicine cabinet..."
```


### Children
- An array of behavior IDs (strings) specifying the execution order of the subgoal's behaviors.
- Important: These IDs must exist in the behavior_library field.

Example:
```json
"children": [
"take_path_to_medicine_cabinet",
"unlock_cabinet",
"retrieve_medicine"
]
```


### Behavior Library
- A list of all possible behaviors for the subgoal.
- Each behavior is an object with the following fields:
- id (required): Unique identifier.
- name (required): Description of the behavior.
- in_behavior_bank (optional): true if included in the behavior bank.

Example:
```json
"behavior_library": [
{
"id": "take_path_to_medicine_cabinet",
"name": "take acceptable path to the medicine cabinet",
"in_behavior_bank": false
},
{
"id": "request_medicine",
"name": "request medicine from pharmacist",
"in_behavior_bank": true
}
]
```

### Interruptions

Currently not used. Keep as an empty object: {}



This directory includes configuration files for example experiments.
129 changes: 0 additions & 129 deletions examples/abstract-experiment.json

This file was deleted.

Loading
Loading