Git Product home page Git Product logo

iris-distro's Introduction

Introduction

This package contains the IRIS algorithm for iterative convex regional inflation by semidefinite programming, implemented in C++ with bindings for Python. It is designed to take an environment containing many (convex) obstacles and a start point, and to compute a large convex obstacle-free region. This region can then be used to define linear constraints for some other objective function which the user might want to optimize over the obstacle-free space. The algorithm is described in:

R. L. H. Deits and R. Tedrake, “Computing large convex regions of obstacle-free space through semidefinite programming,” Workshop on the Algorithmic Fundamentals of Robotics, Istanbul, Aug. 2014. [Online]. Available: http://groups.csail.mit.edu/robotics-center/public_papers/Deits14.pdf

Build Status

MATLAB Support

A pure-MATLAB implementation of IRIS is also included in src/matlab. This will be slower and less flexible than the Python and C++ versions, but may be useful for legacy code.

Requirements

Ubuntu (with apt-get):

pkg-config
cmake
libgmp-dev

Mac OSX (with homebrew):

pkg-config
cmake
gmp

You'll also need some python packages to build and use the python bindings. You can install them on ubuntu with these apt-get packages:

python-numpy
python-scipy
python-matplotlib
python-nose
cython

Or you can install the liblapack-dev, libblas-dev, and gfortran packages from apt-get, and then install the python modules with pip:

pip install -r python_requirements.txt

You'll also need a license for the Mosek optimization toolbox https://www.mosek.com/ (this package includes a downloader for the Mosek code, but you have to get your own license). Mosek has free licenses available for academic use.

Installation

This project is configured as a standard CMake project, so the general build process is:

mkdir build
cd build
cmake ..
make

Installation without externals

By default, IRIS will build its external dependencies as part of the build process. If you want to turn any or all of them off, you can set the WITH_EIGEN, WITH_CDD, and WITH_MOSEK options to OFF using cmake. The easiest way to do that is to run:

cd build
ccmake .

which will launch a terminal-based GUI to let you change those options.

If you're using IRIS as part of another project with cmake, you can just set the CMAKE_CACHE_ARGS to include -DIRIS_WITH_EIGEN:BOOL=OFF etc. For more information, see: http://www.cmake.org/cmake/help/v3.0/module/ExternalProject.html.

Example Usage

Python wrapper

python -m irispy.test.test_iris_2d

C++ library

See iris/src/iris_demo.cpp for a basic usage example.

Examples

Here are some animations of the algorithm running in various environments:

2-dimensional space, 30 obstacles:

2-dimensional space, 50 obstacles:

2-dimensional space, 50 obstacles:

2-dimensional space, 1000 obstacles:

3-dimensional space:

3-dimensional space:

3-dimensional configuration space of a rod-shaped robot translating and yawing:

3-dimensional slice of a 4-dimensional region among 4D obstacles:

Example Application

This is a demonstration of path-planning for a simple UAV model around obstacles. Rather than constraining that the UAV be outside the obstacles, we seed several IRIS regions and require that the UAV be inside one of those regions at each time step. This turns a non-convex problem into a mixed-integer convex problem, which we can solve to its global optimum. You can try this out by running iris.test.test_uav_demo(); or iris.test.test_uav_demo('4d');

iris-distro's People

Contributors

andybarry avatar edowson avatar jwnimmer-tri avatar kuindersma avatar psiorx avatar rdeits avatar russtedrake avatar tkoolen avatar wxmerkt 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iris-distro's Issues

irispy not found

Hi Robin,

I installed iris from your repo following the instructions, yet when trying to run "python -m irispy.test.test_iris_2d", python cannot find the irispy module. This happens in both python2 and python3. Any idea why?

Thanks!
Yuxiao

test_poly_2d failed

Hi, I followed the guide to build the library from source, but when I try to run the test I get the following error:

import iris.test.*;
test_poly_2d;
Undefined function 'Model' for input arguments of type 'char'.

