Giter VIP home page Giter VIP logo

task-models's Introduction

Task models for human robot collaboration

image

image

Tools to manipulate and use task models for human robot collaboration.

If you are using this software and or one of its components, we warmly recommend you to cite the following paper:

Repository overview

The top-level directories contain the following code:

  • samples: scripts,
  • tests: unittests (run python -m unittest discover tests),
  • visualization: task models and policies visualizations based on d3.js <https://d3js.org/>.

The code from the task_models package contains a set of classes to represents models of tasks for human robot collaboration and in particular hierarchical task models. The code mostly consists in the following components:

  • The state.py and action.py modules define useful classes used in task.py. In addition to providing useful objects to represent hierarchies of task (HTM), the latter also implements the techniques for extracting such structure that were introduced in [Hayes2016].
  • The lib directory provides:
    • pomdp.py: a python wrapper to Anthony Cassandra's POMDP solver. Please visit pomdp.org.
    • pomcp.py: a partial implementation of [Silver2010],
    • belief.py: belief representations,
    • py23.py: compatibility code for python 2 and 3,
    • utils.py: additional helpers.
  • utils is a clone of https://github.com/omangin/python-utils.
  • task_to_pomdp.py: code mostly used for [Roncone2017].

Prerequisites for using the POMDP solvers

This package requires a binary from Anthony Cassandra's POMDP solver. Please visit pomdp.org for any matter related to the POMDP solver. In order to be using the simplex finite grid method, a fork of the version from cmansley needs to be installed that contains a fix to the original code. You can get the fork here.

The python code is looking for the pomdp-solve executable in your $PATH. Here are some instructions on how to compile and install the solver properly (assuming that ~/src is the directory in which you usually place your code):

cd ~/src
git clone https://github.com/scazlab/pomdp-solve
cd pomdp-solve
mkdir build
cd build/
../configure --prefix=$HOME/.local
make
make install

Make sure that ~/.local/bin is in yout path and now you should have pomdp-solve installed in it, and it should be available for the python package to be used.

ICRA 2017

To generate the policy from the experiment in [Roncone2017], please use the script samples/icra_scenario2pomdp.py. The script will generate the corresponding POMDP model, solve it with Anthony Cassandra's POMDP solver, and store the corresponding policy under visualization/policy/json/icra.json. To run the full experiment on the baxter robot, please refer to github.com/ScazLab/baxter_collaboration.

Hayes2016

Hayes, Bradley and Scassellati, Brian Autonomously constructing hierarchical task networks for planning and human-robot collaboration, IEEE International Conference on Robotics and Automation (ICRA 2016)

Roncone2017

Roncone Alessandro, Mangin Olivier, Scassellati Brian Transparent Role Assignment and Task Allocation in Human Robot Collaboration IEEE International Conference on Robotics and Automation (ICRA 2017), Singapore. [PDF] [BIB]

Silver2010

Silver, David and Veness, Joel Monte-Carlo Planning in Large POMDPs (2010)

task-models's People

Contributors

alecive avatar elenacorinagrigore avatar jakebrawer avatar omangin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

task-models's Issues

No belief list file: facet-test-00.belief

When trying to generate the policy from the ICRA paper [Roncone2017] (python script icra_scenario2pomdp.py), it fails on the POMDP due to no "facet-test-00.belief" file. How should this file be generated?

[Finite Grid Method:]
    [Creating grid ... ** Error: The belief list file: facet-test-00.belief does not exist.
done.]

** ABORT ** File: ../../src/belief.c function: sizeBeliefList, Line: 380
	List is NULL.
Traceback (most recent call last):
  File "icra_scenario2pomdp.py", line 18, in <module>
    gp = p.solve(method='grid', n_iterations=500, verbose=True)
  File "/home/murphy/ScazLab/src/task-models/task_models/lib/pomdp.py", line 371, in solve
    stdout=None if verbose else DEVNULL)
  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/local/bin/pomdp-solve', '-horizon', '500', '-rand_seed', '9400528733', '-method', 'grid', '-fg_type', 'simplex', '-o', 'tosolve', '-pomdp', '/tmp/tmprO6wS1/tosolve.pomdp']' returned non-zero exit status 255

Subprocess.check_call()

simon@simon:~/MyTest/task-models/samples$ python icra_scenario2pomdp.py
Traceback (most recent call last):
  File "icra_scenario2pomdp.py", line 18, in <module>
    gp = p.solve(method='grid', n_iterations=500, verbose=True)
  File "/usr/local/lib/python2.7/dist-packages/task_models/lib/pomdp.py", line 363, in solve
    stdout=None if verbose else DEVNULL)
  File "/usr/lib/python2.7/subprocess.py", line 535, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Here is the error I got when I try to run: python icra_scenario2pomdp.py on the terminal
Note: I installed the POMDP solver and copied the pomdp-sol into ../task-models/samples

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.