Commit 87681a73 authored by Olivier Stasse's avatar Olivier Stasse

Merge remote-tracking branch 'origin/devel' into cmake-export

parents f64247b4 df561f82
---
ColumnLimit: 80
Standard: C++03
...
# Copyright 2010, 2019 JRL, CNRS/AIST, LAAS CNRS
# See LICENSE file.
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
SET(PROJECT_ORG stack-of-tasks)
SET(PROJECT_NAME sot-core)
......@@ -17,13 +17,8 @@ SET(CXX_DISABLE_WERROR True)
INCLUDE(cmake/base.cmake)
# Specify the project.
cmake_policy(SET CMP0048 NEW)
PROJECT(${PROJECT_NAME}
LANGUAGES
CXX
VERSION
${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}
)
COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX)
PROJECT(${PROJECT_NAME} ${PROJECT_ARGS})
find_package (Boost REQUIRED
python filesystem system thread program_options unit_test_framework)
......@@ -47,6 +42,9 @@ install(FILES "src/sot-coreMacros.cmake"
set(PACKAGE_EXTRA_MACROS "${PACKAGE_EXTRA_MACROS}
include(\"\${CMAKE_CURRENT_LIST_DIR}/sot-coreMacros.cmake\")")
OPTION (BUILD_PYTHON_INTERFACE "Build the python binding" ON)
OPTION (INSTALL_PYTHON_INTERFACE_ONLY "Install *ONLY* the python binding" OFF)
PKG_CONFIG_APPEND_LIBS("sot-core")
# Search for dependencies.
......@@ -57,11 +55,8 @@ SET(BOOST_COMPONENTS
ADD_PROJECT_DEPENDENCY(dynamic-graph REQUIRED)
OPTION (BUILD_PYTHON_INTERFACE "Build the python binding" ON)
OPTION (INSTALL_PYTHON_INTERFACE_ONLY "Install *ONLY* the python binding" OFF)
IF(BUILD_PYTHON_INTERFACE)
FINDPYTHON(2.7 EXACT REQUIRED)
FINDPYTHON()
STRING(REGEX REPLACE "-" "_" PY_NAME ${PROJECT_NAME})
SET(${PY_NAME}_INSTALL_DIR ${PYTHON_SITELIB}/${PY_NAME})
INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIRS})
......@@ -71,16 +66,14 @@ IF(BUILD_PYTHON_INTERFACE)
ENDIF(BUILD_PYTHON_INTERFACE)
ADD_REQUIRED_DEPENDENCY ("pinocchio >= 2.0.0")
ADD_REQUIRED_DEPENDENCY ("pinocchio >= 2.2.1")
SEARCH_FOR_BOOST()
ADD_SUBDIRECTORY(include)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(unitTesting)
IF (NOT INSTALL_PYTHON_INTERFACE_ONLY)
ADD_SUBDIRECTORY(doc)
ENDIF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
ADD_SUBDIRECTORY(doc)
# **********************************
# Robot_utils_sot_py PYTHON module *
......@@ -107,3 +100,5 @@ list (SORT _variableNames)
foreach (_variableName ${_variableNames})
message(STATUS "${_variableName}=${${_variableName}}")
endforeach()
=======
>>>>>>> origin/devel
Subproject commit efa25a9976b8a6fc9f51d26924d4238d0d4820b1
Subproject commit 2a9086eaf5e7ef7cd6992e0fd6c6c615c0893400
......@@ -9,8 +9,10 @@ IF(BUILD_PYTHON_INTERFACE)
INCLUDE(../cmake/sphinx.cmake)
SPHINX_SETUP()
SPHINX_FINALIZE()
INSTALL (FILES
pictures/feature.png
pictures/task.png
DESTINATION ${_PKG_CONFIG_DOXYGENDOCDIR}/pictures)
IF(INSTALL_DOCUMENTATION)
INSTALL (FILES
pictures/feature.png
pictures/task.png
DESTINATION ${_PKG_CONFIG_DOXYGENDOCDIR}/pictures)
ENDIF(INSTALL_DOCUMENTATION)
ENDIF(BUILD_PYTHON_INTERFACE)
/** \page codeorganization Code organization
\section sec_organization Organization of the code
The code is based on the <c>dynamic-graph</c> package, which provides the
framework on which sot-core relies. Hence most of the code in <c>sot-core</c>
consists of classes that derive from dynamic_graph::Entity.
......
......@@ -5,7 +5,7 @@
\subsection ssubp_unitary_op Vector selector
This entity output a vector remapping an input vector
This entity output a vector remapping an input vector
\f${\bf v}_{in}=[v_0,v_1,\cdots,v_n]\f$.
It is realized by specifying bounds such as \f$({[i,j],[k,l]})\f$,
then the output vector will be the contanetion of the
......@@ -13,7 +13,7 @@ intervals extracted from the input vector:
\f${\bf v}_{out}=[v_i,v_{i+1},\cdots,v_{j-1},v_{j},v_{k},
v_{k+1},\cdots,v_{l-1},v_l]\f$
For instance if we have an input vector
such that:
such that:
\code
1
2
......
......@@ -10,7 +10,7 @@
<ul>
<li> Feature1D : \f$ L_2 \f$ norm of \f$ e(t)\f$
dynamicgraph::sot::Feature1D</li>
<li> FeatureGeneric : Externalisation of the Feature computation
<li> FeatureGeneric : Externalisation of the Feature computation
dynamicgraph::sot::FeatureGeneric </li>
<li> FeatureJointLimits : Distance to the joint limits and its Jacobian
dynamicgraph::sot::FeatureJointLimits </li>
......
......@@ -10,7 +10,7 @@ This library is based on several packages:
\li <c>pthread</c>
\li <c>python</c>
\li <c>pinocchio</c> (https://github.com/stack-of-tasks/pinocchio)
Their presence will be checked with the use of pkg-config.
\section sec_installation Installation
......@@ -23,15 +23,12 @@ extension</a>.
A short and quick way to get it on 16.04 LTS is to do the following:
\verbatim
sudo tee /etc/apt/sources.list.d/robotpkg.list <<EOF
deb [arch=amd64] http://robotpkg.openrobots.org/wip/packages/debian/pub kinetic robotpkg
deb [arch=amd64] http://robotpkg.openrobots.org/packages/debian/pub kinetic robotpkg
EOF
\endverbatim
This created a file to add robotpkg and robotpkg/wip as apt repositories.
To identify the packages from this repository the server key must be added:
\verbatim
curl http://robotpkg.openrobots.org/packages/debian/robotpkg.key |
sudo apt-key add -
deb [arch=amd64] http://robotpkg.openrobots.org/wip/packages/debian/pub kinetic
robotpkg deb [arch=amd64] http://robotpkg.openrobots.org/packages/debian/pub
kinetic robotpkg EOF \endverbatim This created a file to add robotpkg and
robotpkg/wip as apt repositories. To identify the packages from this repository
the server key must be added: \verbatim curl
http://robotpkg.openrobots.org/packages/debian/robotpkg.key | sudo apt-key add -
\endverbatim
The list of available packages is provided through:
\verbatim
......
......@@ -7,4 +7,3 @@
This is the namespace for a subset of helperd classes related to the
implementation of the Stack-Of-Tasks.
*/
......@@ -9,7 +9,7 @@ having high level software capabilities, like plugins and python scripting.
The package includes the following functionnalities:
<ul>
<li> A parameter server object to register and collect information on your
robot (see \subpage page_parameter_server) </li>
robot (see \subpage page_parameter_server) </li>
<li> From the internal SoT point of view a class called Device which is
allowing a direct interaction with your robot.</li>
<li> From the extern SoT point of view a class which makes the connection
......@@ -17,9 +17,9 @@ either with the hardware or with a simulator </li>
<li> A full kinematic engine implemented in an incremental manner.</li>
</ul>
\subpage page_RequirementsInstallation
\subpage page_RequirementsInstallation
\subpage page_featuredoc
\subpage page_featuredoc
\subpage page_sot
......@@ -52,10 +52,9 @@ A hierarchical inequality solver, sot::SolverHierarchicalInequalities, is
present. For the maths, see \cite Mansard2007.
\subsection subsec_exceptions Exceptions
The library defines the following classes of exceptions that derive from std::exception:
\li sot::ExceptionAbstract (the base class for all exceptions in sot-core; use it to
catch only sot-core exceptions)
\li sot::ExceptionDynamic
The library defines the following classes of exceptions that derive from
std::exception: \li sot::ExceptionAbstract (the base class for all exceptions in
sot-core; use it to catch only sot-core exceptions) \li sot::ExceptionDynamic
\li sot::ExceptionFactory (raised if issues in instancing tasks and features)
\li sot::ExceptionFeature (raised by a feature - see \ref subsec_Features)
\li sot::ExceptionSignal
......@@ -78,7 +77,7 @@ Tasks are the hierarchical element of the stack of tasks.
A task computes a value and a Jacobian as output signals.
Once stacked into a solver, the solver will compute the control vector
that makes the task value converge toward zero in the
that makes the task value converge toward zero in the
order defined by the priority levels. For more information see the documentation
of class dynamicgraph::sot:TaskAbstract.
......@@ -87,8 +86,9 @@ The following classes encapsulate common mathematical objects, and
are all defined in the core library; see each individual class documentation
for reference.
\li Vectors: (sot::VectorQuaternion, sot::VectorRollPitchYaw, sot::VectorUTheta)
\li Matrices: (sot::MatrixForce, sot::MatrixHomogeneous, sot::MatrixRotation, sot::MatrixTwist)
\li sot::MultiBound can be used to enforce bounds on numeric values
\li Matrices: (sot::MatrixForce, sot::MatrixHomogeneous, sot::MatrixRotation,
sot::MatrixTwist) \li sot::MultiBound can be used to enforce bounds on numeric
values
\subsection subsec_others Others
The core library also contains functions for adaptation and extension of
......@@ -101,61 +101,61 @@ See \ref factory for additional information.
\defgroup plugins_list List of python modules
These python modules are linked with the core library.
sot/sot-qr
sot/weighted-sot
sot/sot-h
sot/sot
math/op-point-modifier
matrix/binary-op
matrix/derivator
matrix/fir-filter
matrix/integrator-abstract
matrix/integrator-euler
matrix/matrix-constant
matrix/unary-op
matrix/vector-constant
matrix/vector-to-rotation
task/gain-adaptive
task/task-pd
task/constraint
task/gain-hyperbolic
task/task
task/task-conti
task/task-unilateral
feature/feature-point6d
feature/feature-vector3
feature/feature-generic
feature/feature-joint-limits
feature/feature-1d
feature/feature-point6d-relative
feature/feature-visual-point
feature/feature-task
feature/feature-line-distance
traces/reader
tools/time-stamp
tools/timer
tools/seq-play
tools/sequencer
tools/robot-simu
tools/periodic-call-entity
tools/motion-period
tools/neck-limitation
tools/mailbox-vector
tools/kalman
tools/joint-limitator
tools/gripper-control
tools/com-freezer
tools/clamp-workspace
tools/binary-int-to-uint
control/control-gr
control/control-pd
sot/sot-qr
sot/weighted-sot
sot/sot-h
sot/sot
math/op-point-modifier
matrix/binary-op
matrix/derivator
matrix/fir-filter
matrix/integrator-abstract
matrix/integrator-euler
matrix/matrix-constant
matrix/unary-op
matrix/vector-constant
matrix/vector-to-rotation
task/gain-adaptive
task/task-pd
task/constraint
task/gain-hyperbolic
task/task
task/task-conti
task/task-unilateral
feature/feature-point6d
feature/feature-vector3
feature/feature-generic
feature/feature-joint-limits
feature/feature-1d
feature/feature-point6d-relative
feature/feature-visual-point
feature/feature-task
feature/feature-line-distance
traces/reader
tools/time-stamp
tools/timer
tools/seq-play
tools/sequencer
tools/robot-simu
tools/periodic-call-entity
tools/motion-period
tools/neck-limitation
tools/mailbox-vector
tools/kalman
tools/joint-limitator
tools/gripper-control
tools/com-freezer
tools/clamp-workspace
tools/binary-int-to-uint
control/control-gr
control/control-pd
@defgroup factory Factory
......@@ -185,4 +185,3 @@ They are all located in the tests directory.
*/
......@@ -3,5 +3,5 @@
In order to register and recover information on your robot it is possible
to register information using the class dynamicgraph::sot::RobotUtil.
*/
/** \page page_sot Stack-of-Tasks
As explained in class dynamicgraph::sot::FeatureAbstract,
\f[
{\bf E}(t) = {\bf e}({\bf q}(t), t)= {\bf s}({\bf q}(t)) - {\bf s}^*(t)
......
# Copyright 2010, François Bleibel, Olivier Stasse, JRL, CNRS/AIST
SET(NEWHEADERS
sot/core/abstract-sot-external-interface.hh
sot/core/additional-functions.hh
sot/core/abstract-sot-external-interface.hh
sot/core/additional-functions.hh
sot/core/api.hh
sot/core/binary-int-to-uint.hh
sot/core/binary-op.hh
sot/core/binary-int-to-uint.hh
sot/core/binary-op.hh
sot/core/causal-filter.hh
sot/core/clamp-workspace.hh
sot/core/com-freezer.hh
sot/core/com-freezer.hh
sot/core/contiifstream.hh
sot/core/constraint.hh
sot/core/constraint.hh
sot/core/debug.hh
sot/core/derivator.hh
sot/core/derivator.hh
sot/core/device.hh
sot/core/double-constant.hh
sot/core/event.hh
sot/core/exception-abstract.hh
sot/core/exception-dynamic.hh
......@@ -24,62 +25,62 @@ SET(NEWHEADERS
sot/core/exception-tools.hh
sot/core/exp-moving-avg.hh
sot/core/factory.hh
sot/core/feature-1d.hh
sot/core/feature-1d.hh
sot/core/feature-abstract.hh
sot/core/feature-generic.hh
sot/core/feature-joint-limits.hh
sot/core/feature-line-distance.hh
sot/core/feature-line-distance.hh
sot/core/feature-point6d-relative.hh
sot/core/feature-point6d.hh
sot/core/feature-pose.hh
sot/core/feature-posture.hh
sot/core/feature-task.hh
sot/core/feature-pose.hh
sot/core/feature-posture.hh
sot/core/feature-task.hh
sot/core/feature-vector3.hh
sot/core/feature-visual-point.hh
sot/core/filter-differentiator.hh
sot/core/filter-differentiator.hh
sot/core/fir-filter.hh
sot/core/flags.hh
sot/core/gain-adaptive.hh
sot/core/gain-hyperbolic.hh
sot/core/gripper-control.hh
sot/core/gripper-control.hh
sot/core/integrator-abstract.hh
sot/core/integrator-euler.hh
sot/core/joint-limitator.hh
sot/core/joint-limitator.hh
sot/core/kalman.hh
sot/core/latch.hh
sot/core/macros-signal.hh
sot/core/mailbox-vector.hh
sot/core/mailbox.hh
sot/core/mailbox.hxx
sot/core/mailbox.hxx
sot/core/matrix-constant.hh
sot/core/matrix-geometry.hh
sot/core/matrix-svd.hh
sot/core/memory-task-sot.hh
sot/core/motion-period.hh
sot/core/motion-period.hh
sot/core/multi-bound.hh
sot/core/neck-limitation.hh
sot/core/neck-limitation.hh
sot/core/op-point-modifier.hh
sot/core/parameter-server.hh
sot/core/periodic-call.hh
sot/core/periodic-call-entity.hh
sot/core/periodic-call-entity.hh
sot/core/pool.hh
sot/core/reader.hh
sot/core/reader.hh
sot/core/robot-simu.hh
sot/core/robot-utils.hh
sot/core/robot-utils.hh
sot/core/sot.hh
sot/core/stop-watch.hh
sot/core/switch.hh
sot/core/task.hh
sot/core/switch.hh
sot/core/task.hh
sot/core/task-abstract.hh
sot/core/task-conti.hh
sot/core/task-pd.hh
sot/core/task-unilateral.hh
sot/core/time-stamp.hh
sot/core/timer.hh
sot/core/trajectory.hh
sot/core/trajectory.hh
sot/core/unary-op.hh
sot/core/utils-windows.hh
sot/core/variadic-op.hh
sot/core/variadic-op.hh
sot/core/vector-constant.hh
sot/core/vector-to-rotation.hh
sot/core/visual-point-projecter.hh
......
......@@ -9,63 +9,60 @@
#ifndef ABSTRACT_SOT_EXTERNAL_INTERFACE_HH
#define ABSTRACT_SOT_EXTERNAL_INTERFACE_HH
#include <vector>
#include <map>
#include <string>
#include <sot/core/api.hh>
#include <string>
#include <vector>
namespace dynamicgraph {
namespace sot {
class SOT_CORE_EXPORT NamedVector
{
private:
std::string name_;
std::vector<double> values_;
namespace sot {
public:
NamedVector() {}
~NamedVector() {}
class SOT_CORE_EXPORT NamedVector {
const std::string & getName() const
{ return name_;}
private:
std::string name_;
std::vector<double> values_;
void setName(const std::string & aname)
{ name_ = aname;}
public:
NamedVector() {}
~NamedVector() {}
const std::vector<double> & getValues() const
{ return values_;}
const std::string &getName() const { return name_; }
void setValues(const std::vector<double> & values)
{ values_ = values;}
void setName(const std::string &aname) { name_ = aname; }
};
typedef NamedVector SensorValues;
typedef NamedVector ControlValues;
const std::vector<double> &getValues() const { return values_; }
class SOT_CORE_EXPORT AbstractSotExternalInterface
{
public:
void setValues(const std::vector<double> &values) { values_ = values; }
};
typedef NamedVector SensorValues;
typedef NamedVector ControlValues;
AbstractSotExternalInterface(){}
class SOT_CORE_EXPORT AbstractSotExternalInterface {
public:
AbstractSotExternalInterface() {}
virtual ~AbstractSotExternalInterface(){}
virtual ~AbstractSotExternalInterface() {}
virtual void setupSetSensors(std::map<std::string,SensorValues> &sensorsIn)=0;
virtual void
setupSetSensors(std::map<std::string, SensorValues> &sensorsIn) = 0;
virtual void nominalSetSensors(std::map<std::string, SensorValues> &sensorsIn)=0;
virtual void
nominalSetSensors(std::map<std::string, SensorValues> &sensorsIn) = 0;
virtual void cleanupSetSensors(std::map<std::string,SensorValues> &sensorsIn)=0;
virtual void
cleanupSetSensors(std::map<std::string, SensorValues> &sensorsIn) = 0;
virtual void getControl(std::map<std::string,ControlValues> &)=0;
virtual void setSecondOrderIntegration(void)=0;
virtual void setNoIntegration(void)=0;
};
}
}
virtual void getControl(std::map<std::string, ControlValues> &) = 0;
virtual void setSecondOrderIntegration(void) = 0;
virtual void setNoIntegration(void) = 0;
};
} // namespace sot
} // namespace dynamicgraph
typedef dynamicgraph::sot::AbstractSotExternalInterface * createSotExternalInterface_t();
typedef void destroySotExternalInterface_t (dynamicgraph::sot::AbstractSotExternalInterface *);
typedef dynamicgraph::sot::AbstractSotExternalInterface *
createSotExternalInterface_t();
typedef void destroySotExternalInterface_t(
dynamicgraph::sot::AbstractSotExternalInterface *);
#endif
......@@ -8,34 +8,35 @@
*/
/* SOT */
#include "sot/core/api.hh"
#include <dynamic-graph/pool.h>
#include <dynamic-graph/signal-base.h>
#include <sot/core/exception-factory.hh>
#include <dynamic-graph/pool.h>
#include <sot/core/pool.hh>
#include "sot/core/api.hh"
/* --- STD --- */
#include <string>
#include <map>
#include <sstream>
#include <string>
/* --- BOOST --- */
#include <boost/function.hpp>
#include <boost/bind.hpp>
#include <boost/function.hpp>
namespace dynamicgraph { namespace sot {
namespace dynamicgraph {
namespace sot {
/*! @ingroup factory
\brief This helper class dynamically overloads the "new" shell command
to allow creation of tasks and features as well as entities.
*/
class AdditionalFunctions
{
class AdditionalFunctions {
public:
AdditionalFunctions();
~AdditionalFunctions();
static void cmdFlagSet( const std::string& cmd,std::istringstream& args,
std::ostream& os );
AdditionalFunctions();
~AdditionalFunctions();
static void cmdFlagSet(const std::string &cmd, std::istringstream &args,
std::ostream &os);
};
} /* namespace sot */} /* namespace dynamicgraph */
} /* namespace sot */
} /* namespace dynamicgraph */
......@@ -10,14 +10,14 @@
#ifndef SOT_CORE_API_HH
#define SOT_CORE_API_HH
#if defined (WIN32)
# ifdef sot_core_EXPORTS
# define SOT_CORE_EXPORT __declspec(dllexport)
# else
# define SOT_CORE_EXPORT __declspec(dllimport)
# endif
#if defined(WIN32)
#ifdef sot_core_EXPORTS
#define SOT_CORE_EXPORT __declspec(dllexport)
#else
# define SOT_CORE_EXPORT