Error in iris.thirdParty.mosek_lownerjohn.lownerjohn_ellipsoid.lownerjohn_inner (line 61)
M = Model('lownerjohn_inner');

Error in iris.inner_ellipsoid.mosek_ellipsoid (line 3)
[C,d] = lownerjohn_ellipsoid.lownerjohn_inner(A,b);

Error in iris.maximal_ellipse (line 4)
[C, d] = iris.inner_ellipsoid.mosek_ellipsoid(A, b);

Error in iris.inflate_region (line 61)
[C, d, cvx_optval] = maximal_ellipse(A,b);

Error in iris.test.test_poly_2d (line 22)
[A,b,C,d,results] = inflate_region(obstacle_pts, A_bounds, b_bounds, start, []);

Invalid region returned when there are obstacles that exceed the bounds.

Hello,

I'm not sure if this is a bug, or if obstacles are not allowed to exceed the bounds and this is expected behavior.

Basically, IRIS is returning a degenerate region that is invalid when there are obstacles that intersect the environment bounds.

The left figure shows, in green, the region that IRIS returns when using the obstacles in blue, the seed point as the red cross and when the boundary is the large box with black edges.

On the right, the same result when the boundary used is the yellow area instead. As you can see the region returned consists of three vertices where two of them are the same point. Moreover, one of those vertices is outside the boundary.

Just leaving this here in case this is something that should be fixed.
By the way, thanks for making this available, Robin. It works fantastically well and it's really easy to use!

iris_issue

The vertices of the regions are:

IRIS region when using big bounds:
 [[  3.86205232   2.89598565]
 [  4.12493869   5.        ]
 [ 15.           1.83012696]
 [ 15.           5.        ]]
IRIS region when using small bounds:
 [[  3.75000000e+00   2.00000000e+00]
 [  3.75000000e+00   2.00002585e+00]
 [  4.20400665e-12   5.03153075e-13]]

The code I used to generate this problem is the following (Jupyter notebook):

%matplotlib inline
import irispy
import matplotlib.pyplot as plt
import numpy as np
import scipy

def plot_polygon(vertices, ax=None, draw_vertices=False, **kwargs):
        if ax is None:
            ax = plt.gca()
        hull = scipy.spatial.ConvexHull(vertices)
        kwargs.setdefault("facecolor", "none")
        
        if draw_vertices:
            xx, yy = list(zip(*vertices))
            plt.plot(xx, yy, 'o',color='red')
        
        return [ax.add_patch(plt.Polygon(xy=vertices[hull.vertices],**kwargs))]
def plot_bounds(bounds, ax=None, **kwargs):
    (minx, miny), (maxx, maxy) = bounds
    vertices = np.array([[minx,miny], [minx,maxy], [maxx, maxy], [maxx, miny]])
    plot_polygon(vertices, ax, **kwargs)

def plot_scenario():
    # Plot big boundary
    plt.figure(figsize=(14,7))
    for i in range(2):
        plt.subplot(1,2,i+1)
        plot_bounds(big_bounds, alpha=0.3, facecolor='none', edgecolor='black')

        plt.xlim([minx-1, maxx+1])
        plt.ylim([miny-1, maxy+1])

        for obs in obstacles:
            vertices = np.array(list(zip(*obs)))
            plot_polygon(vertices,facecolor='blue', alpha=0.5)

        # Plot seed
        plt.plot(seed[0], seed[1], 'xr')
    
    
# Case with no errors
big_bounds = (-5, -4), (15, 5)
small_bounds = (3.75, 2.0), (8, 3.88)
(minx, miny), (maxx, maxy) = big_bounds
obstacles = [np.array([[  3. ,  10. ,  10. ,   3. ,   3. ],
        [  1.5,   1.5,   2. ,   2. ,   1.5]]),
         np.array([[ 2.,  3.,  4.,  3.,  2.],
        [-4.,  4.,  4., -4., -4.]]),
         np.array([[ 7. ,  7.5,  8. ,  7.5,  7. ],
        [-2. , -2. ,  2.5,  2.5, -2. ]])]
