Giter VIP home page Giter VIP logo

wrench-cone-lib's Introduction

Overview

This library implements the Contact Wrench Cone as given here. It uses cdd for the polyhedron computation and Eigen for the matrix part. Python bindings are also available.

The license that applies to the whole package content is GPLv3.0. Please look at the license.txt file at the root of this repository.

Installation

First install eigen-cddlib.

Then, install wrench-cone-lib following the standard CMake procedure:

git clone --recursive https://github.com/vsamy/wrench-cone-lib
cd wrench-cone-lib
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFX=<your_path>
make -j4
make install

Optional compilation definitions

There is only one parameter you can apply that will change the output of the library. This parameter is PLUCKER_NOTATION and modify the outputs of the 6d vector by interchanging the 3 sub-vectors of angular and translational parameters. The plucker notation outputs the results so that output = { ang_x, ang_y, ang_z, tra_x, tra_y, tra_z }. By default output = { tra_x, tra_y, tra_z, ang_x, ang_y, ang_z }. To activate the plucker notation, append to the cmake -DPLUCKER_NOTATION=ON.

About python version

You may need to install the adequate numpy python modules on your system, depending on the version of python you intend to use. On Debian like systems like ubuntu:

sudo apt-get update; sudo apt-get install python-pip python3-pip
sudo pip install numpy; sudo pip3 install numpy

Testing

cd wrench-cone-lib/build
make test

Examples

To build the example please append to cmake -DBUILD_EXAMPLES=ON.

wrench-cone-lib's People

Contributors

robinpassama avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

passama vastsoun

wrench-cone-lib's Issues

Cannot build examples

Hello,

I followed the instructions and installed the package using PID, but when I execute make build to build examples, I get the following error:
Running CMake to regenerate build system...
-- Configuring done
-- Generating done
-- Build files have been written to: /home/oguz/pid-workspace/packages/wrench-cone-lib/build/debug
-- Configuring done
-- Generating done
-- Build files have been written to: /home/oguz/pid-workspace/packages/wrench-cone-lib/build/release
-- Configuring done
-- Generating done
-- Build files have been written to: /home/oguz/pid-workspace/packages/wrench-cone-lib/build
[ 60%] Built target reconfigure
[ 80%] [PID] Checking branch...
CMake Error at /home/oguz/pid-workspace/share/cmake/system/Check_PID_Package_Branch.cmake:27 (message):
[PID] ERROR : wrench-cone-lib must be built on a development branch
(integration or feature specific branch).

CMakeFiles/check-branch.dir/build.make:57: recipe for target 'CMakeFiles/check-branch' failed
make[3]: *** [CMakeFiles/check-branch] Error 1
CMakeFiles/Makefile2:259: recipe for target 'CMakeFiles/check-branch.dir/all' failed
make[2]: *** [CMakeFiles/check-branch.dir/all] Error 2
CMakeFiles/Makefile2:396: recipe for target 'CMakeFiles/build.dir/rule' failed
make[1]: *** [CMakeFiles/build.dir/rule] Error 2
Makefile:248: recipe for target 'build' failed
make: *** [build] Error 2

I get the same error even I turn examples OFF in ccmake.. and try building it.

Regards

API miss-matching

Hi Vincent!

I met the following problem during compilation:

[ 33%] Building CXX object src/CMakeFiles/wcl.dir/ContactSurface.cpp.o
cd /home/yuquan/local/wrench-cone-lib/build/src && /usr/bin/c++  -D_USE_MATH_DEFINES -Dwcl_EXPORTS -I/home/yuquan/local/wrench-cone-lib/build -I/home/yuquan/local/wrench-cone-lib/build/include -I/home/yuquan/local/wrench-cone-lib/include -I/home/yuquan/local/wrench-cone-lib/src -isystem /usr/local/include/eigen3  -Werror  -pedantic -Wno-long-long -Wall -Wextra -Wcast-align -Wcast-qual -Wformat -Wwrite-strings -Wconversion  -O2 -g -DNDEBUG -fPIC   -Dwcl_EXPORTS -std=gnu++11 -o CMakeFiles/wcl.dir/ContactSurface.cpp.o -c /home/yuquan/local/wrench-cone-lib/src/ContactSurface.cpp
/home/yuquan/local/wrench-cone-lib/src/ContactSurface.cpp: In function ‘wcl::ContactSurface wcl::rectangularSurface(double, double, const Vector3d&, const Matrix3d&, double, unsigned int)’:
/home/yuquan/local/wrench-cone-lib/src/ContactSurface.cpp:32:73: error: no matching function for call to ‘wcl::ContactSurface::ContactSurface(<brace-enclosed initializer list>)’
     return wcl::ContactSurface({position, rotation, p, mu, nrGenerators});
                                                                         ^
In file included from /home/yuquan/local/wrench-cone-lib/src/ContactSurface.cpp:19:0:
/home/yuquan/local/wrench-cone-lib/include/wcl/ContactSurface.h:30:19: note: candidate: wcl::ContactSurface::ContactSurface()
 struct WCL_DLLAPI ContactSurface {
                   ^
/home/yuquan/local/wrench-cone-lib/include/wcl/ContactSurface.h:30:19: note:   candidate expects 0 arguments, 1 provided
/home/yuquan/local/wrench-cone-lib/include/wcl/ContactSurface.h:30:19: note: candidate: wcl::ContactSurface::ContactSurface(const wcl::ContactSurface&)
/home/yuquan/local/wrench-cone-lib/include/wcl/ContactSurface.h:30:19: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const wcl::ContactSurface&’
/home/yuquan/local/wrench-cone-lib/include/wcl/ContactSurface.h:30:19: note: candidate: wcl::ContactSurface::ContactSurface(wcl::ContactSurface&&)
/home/yuquan/local/wrench-cone-lib/include/wcl/ContactSurface.h:30:19: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘wcl::ContactSurface&&’
src/CMakeFiles/wcl.dir/build.make:65: recipe for target 'src/CMakeFiles/wcl.dir/ContactSurface.cpp.o' failed
make[2]: *** [src/CMakeFiles/wcl.dir/ContactSurface.cpp.o] Error 1
make[2]: Leaving directory '/home/yuquan/local/wrench-cone-lib/build'
CMakeFiles/Makefile2:1300: recipe for target 'src/CMakeFiles/wcl.dir/all' failed
make[1]: *** [src/CMakeFiles/wcl.dir/all] Error 2
make[1]: Leaving directory '/home/yuquan/local/wrench-cone-lib/build'
Makefile:143: recipe for target 'all' failed
make: *** [all] Error 2

Could you suggest a fix please?

Best,

Yuquan

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.