rll / lfd

LfD: Learning from Demonstrations for Robotic Manipulation
Other
47 stars 16 forks source link

Segfault when running the test suite #5

Closed rgleichman closed 10 years ago

rgleichman commented 10 years ago

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
dhadfieldmenell commented 10 years ago

The issue in register.py is a known bug. There should be a fix soon. @antingshen do you know anything about issues with the Manipulator class?

I haven't seen the other issues before.

alexlee-gk commented 10 years ago

Can you check which test is failing? That command basically runs all test files in the test/ directory (i.e. test_registration.py and test_simulation.py).

move_box.py and move_rope.py might be failing because GetArmDOFValues() is not defined in OpenRAVE 0.8. This repo requires OpenRAVE 0.9 or later. In addition, are you using the trajopt version from the README?

record_sim.py should be fixed with issue #6

register.py should be fixed with issue #3

rgleichman commented 10 years ago

The test test_registration.py fails with the segfault. The other test test_simulation.py seems to work. The segfault from test_registration.py is caused by importing cloudprocpy (see ipython output below).

For trajopt I am using the trajopt-jointopt branch of git@github.com:erictzeng/trajopt.git OpenRAVE 0.9 is installed pcl 1.7 is installed with sudo apt-get install libpcl-1.7-all

In [1]: from lfd.rapprentice import clouds

In [2]: clouds.downsample('','')
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-624f2a19b00b> in <module>()
----> 1 clouds.downsample('','')

/home/robbie/git/robbie/lfd/lfd/rapprentice/clouds.pyc in downsample(xyz, v)
     26 
     27 def downsample(xyz, v):
---> 28     import cloudprocpy
     29     if xyz.shape[1] == 3:
     30         cloud = cloudprocpy.CloudXYZ()

ImportError: /home/robbie/git/erict/trajopt/build_trajopt/lib/cloudprocpy.so: undefined symbol: _ZN9cloudproc15downsampleCloudIN3pcl8PointXYZEEENS1_10PointCloudIT_E3PtrENS5_8ConstPtrEf

In [3]: import cloudprocpy
Segmentation fault (core dumped)
alexlee-gk commented 10 years ago

Can you paste the configured cmake variables here? You can get those by running cmake -L in your trajopt build directory.

