roboptim-commit Mailing List for RobOptim (Page 82)
Status: Beta
Brought to you by:
flamiraux
You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(62) |
Jul
(62) |
Aug
(36) |
Sep
(24) |
Oct
(41) |
Nov
(182) |
Dec
(8) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(12) |
Feb
(13) |
Mar
(104) |
Apr
(95) |
May
(90) |
Jun
(90) |
Jul
(93) |
Aug
(97) |
Sep
(91) |
Oct
(93) |
Nov
(90) |
Dec
(95) |
2011 |
Jan
(96) |
Feb
(84) |
Mar
(94) |
Apr
(91) |
May
(93) |
Jun
(91) |
Jul
(93) |
Aug
(93) |
Sep
(107) |
Oct
(93) |
Nov
(58) |
Dec
|
2012 |
Jan
(8) |
Feb
(4) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(6) |
Dec
(5) |
2013 |
Jan
(16) |
Feb
(22) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <no-...@ro...> - 2009-12-02 02:03:03
|
The Buildbot has finished a build of roboptim-core-cfsqp-plugin on RobOptim. Full details are available at: http://cleo.laas.fr:8010/builders/roboptim-core-cfsqp-plugin/builds/28 Buildbot URL: http://cleo.laas.fr:8010/ Buildslave for this Build: cleo Build Reason: The Nightly scheduler named 'nightly' triggered this build Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed shell_4 sincerely, -The Buildbot |
From: <no-...@ro...> - 2009-12-01 02:06:28
|
The Buildbot has finished a build of roboptim-core on RobOptim. Full details are available at: http://cleo.laas.fr:8010/builders/roboptim-core/builds/42 Buildbot URL: http://cleo.laas.fr:8010/ Buildslave for this Build: cleo Build Reason: The Nightly scheduler named 'nightly' triggered this build Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed shell_4 sincerely, -The Buildbot |
From: <no-...@ro...> - 2009-12-01 02:04:23
|
The Buildbot has finished a build of roboptim-trajectory on RobOptim. Full details are available at: http://cleo.laas.fr:8010/builders/roboptim-trajectory/builds/29 Buildbot URL: http://cleo.laas.fr:8010/ Buildslave for this Build: cleo Build Reason: The Nightly scheduler named 'nightly' triggered this build Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed shell_4 sincerely, -The Buildbot |
From: <no-...@ro...> - 2009-12-01 02:03:11
|
The Buildbot has finished a build of roboptim-core-cfsqp-plugin on RobOptim. Full details are available at: http://cleo.laas.fr:8010/builders/roboptim-core-cfsqp-plugin/builds/27 Buildbot URL: http://cleo.laas.fr:8010/ Buildslave for this Build: cleo Build Reason: The Nightly scheduler named 'nightly' triggered this build Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed shell_4 sincerely, -The Buildbot |
From: <no-...@ro...> - 2009-11-30 02:06:34
|
The Buildbot has finished a build of roboptim-core on RobOptim. Full details are available at: http://cleo.laas.fr:8010/builders/roboptim-core/builds/41 Buildbot URL: http://cleo.laas.fr:8010/ Buildslave for this Build: cleo Build Reason: The Nightly scheduler named 'nightly' triggered this build Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed shell_4 sincerely, -The Buildbot |
From: <no-...@ro...> - 2009-11-30 02:04:31
|
The Buildbot has finished a build of roboptim-trajectory on RobOptim. Full details are available at: http://cleo.laas.fr:8010/builders/roboptim-trajectory/builds/28 Buildbot URL: http://cleo.laas.fr:8010/ Buildslave for this Build: cleo Build Reason: The Nightly scheduler named 'nightly' triggered this build Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed shell_4 sincerely, -The Buildbot |
From: <no-...@ro...> - 2009-11-30 02:03:21
|
The Buildbot has finished a build of roboptim-core-cfsqp-plugin on RobOptim. Full details are available at: http://cleo.laas.fr:8010/builders/roboptim-core-cfsqp-plugin/builds/26 Buildbot URL: http://cleo.laas.fr:8010/ Buildslave for this Build: cleo Build Reason: The Nightly scheduler named 'nightly' triggered this build Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed shell_4 sincerely, -The Buildbot |
From: <no-...@ro...> - 2009-11-29 02:06:28
|
The Buildbot has finished a build of roboptim-core on RobOptim. Full details are available at: http://cleo.laas.fr:8010/builders/roboptim-core/builds/40 Buildbot URL: http://cleo.laas.fr:8010/ Buildslave for this Build: cleo Build Reason: The Nightly scheduler named 'nightly' triggered this build Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed shell_4 sincerely, -The Buildbot |
From: <no-...@ro...> - 2009-11-29 02:04:26
|
The Buildbot has finished a build of roboptim-trajectory on RobOptim. Full details are available at: http://cleo.laas.fr:8010/builders/roboptim-trajectory/builds/27 Buildbot URL: http://cleo.laas.fr:8010/ Buildslave for this Build: cleo Build Reason: The Nightly scheduler named 'nightly' triggered this build Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed shell_4 sincerely, -The Buildbot |
From: <no-...@ro...> - 2009-11-29 02:03:12
|
The Buildbot has finished a build of roboptim-core-cfsqp-plugin on RobOptim. Full details are available at: http://cleo.laas.fr:8010/builders/roboptim-core-cfsqp-plugin/builds/25 Buildbot URL: http://cleo.laas.fr:8010/ Buildslave for this Build: cleo Build Reason: The Nightly scheduler named 'nightly' triggered this build Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed shell_4 sincerely, -The Buildbot |
From: <no-...@ro...> - 2009-11-28 02:06:20
|
The Buildbot has finished a build of roboptim-core on RobOptim. Full details are available at: http://cleo.laas.fr:8010/builders/roboptim-core/builds/39 Buildbot URL: http://cleo.laas.fr:8010/ Buildslave for this Build: cleo Build Reason: The Nightly scheduler named 'nightly' triggered this build Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed shell_4 sincerely, -The Buildbot |
From: <no-...@ro...> - 2009-11-28 02:04:24
|
The Buildbot has finished a build of roboptim-trajectory on RobOptim. Full details are available at: http://cleo.laas.fr:8010/builders/roboptim-trajectory/builds/26 Buildbot URL: http://cleo.laas.fr:8010/ Buildslave for this Build: cleo Build Reason: The Nightly scheduler named 'nightly' triggered this build Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed shell_4 sincerely, -The Buildbot |
From: <no-...@ro...> - 2009-11-28 02:02:59
|
The Buildbot has finished a build of roboptim-core-cfsqp-plugin on RobOptim. Full details are available at: http://cleo.laas.fr:8010/builders/roboptim-core-cfsqp-plugin/builds/24 Buildbot URL: http://cleo.laas.fr:8010/ Buildslave for this Build: cleo Build Reason: The Nightly scheduler named 'nightly' triggered this build Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed shell_4 sincerely, -The Buildbot |
From: <no-...@ro...> - 2009-11-27 02:06:20
|
The Buildbot has finished a build of roboptim-core on RobOptim. Full details are available at: http://cleo.laas.fr:8010/builders/roboptim-core/builds/38 Buildbot URL: http://cleo.laas.fr:8010/ Buildslave for this Build: cleo Build Reason: The Nightly scheduler named 'nightly' triggered this build Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed shell_4 sincerely, -The Buildbot |
From: <no-...@ro...> - 2009-11-27 02:04:25
|
The Buildbot has finished a build of roboptim-trajectory on RobOptim. Full details are available at: http://cleo.laas.fr:8010/builders/roboptim-trajectory/builds/25 Buildbot URL: http://cleo.laas.fr:8010/ Buildslave for this Build: cleo Build Reason: The Nightly scheduler named 'nightly' triggered this build Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed shell_4 sincerely, -The Buildbot |
From: <no-...@ro...> - 2009-11-27 02:03:19
|
The Buildbot has finished a build of roboptim-core-cfsqp-plugin on RobOptim. Full details are available at: http://cleo.laas.fr:8010/builders/roboptim-core-cfsqp-plugin/builds/23 Buildbot URL: http://cleo.laas.fr:8010/ Buildslave for this Build: cleo Build Reason: The Nightly scheduler named 'nightly' triggered this build Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed shell_4 sincerely, -The Buildbot |
From: <no-...@ro...> - 2009-11-26 02:23:01
|
The Buildbot has finished a build of roboptim-core-cfsqp-plugin on RobOptim. Full details are available at: http://cleo.laas.fr:8010/builders/roboptim-core-cfsqp-plugin/builds/22 Buildbot URL: http://cleo.laas.fr:8010/ Buildslave for this Build: cleo Build Reason: The Nightly scheduler named 'nightly' triggered this build Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed shell_4 sincerely, -The Buildbot |
From: <no-...@ro...> - 2009-11-26 02:08:49
|
The Buildbot has finished a build of roboptim-core on RobOptim. Full details are available at: http://cleo.laas.fr:8010/builders/roboptim-core/builds/37 Buildbot URL: http://cleo.laas.fr:8010/ Buildslave for this Build: cleo Build Reason: The Nightly scheduler named 'nightly' triggered this build Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed shell_4 sincerely, -The Buildbot |
From: <no-...@ro...> - 2009-11-26 02:05:43
|
The Buildbot has finished a build of roboptim-trajectory on RobOptim. Full details are available at: http://cleo.laas.fr:8010/builders/roboptim-trajectory/builds/24 Buildbot URL: http://cleo.laas.fr:8010/ Buildslave for this Build: cleo Build Reason: The Nightly scheduler named 'nightly' triggered this build Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed shell_4 sincerely, -The Buildbot |
From: Thomas M. <tho...@us...> - 2009-11-25 16:44:30
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-core". The branch, user-manual has been created at 37aeb401ee9d98577dc047bc9eca6895deeb578e (commit) - Log ----------------------------------------------------------------- commit 37aeb401ee9d98577dc047bc9eca6895deeb578e Author: Thomas Moulard <tho...@gm...> Date: Wed Nov 25 17:43:32 2009 +0100 Add first tutorial. * doc/user-manual/images/tutorial-1.gp: Enhance display. * doc/user-manual/roboptim-core.tex, * doc/user-manual/text-en/function.tex, * doc/user-manual/text-en/installation.tex, * doc/user-manual/text-en/introduction.tex: Change section into chapter. * doc/user-manual/text-en/tutorial-1.cc: New. * doc/user-manual/text-en/tutorial-1.tex: New. * doc/user-manual/text-en/tutorial.tex: Remove. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index feed42a..2ec7eb2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2009-11-25 Thomas Moulard <tho...@gm...> + + Add first tutorial. + * doc/user-manual/images/tutorial-1.gp: Enhance display. + * doc/user-manual/roboptim-core.tex, + * doc/user-manual/text-en/function.tex, + * doc/user-manual/text-en/installation.tex, + * doc/user-manual/text-en/introduction.tex: Change section into chapter. + * doc/user-manual/text-en/tutorial-1.cc: New. + * doc/user-manual/text-en/tutorial-1.tex: New. + * doc/user-manual/text-en/tutorial.tex: Remove. + 2009-11-19 Thomas Moulard <tho...@gm...> Synchronize. diff --git a/doc/user-manual/images/tutorial-1.gp b/doc/user-manual/images/tutorial-1.gp index 47e8d8e..8f29553 100644 --- a/doc/user-manual/images/tutorial-1.gp +++ b/doc/user-manual/images/tutorial-1.gp @@ -1,3 +1,6 @@ #!/usr/bin/gnuplot +set terminal png +set contour base +set isosamples 30, 30 splot x*x+y*y \ No newline at end of file diff --git a/doc/user-manual/roboptim-core.tex b/doc/user-manual/roboptim-core.tex index 4a68478..128b6ae 100644 --- a/doc/user-manual/roboptim-core.tex +++ b/doc/user-manual/roboptim-core.tex @@ -15,11 +15,12 @@ %% You should have received a copy of the GNU Lesser General Public License %% along with roboptim. If not, see <http://www.gnu.org/licenses/>. -\documentclass[a4paper]{ltxdoc} +\documentclass[a4paper]{book} \usepackage[pdfborder={0 0 0}]{hyperref} -\usepackage[version=latest]{pgf} +%\usepackage[version=latest]{pgf} +\usepackage{pgf} \usepackage{xkeyval,calc,listings,tikz,fp} \usepackage{hyperref} @@ -66,7 +67,9 @@ \include{text-en/introduction} - \include{text-en/tutorial} + \part{Tutorial and Guidelines} + \include{text-en/tutorial-1} + \include{text-en/installation} diff --git a/doc/user-manual/text-en/function.tex b/doc/user-manual/text-en/function.tex index 8f76ed7..3fbb49e 100644 --- a/doc/user-manual/text-en/function.tex +++ b/doc/user-manual/text-en/function.tex @@ -15,7 +15,7 @@ %% You should have received a copy of the GNU Lesser General Public License %% along with roboptim. If not, see <http://www.gnu.org/licenses/>. -\section{Functions} +\chapter{Functions} FIXME: should show how functions are represented diff --git a/doc/user-manual/text-en/installation.tex b/doc/user-manual/text-en/installation.tex index 5d1cc8a..54c2715 100644 --- a/doc/user-manual/text-en/installation.tex +++ b/doc/user-manual/text-en/installation.tex @@ -17,7 +17,7 @@ \part{Installation and Configuration} -\section{Installation using a package} +\chapter{Installation using a package} The easiest way to setup \roboptim is by installing a package. Currently, RPM packages for \fedora are available on the @@ -29,7 +29,7 @@ install the package, please follow the shell commands indicated in Using packages makes setup easier as \roboptim dependencies will be installed automatically. However it requires root access and RPM packages may be older than the latest available tarball. To install -manually \roboptim, please see the following section. +manually \roboptim, please see the following chapter. \begin{figure}[htbp] @@ -49,7 +49,7 @@ rpm -i roboptim-core-doc-0.4-1.fc11.rpm \end{figure} -\section{Installation from a tarball} +\chapter{Installation from a tarball} The software can also be installed manually, but in this case, it is \emph{your responsability} to make sure that the software \roboptim diff --git a/doc/user-manual/text-en/introduction.tex b/doc/user-manual/text-en/introduction.tex index 446ac36..8cb1e19 100644 --- a/doc/user-manual/text-en/introduction.tex +++ b/doc/user-manual/text-en/introduction.tex @@ -15,7 +15,7 @@ %% You should have received a copy of the GNU Lesser General Public License %% along with roboptim. If not, see <http://www.gnu.org/licenses/>. -\section{Introduction} +\chapter{Introduction} The \roboptim packages are a set of C++ libraries for \emph{robotics numerical optimization}. This software can be freely used under the @@ -30,7 +30,7 @@ These tools are widely used in robotics to optimize trajectories or postures for instance. -\subsection{Structure} +\section{Structure} \roboptim is composed of different layers as illustrated by \autoref{fig:pkg-relations}: diff --git a/doc/user-manual/text-en/tutorial-1.cc b/doc/user-manual/text-en/tutorial-1.cc new file mode 100644 index 0000000..1474292 --- /dev/null +++ b/doc/user-manual/text-en/tutorial-1.cc @@ -0,0 +1,64 @@ +#include <iostream> +#include <boost/mpl/vector.hpp> + +#include <roboptim/core/derivable-function.hh> +#include <roboptim/core/problem.hh> +#include <roboptim/core/solver-factory.hh> + +#include <roboptim/core/io.hh> + +using namespace roboptim; + +struct MyCost : public DerivableFunction +{ + MyCost () + : DerivableFunction (2, 1, "x * x + y * y") + {} + + void + impl_compute + (result_t& res, const argument_t& x) const throw () + { + res[0] = x[0] * x[0] + x[1] * x[1]; + } + + void + impl_gradient + (gradient_t& grad, const argument_t& x, size_type) + const throw () + { + grad[0] = 2 * x[0]; + grad[1] = 2 * x[1]; + } +}; + +int main () +{ + MyCost c; + + typedef Problem<DerivableFunction, boost::mpl::vector<Function> > problem_t; + typedef Solver<DerivableFunction, boost::mpl::vector<Function> > solver_t; + + problem_t problem (c); + std::cout << problem << std::endl; + + std::cout + << "Which plug-in do you want to use? (example: ``dummy'')" + << std::endl; + std::string pluginName; + std::cin >> pluginName; + + try + { + SolverFactory<solver_t> factory (pluginName, problem); + solver_t& solver = factory (); + std::cout << solver.minimum () << std::endl; + } + catch (std::runtime_error& e) + { + std::cout << e.what () << std::endl; + return 1; + } + + return 0; +} diff --git a/doc/user-manual/text-en/tutorial-1.tex b/doc/user-manual/text-en/tutorial-1.tex new file mode 100644 index 0000000..15e8cb1 --- /dev/null +++ b/doc/user-manual/text-en/tutorial-1.tex @@ -0,0 +1,305 @@ +%% Copyright (C) 2009 by Thomas Moulard, AIST, CNRS, INRIA. +%% +%% This file is part of the roboptim. +%% +%% roboptim is free software: you can redistribute it and/or modify +%% it under the terms of the GNU Lesser General Public License as published by +%% the Free Software Foundation, either version 3 of the License, or +%% (at your option) any later version. +%% +%% roboptim is distributed in the hope that it will be useful, +%% but WITHOUT ANY WARRANTY; without even the implied warranty of +%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +%% GNU Lesser General Public License for more details. +%% +%% You should have received a copy of the GNU Lesser General Public License +%% along with roboptim. If not, see <http://www.gnu.org/licenses/>. + +\chapter{Constraints-free optimization} + +The first tutorial aims at finding in the 2d plan a point which +minimizes a cost function. + +The cost function is defined by $f(x, y) = x^2 + y^2$ and represented +on the \autoref{fig:tutorial-1-cost-function}. There will be no +constraints on the solution, so the global minimum is $(0,0)$. + + +This tutorial will show how to: +\begin{itemize} +\item define a function and its gradient, +\item create an optimization problem with no constraints +\item solve the problem and get additional information about the result. +\end{itemize} + +\begin{figure}[htbp] + \begin{center} + \includegraphics[width=\linewidth]{tutorial-1} + \end{center} + \caption{Cost function \label{fig:tutorial-1-cost-function}} +\end{figure} + + +\section{Defining a derivable function} + +To build an optimization problem, the user must provide a +cost function and optionally constraints. + +The first task will be to define this cost function through the tools +provided by \roboptim. + +A function $f$ is defined by: +$$ x \in \mathbb{R}^n \longrightarrow f(x) \in \mathbb{R}^m$$ + +In particular, the developer has to provide: +\begin{itemize} +\item the input and output sizes: $n$ and $m$ +\item an evaluation function ($f(x)$) +\end{itemize} + +It can also provides gradient evaluation function up to any derivation +order. + + +The \autoref{lst:tutorial-1-cost-function} defines a \texttt{MyCost} +function which modelizes the cost function of the optimization +problem. + +The function definition is done by inheriting one of the different +function's base classes provided by the library: +\begin{description} +\item[\texttt{Function}] No gradient. +\item[\texttt{DerivableFunction}] First order gradient. +\item[\texttt{TwiceDerivableFunction}] Second order gradient. +\item[\texttt{NTimesDerivableFunction<or>}] gradient up to order $or$ + (force input size to one, $or \geq 2$). +\end{description} + + +The function's constructors takes three parameters: +\begin{itemize} +\item The input size will define the optimization parameters size. As + this example searches for a 2d point, the input size is two. +\item The output size defines the function's output size. In the case + of a cost function, it has to be one. +\item An optional title can also be set. It does not impact the + computation but will be used for display. +\end{itemize} + +The method \texttt{impl\_compute} then provides a way to evaluate the +function. It takes two arguments: + +$$result = function (x)$$ + +\begin{description} +\item[\texttt{result}] is a vector of size $m$, it has to be updated + the function's result. +\item[\texttt{x}] is a constant vector of size $n$, it contains the + evaluation point. +\end{description} + + +The method \texttt{impl\_gradient} then provides a way to evaluate the +function's first order gradient. It takes three arguments: + +$$gradient = +(\frac{\partial f(x)}{x_0}(idFunction), + \ldots, + \frac{\partial f(x)}{x_m}(idFunction) +)$$ + +\begin{description} +\item[\texttt{gradient}] is a vector of size $n$, it has to be updated + the computation gradient. +\item[\texttt{x}] is a constant vector of size $n$, it contains the + evaluation point. +\item[\texttt{idFunction}] defines which part of the jacobian should + be computed ($0 \leq idFunction \leq m-1$). +\end{description} + +In another word \texttt{impl\_gradient} returns the $idFunction$-nth +line of the function's jacobian: + +$$ +jacobian (x) = +\begin{bmatrix} + \dfrac{\partial f(x)_1}{\partial x_1} & \cdots & \dfrac{\partial f(x)_1}{\partial x_n} \\ + \vdots & \ddots & \vdots \\ + \color{red} \dfrac{\partial f(x)_{idFunction}}{\partial x_1} & + \cdots & + \color{red} \dfrac{\partial f(x)_{idFunction}}{\partial x_n} \\ + \vdots & \ddots & \vdots \\ + \dfrac{\partial f(x)_m}{\partial x_1} & \cdots & \dfrac{\partial f(x)_m}{\partial x_n} +\end{bmatrix} +$$ + + +The last important point is that the \texttt{impl\_\ldots} methods +should \textbf{always be private}. There is no reason to invoke these +methods directly. One can use instead the \texttt{operator ()} for +function evaluation and the \texttt{gradient} method for gradient +computation. + + +\section{Problem definition} + +The \autoref{lst:tutorial-1-function-def} defines an optimization +problem. It takes as argument a cost function instance. + +The problem type is parametrized by two types: +\begin{itemize} +\item the cost function type +\item the list of the constraints types\footnote{An empty + list would be more correct but this is currently unsupported, + so a dummy type is used.} +\end{itemize} + + +Then, the problem can be displayed using standard output streams. One +should note that the include of the \texttt{roboptim/core/io.hh} +header is required before any display operation is performed. + + +\begin{figure}[htbp] + \begin{center} + \begin{lstlisting}[language=c++] +MyCost c; +typedef Problem<DerivableFunction, boost::mpl::vector<Function> > problem_t; +problem_t problem (c); +std::cout << problem << std::endl; + \end{lstlisting} + \end{center} + \caption{Cost function definition \label{lst:tutorial-1-function-def}} +\end{figure} + + + +\section{Solver instantiation} + +Solver instantiation is done through a plug-in mechanism to avoid +linking directly against all possibly available solvers. +The instanciation is done in two steps: +\begin{itemize} +\item First, the factory instantiation using the solver's name and the + optimization problem. +\item And secondly, the solver's instantiation through the factory. +\end{itemize} + +If the solver is not found (or is incompatible), a +\texttt{std::runtime\_error} will be throwed by the factory. + +The \autoref{lst:tutorial-1-solver-inst} illustrates the whole +process. + +\begin{figure}[htbp] + \begin{center} + \begin{lstlisting}[language=c++] +try + { + SolverFactory<solver_t> factory ("dummy", problem); + solver_t& solver = factory (); + std::cout << solver.minimum () << std::endl; + } +catch (std::runtime_error& e) + { + std::cout << e.what () << std::endl; + return 1; + } + \end{lstlisting} + \end{center} + \caption{Cost function definition \label{lst:tutorial-1-solver-inst}} +\end{figure} + + +\section{Linking everything together\ldots} + +The \autoref{lst:tutorial-1-full} shows the full source code of this +tutorial, it also requests from the user the solver's name that should +be used for solving the problem. + +One can compile the example by using the following command line: +\texttt{g++ tutorial-1.cc -lroboptim-core}\footnote{This supposes that + includes and headers installed in standard locations, used + \texttt{-I} and \texttt{-L} if it is not the case.} + + +\begin{figure}[htbp] + \begin{center} + \begin{lstlisting}[language=c++] +#include <iostream> +#include <boost/mpl/vector.hpp> + +#include <roboptim/core/derivable-function.hh> +#include <roboptim/core/problem.hh> +#include <roboptim/core/solver-factory.hh> + +#include <roboptim/core/io.hh> + +using namespace roboptim; + +struct MyCost : public DerivableFunction +{ + MyCost () + : DerivableFunction (2, 1, "x * x + y * y") + {} + + void + impl_compute + (result_t& res, const argument_t& x) const throw () + { + res[0] = x[0] * x[0] + x[1] * x[1]; + } + + void + impl_gradient + (gradient_t& grad, const argument_t& x, size_type) + const throw () + { + grad[0] = 2 * x[0]; + grad[1] = 2 * x[1]; + } +}; + +int main () +{ + MyCost c; + + typedef Problem<DerivableFunction, boost::mpl::vector<Function> > problem_t; + typedef Solver<DerivableFunction, boost::mpl::vector<Function> > solver_t; + + problem_t problem (c); + std::cout << problem << std::endl; + + std::cout + << "Which plug-in do you want to use? (example: ``dummy'')" + << std::endl; + std::string pluginName; + std::cin >> pluginName; + + try + { + SolverFactory<solver_t> factory (pluginName, problem); + solver_t& solver = factory (); + std::cout << solver.minimum () << std::endl; + } + catch (std::runtime_error& e) + { + std::cout << e.what () << std::endl; + return 1; + } + + return 0; +} + \end{lstlisting} + \end{center} + \caption{Tutorial 1 \label{lst:tutorial-1-full}} +\end{figure} + + + + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "../roboptim-core.tex" +%%% End: + diff --git a/doc/user-manual/text-en/tutorial.tex b/doc/user-manual/text-en/tutorial.tex deleted file mode 100644 index c743aa0..0000000 --- a/doc/user-manual/text-en/tutorial.tex +++ /dev/null @@ -1,36 +0,0 @@ -%% Copyright (C) 2009 by Thomas Moulard, AIST, CNRS, INRIA. -%% -%% This file is part of the roboptim. -%% -%% roboptim is free software: you can redistribute it and/or modify -%% it under the terms of the GNU Lesser General Public License as published by -%% the Free Software Foundation, either version 3 of the License, or -%% (at your option) any later version. -%% -%% roboptim is distributed in the hope that it will be useful, -%% but WITHOUT ANY WARRANTY; without even the implied warranty of -%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -%% GNU Lesser General Public License for more details. -%% -%% You should have received a copy of the GNU Lesser General Public License -%% along with roboptim. If not, see <http://www.gnu.org/licenses/>. - -\part{Tutorial and Guidelines} -\section{Tutorial} - -FIXME: first tutorial should solve a very simple robotics problem. -Such as finding the best position for the robot (far from obstacles). - -\begin{figure}[htbp] - \begin{center} - \includegraphics[width=\linewidth]{tutorial-1} - \end{center} - \caption{Tutorial \label{fig:tutorial}} -\end{figure} - - -%%% Local Variables: -%%% mode: latex -%%% TeX-master: "../roboptim-core.tex" -%%% End: - commit 6676d231b919fc0628c6077902ffa11f43da055e Author: Thomas Moulard <tho...@gm...> Date: Mon Nov 23 01:02:15 2009 +0100 Add intro, setup to user manual. diff --git a/doc/user-manual/images/pkg-relations.dot b/doc/user-manual/images/pkg-relations.dot new file mode 100644 index 0000000..6c8e791 --- /dev/null +++ b/doc/user-manual/images/pkg-relations.dot @@ -0,0 +1,21 @@ +digraph pkgrelations { + node [shape=box]; + rankdir = "RL"; + + roboptimcore [label = "roboptim-core"]; + + subgraph plugins { + roboptimplugin1 [label = "core plug-in (a)"]; + roboptimplugin2 [label = "core plug-in (b)"]; + } + roboptimtrajectory [label = "roboptim-trajectory"]; + myapp [label = "user application", style=filled, color=lightgrey]; + + roboptimplugin1 -> roboptimcore; + roboptimplugin2 -> roboptimcore; + roboptimtrajectory -> roboptimcore; + + myapp -> roboptimplugin1 [style = dashed]; + myapp -> roboptimplugin2 [style = dashed]; + myapp -> roboptimtrajectory; +} diff --git a/doc/user-manual/images/tutorial-1.gp b/doc/user-manual/images/tutorial-1.gp new file mode 100644 index 0000000..47e8d8e --- /dev/null +++ b/doc/user-manual/images/tutorial-1.gp @@ -0,0 +1,3 @@ +#!/usr/bin/gnuplot + +splot x*x+y*y \ No newline at end of file diff --git a/doc/user-manual/macros/acronyms.tex b/doc/user-manual/macros/acronyms.tex new file mode 100644 index 0000000..0b5f505 --- /dev/null +++ b/doc/user-manual/macros/acronyms.tex @@ -0,0 +1,28 @@ +%% Copyright (C) 2009 by Thomas Moulard, AIST, CNRS, INRIA. +%% +%% This file is part of the roboptim. +%% +%% roboptim is free software: you can redistribute it and/or modify +%% it under the terms of the GNU Lesser General Public License as published by +%% the Free Software Foundation, either version 3 of the License, or +%% (at your option) any later version. +%% +%% roboptim is distributed in the hope that it will be useful, +%% but WITHOUT ANY WARRANTY; without even the implied warranty of +%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +%% GNU Lesser General Public License for more details. +%% +%% You should have received a copy of the GNU Lesser General Public License +%% along with roboptim. If not, see <http://www.gnu.org/licenses/>. + +% RobOptim +\newcommand{\roboptim}{\textbf{RobOptim} } + +% Linux +\newcommand{\fedora}{Fedora} +\newcommand{\linux}{Linux} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "../roboptim-core.tex" +%%% End: diff --git a/doc/user-manual/macros/misc.tex b/doc/user-manual/macros/misc.tex new file mode 100644 index 0000000..d085cde --- /dev/null +++ b/doc/user-manual/macros/misc.tex @@ -0,0 +1,25 @@ +%% Copyright (C) 2009 by Thomas Moulard, AIST, CNRS, INRIA. +%% +%% This file is part of the roboptim. +%% +%% roboptim is free software: you can redistribute it and/or modify +%% it under the terms of the GNU Lesser General Public License as published by +%% the Free Software Foundation, either version 3 of the License, or +%% (at your option) any later version. +%% +%% roboptim is distributed in the hope that it will be useful, +%% but WITHOUT ANY WARRANTY; without even the implied warranty of +%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +%% GNU Lesser General Public License for more details. +%% +%% You should have received a copy of the GNU Lesser General Public License +%% along with roboptim. If not, see <http://www.gnu.org/licenses/>. + +\providecommand\href[2]{\texttt{#1}} +\providecommand\hypertarget[2]{\texttt{#1}} +\providecommand\hyperlink[2]{\texttt{#1}} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "../roboptim-core.tex" +%%% End: diff --git a/doc/user-manual/roboptim-core.tex b/doc/user-manual/roboptim-core.tex new file mode 100644 index 0000000..4a68478 --- /dev/null +++ b/doc/user-manual/roboptim-core.tex @@ -0,0 +1,85 @@ +%% Copyright (C) 2009 by Thomas Moulard, AIST, CNRS, INRIA. +%% +%% This file is part of the roboptim. +%% +%% roboptim is free software: you can redistribute it and/or modify +%% it under the terms of the GNU Lesser General Public License as published by +%% the Free Software Foundation, either version 3 of the License, or +%% (at your option) any later version. +%% +%% roboptim is distributed in the hope that it will be useful, +%% but WITHOUT ANY WARRANTY; without even the implied warranty of +%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +%% GNU Lesser General Public License for more details. +%% +%% You should have received a copy of the GNU Lesser General Public License +%% along with roboptim. If not, see <http://www.gnu.org/licenses/>. + +\documentclass[a4paper]{ltxdoc} + +\usepackage[pdfborder={0 0 0}]{hyperref} + +\usepackage[version=latest]{pgf} +\usepackage{xkeyval,calc,listings,tikz,fp} + +\usepackage{hyperref} +\hypersetup{% + colorlinks=true,% use true to enable colors below: + linkcolor=blue,%red, + filecolor=blue,%magenta, + pagecolor=blue,%red, + urlcolor=blue,%cyan, + citecolor=blue, + pdfborder=0 0 0, +} + +\usepackage[a4paper,nohead]{geometry} +\usepackage{amsmath,amssymb} +\usepackage{xxcolor} +\usepackage{pifont} +\usepackage{makeidx} +\usepackage[latin1]{inputenc} +\usepackage{amsmath} + +\graphicspath{{images/}} +\input{macros/acronyms} +\input{macros/misc} + +\makeindex + + + +\begin{document} + +\title{\bfseries RobOptim core\\ + \large Manual for version FIXME\\[1mm] + \large\href{http://roboptim.sourceforge.net}% + {\texttt{http://roboptim.sourceforge.net}}} +\author{Thomas Moulard} + + + \maketitle + + \tableofcontents + \clearpage + + + \include{text-en/introduction} + + \include{text-en/tutorial} + \include{text-en/installation} + + + \part{Modelisation} + \include{text-en/modelisation} + + %FIXME: add parts for internals... + + \part{References and Index} + \printindex + +\end{document} + +%%% Local Variables: +%%% mode: latex +%%% End: diff --git a/doc/user-manual/text-en/function.tex b/doc/user-manual/text-en/function.tex new file mode 100644 index 0000000..8f76ed7 --- /dev/null +++ b/doc/user-manual/text-en/function.tex @@ -0,0 +1,28 @@ +%% Copyright (C) 2009 by Thomas Moulard, AIST, CNRS, INRIA. +%% +%% This file is part of the roboptim. +%% +%% roboptim is free software: you can redistribute it and/or modify +%% it under the terms of the GNU Lesser General Public License as published by +%% the Free Software Foundation, either version 3 of the License, or +%% (at your option) any later version. +%% +%% roboptim is distributed in the hope that it will be useful, +%% but WITHOUT ANY WARRANTY; without even the implied warranty of +%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +%% GNU Lesser General Public License for more details. +%% +%% You should have received a copy of the GNU Lesser General Public License +%% along with roboptim. If not, see <http://www.gnu.org/licenses/>. + +\section{Functions} + +FIXME: should show how functions are represented + +how gradients are working... + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "../roboptim-core.tex" +%%% End: + diff --git a/doc/user-manual/text-en/installation.tex b/doc/user-manual/text-en/installation.tex new file mode 100644 index 0000000..5d1cc8a --- /dev/null +++ b/doc/user-manual/text-en/installation.tex @@ -0,0 +1,96 @@ +%% Copyright (C) 2009 by Thomas Moulard, AIST, CNRS, INRIA. +%% +%% This file is part of the roboptim. +%% +%% roboptim is free software: you can redistribute it and/or modify +%% it under the terms of the GNU Lesser General Public License as published by +%% the Free Software Foundation, either version 3 of the License, or +%% (at your option) any later version. +%% +%% roboptim is distributed in the hope that it will be useful, +%% but WITHOUT ANY WARRANTY; without even the implied warranty of +%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +%% GNU Lesser General Public License for more details. +%% +%% You should have received a copy of the GNU Lesser General Public License +%% along with roboptim. If not, see <http://www.gnu.org/licenses/>. + +\part{Installation and Configuration} + +\section{Installation using a package} + +The easiest way to setup \roboptim is by installing a +package. Currently, RPM packages for \fedora are available on the +\href{https://sourceforge.net/projects/roboptim/files/}{website}. To +install the package, please follow the shell commands indicated in +\autoref{lst:install-rpm}. + + +Using packages makes setup easier as \roboptim dependencies will be +installed automatically. However it requires root access and RPM +packages may be older than the latest available tarball. To install +manually \roboptim, please see the following section. + + +\begin{figure}[htbp] + \begin{center} + \begin{lstlisting}[language=sh] +# To install the libraries: +rpm -i roboptim-core-0.4-1.fc11.rpm +# To install the development files (such as headers): +rpm -i roboptim-core-devel-0.4-1.fc11.rpm +# To install the debugging symbols: +rpm -i roboptim-core-debuginfo-0.4-1.fc11.rpm +# To install the documentation: +rpm -i roboptim-core-doc-0.4-1.fc11.rpm + \end{lstlisting} + \end{center} + \caption{RPM installation procedure \label{lst:install-rpm}} +\end{figure} + + +\section{Installation from a tarball} + +The software can also be installed manually, but in this case, it is +\emph{your responsability} to make sure that the software \roboptim +requires is available. The following libraries must be available: +\begin{description} +\item[Boost C++ libraries] High-quality general purpose libraries, + used for matrix computations (uBLAS), memory management + (shared\_ptr) and advanced typing (optional, variant, MPL, + TypeTraits). +\item[GNU Libtool ltdl] Libtool ltdl is a portable wrapper for plug-in + management. It is part of GNU Libtool but is often packaged + separately. +\item[Doxygen] Generate API documentation. +\item[Miscellaneous] GNU Make and a working C++ buildchain are also + required. +\end{description} + +If the required tools are installed, the \autoref{lst:install-tarball} +commands will setup \roboptim on your computer. + + +\begin{figure}[htbp] + \begin{center} + \begin{lstlisting}[language=sh] +# Uncompress the tarball +tar xzvf roboptim-core-0.4.tar.gz +cd roboptim-core-0.4 +# Configure the package +# Package settings are controlled by the flags passed through this script. +./configure +# Compile +make +# Install the software +# Should be run as super-user if the installation prefix is not writeable. +make install + \end{lstlisting} + \end{center} + \caption{Tarball installation procedure \label{lst:install-tarball}} +\end{figure} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "../roboptim-core.tex" +%%% End: diff --git a/doc/user-manual/text-en/introduction.tex b/doc/user-manual/text-en/introduction.tex new file mode 100644 index 0000000..446ac36 --- /dev/null +++ b/doc/user-manual/text-en/introduction.tex @@ -0,0 +1,64 @@ +%% Copyright (C) 2009 by Thomas Moulard, AIST, CNRS, INRIA. +%% +%% This file is part of the roboptim. +%% +%% roboptim is free software: you can redistribute it and/or modify +%% it under the terms of the GNU Lesser General Public License as published by +%% the Free Software Foundation, either version 3 of the License, or +%% (at your option) any later version. +%% +%% roboptim is distributed in the hope that it will be useful, +%% but WITHOUT ANY WARRANTY; without even the implied warranty of +%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +%% GNU Lesser General Public License for more details. +%% +%% You should have received a copy of the GNU Lesser General Public License +%% along with roboptim. If not, see <http://www.gnu.org/licenses/>. + +\section{Introduction} + +The \roboptim packages are a set of C++ libraries for \emph{robotics + numerical optimization}. This software can be freely used under the +terms of the LGPLv3 license. + +Numerical optimization aims at solving minimization (or maximization) +problems under constraints. Algorithms provides general methods to get +approximated solutions of problems that can not be solved +analytically. + +These tools are widely used in robotics to optimize trajectories or +postures for instance. + + +\subsection{Structure} + +\roboptim is composed of different layers as illustrated by +\autoref{fig:pkg-relations}: +\begin{description} +\item[core] The core layer provides optimization problems definition + mechanisms. +\item[core plug-ins] The plug-ins implements optimization algorithms. +\item[trajectory] The trajectory layer defines different class of + trajectories and trajectories optimization problems building blocks. +\end{description} + +\begin{figure}[htbp] + \begin{center} + \includegraphics[width=\linewidth]{pkg-relations} + \end{center} + \caption{Packages relations \label{fig:pkg-relations}} +\end{figure} + +In \autoref{fig:pkg-relations}, solid lines symbolizes permanent +dependencie between libraries and applications. Dashed lines +represents run-time dependencies: plug-in are loaded at run-time and +can be switched anytime. + + + + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "../roboptim-core.tex" +%%% End: + diff --git a/doc/user-manual/text-en/tutorial.tex b/doc/user-manual/text-en/tutorial.tex new file mode 100644 index 0000000..c743aa0 --- /dev/null +++ b/doc/user-manual/text-en/tutorial.tex @@ -0,0 +1,36 @@ +%% Copyright (C) 2009 by Thomas Moulard, AIST, CNRS, INRIA. +%% +%% This file is part of the roboptim. +%% +%% roboptim is free software: you can redistribute it and/or modify +%% it under the terms of the GNU Lesser General Public License as published by +%% the Free Software Foundation, either version 3 of the License, or +%% (at your option) any later version. +%% +%% roboptim is distributed in the hope that it will be useful, +%% but WITHOUT ANY WARRANTY; without even the implied warranty of +%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +%% GNU Lesser General Public License for more details. +%% +%% You should have received a copy of the GNU Lesser General Public License +%% along with roboptim. If not, see <http://www.gnu.org/licenses/>. + +\part{Tutorial and Guidelines} +\section{Tutorial} + +FIXME: first tutorial should solve a very simple robotics problem. +Such as finding the best position for the robot (far from obstacles). + +\begin{figure}[htbp] + \begin{center} + \includegraphics[width=\linewidth]{tutorial-1} + \end{center} + \caption{Tutorial \label{fig:tutorial}} +\end{figure} + + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "../roboptim-core.tex" +%%% End: + ----------------------------------------------------------------------- hooks/post-receive -- roboptim-core |
From: Thomas M. <tho...@us...> - 2009-11-25 13:43:33
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-core". The branch, master has been updated via 0b9eaa96ff81df218783e67800a664604df8f622 (commit) from be6f3b4dbe3117326ba8ec30adff0b5916731ff1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0b9eaa96ff81df218783e67800a664604df8f622 Author: Thomas Moulard <tho...@gm...> Date: Wed Nov 25 14:42:50 2009 +0100 Make Libtool generate dlls on Windows. * configure.ac: Add win32-dll flag to LT_INIT to enable dlls building on Microsoft Windows platform. It implies that the package can be compiled using ``-no-undefined''. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index feed42a..ac07b6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-11-25 Thomas Moulard <tho...@gm...> + + Make Libtool generate dlls on Windows. + * configure.ac: Add win32-dll flag to LT_INIT to + enable dlls building on Microsoft Windows platform. + It implies that the package can be compiled using + ``-no-undefined''. + 2009-11-19 Thomas Moulard <tho...@gm...> Synchronize. diff --git a/configure.ac b/configure.ac index 3b73c0a..857a73a 100644 --- a/configure.ac +++ b/configure.ac @@ -58,7 +58,7 @@ AC_PROG_SED JRL_PROG_DOXYGEN # Search for Libtool. -LT_INIT([dlopen]) +LT_INIT([dlopen win32-dll]) # Search for libltdl. AC_CHECK_LIB([ltdl], [lt_dlopen], [], ----------------------------------------------------------------------- Summary of changes: ChangeLog | 8 ++++++++ configure.ac | 2 +- 2 files changed, 9 insertions(+), 1 deletions(-) hooks/post-receive -- roboptim-core |
From: <no-...@ro...> - 2009-11-25 02:22:58
|
The Buildbot has finished a build of roboptim-core-cfsqp-plugin on RobOptim. Full details are available at: http://cleo.laas.fr:8010/builders/roboptim-core-cfsqp-plugin/builds/21 Buildbot URL: http://cleo.laas.fr:8010/ Buildslave for this Build: cleo Build Reason: The Nightly scheduler named 'nightly' triggered this build Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed shell_4 sincerely, -The Buildbot |
From: <no-...@ro...> - 2009-11-25 02:07:08
|
The Buildbot has finished a build of roboptim-core on RobOptim. Full details are available at: http://cleo.laas.fr:8010/builders/roboptim-core/builds/36 Buildbot URL: http://cleo.laas.fr:8010/ Buildslave for this Build: cleo Build Reason: The Nightly scheduler named 'nightly' triggered this build Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed shell_4 sincerely, -The Buildbot |
From: <no-...@ro...> - 2009-11-25 02:05:15
|
The Buildbot has finished a build of roboptim-trajectory on RobOptim. Full details are available at: http://cleo.laas.fr:8010/builders/roboptim-trajectory/builds/23 Buildbot URL: http://cleo.laas.fr:8010/ Buildslave for this Build: cleo Build Reason: The Nightly scheduler named 'nightly' triggered this build Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed shell_4 sincerely, -The Buildbot |
From: <no-...@ro...> - 2009-11-24 02:22:54
|
The Buildbot has finished a build of roboptim-core-cfsqp-plugin on RobOptim. Full details are available at: http://cleo.laas.fr:8010/builders/roboptim-core-cfsqp-plugin/builds/20 Buildbot URL: http://cleo.laas.fr:8010/ Buildslave for this Build: cleo Build Reason: The Nightly scheduler named 'nightly' triggered this build Build Source Stamp: HEAD Blamelist: BUILD FAILED: failed shell_4 sincerely, -The Buildbot |