[ompl] 03/04: Added a backport of ompl_benchmark_statistics from 1.2.1

Leopold Palomo-Avellaneda leo at alaxarxa.net
Wed Mar 15 15:25:44 UTC 2017


This is an automated email from the git hooks/post-receive script.

lepalom-guest pushed a commit to branch ubuntu-robotics
in repository ompl.

commit fac15aec0aafb6e5cd55551596420471557d44bc
Author: Leopold Palomo-Avellaneda <leo at alaxarxa.net>
Date:   Mon Sep 19 10:48:17 2016 +0200

    Added a backport of ompl_benchmark_statistics from 1.2.1
---
 ...t-of-ompl_benchmark_statistics-from-1.2.1.patch | 58 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 59 insertions(+)

diff --git a/debian/patches/0003-Backport-of-ompl_benchmark_statistics-from-1.2.1.patch b/debian/patches/0003-Backport-of-ompl_benchmark_statistics-from-1.2.1.patch
new file mode 100644
index 0000000..33de3e7
--- /dev/null
+++ b/debian/patches/0003-Backport-of-ompl_benchmark_statistics-from-1.2.1.patch
@@ -0,0 +1,58 @@
+From: Leopold Palomo-Avellaneda <leo at alaxarxa.net>
+Date: Mon, 19 Sep 2016 10:44:21 +0200
+Subject: Backport of ompl_benchmark_statistics from 1.2.1
+
+---
+ scripts/ompl_benchmark_statistics.py | 26 ++++++++++++++++----------
+ 1 file changed, 16 insertions(+), 10 deletions(-)
+
+diff --git a/scripts/ompl_benchmark_statistics.py b/scripts/ompl_benchmark_statistics.py
+index 61483a4..34ccab7 100755
+--- a/scripts/ompl_benchmark_statistics.py
++++ b/scripts/ompl_benchmark_statistics.py
+@@ -41,13 +41,18 @@ from os.path import basename, splitext, exists
+ import os
+ import sqlite3
+ import datetime
+-import matplotlib
+-matplotlib.use('pdf')
+-from matplotlib import __version__ as matplotlibversion
+-from matplotlib.backends.backend_pdf import PdfPages
+-import matplotlib.pyplot as plt
+-import numpy as np
+-from math import floor
++plottingEnabled=True
++try:
++    import matplotlib
++    matplotlib.use('pdf')
++    from matplotlib import __version__ as matplotlibversion
++    from matplotlib.backends.backend_pdf import PdfPages
++    import matplotlib.pyplot as plt
++    import numpy as np
++    from math import floor
++except:
++    print('Matplotlib or Numpy was not found; disabling plotting capabilities...')
++    plottingEnabled=False
+ from optparse import OptionParser, OptionGroup
+ 
+ # Given a text line, split it into tokens (by space) and return the token
+@@ -563,15 +568,16 @@ if __name__ == "__main__":
+         help="Append data to database (as opposed to overwriting an existing database)")
+     parser.add_option("-v", "--view", action="store_true", dest="view", default=False,
+         help="Compute the views for best planner configurations")
+-    parser.add_option("-p", "--plot", dest="plot", default=None,
+-        help="Create a PDF of plots")
++    if plottingEnabled:
++        parser.add_option("-p", "--plot", dest="plot", default=None,
++            help="Create a PDF of plots")
+     parser.add_option("-m", "--mysql", dest="mysqldb", default=None,
+         help="Save SQLite3 database as a MySQL dump file")
+     parser.add_option("--moveit", action="store_true", dest="moveit", default=False,
+         help="Log files are produced by MoveIt!")
+     (options, args) = parser.parse_args()
+ 
+-    if not options.append and exists(options.dbname):
++    if not options.append and exists(options.dbname) and len(args)>0:
+         os.remove(options.dbname)
+ 
+     if len(args)>0:
diff --git a/debian/patches/series b/debian/patches/series
index e898a7f..fd95362 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 0001-Disabling-installPyPlusPlus.sh-stuff.patch
 0002-Fixup-pkgconfig-for-multiarch.patch
+0003-Backport-of-ompl_benchmark_statistics-from-1.2.1.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ompl.git



More information about the debian-science-commits mailing list