Commit 2df4b413 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

Merge branch 'stable' into 'stable'

update stable

See merge request humanoid-path-planner/hpp-doc!10
parents 252ba654 1d13319e
......@@ -21,6 +21,7 @@ RUN apt-get update -qqy \
doxygen \
g++ \
git \
graphviz \
libassimp-dev \
libboost-dev \
libccd-dev \
......@@ -30,8 +31,9 @@ RUN apt-get update -qqy \
libgraphviz-dev \
libltdl-dev \
libomniorb4-dev \
libopenscenegraph-dev \
libpcre3-dev \
libpythonqt-qtall-qt5-python2-dev \
libpythonqt-qtall-qt5-python3-dev \
libqt4-opengl-dev \
libqtgui4 \
libqtwebkit-dev \
......@@ -39,16 +41,20 @@ RUN apt-get update -qqy \
liburdfdom-dev \
libxml2 \
omniorb-nameserver \
openscenegraph \
oxygen-icon-theme \
python-matplotlib \
python-omniorb \
qt4-dev-tools \
qtbase5-dev \
qttools5-dev \
robotpkg-omniorb \
robotpkg-openscenegraph \
robotpkg-qpoases+doc \
robotpkg-roboptim-core \
robotpkg-roboptim-trajectory \
robotpkg-romeo-description \
robotpkg-py36-omniorbpy \
robotpkg-qt5-osgqt \
ros-${ROS}-octomap \
ros-${ROS}-pr2-description \
ros-${ROS}-resource-retriever \
......
FROM ubuntu:16.04
FROM ubuntu:20.04
ENV DEVEL_HPP_DIR=/workspace UBUNTU=xenial ROS=kinetic
ENV DEVEL_HPP_DIR=/workspace UBUNTU=focal ROS=noetic
RUN apt-get update -y && apt-get install -y \
curl \
gnupg2 \
&& rm -rf /var/lib/apt/lists/*
ADD repos.key /
......@@ -16,49 +17,49 @@ RUN echo "deb http://packages.ros.org/ros/ubuntu ${UBUNTU} main" > /etc/apt/sour
RUN apt-get update -qqy \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qqy \
asciidoc \
autoconf \
bison \
cmake \
doxygen \
flex \
g++ \
git \
graphviz \
libassimp-dev \
libboost-dev \
libccd-dev \
libcdd-dev \
libeigen3-dev \
libglpk-dev \
liblog4cxx10-dev \
libgraphviz-dev \
libltdl-dev \
libomniorb4-dev \
libopenscenegraph-dev \
libpcre3-dev \
libqt4-opengl-dev \
libqtgui4 \
libqtwebkit-dev \
libqt5svg5-dev \
libqt5webkit5-dev \
libqt5xmlpatterns5-dev \
libtinyxml2-dev \
liburdfdom-dev \
libxml2-dev \
omniidl \
omniidl-python \
libxml2 \
omniorb-nameserver \
openscenegraph \
oxygen-icon-theme \
python-matplotlib \
qt4-dev-tools \
pyqt5-dev \
python-is-python3 \
python3-pyqt5 \
python3-matplotlib \
qtdeclarative5-dev \
qtbase5-private-dev \
qtmultimedia5-dev \
robotpkg-omniorb \
robotpkg-openscenegraph \
robotpkg-qpoases+doc \
robotpkg-roboptim-core \
robotpkg-roboptim-trajectory \
ros-${ROS}-common-msgs \
ros-${ROS}-kdl-parser \
robotpkg-romeo-description \
robotpkg-py38-omniorbpy \
robotpkg-py38-pythonqt \
robotpkg-qt5-osgqt \
ros-${ROS}-octomap \
ros-${ROS}-pr2-description \
ros-${ROS}-srdfdom \
ros-${ROS}-resource-retriever \
ros-${ROS}-tf \
ros-${ROS}-tf-conversions \
ros-${ROS}-srdfdom \
ros-${ROS}-xacro \
source-highlight \
sudo \
wget \
&& apt-get remove -y texlive-latex-base texlive-binaries ghostscript \
......
......@@ -79,8 +79,8 @@ stable-18.04-build:
- stable
<<: *build_definition
stable-16.04-build:
image: gitlab.laas.fr:4567/humanoid-path-planner/hpp-doc:16.04
stable-20.04-build:
image: gitlab.laas.fr:4567/humanoid-path-planner/hpp-doc:20.04
allow_failure: true
only:
- stable
......@@ -92,8 +92,8 @@ devel-18.04-build:
- devel
<<: *build_definition
devel-16.04-build:
image: gitlab.laas.fr:4567/humanoid-path-planner/hpp-doc:16.04
devel-20.04-build:
image: gitlab.laas.fr:4567/humanoid-path-planner/hpp-doc:20.04
allow_failure: true
only:
- devel
......@@ -107,11 +107,11 @@ stable-18.04-test:
- stable
<<: *test_definition
stable-16.04-test:
stable-20.04-test:
allow_failure: true
image: gitlab.laas.fr:4567/humanoid-path-planner/hpp-doc:16.04
image: gitlab.laas.fr:4567/humanoid-path-planner/hpp-doc:20.04
dependencies:
- stable-16.04-build
- stable-20.04-build
only:
- stable
<<: *test_definition
......@@ -125,11 +125,11 @@ devel-18.04-test:
- devel
<<: *test_definition
devel-16.04-test:
image: gitlab.laas.fr:4567/humanoid-path-planner/hpp-doc:16.04
devel-20.04-test:
image: gitlab.laas.fr:4567/humanoid-path-planner/hpp-doc:20.04
allow_failure: true
dependencies:
- devel-16.04-build
- devel-20.04-build
only:
- devel
<<: *test_definition
......@@ -142,11 +142,11 @@ stable-18.04-doc:
- stable
<<: *doc_definition
stable-16.04-doc:
image: gitlab.laas.fr:4567/humanoid-path-planner/hpp-doc:16.04
stable-20.04-doc:
image: gitlab.laas.fr:4567/humanoid-path-planner/hpp-doc:20.04
allow_failure: true
dependencies:
- stable-16.04-build
- stable-20.04-build
only:
- stable
<<: *doc_definition
......@@ -159,11 +159,11 @@ devel-18.04-doc:
- devel
<<: *doc_definition
devel-16.04-doc:
image: gitlab.laas.fr:4567/humanoid-path-planner/hpp-doc:16.04
devel-20.04-doc:
image: gitlab.laas.fr:4567/humanoid-path-planner/hpp-doc:20.04
allow_failure: true
dependencies:
- devel-16.04-build
- devel-20.04-build
only:
- devel
<<: *doc_definition
......@@ -51,10 +51,10 @@ ADD_HPP_PKG(hpp_tutorial)
FOREACH(PKG ${SETUP_DOC_PKG})
ADD_PROJECT_DEPENDENCY(${PKG})
STRING(REGEX REPLACE "[^a-zA-Z0-9]" "_" PREFIX "${PKG}")
STRING(TOUPPER ${PREFIX} PREFIX)
STRING(REGEX REPLACE "[^a-zA-Z0-9]" "" DOC_VAR "${PKG}")
STRING(TOUPPER ${DOC_VAR} DOC_VAR)
SET(PREFIX "${PKG}")
SET(DOC_VAR "${PKG}")
LIST(APPEND LOGGING_WATCHED_VARIABLES
${PREFIX}_FOUND)
IF(${PREFIX}_FOUND)
IF(DEFINED ${PREFIX}_DOXYGENDOCDIR)
SET(DOC_PREFIX ${${PREFIX}_DOXYGENDOCDIR})
......@@ -90,6 +90,8 @@ make update
ENDIF(DEFINED ${PKG}_robotpkg_package)
CONFIGURE_FILE(doc/missing.dox.in ${CMAKE_BINARY_DIR}/doc/${PKG}-missing.dox @ONLY)
ENDIF(${PREFIX}_FOUND)
LIST(APPEND LOGGING_WATCHED_VARIABLES ${DOC_VAR}_URL ${DOC_VAR}_LINK)
ENDFOREACH(PKG ${SETUP_DOC_PKG})
CONFIG_FILES(doc/main.dox doc/doxygenLayout.xml)
......
Subproject commit 59d817dca29527e98bdbef555e09f25358810cae
Subproject commit a689714c0d0890ffff5649ba25cbaed44dd6e660
export INSTALL_HPP_DIR=$DEVEL_HPP_DIR/install
export ROBOTPKG=/opt/openrobots
export ROS=/opt/ros/noetic
export PATH=$INSTALL_HPP_DIR/sbin:$INSTALL_HPP_DIR/bin:$ROBOTPKG/bin:$ROBOTPKG/sbin:$ROS/bin:$PATH
export PKG_CONFIG_PATH=$INSTALL_HPP_DIR/lib/pkgconfig/:$ROBOTPKG/lib/pkgconfig:$ROS/lib/pkgconfig
export PYTHONPATH=$INSTALL_HPP_DIR/lib/python3/dist-packages:$ROBOTPKG/lib/python3.8/site-packages:$ROS/lib/python3/dist-packages:$PYTHONPATH
export LD_LIBRARY_PATH=$INSTALL_HPP_DIR/lib:$ROBOTPKG/lib:$INSTALL_HPP_DIR/lib64:$ROS/lib:$LD_LIBRARY_PATH
# Make sure that /opt/ros/noetic is in the ROS_PACKAGE_PATH,
# otherwise, you should add it by hand in the line below.
export ROS_PACKAGE_PATH=$INSTALL_HPP_DIR/share:$ROBOTPKG/share:$ROS/share
export CMAKE_PREFIX_PATH=$INSTALL_HPP_DIR:$ROBOTPKG:$ROS:/usr
if [ -f "${INSTALL_HPP_DIR}/etc/hpp-tools/bashrc" ]; then
source "${INSTALL_HPP_DIR}/etc/hpp-tools/bashrc"
fi
Developing in Hpp
=================
This page explains some development rules applied in *HPP* project.
General rules to be followed in HPP developement
------------------------------------------------
Make clear distinction between algorithms, middleware and graphical interface
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.*HPP* architecture: the functionalities are distributed into separate software packages. The architecture is composed of three types of packages: algorithms, CORBA interfaces and KPP-SDK interfaces.
image:figures/archi.png[HPP architecture]
*HPP* is composed of several software packages divided into three
groups as explained in the above figure:
* algorithms,
* Corba server
* KPP-interfaces
KPP-interface and Corba server should be considered as visualization
and debugging-testing tools. It is mostly important that packages
implementing path planning algorithms for humanoid robots are
independent from a given middleware (CORBA) and from a given GUI
(KineoPathPlanner). As a consequence, no CORBA::xxx attribute should
be in a class belonging to the algorithm part.
This simple principle will enable to easily insert the algorithmic
software packages into different middlewares (GenoM, RT-middleware for
instance).
Modularity
~~~~~~~~~~
Try to avoid developing huge packages including many
functions. Instead, build several small packages with simple
interfaces and easy to understand functionalities.
Example
^^^^^^^
Let us assume that you are developing a path planning algorithm and
you want to use quaternions to represent the orientations of
rigid-bodies.
* The first step consists in trying to find an existing implementation
of quaternions that you can use.
* Let us assume (this is very unlikeky) that you cannot find a good
implementation of quaternions, then, instead of developing
operations on quaternions in your path planning package, it is much
more clever to create a package that will handle quaternion
operations and to make your path planning package depend on
it. Later, other users will be able to use your quaternion package.
Level of generality
~~~~~~~~~~~~~~~~~~~
When you implement an algorithm, always ask yourself the question:
"Could my algorihtm be applied to applications more general than the
one I am dealing with?" If yes, try to make your algorithm take more
general input than your practical problem of today.
Example
^^^^^^^
Let us assume that you want to implement Newton algoritm to find a
root of a polynomial function. Your algorithm requires the derivative
of the polynomial. You can get an expression of a polynomial
derivative using the polynomial coefficients.
However, it would be more clever to develop the same algorithm taking
as input a function that might not be a polynomial. For that you can
define an abstract class:
[source,cc]
class Cmapping {
public:
virtual double value(double inParamter) = 0;
virtual double derivative(double inParamter) = 0;
};
make your Newton implementation take as input an object Cmapping and
then derive this class into a concrete polynomial class. Thus, your
algorithm can be used by other people wanting to find the root of
non-polynomial functions.
Humanoid robots
^^^^^^^^^^^^^^^
The algorithms we develop are mostly applied to one type of humanoid
robot: HRP2. It is therefore important to develop these algorithms in
such a way that they can be applied to any other humanoid robot. For
that developers should avoid to make too strong asumptions about the
robot structure. The abstract CjrlHumanoidDynamicRobot interface for
dynamic humanoid robots have been designed in this aim.
How to implement a new algorithm in HPP
----------------------------------------
To implement a new algorithm in HPP, you need to create new software
packages as described below. To create new software packages, we
advise developers to use perl script packageCreate.
[source,shell]
[~] cd devel/src
[src] cg-clone git+ssh://[git|softs].laas.fr/git/robots/scripts
Create a new software package implementing your algorithm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To create a new package depending on hppCore, type the following
commands.
[source,shell]
[~] cd devel/src
[src] perl ./scripts/packageCreate hppNewAlgo -d hppCore HPPCORE
If you want your package to depend on other packages add `-d package
PACKAGE` for each dependence.
This operation creates a template of software package with all
necessary files to compile. There are four subdirectories in this
package:
* `doc` contains necessary files to generate doxygen documentation,
* `include` contains headers files
* `src` contains source code files
* `unitTesting` contains files used to test the algorithm developed in
the package.
Define in `include/hppNewAlgo.h` a class that derives from `ChppPlanner`.
[source,cc]
---------------------------------------------------------------------
#include "hppPlanner.h"
class ChppNewAlgo : public ChppPlanner {
public:
...
ktStatus solve();
};
---------------------------------------------------------------------
`Class ChppPlanner` proposes an interface functions to insert a robot
and obstacles:
[source,cc]
ktStatus ChppPlanner::addHppProblem(CkppDeviceComponentShPtr robot);
[source,cc]
ktStatus ChppPlanner::addObstacle(CkcdObjectShPtr object);
Independently from how the robot and obstacles are inserted, you can
use them as the input of your algorithm in your `class ChppNewAlgo`:
[source,cc]
CkppDeviceComponentShPtr robot = robotIthProblem(0);
Write in `src/hppNewAlgo.cpp` function:
[source,cc]
---------------------------------------------------------------------
ktStatus ChppNewAlgo::solve()
{
CkwsPath path = resultOfNewAlgo();
ChppProblem& hppProblem = hppProblemVector[problemId];
hppProblem.addPath(kwsPath);
}
---------------------------------------------------------------------
that runs your algorithm. The two last lines insert the result of your
path in KPP interface if the interface is running.
To compile and install your package do the following step:
[source,shell]
[~] cd devel/src/hppNewAlgo
[hppNewAlgo] mkdir build
[hppNewAlgo] cd build
[hppNewAlgo] cmake -DCMAKE_INSTALL_PREFIX=${HOME}/devel ..
[hppNewAlgo] make install
Create a new KPP-interface for your package
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To be able to see the result of your algorithm, you need to create a
new KPP-interface deriving from CkppInterface:
[source,shell]
[~] cd devel/src
[src] perl ./scripts/packageCreate kppInterfaceNewAlgo -d kppInterface KPPINTERFACE -d hppNewAlgo HPPNEWALGO
and depending on your algorithm software package.
See package kppInterfaceTutorial for an example, and especially for
managing Kineo license issue in `src/Makefile.am`:
[source,shell]
[~] cd devel/src
[src] cg-clone git+ssh://[git|softs].laas.fr/git/jrl/hppTutorialPlanner
[src] cg-clone git+ssh://[git|softs].laas.fr/git/jrl/kppInterfaceTutorial
To run your interface into KineoPathPlanner, do the following:
[source,shell]
[~] KineoPathPlanner -ModulePath ${HOME}/lib/modules/${HOST}/libkppInterfaceNewAlgo
Programming conventions
-----------------------
Programming rules
~~~~~~~~~~~~~~~~~
Besides the general rules explained above, some more specific rules
should be enforced when writing a new class.
Private attributes
^^^^^^^^^^^^^^^^^^
All attributes in a class should be private since they represent the
internal state of the object. Access to these attributes can be
controlled through protected or public access functions.
.Example
[source,cc]
---------------------------------------------------------------------
class ConeClass {
public:
/**
\brief Public read access
\return Internal value of the object.
*/
inline double value()
{
return inValue;
};
protected:
/**
\brief Write access for derived classes
\param inValue new internal value of the object.
*/
inline void value(double inValue)
{
attValue = inValue;
};
private:
/**
\brief Internal value of the object
*/
double attValue;
};
---------------------------------------------------------------------
......@@ -30,10 +30,10 @@ The packages are distributed into the following categories:
<img src="../figures/archi.svg" alt="Overview of the architecture" style="max-height: 50vh"/>
</td><td width="5%">
</td><td width="30%">
The algorithmic part, built on @HPPCORE_LINK@ is
The algorithmic part, built on @hpp-core_LINK@ is
embedded in corba servers implemented by
@HPPCORBASERVER_LINK@ or extensions like
@HPPMANIPULATIONCORBA_LINK@.
@hpp-corbaserver_LINK@ or extensions like
@hpp-manipulation-corba_LINK@.
The corba servers are linked to executable \c hppcorbaserver.
<p></p>
From a python terminal, clients to the corba servers can be created in order
......@@ -42,13 +42,13 @@ The packages are distributed into the following categories:
<p></p>
Results of path planning requests as well as individual configurations can
be displayed in \c gepetto-gui via package
@HPPGEPETTOVIEWER_LINK@.
@hpp-gepetto-viewer_LINK@.
</td></tr>
</table>
\par Getting started
Package @HPPTUTORIAL_LINK@ provides some examples of
Package @hpp_tutorial_LINK@ provides some examples of
how to use this project.
**/
......@@ -59,27 +59,24 @@ how to use this project.
\section hpp_doc_algorithms_technical_tools Technical tools
- @HPPUTIL_LINK@: technical tools for the HPP project (logging, benchmark, quality assurance tools),
- @hpp-util_LINK@: technical tools for the HPP project (logging, benchmark, quality assurance tools),
\section hpp_doc_algorithms_motion_planning Motion planning for humanoid systems
\par Kinematic chain with geometry
- @HPPFCL_LINK@: Modified version of Flexible collision library, for collision detection and distance computation,
- @PINOCCHIO_LINK@: implementation of kinematic chain with dynamic computations,
- @HPPPINOCCHIO_LINK@: Interface between pinocchio and hpp-core,
- @hpp-fcl_LINK@: Modified version of Flexible collision library, for collision detection and distance computation,
- @pinocchio_LINK@: implementation of kinematic chain with dynamic computations,
- @hpp-pinocchio_LINK@: Interface between pinocchio and hpp-core,
\par Non linear constraints
- @HPPCONSTRAINTS_LINK@: definition of some nonlinear constraints,
- @hpp-constraints_LINK@: definition of some nonlinear constraints,
\par Path planning
- @HPPCORE_LINK@: definition of basic classes, path planning problems and solvers,
\par Path Planning for humanoid robots
- @HPPWHOLEBODYSTEP_LINK@: whole-body and walk planning using sliding path approximation.
- @hpp-core_LINK@: definition of basic classes, path planning problems and solvers,
\par Manipulation Planning
- @HPPMANIPULATION_LINK@: Manipulation planning
- @HPPMANIPULATIONURDF_LINK@: Manipulation planning
- @hpp-manipulation_LINK@: Manipulation planning
- @hpp-manipulationurdf_LINK@: Manipulation planning
**/
......@@ -90,8 +87,8 @@ how to use this project.
\par Packages implementing CORBA interfaces
The following packages implement Corba communication functionalities
\li @HPPCORBASERVER_LINK@ : Corba server embedding a hpp::core::ProblemSolver instance.
\li @HPPMANIPULATIONCORBA_LINK@ : Corba server for @HPPMANIPULATION_LINK@.
\li @hpp-corbaserver_LINK@ : Corba server embedding a hpp::core::ProblemSolver instance.
\li @hpp-manipulation-corba_LINK@ : Corba server for @hpp-manipulation_LINK@.
**/
......@@ -102,9 +99,9 @@ The following packages implement Corba communication functionalities
\par Packages implementing graphical user interface
The following packages implement a corba connection with a graphical display
\li @GEPETTOVIEWER_LINK@ : Graphical window based on OpenSceneGraph.
\li @GEPETTOVIEWERCORBA_LINK@ : Corba interface to gepetto-gui.
\li @HPPGEPETTOVIEWER_LINK@ : Link between hpp and gepetto-viewer-corba.
\li @gepetto-viewer_LINK@ : Graphical window based on OpenSceneGraph.
\li @gepetto-viewer-corba_LINK@ : Corba interface to gepetto-gui.
\li @hpp-gepetto-viewer_LINK@ : Link between hpp and gepetto-viewer-corba.
**/
......
## Binary installation on ubuntu-18.04 64 bit with ros-melodic
## Source installation on ubuntu-18.04 64 bit with ros-melodic
To install all the packages on ubuntu 18.04 LTS 64 bit, you should do the following steps:
......@@ -6,56 +6,84 @@ To install all the packages on ubuntu 18.04 LTS 64 bit, you should do the follow
2. install robotpkg: follow [the robotpkg installation website](http://robotpkg.openrobots.org/debian.html).
3. install HPP:
```bash
#pyver=27
pyver=36
sudo apt-get install robotpkg-py${pyver}-hpp-manipulation-corba robotpkg-py${pyver}-qt5-hpp-gepetto-viewer
3. install by apt-get
```bash
sudo apt-get install \
g++ \
cmake \
doxygen \
libboost-dev \
liburdfdom-dev \
libassimp-dev \
libeigen3-dev \
libgraphviz-dev \
robotpkg-omniorb \
robotpkg-qpoases+doc \
robotpkg-romeo-description \