Skip to content

Instantly share code, notes, and snippets.

@tzwenn
Created January 25, 2015 19:32
Show Gist options
  • Save tzwenn/8bdb168bd7f74dd562a9 to your computer and use it in GitHub Desktop.
Save tzwenn/8bdb168bd7f74dd562a9 to your computer and use it in GitHub Desktop.
Homebrew Formula for installing librl (robotics library)
class Rl < Formula
homepage "http://www.roboticslibrary.org"
url "https://github.com/roboticslibrary/rl/archive/0.6.2.tar.gz"
sha1 "b0e40bd06cae2a96f0a517ceaa72fc2237d1620b"
depends_on "cmake" => :build
depends_on "boost"
depends_on "cgal"
depends_on "coin"
depends_on "eigen"
depends_on "xml2"
depends_on "qt" => :recommended
depends_on "solid" => :recommended
depends_on "bullet" => :optional
depends_on "libdc1394" => :optional
depends_on "ode" => :optional
option "with-demos", "Build the demo applications"
option "with-extras", "Build the extra applications"
option "without-hal", "Disable building the RL::HAL library and all its dependencies"
option "without-kin", "Disable building the RL::KIN library and all its dependencies"
option "without-math", "Disable building the RL::MATH library and all its dependencies"
option "without-mdl", "Disable building the RL::MDL library and all its dependencies"
option "without-plan", "Disable building the RL::PLAN library and all its dependencies"
option "without-sg", "Disable building the RL::SG library and all its dependencies"
option "without-util", "Disable building the RL::UTIL library and all its dependencies"
option "without-xml", "Disable building the RL::XML library and all its dependencies"
patch :DATA
def install
args = std_cmake_args
args << "-DBUILD_DEMOS=OFF" if build.without? "demos"
args << "-DBUILD_EXTRAS=OFF" if build.without? "extras"
args << "-DBUILD_RL_HAL=OFF" if build.without? "hal"
args << "-DBUILD_RL_KIN=OFF" if build.without? "kin"
args << "-DBUILD_RL_MATH=OFF" if build.without? "math"
args << "-DBUILD_RL_MDL=OFF" if build.without? "mdl"
args << "-DBUILD_RL_PLAN=OFF" if build.without? "plan"
args << "-DBUILD_RL_SG=OFF" if build.without? "sg"
args << "-DBUILD_RL_UTIL=OFF" if build.without? "util"
args << "-DBUILD_RL_XML=OFF" if build.without? "xml"
system "cmake", ".", *args
system "make", "install"
end
end
__END__
diff --git a/Modules/FindCoin.cmake b/Modules/FindCoin.cmake
index 5bdaa96..8955ba3 100644
--- a/Modules/FindCoin.cmake
+++ b/Modules/FindCoin.cmake
@@ -38,7 +38,7 @@ find_path(
find_library(
COIN_LIBRARY_DEBUG
NAMES
- Coind coin2d coin3d
+ Coind coin2d coin3d Inventor
HINTS
${COIN_LIBRARY_PATHS}
)
@@ -46,7 +46,7 @@ find_library(
find_library(
COIN_LIBRARY_RELEASE
NAMES
- Coin coin2 coin3
+ Coin coin2 coin3 Inventor
HINTS
${COIN_LIBRARY_PATHS}
)
diff --git a/src/rl/hal/Exception.h b/src/rl/hal/Exception.h
index 839d28b..440965e 100644
--- a/src/rl/hal/Exception.h
+++ b/src/rl/hal/Exception.h
@@ -28,6 +28,7 @@
#define _RL_HAL_EXCEPTION_H_
#include <stdexcept>
+#include <string>
namespace rl
{
diff --git a/src/rl/kin/Joint.h b/src/rl/kin/Joint.h
index 9ab6587..fb5bc42 100644
--- a/src/rl/kin/Joint.h
+++ b/src/rl/kin/Joint.h
@@ -27,11 +27,7 @@
#ifndef _RL_KIN_JOINT_H_
#define _RL_KIN_JOINT_H_
-#ifdef WIN32
#include <unordered_set>
-#else // WIN32
-#include <tr1/unordered_set>
-#endif // WIN32
#include <rl/math/Unit.h>
@@ -64,7 +60,7 @@ namespace rl
::rl::math::Real d;
- ::std::tr1::unordered_set< ::std::size_t > leaves;
+ ::std::unordered_set< ::std::size_t > leaves;
::rl::math::Real max;
diff --git a/src/rl/kin/Link.h b/src/rl/kin/Link.h
index 08a9300..8b1d4a6 100644
--- a/src/rl/kin/Link.h
+++ b/src/rl/kin/Link.h
@@ -27,11 +27,7 @@
#ifndef _RL_KIN_LINK_H_
#define _RL_KIN_LINK_H_
-#ifdef WIN32
#include <unordered_set>
-#else // WIN32
-#include <tr1/unordered_set>
-#endif // WIN32
#include <rl/math/Vector.h>
@@ -56,7 +52,7 @@ namespace rl
::rl::math::Real mass;
- ::std::tr1::unordered_set< Link* > selfcollision;
+ ::std::unordered_set< Link* > selfcollision;
protected:
diff --git a/src/rl/mdl/Body.h b/src/rl/mdl/Body.h
index 988174f..d0c1ca4 100644
--- a/src/rl/mdl/Body.h
+++ b/src/rl/mdl/Body.h
@@ -27,11 +27,7 @@
#ifndef _RL_MDL_BODY_H_
#define _RL_MDL_BODY_H_
-#ifdef WIN32
#include <unordered_set>
-#else // WIN32
-#include <tr1/unordered_set>
-#endif // WIN32
#include "Frame.h"
@@ -78,7 +74,7 @@ namespace rl
::rl::math::Real m;
- ::std::tr1::unordered_set< Body* > selfcollision;
+ ::std::unordered_set< Body* > selfcollision;
protected:
diff --git a/src/rl/sg/solid/Shape.cpp b/src/rl/sg/solid/Shape.cpp
index 5947080..dfe4bfb 100644
--- a/src/rl/sg/solid/Shape.cpp
+++ b/src/rl/sg/solid/Shape.cpp
@@ -68,7 +68,7 @@ namespace rl
{
this->getBody()->remove(this);
- for (::std::tr1::unordered_set< Shape* >::iterator i = this->encounters.begin(); i != this->encounters.end(); ++i)
+ for (::std::unordered_set< Shape* >::iterator i = this->encounters.begin(); i != this->encounters.end(); ++i)
{
(*i)->encounters.erase(this);
}
diff --git a/src/rl/sg/solid/Shape.h b/src/rl/sg/solid/Shape.h
index f5af2a5..11547c0 100644
--- a/src/rl/sg/solid/Shape.h
+++ b/src/rl/sg/solid/Shape.h
@@ -32,11 +32,7 @@
#include <SOLID/SOLID.h>
#include <SOLID/SOLID_broad.h>
-#ifdef WIN32
#include <unordered_set>
-#else // WIN32
-#include <tr1/unordered_set>
-#endif // WIN32
#include "../Shape.h"
@@ -67,7 +63,7 @@ namespace rl
bool complex;
- ::std::tr1::unordered_set< Shape* > encounters;
+ ::std::unordered_set< Shape* > encounters;
DT_ObjectHandle object;
@tzwenn
Copy link
Author

tzwenn commented Jan 25, 2015

Homebrew Formula to install librl (roboticslibrary.org)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment