Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions func_collection.sh
Original file line number Diff line number Diff line change
Expand Up @@ -448,17 +448,17 @@ function fetch_ode_mars() {
pushd . > /dev/null 2>&1
mkdir -p ${MARS_DEV_ROOT}/external
cd ${MARS_DEV_ROOT}/external
if [ ! -e "ode-0.12.tar.gz" ]; then
wget http://sourceforge.net/projects/opende/files/ODE/0.12/ode-0.12.tar.gz
if [ ! -e "ode-0.13.1.tar.gz" ]; then
wget http://bitbucket.org/odedevs/ode/downloads/ode-0.13.1.tar.gz
if [ -d "ode_mars" ]; then
uninstall_package "external/ode_mars"
rm -rf ode_mars
fi
fi

if [ ! -d "ode_mars" ]; then
tar -xzvf ode-0.12.tar.gz
mv ode-0.12 ode_mars
tar -xzvf ode-0.13.1.tar.gz
mv ode-0.13.1 ode_mars
fi
cd ..
popd > /dev/null 2>&1
Expand Down Expand Up @@ -634,18 +634,18 @@ function patch_eigen {
}

function patch_ode_mars {
printBold "patching external/ode_mars version 0.12 ..."
printBold "patching external/ode_mars version 0.13.1..."
setScriptDir
setupConfig
# patch was accepted upstream (http://sf.net/p/opende/patches/180) and
# applied to Rev. 1913 (http://sf.net/p/opende/code/1913) and should be
# in the next release
patch -N -p0 -d ${MARS_DEV_ROOT}/external/ode_mars -i ${MARS_SCRIPT_DIR}/patches/ode-0.12-va_end.patch
patch -N -p0 -d ${MARS_DEV_ROOT}/external/ode_mars -i ${MARS_SCRIPT_DIR}/patches/ode-0.12-lambda.patch
patch -N -p0 -d ${MARS_DEV_ROOT}/external/ode_mars -i ${MARS_SCRIPT_DIR}/patches/ode-0.12-export_joint_internals.patch
#patch -N -p0 -d ${MARS_DEV_ROOT}/external/ode_mars -i ${MARS_SCRIPT_DIR}/patches/ode-0.12-va_end.patch
patch -N -p0 -d ${MARS_DEV_ROOT}/external/ode_mars -i ${MARS_SCRIPT_DIR}/patches/ode-0.13.1-lambda.patch
patch -N -p0 -d ${MARS_DEV_ROOT}/external/ode_mars -i ${MARS_SCRIPT_DIR}/patches/ode-0.13.1-export_joint_internals.patch
# patch was submitted upstream (http://sf.net/p/opende/patches/187)
patch -N -p0 -d ${MARS_DEV_ROOT}/external/ode_mars -i ${MARS_SCRIPT_DIR}/patches/ode-0.12-abort.patch
printBold "... done patching external/ode_mars version 0.12."
patch -N -p0 -d ${MARS_DEV_ROOT}/external/ode_mars -i ${MARS_SCRIPT_DIR}/patches/ode-0.13.1-abort.patch
printBold "... done patching external/ode_mars version 0.13.1."
}


Expand Down Expand Up @@ -727,6 +727,7 @@ function install_ode_mars {
export CFLAGS=-fPIC
export CXXFLAGS=-fPIC
# --enable-release
./bootstrap
./configure CPPFLAGS="-DdNODEBUG" CXXFLAGS="-O2 -ffast-math -fPIC" CFLAGS="-O2 -ffast-math -fPIC" --enable-double-precision --prefix=$prefix --with-drawstuff=none --disable-demos
if [ "${platform}" = "linux" ]; then
if [ x`which libtool` != x ]; then
Expand Down
42 changes: 0 additions & 42 deletions patches/ode-0.12-abort.patch

This file was deleted.

21 changes: 0 additions & 21 deletions patches/ode-0.12-lambda.patch

This file was deleted.

154 changes: 0 additions & 154 deletions patches/ode-0.12-va_end.patch

This file was deleted.

38 changes: 38 additions & 0 deletions patches/ode-0.13.1-abort.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
--- ode/src/error.cpp 2014-02-04 07:00:58.000000000 +0100
+++ ode/src/error.cpp 2016-01-25 13:14:51.437768604 +0100
@@ -90,7 +90,8 @@
if (error_function) error_function (num,msg,ap);
else printMessage (num,"ODE Error",msg,ap);
va_end (ap);
- exit (1);
+ if (!error_function)
+ exit (1);
}


@@ -102,6 +103,7 @@
else printMessage (num,"ODE INTERNAL ERROR",msg,ap);
va_end (ap);
// *((char *)0) = 0; ... commit SEGVicide
+ if (!debug_function)
abort();
}

