Code Monkey home page Code Monkey logo

lfd's Introduction

LfD: Learning from Demonstrations for Robotic Manipulation

Package Description

The LfD package generalizes robot trajectories from demonstrations into new situations, thus enabling robots to learn to perform tasks from demonstrations.

Documentation Status

Documentation

Package documentation is available at http://rll.berkeley.edu/lfd.

lfd's People

Contributors

alexlee-gk avatar antingshen avatar c-l avatar cbfinn avatar dhadfieldmenell avatar rgleichman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar

lfd's Issues

Segfault when running the test suite

When I run the test suite I get a segfault:

~/git/robbie/lfd$ python -m unittest discover -s test
You can set logging level with TRAJOPT_LOG_THRESH. Valid values: FATAL ERROR WARN INFO DEBUG TRACE. Defaulting to INFO
ESegmentation fault (core dumped)

Also all of the exaples except drop_objs.py fail.

move_box:

robbie@bluefin:~/git/robbie/lfd/examples$ python move_box.py 
You can set logging level with TRAJOPT_LOG_THRESH. Valid values: FATAL ERROR WARN INFO DEBUG TRACE. Defaulting to INFO
[plugindatabase.h:577] Failed to create name base_stereo_camera, interface sensor
[colladareader.cpp:2703] cannot find instance_sensor for attached sensor pr2:wide_stereo_optical_sensor
[plugindatabase.h:577] Failed to create name base_stereo_camera, interface sensor
[colladareader.cpp:2703] cannot find instance_sensor for attached sensor pr2:narrow_stereo_optical_sensor
[colladareader.cpp:2844] unprocessed tag: sensor/interface_type
[colladareader.cpp:2844] unprocessed tag: sensor/interface_type
[colladareader.cpp:2844] unprocessed tag: sensor/angle_range
[colladareader.cpp:2844] unprocessed tag: sensor/distance_range
[colladareader.cpp:2844] unprocessed tag: sensor/angle_increment
[colladareader.cpp:2844] unprocessed tag: sensor/measurement_time
[colladareader.cpp:2844] unprocessed tag: sensor/interface_type
[colladareader.cpp:2844] unprocessed tag: sensor/angle_range
[colladareader.cpp:2844] unprocessed tag: sensor/distance_range
[colladareader.cpp:2844] unprocessed tag: sensor/angle_increment
[colladareader.cpp:2844] unprocessed tag: sensor/measurement_time
[colladareader.cpp:2844] unprocessed tag: sensor/interface_type
[INFO] creating bullet collision checker for environment
[INFO] creating viewer
[INFO] ====== Welcome to the OSG Viewer =======
Mouse: 
- rotate by holding left mouse button and dragging
- zoom by holding right mouse button and dragging
key bindings:
Esc       quit application
Space     reset view
h:       Display help
p:       Toggle idle
�:       Quit (raise exception)

Traceback (most recent call last):
  File "move_box.py", line 67, in <module>
    traj = get_move_traj(box0_pos + np.r_[0,0,move_height], box0_pos + np.r_[0,0,box_depth/2-0.02], False)
  File "move_box.py", line 58, in get_move_traj
    dof_vals = sim.robot.GetManipulator(manip_name).GetArmDOFValues()
AttributeError: 'Manipulator' object has no attribute 'GetArmDOFValues'

move_rope

robbie@bluefin:~/git/robbie/lfd/examples$ python move_rope.py 
You can set logging level with TRAJOPT_LOG_THRESH. Valid values: FATAL ERROR WARN INFO DEBUG TRACE. Defaulting to INFO
[plugindatabase.h:577] Failed to create name base_stereo_camera, interface sensor
[colladareader.cpp:2703] cannot find instance_sensor for attached sensor pr2:wide_stereo_optical_sensor
[plugindatabase.h:577] Failed to create name base_stereo_camera, interface sensor
[colladareader.cpp:2703] cannot find instance_sensor for attached sensor pr2:narrow_stereo_optical_sensor
[colladareader.cpp:2844] unprocessed tag: sensor/interface_type
[colladareader.cpp:2844] unprocessed tag: sensor/interface_type
[colladareader.cpp:2844] unprocessed tag: sensor/angle_range
[colladareader.cpp:2844] unprocessed tag: sensor/distance_range
[colladareader.cpp:2844] unprocessed tag: sensor/angle_increment
[colladareader.cpp:2844] unprocessed tag: sensor/measurement_time
[colladareader.cpp:2844] unprocessed tag: sensor/interface_type
[colladareader.cpp:2844] unprocessed tag: sensor/angle_range
[colladareader.cpp:2844] unprocessed tag: sensor/distance_range
[colladareader.cpp:2844] unprocessed tag: sensor/angle_increment
[colladareader.cpp:2844] unprocessed tag: sensor/measurement_time
[colladareader.cpp:2844] unprocessed tag: sensor/interface_type
[INFO] creating bullet collision checker for environment
[INFO] creating viewer
[INFO] ====== Welcome to the OSG Viewer =======
Mouse: 
- rotate by holding left mouse button and dragging
- zoom by holding right mouse button and dragging
key bindings:
Esc       quit application
Space     reset view
h:       Display help
p:       Toggle idle
�:       Quit (raise exception)

