Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
jrl-walkgen
Commits
8c78ed7c
Commit
8c78ed7c
authored
Mar 24, 2020
by
Guilhem Saurel
Browse files
Merge branch 'master' into devel
parents
3ebe52f9
667721a2
Pipeline
#8770
failed with stage
in 44 minutes and 38 seconds
Changes
94
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
8c78ed7c
# Copyright 2010, Olivier Stasse, JRL, CNRS/AIST
#
# This file is part of jrl-walkgen.
# jrl-walkgen 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.
#
# jrl-walkgen 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
# General Lesser Public License for more details. You should have
# received a copy of the GNU Lesser General Public License along with
# jrl-walkgen. If not, see <http://www.gnu.org/licenses/>.
# Requires at least CMake 2.6 to configure the package.
CMAKE_MINIMUM_REQUIRED
(
VERSION 2.6
)
# Includes from jrl-cmaketools
INCLUDE
(
cmake/base.cmake
)
INCLUDE
(
cmake/lapack.cmake
)
INCLUDE
(
cmake/cpack.cmake
)
INCLUDE
(
cmake/boost.cmake
)
INCLUDE
(
CMakeDependentOption
)
# Copyright 2010, 2020, Olivier Stasse, Guilhem Saurel, JRL, CNRS/AIST, LAAS-CNRS
# See LICENSE file.
CMAKE_MINIMUM_REQUIRED
(
VERSION 3.1
)
# Define properties of the project
# Project properties
SET
(
PROJECT_ORG stack-of-tasks
)
SET
(
PROJECT_NAME jrl-walkgen
)
SET
(
PROJECT_DESCRIPTION
"Walking pattern generator for Humanoids"
)
SET
(
PROJECT_URL
""
)
SET
(
PROJECT_URL
"
https://github.com/
${
PROJECT_ORG
}
/
${
PROJECT_NAME
}
"
)
SET
(
CXX_DISABLE_WERROR True
)
# Project options
OPTION
(
USE_LSSOL
"Do you want to use the solver lssol?"
OFF
)
OPTION
(
USE_QUADPROG
"Do you want to use the solver eigen-quadprog?"
ON
)
OPTION
(
SUFFIX_SO_VERSION
"Suffix library name with its version"
ON
)
# Project configuration
SET
(
PROJECT_USE_CMAKE_EXPORT TRUE
)
SET
(
CXX_DISABLE_WERROR TRUE
)
SET
(
DOXYGEN_USE_MATHJAX YES
)
# Initialize generic properties of the project
SETUP_PROJECT
()
# JRL-cmakemodule setup
INCLUDE
(
cmake/base.cmake
)
# Project definition
COMPUTE_PROJECT_ARGS
(
PROJECT_ARGS LANGUAGES CXX C
)
PROJECT
(
${
PROJECT_NAME
}
${
PROJECT_ARGS
}
)
# Project dependencies
ADD_PROJECT_DEPENDENCY
(
LAPACK REQUIRED
)
ADD_PROJECT_DEPENDENCY
(
pinocchio REQUIRED PKG_CONFIG_REQUIRES pinocchio
)
IF
(
BUILD_TESTING
)
ADD_REQUIRED_DEPENDENCY
(
"simple_humanoid_description >= 1.0.1"
)
#ADD_OPTIONAL_DEPENDENCY("hrp2_14_description >= 1.0.2")
ENDIF
(
BUILD_TESTING
)
# Handle OS specificities
INCLUDE
(
CheckIncludeFile
s
)
CHECK_INCLUDE_FILE
S
(
"sys/time.h"
SYS_TIME_H
)
IF
(
SYS_TIME_H
)
INCLUDE
(
CheckIncludeFile
)
CHECK_INCLUDE_FILE
(
"sys/time.h"
SYS_TIME_H
)
#
IF(SYS_TIME_H)
ADD_DEFINITIONS
(
"-DHAVE_SYS_TIME_H"
)
ENDIF
(
SYS_TIME_H
)
# Required dependencies
ADD_REQUIRED_DEPENDENCY
(
"pinocchio >= 2.1.0"
)
# Search for Boost.
# Boost.Test is used by the test suite.
# Boost program_options is used by the embedfile utility, which is used
# by metapod_robotbuilder
# Boost filesystem and regex are used by metapod_robotbuilder.
# Boost filesystem depends on Boost system.
SET
(
BOOST_COMPONENTS
filesystem system unit_test_framework program_options regex
)
SEARCH_FOR_BOOST
()
# If Boost is recent enough, we look for Boost timer which can be used by
# by metapod_timer, which is in turn used by the benchmark.
# Boost timer depends on Boost chrono and system.
IF
((
BUILD_MULTI_MODEL_BENCHMARK OR BUILD_SINGLE_MODEL_BENCHMARKS
)
AND NOT Boost_VERSION LESS 104800
)
SET
(
BOOST_COMPONENTS
${
BOOST_COMPONENTS
}
timer chrono system
)
SEARCH_FOR_BOOST
()
ENDIF
()
SEARCH_FOR_LAPACK
()
# Search for Eigen.
ADD_REQUIRED_DEPENDENCY
(
"eigen3 >= 3.0.5"
)
# Eigen (at least version 3.0.5) makes gcc report conversion warnings
# when one assigns to a block. This floods the compilation results.
# So we include Eigen headers as if they were system headers: the compiler
# won't report warning coming from them.
INCLUDE_DIRECTORIES
(
SYSTEM
${
EIGEN3_INCLUDE_DIRS
}
)
#ENDIF(SYS_TIME_H)
# TODO kinda dirty patch to find lssol for now
# using ADD_OPTIONAL_DEPENDENCY prevents the creation
# of classic variables such as ${PKG}_FOUND
# hence we use ADD_REQUIRED_DEPENDENCY to get the data
OPTION
(
USE_LSSOL
"Do you want to use the solver lssol?"
OFF
)
IF
(
USE_LSSOL
)
ADD_REQUIRED_DEPENDENCY
(
"lssol >= 0.1.0"
)
ENDIF
(
USE_LSSOL
)
OPTION
(
USE_QUADPROG
"Do you want to use the solver eigen-quadprog?"
ON
)
OPTION
(
BUILD_TESTING OFF
)
IF
(
USE_QUADPROG
)
ADD_REQUIRED_DEPENDENCY
(
"eigen-quadprog >= 1.0.0"
)
ENDIF
(
USE_QUADPROG
)
# Add aggressive optimization flags in release mode.
IF
(
CMAKE_COMPILER_IS_GNUCXX
)
SET
(
CMAKE_CXX_FLAGS_RELEASE
"-O3 -DNDEBUG "
)
# SET (CMAKE_CXX_FLAGS
# "-std=c++0x")
SET
(
CMAKE_CXX_FLAGS_RELEASE
"-O3 -DNDEBUG "
)
ENDIF
(
CMAKE_COMPILER_IS_GNUCXX
)
#IF(CMAKE_COMPILER_IS_GNUCXX)
# SET (CMAKE_CXX_FLAGS_RELEASE
# "-O3 -funroll-loops -frerun-loop-opt -fschedule-insns2")
# SET (CMAKE_CXX_FLAGS_RELEASE
# "${CMAKE_CXX_FLAGS_RELEASE} -frerun-cse-after-loop -falign-functions")
# SET (CMAKE_CXX_FLAGS_RELEASE
# "${CMAKE_CXX_FLAGS_RELEASE} -falign-labels -falign-loops -falign-jumps")
# SET (CMAKE_CXX_FLAGS_RELEASE
# "${CMAKE_CXX_FLAGS_RELEASE} -fexpensive-optimizations")
#ENDIF(CMAKE_COMPILER_IS_GNUCXX)
# Define the set of headers to be exported
# Main Library
CONFIGURE_FILE
(
src/configJRLWPG.hh.in src/configJRLWPG.hh
)
SET
(
${
PROJECT_NAME
}
_HEADERS
include/jrl/walkgen/patterngeneratorinterface.hh
include/jrl/walkgen/pgtypes.hh
include/jrl/walkgen/pinocchiorobot.hh
)
)
SET
(
${
PROJECT_NAME
}
_SOURCES
src/RobotDynamics/pinocchiorobot.cpp
src/FootTrajectoryGeneration/FootTrajectoryGenerationAbstract.cpp
src/FootTrajectoryGeneration/FootTrajectoryGenerationStandard.cpp
src/FootTrajectoryGeneration/FootTrajectoryGenerationMultiple.cpp
src/FootTrajectoryGeneration/LeftAndRightFootTrajectoryGenerationMultiple.cpp
src/FootTrajectoryGeneration/OnLineFootTrajectoryGeneration.cpp
src/GlobalStrategyManagers/CoMAndFootOnlyStrategy.cpp
src/GlobalStrategyManagers/GlobalStrategyManager.cpp
src/GlobalStrategyManagers/DoubleStagePreviewControlStrategy.cpp
src/Mathematics/AnalyticalZMPCOGTrajectory.cpp
src/Mathematics/ConvexHull.cpp
src/Mathematics/FootConstraintsAsLinearSystem.cpp
#src/Mathematics/FootConstraintsAsLinearSystemForVelRef.cpp
src/Mathematics/FootHalfSize.cpp
src/Mathematics/OptCholesky.cpp
src/Mathematics/Bsplines.cpp
src/Mathematics/Polynome.cpp
src/Mathematics/PolynomeFoot.cpp
src/Mathematics/PLDPSolver.cpp
src/Mathematics/qld.cpp
src/Mathematics/StepOverPolynome.cpp
src/Mathematics/relative-feet-inequalities.cpp
src/Mathematics/intermediate-qp-matrices.cpp
src/PreviewControl/PreviewControl.cpp
src/PreviewControl/OptimalControllerSolver.cpp
src/PreviewControl/ZMPPreviewControlWithMultiBodyZMP.cpp
src/PreviewControl/LinearizedInvertedPendulum2D.cpp
src/PreviewControl/rigid-body.cpp
src/PreviewControl/rigid-body-system.cpp
src/PreviewControl/SupportFSM.cpp
src/ZMPRefTrajectoryGeneration/ZMPRefTrajectoryGeneration.cpp
src/ZMPRefTrajectoryGeneration/ZMPDiscretization.cpp
src/ZMPRefTrajectoryGeneration/ZMPQPWithConstraint.cpp
src/ZMPRefTrajectoryGeneration/ZMPConstrainedQPFastFormulation.cpp
src/ZMPRefTrajectoryGeneration/ZMPVelocityReferencedQP.cpp
src/ZMPRefTrajectoryGeneration/OrientationsPreview.cpp
src/ZMPRefTrajectoryGeneration/AnalyticalMorisawaAbstract.cpp
src/ZMPRefTrajectoryGeneration/AnalyticalMorisawaCompact.cpp
src/ZMPRefTrajectoryGeneration/FilteringAnalyticalTrajectoryByPreviewControl.cpp
src/ZMPRefTrajectoryGeneration/problem-vel-ref.cpp
src/ZMPRefTrajectoryGeneration/qp-problem.cpp
src/ZMPRefTrajectoryGeneration/generator-vel-ref.cpp
src/ZMPRefTrajectoryGeneration/mpc-trajectory-generation.cpp
src/ZMPRefTrajectoryGeneration/DynamicFilter.cpp
#src/MultiContactRefTrajectoryGeneration/MultiContactHirukawa.cc
src/MotionGeneration/StepOverPlanner.cpp
src/MotionGeneration/CollisionDetector.cpp
src/MotionGeneration/WaistHeightVariation.cpp
src/MotionGeneration/UpperBodyMotion.cpp
src/MotionGeneration/GenerateMotionFromKineoWorks.cpp
src/MotionGeneration/ComAndFootRealizationByGeometry.cpp
src/StepStackHandler.cpp
src/PatternGeneratorInterfacePrivate.cpp
src/SimplePlugin.cpp
src/SimplePluginManager.cpp
src/pgtypes.cpp
src/Clock.cpp
src/portability/gettimeofday.cc
src/privatepgtypes.cpp
)
# Define subdirectories to explore for cmake
ADD_SUBDIRECTORY
(
src
)
ADD_SUBDIRECTORY
(
tests
)
IF
(
USE_QUADPROG
)
SET
(
${
PROJECT_NAME
}
_SOURCES
${${
PROJECT_NAME
}
_SOURCES
}
src/ZMPRefTrajectoryGeneration/ZMPVelocityReferencedSQP.cpp
src/ZMPRefTrajectoryGeneration/nmpc_generator.cpp
)
ENDIF
(
USE_QUADPROG
)
ADD_LIBRARY
(
${
PROJECT_NAME
}
SHARED
${${
PROJECT_NAME
}
_SOURCES
}
${${
PROJECT_NAME
}
_HEADERS
}
)
TARGET_INCLUDE_DIRECTORIES
(
${
PROJECT_NAME
}
PRIVATE
$<BUILD_INTERFACE:
${
CMAKE_SOURCE_DIR
}
/src>
$<BUILD_INTERFACE:
${
CMAKE_SOURCE_DIR
}
/src/FootTrajectoryGeneration>
PUBLIC $<INSTALL_INTERFACE:include>
)
TARGET_LINK_LIBRARIES
(
${
PROJECT_NAME
}
${
LAPACK_LIBRARIES
}
pinocchio::pinocchio
)
IF
(
SUFFIX_SO_VERSION
)
SET_TARGET_PROPERTIES
(
${
PROJECT_NAME
}
PROPERTIES SOVERSION
${
PROJECT_VERSION
}
)
ENDIF
(
SUFFIX_SO_VERSION
)
# Generate dependency to jrl-walkgen in pc file
PKG_CONFIG_APPEND_LIBS
(
"jrl-walkgen"
)
SET_TARGET_PROPERTIES
(
${
PROJECT_NAME
}
PROPERTIES
COMPILE_FLAGS
"-msse -msse2 -msse3 -march=core2 -mfpmath=sse -fivopts -ftree-loop-im -fipa-pta "
)
IF
(
USE_LSSOL
)
PKG_CONFIG_USE_DEPENDENCY
(
${
PROJECT_NAME
}
lssol
)
ENDIF
(
USE_LSSOL
)
IF
(
USE_QUADPROG
)
PKG_CONFIG_USE_DEPENDENCY
(
${
PROJECT_NAME
}
eigen-quadprog
)
ENDIF
(
USE_QUADPROG
)
INSTALL
(
TARGETS
${
PROJECT_NAME
}
EXPORT
${
TARGETS_EXPORT_NAME
}
DESTINATION lib
)
ADD_SUBDIRECTORY
(
tests
)
# Ask to generate the final steps.
SETUP_PROJECT_FINALIZE
()
SETUP_PROJECT_CPACK
()
PKG_CONFIG_APPEND_LIBS
(
${
PROJECT_NAME
}
)
INSTALL
(
FILES package.xml DESTINATION share/
${
PROJECT_NAME
}
)
cmake
@
321eb1cc
Compare
b58bd669
...
321eb1cc
Subproject commit
b58bd669f6567662eefb8a410e8e40aeba4f1060
Subproject commit
321eb1ccf1d94570eb564f3659b13ef3ef82239e
doc/PatternGeneratorMain.out
deleted
100644 → 0
View file @
3ebe52f9
\BOOKMARK [0][-]{chapter.1}{User manual}{}
\BOOKMARK [1][-]{section.1.1}{Introduction}{chapter.1}
\BOOKMARK [1][-]{section.1.2}{Installation and quick start for the pattern generator}{chapter.1}
\BOOKMARK [2][-]{subsection.1.2.1}{Download}{section.1.2}
\BOOKMARK [2][-]{subsection.1.2.2}{Compiling and installation}{section.1.2}
\BOOKMARK [2][-]{subsection.1.2.3}{Example}{section.1.2}
\BOOKMARK [2][-]{subsection.1.2.4}{Needed libraries}{section.1.2}
\BOOKMARK [1][-]{section.1.3}{Plugin : WalkGenJRL}{chapter.1}
\BOOKMARK [2][-]{subsection.1.3.1}{Introduction}{section.1.3}
\BOOKMARK [2][-]{subsection.1.3.2}{Functionnalities}{section.1.3}
\BOOKMARK [3][-]{section*.2}{Foot positionning}{subsection.1.3.2}
\BOOKMARK [3][-]{section*.3}{Walking parameters}{subsection.1.3.2}
\BOOKMARK [0][-]{chapter.2}{The theory behind}{}
\BOOKMARK [1][-]{section.2.1}{Inverse Kinematics}{chapter.2}
\BOOKMARK [2][-]{subsection.2.1.1}{The legs}{section.2.1}
\BOOKMARK [1][-]{section.2.2}{Dynamic models of biped robot}{chapter.2}
\BOOKMARK [2][-]{subsection.2.2.1}{3D Linear Inverted Pendulum Mode and Zero-moment point}{section.2.2}
\BOOKMARK [2][-]{subsection.2.2.2}{ZMP equations and cart-table model}{section.2.2}
\BOOKMARK [1][-]{section.2.3}{Walking pattern generation for a given ZMP}{chapter.2}
\BOOKMARK [2][-]{subsection.2.3.1}{Pattern generation as an inverse problem}{section.2.3}
\BOOKMARK [2][-]{subsection.2.3.2}{ZMP control as a servo problem}{section.2.3}
\BOOKMARK [2][-]{subsection.2.3.3}{Pattern generation by preview control}{section.2.3}
\BOOKMARK [2][-]{subsection.2.3.4}{Pattern generation for multibody model}{section.2.3}
\BOOKMARK [2][-]{subsection.2.3.5}{References}{section.2.3}
\BOOKMARK [1][-]{section.2.4}{Finding the weights for the preview control }{chapter.2}
\BOOKMARK [2][-]{subsection.2.4.1}{The general scheme Katayama1985}{section.2.4}
\BOOKMARK [2][-]{subsection.2.4.2}{Removing the offset of the ZMP}{section.2.4}
\BOOKMARK [2][-]{subsection.2.4.3}{Implementation of the weights computation}{section.2.4}
\BOOKMARK [1][-]{section.2.5}{The angular momentum problem}{chapter.2}
\BOOKMARK [2][-]{subsection.2.5.1}{The problem}{section.2.5}
\BOOKMARK [2][-]{subsection.2.5.2}{Arm motion heuristic}{section.2.5}
\BOOKMARK [1][-]{section.2.6}{To change the library}{chapter.2}
\BOOKMARK [2][-]{subsection.2.6.1}{Introduction}{section.2.6}
\BOOKMARK [2][-]{subsection.2.6.2}{ZMPDiscretization}{section.2.6}
\BOOKMARK [2][-]{subsection.2.6.3}{Preview Control}{section.2.6}
\BOOKMARK [2][-]{subsection.2.6.4}{Dynamic Multi Body}{section.2.6}
\BOOKMARK [2][-]{subsection.2.6.5}{ZMPPreviewControlWithZMPMultiBody}{section.2.6}
\BOOKMARK [0][-]{chapter.3}{The Upper body Motion}{}
\BOOKMARK [1][-]{section.3.1}{Walking Mode inside the Pattern Generator V.2 }{chapter.3}
\BOOKMARK [1][-]{section.3.2}{Momentum Equation}{chapter.3}
\BOOKMARK [2][-]{subsection.3.2.1}{Momentum and joint velocities}{section.3.2}
\BOOKMARK [2][-]{subsection.3.2.2}{Constraints of foot contact}{section.3.2}
\BOOKMARK [1][-]{section.3.3}{Resolved Momentum Control}{chapter.3}
\BOOKMARK [2][-]{subsection.3.3.1}{Setting momentum reference}{section.3.3}
\BOOKMARK [2][-]{subsection.3.3.2}{Momentum selection and control by pseudo-inverse}{section.3.3}
\BOOKMARK [2][-]{subsection.3.3.3}{Calculation of the interia matrices}{section.3.3}
\BOOKMARK [2][-]{subsection.3.3.4}{Walking using the Resolved Momentum Control}{section.3.3}
\BOOKMARK [1][-]{section..1}{Introduction}{chapter.3}
\BOOKMARK [1][-]{section..2}{XML's fields}{chapter.3}
src
/configJRLWPG.hh
→
include/jrl/walkgen
/configJRLWPG.hh
View file @
8c78ed7c
...
...
@@ -21,6 +21,7 @@
* Research carried out within the scope of the
* Joint Japanese-French Robotics Laboratory (JRL)
*/
/*! Uses the default implementation for the small 4x4 matrices */
#define _DEFAULT_MATRIX4x4_ 1
...
...
include/jrl/walkgen/pinocchiorobot.hh
View file @
8c78ed7c
...
...
@@ -217,6 +217,8 @@ namespace PatternGeneratorJRL
{
return
m_vrpy
;}
inline
Eigen
::
VectorXd
&
currentRPYAcceleration
()
{
return
m_arpy
;}
inline
Eigen
::
VectorXd
&
currentTau
()
{
return
m_tau
;}
inline
unsigned
numberDof
()
{
return
m_robotModel
->
nq
;}
...
...
package.xml
0 → 100644
View file @
8c78ed7c
<package
format=
"2"
>
<name>
jrl-walkgen
</name>
<version>
4.2.1
</version>
<description>
jrl-walkgen library
</description>
<maintainer
email=
"ostasse@laas.fr"
>
Olivier Stasse
</maintainer>
<license>
BSDv2
</license>
<url>
http://github.com/stack-of-tasks/sot-talos
</url>
<author>
Olivier Stasse
</author>
<build_depend>
roscpp
</build_depend>
<exec_depend>
roscpp
</exec_depend>
<buildtool_depend>
catkin
</buildtool_depend>
<doc_depend>
doxygen
</doc_depend>
</package>
private_cmake/config_private.hh.cmake
deleted
100644 → 0
View file @
3ebe52f9
//
Copyright
(
C
)
2008-2015 LAAS-CNRS, JRL AIST-CNRS.
//
// This file is part of jrl-walkgen.
// jrl-walkgen 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.
//
// jrl-walkgen 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 jrl-walkgen. If not, see <http://www.gnu.org/licenses/>.
#ifndef JRL_WALKGEN_CONFIG_PRIVATE_HH
# define JRL_WALKGEN_CONFIG__PRIVATE_HH
// Package
version
(
header
)
.
# define JRL_WALKGEN_CONFIG_VERSION "@PROJECT_VERSION@"
#endif //! JRL_WALKGEN_CONFIG_PRIVATE_HH
src/CMakeLists.txt
deleted
100644 → 0
View file @
3ebe52f9
# Copyright 2010, Olivier Stasse, JRL, CNRS/AIST
#
# This file is part of jrl-walkgen.
# jrl-walkgen 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.
#
# jrl-walkgen 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
# General Lesser Public License for more details. You should have
# received a copy of the GNU Lesser General Public License along with
# jrl-walkgen. If not, see <http://www.gnu.org/licenses/>.
IF
(
USE_QUADPROG
)
SET
(
QUADPROG_COMPILE_FLAG 1
)
ELSE
()
SET
(
QUADPROG_COMPILE_FLAG 0
)
ENDIF
()
CONFIGURE_FILE
(
configJRLWPG.hh.in
${
CMAKE_BINARY_DIR
}
/include/jrl/walkgen/configJRLWPG.hh
)
# Make sure to find Debug.h
INCLUDE_DIRECTORIES
(
BEFORE
${
PROJECT_SOURCE_DIR
}
/src
)
INCLUDE_DIRECTORIES
(
BEFORE
${
PROJECT_SOURCE_DIR
}
/src/ZMPRefTrajectoryGeneration
)
INCLUDE_DIRECTORIES
(
BEFORE
${
PROJECT_SOURCE_DIR
}
/src/FootTrajectoryGeneration
)
# Add Boost path to include directories.
INCLUDE_DIRECTORIES
(
${
Boost_INCLUDE_DIRS
}
)
message
(
STATUS
"-- Boost Dir : "
${
Boost_INCLUDE_DIRS
}
)
# add flag to compile qld.cc
IF
(
WIN32
)
ADD_DEFINITIONS
(
"/D __STDC__"
)
ENDIF
(
WIN32
)
IF
(
USE_LSSOL
)
ADD_DEFINITIONS
(
"/DLSSOL_FOUND"
)
ENDIF
(
USE_LSSOL
)
SET
(
INCLUDES
PreviewControl/rigid-body.hh
PreviewControl/OptimalControllerSolver.hh
PreviewControl/rigid-body-system.hh
PreviewControl/ZMPPreviewControlWithMultiBodyZMP.hh
PreviewControl/SupportFSM.hh
PreviewControl/LinearizedInvertedPendulum2D.hh
PreviewControl/PreviewControl.hh
PreviewControl/SupportFSM_backup.hh
FootTrajectoryGeneration/FootTrajectoryGenerationMultiple.hh
FootTrajectoryGeneration/FootTrajectoryGenerationAbstract.hh
FootTrajectoryGeneration/FootTrajectoryGenerationStandard.hh
FootTrajectoryGeneration/LeftAndRightFootTrajectoryGenerationMultiple.hh
Debug.hh
SimplePluginManager.hh
privatepgtypes.hh
# MultiContactRefTrajectoryGeneration/MultiContactHirukawa.hh
patterngeneratorinterfaceprivate.hh
Mathematics/FootConstraintsAsLinearSystem.hh
Mathematics/Polynome.hh
Mathematics/ConvexHull.hh
Mathematics/Bsplines.hh
Mathematics/StepOverPolynome.hh
Mathematics/AnalyticalZMPCOGTrajectory.hh
Mathematics/qld.hh
Mathematics/PLDPSolver.hh
Mathematics/FootHalfSize.hh
Mathematics/relative-feet-inequalities.hh
Mathematics/intermediate-qp-matrices.hh
Mathematics/PolynomeFoot.hh
Mathematics/PLDPSolverHerdt.hh
Mathematics/OptCholesky.hh
StepStackHandler.hh
configJRLWPG.hh
Clock.hh
GlobalStrategyManagers/CoMAndFootOnlyStrategy.hh
GlobalStrategyManagers/GlobalStrategyManager.hh
GlobalStrategyManagers/DoubleStagePreviewControlStrategy.hh
ZMPRefTrajectoryGeneration/AnalyticalMorisawaAbstract.hh
ZMPRefTrajectoryGeneration/DynamicFilter.hh
ZMPRefTrajectoryGeneration/ZMPConstrainedQPFastFormulation.hh
ZMPRefTrajectoryGeneration/qp-problem.hh
ZMPRefTrajectoryGeneration/ZMPDiscretization.hh
ZMPRefTrajectoryGeneration/OrientationsPreview.hh
ZMPRefTrajectoryGeneration/mpc-trajectory-generation.hh
ZMPRefTrajectoryGeneration/ZMPRefTrajectoryGeneration.hh
ZMPRefTrajectoryGeneration/ZMPVelocityReferencedQP.hh
ZMPRefTrajectoryGeneration/AnalyticalMorisawaCompact.hh
ZMPRefTrajectoryGeneration/generator-vel-ref.hh
ZMPRefTrajectoryGeneration/nmpc_generator.hh
ZMPRefTrajectoryGeneration/FilteringAnalyticalTrajectoryByPreviewControl.hh
ZMPRefTrajectoryGeneration/problem-vel-ref.hh
ZMPRefTrajectoryGeneration/ZMPQPWithConstraint.hh
SimplePlugin.hh
portability/gettimeofday.hh
portability/bzero.hh
MotionGeneration/ComAndFootRealizationByGeometry.hh
MotionGeneration/StepOverPlanner.hh
MotionGeneration/WaistHeightVariation.hh
MotionGeneration/ComAndFootRealization.hh
MotionGeneration/GenerateMotionFromKineoWorks.hh
MotionGeneration/UpperBodyMotion.hh
MotionGeneration/CollisionDetector.hh
../tests/CommonTools.hh
../tests/ClockCPUTime.hh
../tests/TestObject.hh
../doc/additionalHeader/modules.hh
../include/jrl/walkgen/pgtypes.hh
../include/jrl/walkgen/patterngeneratorinterface.hh
../include/jrl/walkgen/pinocchiorobot.hh
)
IF
(
USE_QUADPROG
)
SET
(
INCLUDES
${
INCLUDES
}
ZMPRefTrajectoryGeneration/ZMPVelocityReferencedSQP.hh
ZMPRefTrajectoryGeneration/nmpc_generator.hh
)
ENDIF
(
USE_QUADPROG
)
SET
(
SOURCES
${
INCLUDES
}
RobotDynamics/pinocchiorobot.cpp
FootTrajectoryGeneration/FootTrajectoryGenerationAbstract.cpp
FootTrajectoryGeneration/FootTrajectoryGenerationStandard.cpp
FootTrajectoryGeneration/FootTrajectoryGenerationMultiple.cpp
FootTrajectoryGeneration/LeftAndRightFootTrajectoryGenerationMultiple.cpp
FootTrajectoryGeneration/OnLineFootTrajectoryGeneration.cpp
GlobalStrategyManagers/CoMAndFootOnlyStrategy.cpp
GlobalStrategyManagers/GlobalStrategyManager.cpp
GlobalStrategyManagers/DoubleStagePreviewControlStrategy.cpp
Mathematics/AnalyticalZMPCOGTrajectory.cpp
Mathematics/ConvexHull.cpp
Mathematics/FootConstraintsAsLinearSystem.cpp
# Mathematics/FootConstraintsAsLinearSystemForVelRef.cpp
Mathematics/FootHalfSize.cpp
Mathematics/OptCholesky.cpp
Mathematics/Bsplines.cpp
Mathematics/Polynome.cpp
Mathematics/PolynomeFoot.cpp
Mathematics/PLDPSolver.cpp
Mathematics/qld.cpp
Mathematics/StepOverPolynome.cpp
Mathematics/relative-feet-inequalities.cpp
Mathematics/intermediate-qp-matrices.cpp
PreviewControl/PreviewControl.cpp
PreviewControl/OptimalControllerSolver.cpp
PreviewControl/ZMPPreviewControlWithMultiBodyZMP.cpp
PreviewControl/LinearizedInvertedPendulum2D.cpp
PreviewControl/rigid-body.cpp
PreviewControl/rigid-body-system.cpp
PreviewControl/SupportFSM.cpp
ZMPRefTrajectoryGeneration/ZMPRefTrajectoryGeneration.cpp
ZMPRefTrajectoryGeneration/ZMPDiscretization.cpp
ZMPRefTrajectoryGeneration/ZMPQPWithConstraint.cpp
ZMPRefTrajectoryGeneration/ZMPConstrainedQPFastFormulation.cpp
ZMPRefTrajectoryGeneration/ZMPVelocityReferencedQP.cpp
ZMPRefTrajectoryGeneration/OrientationsPreview.cpp
ZMPRefTrajectoryGeneration/AnalyticalMorisawaAbstract.cpp
ZMPRefTrajectoryGeneration/AnalyticalMorisawaCompact.cpp
ZMPRefTrajectoryGeneration/FilteringAnalyticalTrajectoryByPreviewControl.cpp
ZMPRefTrajectoryGeneration/problem-vel-ref.cpp
ZMPRefTrajectoryGeneration/qp-problem.cpp
ZMPRefTrajectoryGeneration/generator-vel-ref.cpp
ZMPRefTrajectoryGeneration/mpc-trajectory-generation.cpp
ZMPRefTrajectoryGeneration/DynamicFilter.cpp
# MultiContactRefTrajectoryGeneration/MultiContactHirukawa.cc
MotionGeneration/StepOverPlanner.cpp
MotionGeneration/CollisionDetector.cpp
MotionGeneration/WaistHeightVariation.cpp
MotionGeneration/UpperBodyMotion.cpp
MotionGeneration/GenerateMotionFromKineoWorks.cpp
MotionGeneration/ComAndFootRealizationByGeometry.cpp
StepStackHandler.cpp
PatternGeneratorInterfacePrivate.cpp
SimplePlugin.cpp
SimplePluginManager.cpp
pgtypes.cpp
Clock.cpp
portability/gettimeofday.cc
privatepgtypes.cpp
)
IF
(
USE_QUADPROG
)
SET
(
SOURCES
${
SOURCES
}
ZMPRefTrajectoryGeneration/ZMPVelocityReferencedSQP.cpp
ZMPRefTrajectoryGeneration/nmpc_generator.cpp
)
ENDIF
(
USE_QUADPROG
)
# prefix and suffix each element of list by ${prefix}elemnt${suffix}
macro
(
ADDPREFIX newlist prefix list_name
)
# create empty list - necessary?
SET
(
${
newlist
}
)
# prefix and suffix elements
foreach
(
l
${${
list_name
}}
)
list
(
APPEND
${
newlist
}
${
prefix
}${
l
}
)
endforeach
()
endmacro
(
ADDPREFIX
)
IF
(
'
${
CMAKE_EXTRA_GENERATOR
}
' STREQUAL 'CodeBlocks'
)
ADDPREFIX
(
${
PROJECT_NAME
}
_ABSOLUTE_HEADERS
"
${
CMAKE_SOURCE_DIR
}
/"
${
PROJECT_NAME
}
_HEADERS
)
ENDIF
(
'
${
CMAKE_EXTRA_GENERATOR
}
' STREQUAL 'CodeBlocks'
)
ADD_LIBRARY
(
${
PROJECT_NAME
}
SHARED
${
SOURCES
}
${${
PROJECT_NAME
}
_ABSOLUTE_HEADERS
}
)
TARGET_LINK_LIBRARIES
(
${
PROJECT_NAME
}
${
LAPACK_LIBRARIES
}
)
# Define dependencies
SET_TARGET_PROPERTIES
(
${
PROJECT_NAME
}
PROPERTIES COMPILE_FLAGS
"-msse -msse2 -msse3 -march=core2 -mfpmath=sse -fivopts -ftree-loop-im -fipa-pta "
)
PKG_CONFIG_USE_DEPENDENCY
(
${
PROJECT_NAME
}
pinocchio
)
IF
(
USE_LSSOL
)
PKG_CONFIG_USE_DEPENDENCY
(
${
PROJECT_NAME
}
lssol
)
ENDIF
(
USE_LSSOL
)
IF
(
USE_QUADPROG
)
PKG_CONFIG_USE_DEPENDENCY
(
${
PROJECT_NAME
}
eigen-quadprog
)
ENDIF
(
USE_QUADPROG
)
INSTALL
(
TARGETS
${
PROJECT_NAME
}
DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/lib
)
SET_TARGET_PROPERTIES
(
${
PROJECT_NAME
}
PROPERTIES SOVERSION
${
PROJECT_VERSION
}
)
src/Clock.cpp
View file @
8c78ed7c
...
...
@@ -34,99 +34,72 @@
Please see license.txt for more information on license.
*/
#include
<iostream>
#include
<fstream>
#include
<Clock.hh>
#include
<fstream>
#include
<iostream>
using
namespace
PatternGeneratorJRL
;
Clock
::
Clock
()
{
Clock
::
Clock
()
{
Reset
();
m_DataBuffer
.
resize
(
300000
);
struct
timeval
startingtime
;
gettimeofday
(
&
startingtime
,
0
);
gettimeofday
(
&
startingtime
,
0
);
m_StartingTime
=
startingtime
.
tv_sec
+
0.000001
*
startingtime
.
tv_usec
;
}
Clock
::~
Clock
()
{}
Clock
::~
Clock
()
{
}
void
Clock
::
Reset
()
{