seed = np.array([ 6.25318857,  2.48619646])

plot_scenario()

plt.subplot(1,2,1)
# with big bounds
iris_bounds = irispy.Polyhedron.fromBounds(*big_bounds)
ir = irispy.inflate_region(obstacles, seed, iris_bounds)    
reg_vertices1 = ir.getPolyhedron().getDrawingVertices()
plot_polygon(reg_vertices1, draw_vertices=True, facecolor='green', alpha=0.2)


plt.subplot(1,2,2)
# with small bounds
plot_bounds(small_bounds, alpha=0.3, facecolor='yellow', edgecolor='black')
iris_bounds = irispy.Polyhedron.fromBounds(*small_bounds)
ir = irispy.inflate_region(obstacles, seed, iris_bounds)    
reg_vertices2 = ir.getPolyhedron().getDrawingVertices()
plot_polygon(reg_vertices2, draw_vertices=True, facecolor='green', alpha=0.2)

print("IRIS region when using big bounds:\n", reg_vertices1)
print("IRIS region when using small bounds:\n", reg_vertices2)

CVXGEN doesn't compile in cmake on my x64 ubuntu 14.04

Character escapes didn't function with the matlab call to generate the mex in "cvxgen/CMakelists.txt"
So the make command errored out.

Fixed by changing the relevant part of "cvxgen/CMakelists.txt" to:

set (MATLAB_EXEC "matlab" "-nodesktop" "-nosplash" "-r")
set (MATLAB_CMD "make_csolve,exit")
add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/cvxgen_ldp_mex.${mex_suffix}
  COMMAND ${MATLAB_EXEC} ${MATLAB_CMD}
  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})

Undefined reference errors while trying to run iris_demo.cpp

I have followed the instruction for installation of the package. Also, I have tested the iris_wrapper by running the example that was provided in build/install/lib/python3.6/dist-packages (irispy.test.test_iris_2d) and it is working fine.

The problem arises when I want to run the c++ demo file in iris/src/iris_demo.cpp.
I use g++ -std=c++11 iris_demo.cpp. and the following error is shown:

/tmp/ccKCnNB6.o: In function `main':
iris_demo.cpp:(.text+0xa4): undefined reference to `iris::IRISProblem::setSeedPoint(Eigen::Matrix<double, -1, 1, 0, -1, 1>)'
iris_demo.cpp:(.text+0x1bf): undefined reference to `iris::IRISProblem::addObstacle(Eigen::Matrix<double, -1, -1, 0, -1, -1>)'
iris_demo.cpp:(.text+0x2ae): undefined reference to `iris::IRISProblem::addObstacle(Eigen::Matrix<double, -1, -1, 0, -1, -1>)'
iris_demo.cpp:(.text+0x39d): undefined reference to `iris::IRISProblem::addObstacle(Eigen::Matrix<double, -1, -1, 0, -1, -1>)'
iris_demo.cpp:(.text+0x484): undefined reference to `iris::IRISProblem::addObstacle(Eigen::Matrix<double, -1, -1, 0, -1, -1>)'
iris_demo.cpp:(.text+0x4c4): undefined reference to `iris::inflate_region(iris::IRISProblem const&, iris::IRISOptions const&, iris::IRISDebugData*)'
iris_demo.cpp:(.text+0x4d7): undefined reference to `iris::Ellipsoid::getC() const'
iris_demo.cpp:(.text+0x514): undefined reference to `iris::Ellipsoid::getD() const'
/tmp/ccKCnNB6.o: In function `iris::IRISProblem::IRISProblem(int)':
iris_demo.cpp:(.text._ZN4iris11IRISProblemC2Ei[_ZN4iris11IRISProblemC5Ei]+0x2d): undefined reference to `iris::Polyhedron::Polyhedron(int)'
iris_demo.cpp:(.text._ZN4iris11IRISProblemC2Ei[_ZN4iris11IRISProblemC5Ei]+0x4f): undefined reference to `iris::Ellipsoid::Ellipsoid(int)'
collect2: error: ld returned 1 exit status

Can you possibly help me to solve this problem? Am I missing anything?

Thanks.

Cannot compile

Hi Robin,

Thanks for your great work of IRIS. Recently, I am trying to apply it in my research, but unfortunately, the code cannot be compiled for the same issue https://github.com/rdeits/iris-distro/issues/89. I know that drake has already include IRIS, but your example code was not in their tutorial. Can you please help to get them work or write a tutorial there? That will be very promising for the other researchers to apply your method.

Thanks and regards,

Chen

compile error on mac

tried updating to the latest branch in drake-distro, but got this error compiling on my mac:

[100%] Building C object cvxgen/CMakeFiles/iris_ldp.dir/util.c.o
Linking C shared library ../lib/libiris_ldp.dylib
Undefined symbols for architecture x86_64:
"_params", referenced from:
_multbymA in matrix_support.c.o
_multbymAT in matrix_support.c.o
_fill_KKT in ldl.c.o
"_settings", referenced from:
_set_defaults in solver.c.o
_set_start in solver.c.o
_refine in solver.c.o
_solve in solver.c.o
_ldl_solve in ldl.c.o
_ldl_factor in ldl.c.o
"_vars", referenced from:
_setup_pointers in solver.c.o
_setup_indexing in solver.c.o
_solve in solver.c.o
"_work", referenced from:
_eval_gap in solver.c.o
_setup_pointers in solver.c.o
_setup_indexing in solver.c.o
_set_start in solver.c.o
_eval_objv in solver.c.o
_fillrhs_aff in solver.c.o
_fillrhs_cc in solver.c.o
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [lib/libiris_ldp.dylib] Error 1
make[2]: *** [cvxgen/CMakeFiles/iris_ldp.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2

MacPorts: ./cddmp.h:31:11: fatal error: 'gmp.h' file not found

I get the following error while trying to build iris-bistro, as part of a drake-superbuild, using MacPorts 2.3.4 on Mac OS X 10.10.5 with Xcode 7.0.0 and MATLAB R2015a.

[  5%] Performing build step for 'cdd_project'
Making all in lib-src
Making all in src
Making all in lib-src-gmp
libtool: compile:  gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"cddlib\" -DVERSION=\"0.94\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBGMP=1 -DSTDC_HEADERS=1 -I. -I/usr/local/include -DGMPRATIONAL -g -O2 -MT cddcore.lo -MD -MP -MF .deps/cddcore.Tpo -c cddcore.c  -fno-common -DPIC -o .libs/cddcore.o
In file included from cddcore.c:14:
In file included from ./cdd.h:18:
./cddmp.h:31:11: fatal error: 'gmp.h' file not found
 #include "gmp.h"
          ^
1 error generated.

With a HomeBrew installation, the gmp.h header file can be found because it is installed by default into /usr/local/include.

MacPorts however, installs the gmp.h header file into /opt/local/include

Adding the CXXFLAGS='-I/opt/local/include' does not work :

if (IRIS_WITH_CDD)
    set(CDD_PROJECT_SRC_DIR ${CMAKE_CURRENT_BINARY_DIR}/cdd_project-prefix/src/cdd_project)
    ExternalProject_Add(cdd_project
        URL ftp://ftp.ifor.math.ethz.ch/pub/fukuda/cdd/cddlib-094h.tar.gz
        CONFIGURE_COMMAND ${CDD_PROJECT_SRC_DIR}/configure --prefix=${CMAKE_INSTALL_PREFIX} CXXFLAGS='-I/opt/local/include'
        BUILD_COMMAND make
        BUILD_IN_SOURCE 1
        )
    set(iris_dependencies ${iris_dependencies} cdd_project)
endif()

Unable to install cddlib

Hello,

I'm currently trying to install iris, but it seems that those two lines are complaining when I try to install.

In fact, I got this error message:
image

This sounds like very similar issue to this issue but I could not install iris even though I modified URL based on this page.

So, it'd be very appreciated if you would let me know the correct URL and hash in CMakeLists.txt. Thank you so much!

import error on Mac 10.9 with homebrew python

$ python
Python 2.7.8 (default, Oct 8 2014, 09:44:26)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.51)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