Traceback (most recent call last):
  File "move_rope.py", line 86, in <module>
    traj = get_move_traj(pick_pos + np.r_[0,0,move_height], pick_pos, pick_R, pick_R, False)
  File "move_rope.py", line 73, in get_move_traj
    dof_vals = sim.robot.GetManipulator(manip_name).GetArmDOFValues()
AttributeError: 'Manipulator' object has no attribute 'GetArmDOFValues'

record_sim

robbie@bluefin:~/git/robbie/lfd/examples$ python move_rope.py 
You can set logging level with TRAJOPT_LOG_THRESH. Valid values: FATAL ERROR WARN INFO DEBUG TRACE. Defaulting to INFO
[plugindatabase.h:577] Failed to create name base_stereo_camera, interface sensor
[colladareader.cpp:2703] cannot find instance_sensor for attached sensor pr2:wide_stereo_optical_sensor
[plugindatabase.h:577] Failed to create name base_stereo_camera, interface sensor
[colladareader.cpp:2703] cannot find instance_sensor for attached sensor pr2:narrow_stereo_optical_sensor
[colladareader.cpp:2844] unprocessed tag: sensor/interface_type
[colladareader.cpp:2844] unprocessed tag: sensor/interface_type
[colladareader.cpp:2844] unprocessed tag: sensor/angle_range
[colladareader.cpp:2844] unprocessed tag: sensor/distance_range
[colladareader.cpp:2844] unprocessed tag: sensor/angle_increment
[colladareader.cpp:2844] unprocessed tag: sensor/measurement_time
[colladareader.cpp:2844] unprocessed tag: sensor/interface_type
[colladareader.cpp:2844] unprocessed tag: sensor/angle_range
[colladareader.cpp:2844] unprocessed tag: sensor/distance_range
[colladareader.cpp:2844] unprocessed tag: sensor/angle_increment
[colladareader.cpp:2844] unprocessed tag: sensor/measurement_time
[colladareader.cpp:2844] unprocessed tag: sensor/interface_type
[INFO] creating bullet collision checker for environment
[INFO] creating viewer
[INFO] ====== Welcome to the OSG Viewer =======
Mouse: 
- rotate by holding left mouse button and dragging
- zoom by holding right mouse button and dragging
key bindings:
Esc       quit application
Space     reset view
h:       Display help
p:       Toggle idle
�:       Quit (raise exception)

Traceback (most recent call last):
  File "move_rope.py", line 86, in <module>
    traj = get_move_traj(pick_pos + np.r_[0,0,move_height], pick_pos, pick_R, pick_R, False)
  File "move_rope.py", line 73, in get_move_traj
    dof_vals = sim.robot.GetManipulator(manip_name).GetArmDOFValues()
AttributeError: 'Manipulator' object has no attribute 'GetArmDOFValues'
robbie@bluefin:~/git/robbie/lfd/examples$ python 
drop_objs.py   move_box.py    move_rope.py   record_sim.py  register.py    
robbie@bluefin:~/git/robbie/lfd/examples$ python record_sim.py 
You can set logging level with TRAJOPT_LOG_THRESH. Valid values: FATAL ERROR WARN INFO DEBUG TRACE. Defaulting to INFO
Traceback (most recent call last):
  File "record_sim.py", line 17, in <module>
    from lfd.environment.environment import RecordingSimulationEnvironment
ImportError: cannot import name RecordingSimulationEnvironment

register

robbie@bluefin:~/git/robbie/lfd/examples$ python register.py 
You can set logging level with TRAJOPT_LOG_THRESH. Valid values: FATAL ERROR WARN INFO DEBUG TRACE. Defaulting to INFO
Traceback (most recent call last):
  File "register.py", line 21, in <module>
    sim.add_objects([table])
  File "/home/robbie/git/robbie/lfd/lfd/environment/simulation.py", line 34, in add_objects
    self.robot = self.env.GetRobots()[-1]
IndexError: list index out of range

Fix intended behavior of demos at instantiation for RegistrationFactory

Currently, the demos provided at instantiation of TpsRpmRegistrationFactory, TpsRpmBijRegistrationFactory are merely used to iterate over for batch_register and batch_cost. However, the intended behavior is for the RegistrationFactory to only allow to do register and cost with one of the demos provided at instantiation.

