Skip to content

Commit

Permalink
creating stack and adding OMPL
Browse files Browse the repository at this point in the history
  • Loading branch information
Ioan Sucan committed Oct 12, 2011
0 parents commit 206e93c
Show file tree
Hide file tree
Showing 11 changed files with 191 additions and 0 deletions.
17 changes: 17 additions & 0 deletions moveit_core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)

# Append to CPACK_SOURCE_IGNORE_FILES a semicolon-separated list of
# directories (or patterns, but directories should suffice) that should
# be excluded from the distro. This is not the place to put things that
# should be ignored everywhere, like "build" directories; that happens in
# rosbuild/rosbuild.cmake. Here should be listed packages that aren't
# ready for inclusion in a distro.
#
# This list is combined with the list in rosbuild/rosbuild.cmake. Note
# that CMake 2.6 may be required to ensure that the two lists are combined
# properly. CMake 2.4 seems to have unpredictable scoping rules for such
# variables.
#list(APPEND CPACK_SOURCE_IGNORE_FILES /core/experimental)

rosbuild_make_distribution(0.1.0)
1 change: 1 addition & 0 deletions moveit_core/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include $(shell rospack find mk)/cmake_stack.mk
22 changes: 22 additions & 0 deletions moveit_core/ompl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)

set(ROS_BUILD_TYPE Release)
rosbuild_init()

execute_process(COMMAND cmake -E chdir ${PROJECT_SOURCE_DIR} make -f Makefile.ompl
RESULT_VARIABLE _make_failed)
if(_make_failed)
message(FATAL_ERROR "Build of ompl failed")
endif(_make_failed)

message("Using ompl from ${OMPL_SOURCE}")

set(PROJECT_SOURCE_DIR ${PROJECT_SOURCE_DIR}/${OMPL_SOURCE})

option(OMPL_IN_ROS "Build OMPL against ROS" ON)
option(OMPL_BUILD_DEMOS "Build OMPL demos" OFF)
option(OMPL_BUILD_PYBINDINGS "Build OMPL Python bindings" OFF)
option(OMPL_BUILD_DOC "Build OMPL documentation" OFF)

add_subdirectory(${OMPL_SOURCE})
26 changes: 26 additions & 0 deletions moveit_core/ompl/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
include Makefile.params

INSTALL_LOCATION=installation

EXTRA_CMAKE_FLAGS=-DCMAKE_INSTALL_PREFIX=`pwd`/../$(INSTALL_LOCATION) -DOMPL_SOURCE:string="$(SOURCE_DIR)"

ompltoplevel: all installed

include $(shell rospack find mk)/cmake.mk

clean: extra-clean

installed:
cd build && make install
touch installed

extra-clean:
make -f Makefile.ompl clean
rm -f installed

wipeNoClean:
make -f Makefile.ompl wipe
rm -rf $(INSTALL_LOCATION) $(SOURCE_DIR)

wipe: wipeNoClean clean
-rm -rf bin
19 changes: 19 additions & 0 deletions moveit_core/ompl/Makefile.ompl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
include Makefile.params

all: copied

# We build from a tarball from the latest version of ompl

include $(shell rospack find mk)/download_unpack_build.mk

copied: wiped $(SOURCE_DIR)/unpacked
touch copied

wipe:
rm -rf copied patched

wiped: Makefile.ompl Makefile.params
make -f Makefile wipeNoClean
touch wiped

clean:
8 changes: 8 additions & 0 deletions moveit_core/ompl/Makefile.params
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FILENAME = ompl-1237.tar.gz
TARBALL = build/$(FILENAME)
TARBALL_URL = https://code.ros.org/svn/release/download/thirdparty/ompl/$(FILENAME)
TARBALL_PATCH = console.patch

SOURCE_DIR = build/ompl_arch
UNPACK_CMD = tar xzf
MD5SUM_FILE = $(FILENAME).md5sum
15 changes: 15 additions & 0 deletions moveit_core/ompl/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# These are instructions for updating the ROS package that wraps the release of OMPL from Rice University.
# These instructions are only intended for and useful to the maintainers (Willow Garage) of the OMPL ROS wrapper package and have limited to no utility for users.
# Get the ROS package for OMPL as provided by Rice:
svn co https://rice-ros-pkg.svn.sourceforge.net/svnroot/rice-ros-pkg/ompl
cd ompl

# To get the latest version of the library, do:
make arch

# To get a particular tag/revision of the library, do:
OMPL_REVISION=1001 make arch

This will create a file of the form ompl-*.tar.gz and a file ompl-*.tar.gz.md5sum that can be used in the Willow Garage ROS package.

Copy this into the location for thirdparty packages at https://code.ros.org/svn/release/download/thirdparty/ompl/
48 changes: 48 additions & 0 deletions moveit_core/ompl/console.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
Index: src/ompl/util/src/Console.cpp
===================================================================
--- src/ompl/util/src/Console.cpp
+++ src/ompl/util/src/Console.cpp
@@ -33,6 +33,7 @@
*********************************************************************/

/* Author: Ioan Sucan */
+#include <ros/console.h>

#include "ompl/util/Console.h"
#include <boost/thread/mutex.hpp>
@@ -41,7 +42,34 @@
#include <cstdio>
#include <cstdarg>

-static ompl::msg::OutputHandlerSTD DEFAULT_OUTPUT_HANDLER;
+namespace ompl
+{
+
+ namespace msg
+ {
+
+ class OutputHandlerROS : public OutputHandler
+ {
+ public:
+
+ OutputHandlerROS(void) : OutputHandler()
+ {
+ }
+
+ virtual void error(const std::string &text) { ROS_ERROR("%s", text.c_str()); }
+
+ virtual void warn(const std::string &text) { ROS_WARN("%s", text.c_str()); }
+
+ virtual void inform(const std::string &text) { ROS_INFO("%s", text.c_str()); }
+
+ virtual void debug(const std::string &text) { ROS_DEBUG("%s", text.c_str()); }
+
+ };
+
+ }
+}
+
+static ompl::msg::OutputHandlerROS DEFAULT_OUTPUT_HANDLER;
static ompl::msg::OutputHandler *OUTPUT_HANDLER = static_cast<ompl::msg::OutputHandler*>(&DEFAULT_OUTPUT_HANDLER);
static ompl::msg::OutputHandler *PREVIOUS_OH = OUTPUT_HANDLER;
static boost::mutex LOCK; // it is likely the outputhandler does some I/O, so we serialize it
23 changes: 23 additions & 0 deletions moveit_core/ompl/manifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<package>

<description brief="Open Motion Planning Library (OMPL)">
A library of sampling-based motion planning algorithms
</description>

<author>Ioan Sucan/isucan@rice.edu, Mark Moll/mmoll@rice.edu, Lydia Kavraki/kavraki@rice.edu</author>
<license>BSD</license>
<review status="unreviewed" notes=""/>
<url>http://ros.org/wiki/ompl</url>

<depend package="rosconsole" />

<export>
<cpp cflags="-I${prefix}/installation/include `rosboost-cfg --cflags`" lflags="-Wl,-rpath,${prefix}/installation/lib -L${prefix}/installation/lib -lompl `rosboost-cfg --lflags date_time,thread`"/>
</export>

<platform os="ubuntu" version="9.04"/>
<platform os="ubuntu" version="9.10"/>
<platform os="ubuntu" version="10.04"/>
<platform os="ubuntu" version="10.10"/>

</package>
1 change: 1 addition & 0 deletions moveit_core/ompl/ompl-1237.tar.gz.md5sum
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cdd2fede7f7b45f8625035cc0649b46a ompl-1237.tar.gz
11 changes: 11 additions & 0 deletions moveit_core/stack.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<stack>
<description brief="moveit">Implementation of generic components for planning and execution of motions.</description>
<author>Maintained by Sachin Chitta, Ioan Sucan</author>
<license>BSD</license>
<review status="unreviewed" notes=""/>
<url>http://ros.org/wiki/moveit</url>
<depend stack="ros" />
<depend stack="ros_comm" /> <!-- rosconsole -->
<depend stack="robot_model" />

</stack>

0 comments on commit 206e93c

Please sign in to comment.