import scipy
scipy.version
'0.14.0'

import irispy
import irispy.iris
Traceback (most recent call last):
File "", line 1, in
File "/Users/pat/source/drc/drc/software/build/lib/python2.7/dist-packages/irispy/iris.py", line 5, in
from irispy.hyperplanes import compute_obstacle_planes
File "/Users/pat/source/drc/drc/software/build/lib/python2.7/dist-packages/irispy/hyperplanes.py", line 5, in
import irispy.ldp_cvxgen
File "/Users/pat/source/drc/drc/software/build/lib/python2.7/dist-packages/irispy/ldp_cvxgen.py", line 8, in
_cvxgen_lib = np.ctypeslib.load_library('cvxgen_ldp.so', os.path.dirname(os.path.realpath(file)))
File "/usr/local/lib/python2.7/site-packages/numpy/ctypeslib.py", line 123, in load_library
return ctypes.cdll[libpath]
File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/init.py", line 440, in getitem
return getattr(self, name)
File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/init.py", line 435, in getattr
dll = self._dlltype(name)
File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/init.py", line 365, in init
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Users/pat/source/drc/drc/software/build/lib/python2.7/dist-packages/irispy/cvxgen_ldp.so, 6): no suitable image found. Did find:
/Users/pat/source/drc/drc/software/build/lib/python2.7/dist-packages/irispy/cvxgen_ldp.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00

Broken notebooks

Hi,
I have just tried to see some of the notebooks, but they seems to be broken:

  • mosek_exploration
 ---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-65b0bb1a0eb5> in <module>()
----> 1 from irispy.mosek_ldp import mosek_ldp
      2 from irispy.gurobi_ldp import gurobi_ldp, gurobi_ldp_small
      3 import irispy.gurobi_ldp; reload(irispy.gurobi_ldp)

/home/andrea/github/iris-distro/iris/cython/irispy/__init__.py in <module>()
----> 1 from iriscore import Polyhedron, Ellipsoid, inflate_region

ImportError: No module named iriscore
  • irispy_experiments
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
<ipython-input-7-c31a48da52c9> in <module>()
      3 problem.setSeedPoint(np.array([0.0, 0.0]))
      4 problem.addObstacle(np.array([[1.5, 2], [1.5, 2]]))
----> 5 region = irispy.inflate_region(problem, irispy.IRISOptions())

/home/andrea/github/iris-distro/build/lib/python2.7/dist-packages/irispy/irispy.pyc in inflate_region(obstacles, start_point_or_ellipsoid, bounds, require_containment, required_containment_points, error_on_infeasible_start, termination_threshold, iter_limit, return_debug_data)
     16         # Assume it's a starting point instead
     17 
---> 18         seed_ellipsoid = Ellipsoid.fromNSphere(start_point_or_ellipsoid)
     19     else:
     20         seed_ellipsoid = start_point_or_ellipsoid