Once this behavior is implemented, the RegistrationFactory should do all necessary pre-computation at instantiation for efficiency reasons (i.e. the SolverFactory should create a Solver at this point instead of every time tps_rpm or tps_rpm_bij is called).

add_objects now assumes that a robot has being added

Commit 58d42aa started assuming in function add_objects that at least one of the objects being added is a robot:
https://github.com/dhadfieldmenell/lfd/blob/58d42aa36dfdf1385171685a16c52e965d188a9d/core/simulation.py#L35

Previous behavior was to set the self.robot variable only if a robot was just added:
https://github.com/dhadfieldmenell/lfd/blob/1fe2475d76c90be45202316f79bf79fa92c3bb2e/core/simulation.py#L34-L37

Can you revert the behavior?

Fix recording scripts and classes

Hey @gmulcaire, can you move record_sim.py out of the examples directory? The examples directory is now meant for simple examples that just works with default command line arguments (if any). You can do either of the following:

  • If the script is mature and if it would be beneficial for other projects, then put it in the scripts directory.
  • If the script is currently specific to your project only, then make another subpackage in the lfd package (parallel to lfd/lfmd/ and lfd/mmqe/).
  • Make a new branch and put it there.

In addition, can you make sure these classes work?
RecordingLfdEnvironment, RecordingRopePositionsSceneState, TimestepState
Again, if they are mature and if it would be beneficial for other projects, their current modules are OK. But if this is still experimental, put it in another subpackage or in another branch.

test/test_registration.py Arithmetic exception at end of test

When test/test_registration.py is run, the tests seem to pass, but there is an Arithmetic exception at the end of the test. I am using OpenRave installed from source branch latest-stable.

gdb output and backtrace

(gdb) run test/test_registration.py
Starting program: /usr/bin/python test/test_registration.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
You can set logging level with TRAJOPT_LOG_THRESH. Valid values: FATAL ERROR WARN INFO DEBUG TRACE. Defaulting to INFO
.computing costs: no solver... done in 34.4093010426s
computing costs: solver... done in 16.0090970993s
computing costs: cached solver... done in 15.1748859882s
couldn't run GPU tests since the GPU is not configured properly
.
----------------------------------------------------------------------
Ran 2 tests in 82.713s

OK

Program received signal SIGFPE, Arithmetic exception.
0x00007ffff1330393 in crlibm_exit () from /usr/local/lib/libopenrave0.9.so.0
(gdb) backtrace
#0  0x00007ffff1330393 in crlibm_exit () from /usr/local/lib/libopenrave0.9.so.0
#1  0x00007ffff124f444 in OpenRAVE::RaveGlobal::Destroy() ()
   from /usr/local/lib/libopenrave0.9.so.0
#2  0x00007ffff124eadd in OpenRAVE::RaveGlobal::~RaveGlobal() ()
   from /usr/local/lib/libopenrave0.9.so.0
#3  0x00007ffff124ed86 in OpenRAVE::RaveGlobal::~RaveGlobal() ()
   from /usr/local/lib/libopenrave0.9.so.0
#4  0x00007ffff126def0 in void boost::checked_delete<OpenRAVE::RaveGlobal>(OpenRAVE::RaveGlobal*)
    () from /usr/local/lib/libopenrave0.9.so.0
#5  0x00007ffff1270c78 in boost::detail::sp_counted_impl_p<OpenRAVE::RaveGlobal>::dispose() ()
   from /usr/local/lib/libopenrave0.9.so.0
#6  0x00007ffff1104bc0 in boost::detail::sp_counted_base::release() ()
   from /usr/local/lib/libopenrave0.9.so.0
#7  0x00007ffff1104c83 in boost::detail::shared_count::~shared_count() ()
   from /usr/local/lib/libopenrave0.9.so.0
#8  0x00007ffff124fb86 in boost::shared_ptr<OpenRAVE::RaveGlobal>::~shared_ptr() ()
   from /usr/local/lib/libopenrave0.9.so.0
#9  0x00007ffff7832149 in __run_exit_handlers (status=0, listp=0x7ffff7bb56c8 <__exit_funcs>,
    run_list_atexit=run_list_atexit@entry=true) at exit.c:82
#10 0x00007ffff7832195 in __GI_exit (status=<optimized out>) at exit.c:104
#11 0x000000000042fb83 in Py_Exit ()
#12 0x000000000042fcb9 in ?? ()
---Type <return> to continue, or q <return> to quit---
#13 0x000000000042ec32 in PyErr_PrintEx ()
#14 0x0000000000469f2f in PyRun_SimpleFileExFlags ()
#15 0x000000000046ab81 in Py_Main ()
#16 0x00007ffff7817ec5 in __libc_start_main (main=0x46ac3f <main>, argc=2, argv=0x7fffffffdc58,
    init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>,
    stack_end=0x7fffffffdc48) at libc-start.c:287
#17 0x000000000057497e in _start ()

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.