@@ -145,6 +147,7 @@
MessageBox(0,s,title,MB_OK | MB_ICONWARNING);
}
va_end (ap);
+ if (!error_function)
exit (1);
}

@@ -162,7 +165,8 @@
MessageBox(0,s,title,MB_OK | MB_ICONSTOP);
}
va_end (ap);
- abort();
++ if (!debug_function)
++ abort();
}


Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
--- ode/src/Makefile.am Fri Jul 11 08:16:50 2008
+++ ode/src/Makefile.am Wed Aug 8 08:43:51 2012
@@ -14,6 +14,13 @@
libode_la_LDFLAGS = @EXTRA_LIBTOOL_LDFLAGS@ @ODE_VERSION_INFO@
libode_la_LIBADD = libfast.la joints/libjoints.la
--- ode/src/Makefile.am 2014-02-04 07:00:58.000000000 +0100
+++ ode/src/Makefile.am 2016-01-25 13:14:51.545768600 +0100
@@ -8,7 +8,13 @@
noinst_LTLIBRARIES = libfast.la
libfast_la_SOURCES = fastldlt.c fastltsolve.c fastdot.c fastlsolve.c

-
+# to create child classes of dJoint, we need to make more of
+# the internal data structures accessible.
+libode_la_includedir = $(includedir)/ode-internals
Expand All @@ -12,11 +13,11 @@
+ obstack.h \
+ config.h

# please, let's keep the filenames sorted
libode_la_SOURCES = array.cpp array.h \
--- ode/src/joints/Makefile.am Wed Jun 4 23:47:13 2008
+++ ode/ode/src/joints/Makefile.am Wed Aug 8 08:43:51 2012
@@ -2,6 +2,9 @@
lib_LTLIBRARIES = libode.la

--- ode/src/joints/Makefile.am 2014-02-04 07:00:58.000000000 +0100
+++ ode/ode/src/joints/Makefile.am 2016-01-25 13:14:51.949768584 +0100
@@ -4,6 +4,9 @@

noinst_LTLIBRARIES = libjoints.la

Expand All @@ -26,3 +27,4 @@
libjoints_la_SOURCES = joints.h \
joint.h joint.cpp \
joint_internal.h \

23 changes: 23 additions & 0 deletions patches/ode-0.13.1-lambda.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--- include/ode/common.h 2014-02-27 21:42:09.000000000 +0100
+++ include/ode/common.h 2016-01-25 13:14:50.297768650 +0100
@@ -337,6 +337,7 @@
dVector3 t1; /* torque applied to body 1 */
dVector3 f2; /* force applied to body 2 */
dVector3 t2; /* torque applied to body 2 */
+ dReal lambda;
} dJointFeedback;


--- ode/src/step.cpp 2014-03-05 17:05:14.000000000 +0100
+++ ode/src/step.cpp 2016-01-25 13:14:51.665768595 +0100
@@ -1293,8 +1293,9 @@
cf2[2] += (fb->f2[2] = data[2]);
cf2[4] += (fb->t2[0] = data[4]);
cf2[5] += (fb->t2[1] = data[5]);
- cf2[6] += (fb->t2[2] = data[6]);
+ cf2[6] += (fb->t2[2] = data[6]);
}
+ fb->lambda = *(lambdarow+5);
}
else {
// no feedback is required, let's compute cforce the faster way