rgleichman commented 10 years ago
robbie@bluefin:~/git/erict/trajopt/build_trajopt$ cmake -L
CMake Error: The source directory "/home/robbie/git/erict/trajopt/build_trajopt" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
-- Cache values
BOOST_THREAD_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpthread.so
BUILD_CLOUDPROC:BOOL=ON
BUILD_HUMANOIDS:BOOL=OFF
BUILD_SANDBOX:BOOL=OFF
BUILD_SENSORSIM:BOOL=OFF
BUILD_SHARED_LIBS:BOOL=OFF
CMAKE_BUILD_TYPE:STRING=Release
CMAKE_INSTALL_PREFIX:PATH=/usr/local
DEVEL_MODE:BOOL=OFF
FLANN_INCLUDE_DIRS:PATH=/usr/include
FLANN_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libflann_cpp_s.a
FLANN_LIBRARY_DEBUG:FILEPATH=/usr/lib/x86_64-linux-gnu/libflann_cpp_s.a
LIBUSB_1_INCLUDE_DIR:PATH=/usr/include
LIBUSB_1_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libusb-1.0.so
OPENNI_INCLUDE_DIRS:PATH=/usr/include/ni
OPENNI_LIBRARY:FILEPATH=/usr/lib/libOpenNI.so
OPENTHREADS_INCLUDE_DIR:PATH=/usr/include
OPENTHREADS_LIBRARY:FILEPATH=/usr/lib/libOpenThreads.so
OPENTHREADS_LIBRARY_DEBUG:FILEPATH=OPENTHREADS_LIBRARY_DEBUG-NOTFOUND
OSGDB_INCLUDE_DIR:PATH=/usr/include
OSGDB_LIBRARY:FILEPATH=/usr/lib/libosgDB.so
OSGDB_LIBRARY_DEBUG:FILEPATH=OSGDB_LIBRARY_DEBUG-NOTFOUND
OSGGA_INCLUDE_DIR:PATH=/usr/include
OSGGA_LIBRARY:FILEPATH=/usr/lib/libosgGA.so
OSGGA_LIBRARY_DEBUG:FILEPATH=OSGGA_LIBRARY_DEBUG-NOTFOUND
OSGUTIL_INCLUDE_DIR:PATH=/usr/include
OSGUTIL_LIBRARY:FILEPATH=/usr/lib/libosgUtil.so
OSGUTIL_LIBRARY_DEBUG:FILEPATH=OSGUTIL_LIBRARY_DEBUG-NOTFOUND
OSGVIEWER_INCLUDE_DIR:PATH=/usr/include
OSGVIEWER_LIBRARY:FILEPATH=/usr/lib/libosgViewer.so
OSGVIEWER_LIBRARY_DEBUG:FILEPATH=OSGVIEWER_LIBRARY_DEBUG-NOTFOUND
OSG_INCLUDE_DIR:PATH=/usr/include
OSG_LIBRARY:FILEPATH=/usr/lib/libosg.so
OSG_LIBRARY_DEBUG:FILEPATH=OSG_LIBRARY_DEBUG-NOTFOUND
OpenRAVE_DIR:PATH=/usr/local/lib/cmake/openrave-0.9
OpenRAVE_LIBRARY_SUFFIX:STRING=0.9
PCL_APPS_INCLUDE_DIR:PATH=/usr/include/pcl-1.7
PCL_COMMON_INCLUDE_DIR:PATH=/usr/include/pcl-1.7
PCL_DIR:PATH=/usr/share/pcl-1.7
PCL_FEATURES_INCLUDE_DIR:PATH=/usr/include/pcl-1.7
PCL_FILTERS_INCLUDE_DIR:PATH=/usr/include/pcl-1.7
PCL_GEOMETRY_INCLUDE_DIR:PATH=/usr/include/pcl-1.7
PCL_IO_INCLUDE_DIR:PATH=/usr/include/pcl-1.7
PCL_KDTREE_INCLUDE_DIR:PATH=/usr/include/pcl-1.7
PCL_KEYPOINTS_INCLUDE_DIR:PATH=/usr/include/pcl-1.7
PCL_OCTREE_INCLUDE_DIR:PATH=/usr/include/pcl-1.7
PCL_OUTOFCORE_INCLUDE_DIR:PATH=/usr/include/pcl-1.7
PCL_PEOPLE_INCLUDE_DIR:PATH=/usr/include/pcl-1.7
PCL_RECOGNITION_INCLUDE_DIR:PATH=/usr/include/pcl-1.7
PCL_REGISTRATION_INCLUDE_DIR:PATH=/usr/include/pcl-1.7
PCL_SAMPLE_CONSENSUS_INCLUDE_DIR:PATH=/usr/include/pcl-1.7
PCL_SEARCH_INCLUDE_DIR:PATH=/usr/include/pcl-1.7
PCL_SEGMENTATION_INCLUDE_DIR:PATH=/usr/include/pcl-1.7
PCL_SURFACE_INCLUDE_DIR:PATH=/usr/include/pcl-1.7
PCL_TRACKING_INCLUDE_DIR:PATH=/usr/include/pcl-1.7
PCL_VISUALIZATION_INCLUDE_DIR:PATH=/usr/include/pcl-1.7
QHULL_INCLUDE_DIRS:PATH=/usr/include
QHULL_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libqhull.so
QHULL_LIBRARY_DEBUG:FILEPATH=/usr/lib/x86_64-linux-gnu/libqhull.so
_PYTHON_NUMPY_INCLUDE_DIR:PATH=/usr/lib/python2.7/dist-packages/numpy/core/include/numpy
gtest_build_samples:BOOL=OFF
gtest_build_tests:BOOL=OFF
gtest_disable_pthreads:BOOL=OFF
gtest_force_shared_crt:BOOL=OFF
alexlee-gk commented 10 years ago

You might want to do ldd cloudprocpy.so to see which library is not linking properly and then see if the missing library can't be seen from the path.

rgleichman commented 10 years ago

The import cloudproc issue is fixed with https://github.com/erictzeng/trajopt/pull/1. I will create a new issue for GetArmDOFValues since GetArmDOFValues is not included in the latest-stable branch of OpenRave. The tests seem to pass, but at the end of running test_registration there is an Arithmetic exception. I will make another issue for that.