/home/andrea/github/iris-distro/build/lib/python2.7/dist-packages/irispy/iris_wrapper.pyc in fromNSphere(*args)
    394         fromNSphere(Eigen::VectorXd & center) -> Ellipsoid
    395         """
--> 396         return _iris_wrapper.Ellipsoid_fromNSphere(*args)
    397 
    398     fromNSphere = staticmethod(fromNSphere)

NotImplementedError: Wrong number or type of arguments for overloaded function 'Ellipsoid_fromNSphere'.
  Possible C/C++ prototypes are:
    iris::Ellipsoid::fromNSphere(Eigen::VectorXd &,double)
    iris::Ellipsoid::fromNSphere(Eigen::VectorXd &)

test_poly_2d fail...

Hi,

I am interested in IRIS algorithm. I have followed the instructions. But when I tried to run the test_poly_2d, I get an error.
I am using Windows 8.1 64 bits and Matlab 2015a

I added the .jar mosek in my java path and the matlab directory

javaaddpath('C:\Program Files\Mosek\7\tools\platform\win64x86\bin\mosekmatlab.jar');
addpath 'C:\Users\Jonathan\Documents\MATLAB\iris-distro-master\matlab'
import iris.test.*;
test_poly_2d;

and I get

Undefined function or variable 'cvxgen_ldp_mex'.

Error in iris.least_distance.cvxgen_ldp (line 9)
[vars, ~] = cvxgen_ldp_mex(struct('Y', Y), struct('verbose', 0));

Error in iris.separating_hyperplanes (line 48)
ystar = iris.least_distance.cvxgen_ldp(ys);

Error in iris.inflate_region (line 32)
[A, b, infeas_start] = separating_hyperplanes(obstacle_pts, C, d);

Error in iris.test.test_poly_2d (line 22)
[A,b,C,d,results] = inflate_region(obstacle_pts, A_bounds, b_bounds, start, []);

Thank you,

Jonathan

Issues loading IRIS in director - cannot load any more module with static TLS

System: Ubuntu 14.04 Trusty, oh-distro-private installed (i7. 16GB)

Director crashes upon start with:

Traceback (most recent call last):
  File "<string>", line 7, in <module>
  File "/home/theo/software/oh-distro-private/software/build/lib/python2.7/dist-packages/director/startup.py", line 7, in <module>
    from director import irisdriver
  File "/home/theo/software/oh-distro-private/software/build/lib/python2.7/dist-packages/director/irisdriver.py", line 5, in <module>
    from director import irisUtils
  File "/home/theo/software/oh-distro-private/software/build/lib/python2.7/dist-packages/director/irisUtils.py", line 3, in <module>
    from irispy.utils import lcon_to_vert
  File "/home/theo/software/oh-distro-private/software/build/lib/python2.7/dist-packages/irispy/__init__.py", line 1, in <module>
    from irispy import inflate_region, Polyhedron, Ellipsoid, IRISRegion, IRISOptions, IRISProblem
  File "/home/theo/software/oh-distro-private/software/build/lib/python2.7/dist-packages/irispy/irispy.py", line 1, in <module>
    from iris_wrapper import IRISOptions, IRISRegion, IRISProblem, IRISDebugData, Ellipsoid, Polyhedron
  File "/home/theo/software/oh-distro-private/software/build/lib/python2.7/dist-packages/irispy/iris_wrapper.py", line 28, in <module>
    _iris_wrapper = swig_import_helper()
  File "/home/theo/software/oh-distro-private/software/build/lib/python2.7/dist-packages/irispy/iris_wrapper.py", line 24, in swig_import_helper
    _mod = imp.load_module('_iris_wrapper', fp, pathname, description)
ImportError: dlopen: cannot load any more object with static TLS

@wxmerkt recommended LD_PRELOADing _iris_wrapper.so and this solves the problem locally.

osx compile error

Running make gets me:
[ 2%] Performing build step for 'cdd_project'
Making all in lib-src
Making all in src
Making all in lib-src-gmp
Making all in src-gmp
libtool: link: gcc -g -O2 -o .libs/fourier_gmp fourier.o -L/usr/local/lib ../lib-src-gmp/.libs/libcddgmp.dylib
Undefined symbols for architecture x86_64:
"___gmpq_clear", referenced from:
_main in fourier.o
"___gmpq_init", referenced from:
_main in fourier.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[5]: *** [fourier_gmp] Error 1
make[4]: *** [all-recursive] Error 1
make[3]: *** [cdd_project-prefix/src/cdd_project-stamp/cdd_project-build] Error 2
make[2]: *** [CMakeFiles/cdd_project.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2

Python: Illegal instruction (core dumped)

System: Freshly installed Ubuntu 18.04 with required packages installed
Python: python3.6.9
cmake: cmake version 3.10.2
g++/gcc: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0

Successfully make IRIS package and obtained iris_wrapper.cpython-36m-x86_64-linux-gnu.so from iris-distro/build/install/lib/python3.6/dist-packages/irispy

Running Test Code

python -m irispy.test.test_iris_2d
## The Response
Loading cdd global constants
Illegal instruction (core dumped)

I have put print statements in the built irispy folder to find which segment of the code incurred this error.

This happens when c_inflate_region function was called this is imported as such:

from .iris_wrapper import inflate_region as c_inflate_region
## some code and function
 if return_debug_data:
        debug = IRISDebugData()
        region = c_inflate_region(problem, options, debug)
        return region, debug
    else:
        region = c_inflate_region(problem, options)
        return region

I believe this is an issue with the compiled file iris_wrapper.cpython-36m-x86_64-linux-gnu.so

How could I proceed with this? I have re-installed my Ubuntu and to just build IRIS from the clean OS, the same error persist.

Thank you.

Error in the 3D case with thin triangle like obstacles

Problem setup

I am trying to approximate the largest convex region in the 3D case, where the obstacles are thin triangles, and they are together, creating a 3D concave surface. Like in this picture:
tile_surf_3d

I provide the iris algorithm an initial point that is certainly inside of the surface.

Issue 1

I receive 1 out of 10 optimizations with the following errors:

  1. MSK_RES_ERR_LOWER_BOUND_IS_A_NAN: The lower bound specified is not a number (nan).
  2. Inner ellipsoid problem is infeasible (this likely means that the polyhedron has no interior)

Does somebody know what can cause the problem?

Issue 2 - Solved

Another issue is that sometimes, the approximated polyhedron collapses, although the ellipse grows (iteration 3):
iris_iterations

The collapsing polyhedron comes from the numerically unstable cddlib, the half-space representation is correct.

iris takes a lot cpu resources

Hi there,

I'm struggling with a problem that when running inflate_region from the Python interface, it automatically takes more than 1000% CPU usage. This has caused all our program to slow down a lot. I suspect it originates from some internal computation in Eigen3 or MOSEK using multiple threads but couldn't find out how to disable it or constraint it to use only up to 100% CPU. I've tried to set the environment variables for multi threading such as MSK_IPAR_INTPNT_MULTI_THREAD, MSK_IPAR_NUM_THREADS, NUM_OMP_THREADS, MKL_NUM_THREADS and Eigen::setThreads() in the iris.cpp: inflate_region function but nothing helped. Any advice or hints would be highly appreciated.

Mosek-src not found, no such repository

After making relevant changes in Cmakelist for the eigen library, make gets stuck at mosek git clone and after searching for this repo, it's seems that this repo has been removed. What to do now?

OSX 10.11.2 El Capitan compile error (cddlib)

IRIS fails to compile in my computer running OSX 10.11.2 El Capitan because cddlib fails to compile.

I get the errors:

/bin/sh ../libtool --tag=CC   --mode=link gcc  -g -O2 -L/usr/local/lib  -o fourier_gmp fourier.o ../lib-src-gmp/libcddgmp.la
libtool: link: gcc -g -O2 -o .libs/fourier_gmp fourier.o  -L/usr/local/lib ../lib-src-gmp/.libs/libcddgmp.dylib
Undefined symbols for architecture x86_64:
  "___gmpq_clear", referenced from:
      _main in fourier.o
  "___gmpq_init", referenced from:
      _main in fourier.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [fourier_gmp] Error 1
make: *** [all-recursive] Error 1

That originate when trying to compile the folder src-gmp.

The problem is that it should be linking gmp, but it doesn't.
That is, from the src-gmp folder the make file is trying to do:

bin/sh ../libtool --tag=CC   --mode=link gcc  -g -O2 -L/usr/local/lib  -o fourier_gmp fourier.o ../lib-src-gmp/libcddgmp.la

which fails. However, adding -lgmp:

bin/sh ../libtool --tag=CC   --mode=link gcc  -g -O2 -L/usr/local/lib  -o fourier_gmp fourier.o ../lib-src-gmp/libcddgmp.la -lgmp

works fine. This happens for all the .o compontents of src-gmp.

Logically this also fails when trying to install Drake WITH_IRIS=ON.

A quick crappy fix consists on changing line 258 of Makefile in cdd_project/src-gmp/Makefile from:

LDADD = ../lib-src-gmp/libcddgmp.la

to

LDADD = ../lib-src-gmp/libcddgmp.la -lgmp

Then Drake builds properly.

The really weird thing is that I'm able to install cddlib using homebrew from source without issues. The formula is here but it doesn't seem to be doing anything at all about this. The homebrew formula points to an older version of cddlib (0.94g) while IRIS downloads (0.94h). However, I've tried to compile both versions standalone and I get the same errors unless adding the -lgmp flag.

Has anyone else seen this using OSX El Capitan?

Thanks!

cannot import name 'types' from 'vkbottle'

Hi,

I was trying to use your tool by using Python and getting the following issue:

ImportError: cannot import name 'types' from 'vkbottle' (/home/main/Software/iris-distro-master/env/lib/python3.8/site-packages/vkbottle/init.py)

I was wondering if you have any suggestions how I could solve this.

cddlib download uses unreliable ftp server

The current iris-distro downloads the cddlib tarball from a slow and unreliable FTP server. This is causing headaches for Drake's continuous integration.

It would be better if the cddlib tarball came from somewhere more reliable. Perhaps we should re-host it, or select a more reliable existing host.

See also RobotLocomotion/drake#2771.

could not find git for clone of mosek

Hi all,

i tried to install irispy in my ubuntu system, and I already download and activate the mosek. Why does the following fault still appear after I input cmake .. :

CMake Error at /snap/cmake/340/share/cmake-3.17/Modules/ExternalProject.cmake:2454 (message):
error: could not find git for clone of mosek
Call Stack (most recent call first):
/snap/cmake/340/share/cmake-3.17/Modules/ExternalProject.cmake:3267 (_ep_add_download_command)
CMakeLists.txt:102 (ExternalProject_Add)

-- Configuring incomplete, errors occurred!

Thanks a lot in advance!

/usr/bin/python: No module named iris_wrapper

I am trying to run the Python wrapper by running python -m irispy.test.test_iris_2d.
However, I cannot make it work. All I get is /usr/bin/python: No module named iris_wrapper.
From what I understood, the error happens in irispy.py, when trying to import from .iris_wrapper.

I tried it in both Ubuntu 16.04 and 18.04. I have installed all the requirements, packages and license specified in the Readme.md file.

Am I missing any step?

Edit 1: Might be related to my problem. I just found a .gitignore file under iris-distro/src/python/irispy that has only one line, iris_wrapper.py.

Error in the paper

In optimization problem 10 in your paper, Is the term d missing after the term a_i^T?

IRIS in ROS package

Hey,

I'd like to use your library inside a custom ROS package for motion planning and control. Could you please provide some examples to do so? Thanks in advance for your collaboration.

Sincerely,
Anna Mannucci

test_poly_Nd fails with low probability

Error using convhull
Error computing the convex hull. Not enough unique
points specified.

Error in iris.drawing.drawPolyFromVertices (line 7)
k = convhull(c(1,:), c(2,:), c(3,:));

Error in iris.drawing.draw_Nd (line 10)
drawPolyFromVertices(obs,'k','FaceAlpha',1);

Error in iris.drawing.animate_results>draw (line 96)
draw_Nd(A,b,C,d,obstacles,lb,ub);

Error in iris.drawing.animate_results (line 50)
draw(A, b, C, d, results.obstacles, lb, ub, results);

Error in iris.test.test_poly_Nd (line 48)
animate_results(results, record);

Error in iris.test.run_system_tests (line 9)
iris.test.test_poly_Nd(4);

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.