The goal of this project is to provide a Yarp-free
library for computing and visualizing the superquadric representing an object and the relative grasping candidates for a generic robot.
This is a new design of the code included in the repositories:
This release provides methods to:
- reconstruct the object model with single or multiple superquadric;
- compute grasping candidates for any robot;
- visualize superquadrics, planes, point clouds and grasping poses.
Some examples of outputs of the superquadric-lib
are available here.
- Only three dependencies:
Ipopt
,Eigen3
andVTK
; - Faster computation of grasping poses w.r.t the implementation of superquadric-grasp;
- High-level interface.
Here are the instructions to build and install the library:
$ git clone https://github.com/robotology/superquadric-lib.git
$ cd superquadric-lib
$ mkdir build && cd build
$ cmake ..
$ make
$ [sudo] make install
By default, this command will build and install:
SuperquadricLibModel
, that includes all the tools to play with superquadrics;SuperquadricLibGrasp
, to compute the grasping poses for an object represented with a superquadric (it requires 1.);SuperquadricLibVis
, to visualize everything (it requires 1. and 2.);Superquadric-Pipeline-Single
andSuperquadric-Pipeline-Multiple
, executables providing an example on how to compute single/multiple superquadric object models and the grasping pose starting from the object point cloud and show the results using the visualizer. They require 1 - 3.
Optional:
- Python bindings: Enabling the flag
ENABLE_BINDINGS
will generate the python bindings of SuperquadricLibModel, SuperquadricLibGrasp and SuperquadricLibVis. The following dependency is required to generate the python bindings: - SWIG - 4.0.1, which can be installed with:
$ curl https://netcologne.dl.sourceforge.net/project/swig/swig/swig-4.0.1/swig-4.0.1.tar.gz | tar xvz
$ cd swig-4.0.1 && ./configure --prefix=<path-to-install-directory>
$ make -j4
$ make install
After the installation of the python bindings, you may need to add the superquadriclib/bindings
to the PYTHONPATH
in your .bashrc
:
export PYTHONPATH=${PYTHONPATH}:${INSTALL_DIR}/lib/superquadriclib/bindings
- Yarp demo: Enabling the cmake flag
YARP_EXE
will compile also aYarp-based-Demo
, namedSuperquadric-Lib-Demo
. This is a demo that uses thesuperquadric-lib
to execute superquadric modeling and grasping on the iCub robot, iCub simulator and R1 robot.
The following dependencies are required for this demo:
An overview of the Superquadric-Lib-Demo
is provided here.
Once the library is installed, you can link it using CMake
by writing the following line of code in your project CMakeLists.txt
:
find_package(SuperquadricLib 0.1.0.0 EXACT REQUIRED)
target_link_libraries(<target> SuperquadricLib::SuperquadricLib<tag>)
where <tag>
can be:
Model
Grasp
Vis
An example on how to use the library in your code is provided here.