Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit 7863ecf

Browse files
committed
Merge branch 'devel' into cmake-export
2 parents e014e3b + 2c9a1df commit 7863ecf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+2952
-3466
lines changed

CMakeLists.txt

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
11
# Copyright 2010, François Bleibel, Olivier Stasse, JRL, CNRS/AIST
22

3+
<<<<<<< HEAD
34
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
45

56
SET(PROJECT_ORG stack-of-tasks)
7+
=======
8+
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
9+
10+
SET(PROJECT_NAMESPACE stack-of-tasks)
11+
>>>>>>> devel
612
SET(PROJECT_NAME sot-dynamic-pinocchio)
713
SET(PROJECT_DESCRIPTION "pinocchio bindings for dynamic-graph.")
814
SET(PROJECT_URL "https://github.com/${PROJECT_ORG}/${PROJECT_NAME}")
915
SET(PROJECT_SUFFIX "-v3")
1016

11-
# Export CMake Target
12-
SET(PROJECT_USE_CMAKE_EXPORT TRUE)
17+
INCLUDE(cmake/base.cmake)
18+
INCLUDE(cmake/boost.cmake)
19+
INCLUDE(cmake/eigen.cmake)
20+
INCLUDE(cmake/python.cmake)
21+
INCLUDE(cmake/test.cmake)
22+
23+
SET(CUSTOM_HEADER_DIR "${PROJECT_NAME}")
24+
SET(DOXYGEN_USE_MATHJAX YES)
1325

1426
# Disable -Werror on Unix for now.
1527
SET(CXX_DISABLE_WERROR True)
@@ -41,6 +53,9 @@ SET(PKG_CONFIG_ADDITIONAL_VARIABLES
4153
plugindir
4254
)
4355

56+
COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX)
57+
PROJECT(${PROJECT_NAME} ${PROJECT_ARGS})
58+
4459
# Search for dependencies.
4560
ADD_REQUIRED_DEPENDENCY("pinocchio >= 2.0.0")
4661
ADD_PROJECT_DEPENDENCY(dynamic-graph REQUIRED )
@@ -51,12 +66,15 @@ SET(BOOST_COMPONENTS filesystem system unit_test_framework)
5166

5267
OPTION (BUILD_PYTHON_INTERFACE "Build the python binding" ON)
5368
OPTION (INSTALL_PYTHON_INTERFACE_ONLY "Install *ONLY* the python bindings" OFF)
69+
OPTION(SUFFIX_SO_VERSION
70+
"Suffix shared library name by a string depending on git status of project"
71+
ON)
5472

5573
IF(BUILD_PYTHON_INTERFACE)
5674
FINDPYTHON()
5775
ADD_PROJECT_DEPENDENCY(dynamic-graph-python REQUIRED)
5876
SET(BOOST_COMPONENTS ${BOOST_COMPONENTS} python)
59-
INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
77+
INCLUDE_DIRECTORIES(SYSTEM ${PYTHON_INCLUDE_PATH})
6078
ADD_REQUIRED_DEPENDENCY("eigenpy")
6179
ENDIF(BUILD_PYTHON_INTERFACE)
6280

@@ -74,5 +92,3 @@ ADD_SUBDIRECTORY(src)
7492
ADD_SUBDIRECTORY(doc)
7593
ADD_SUBDIRECTORY(python)
7694
ADD_SUBDIRECTORY(unitTesting)
77-
78-
SETUP_PROJECT_PACKAGE_FINALIZE()

doc/additionalDoc/package.hh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ install these packages at https://github.com/jrl-umi3218.
2828
\section python_bindings Python bindings
2929
3030
As most packages based on the dynamic-graph framework (see https://github.com/jrl-umi3218/dynamic-graph),
31-
the functionnality is exposed through entities. Hence python sub-modules of dynamic_graph are generated. See <a href="../sphinx-html/index.html">sphinx documentation</a> for more details.
31+
the functionnality is exposed through entities. Hence python sub-modules of dynamic_graph are generated. See <a
32+
href="../sphinx-html/index.html">sphinx documentation</a> for more details.
3233
3334
The following entities are created by this package:\n
3435
(all entites are placed in the namespace sot::)

include/sot-dynamic-pinocchio/angle-estimator.h

Lines changed: 45 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
/* --- API ------------------------------------------------------------- */
1414
/* --------------------------------------------------------------------- */
1515

16-
#if defined (WIN32)
17-
# if defined (angle_estimator_EXPORTS)
18-
# define SOTANGLEESTIMATOR_EXPORT __declspec(dllexport)
19-
# else
20-
# define SOTANGLEESTIMATOR_EXPORT __declspec(dllimport)
21-
# endif
16+
#if defined(WIN32)
17+
#if defined(angle_estimator_EXPORTS)
18+
#define SOTANGLEESTIMATOR_EXPORT __declspec(dllexport)
2219
#else
23-
# define SOTANGLEESTIMATOR_EXPORT
20+
#define SOTANGLEESTIMATOR_EXPORT __declspec(dllimport)
21+
#endif
22+
#else
23+
#define SOTANGLEESTIMATOR_EXPORT
2424
#endif
2525

2626
/* --------------------------------------------------------------------- */
@@ -30,87 +30,70 @@
3030
/* Matrix */
3131
#include <dynamic-graph/linear-algebra.h>
3232

33-
3433
/* SOT */
3534
#include <dynamic-graph/entity.h>
3635
#include <dynamic-graph/signal-ptr.h>
3736
#include <dynamic-graph/signal-time-dependent.h>
3837
#include <sot/core/matrix-geometry.hh>
3938

40-
4139
/* STD */
4240
#include <string>
4341

44-
45-
namespace dynamicgraph { namespace sot {
42+
namespace dynamicgraph {
43+
namespace sot {
4644
namespace dg = dynamicgraph;
4745

4846
/* --------------------------------------------------------------------- */
4947
/* --- CLASS ----------------------------------------------------------- */
5048
/* --------------------------------------------------------------------- */
5149

52-
class SOTANGLEESTIMATOR_EXPORT AngleEstimator
53-
:public dg::Entity
54-
{
50+
class SOTANGLEESTIMATOR_EXPORT AngleEstimator : public dg::Entity {
5551
public:
5652
static const std::string CLASS_NAME;
57-
virtual const std::string& getClassName( void ) const { return CLASS_NAME; }
53+
virtual const std::string& getClassName(void) const { return CLASS_NAME; }
5854

5955
public: /* --- CONSTRUCTION --- */
60-
61-
AngleEstimator( const std::string& name );
62-
virtual ~AngleEstimator( void );
63-
64-
public: /* --- SIGNAL --- */
65-
66-
dg::SignalPtr<MatrixRotation,int> sensorWorldRotationSIN; // estimate(worldRc)
67-
dg::SignalPtr<MatrixHomogeneous,int> sensorEmbeddedPositionSIN; // waistRchest
68-
dg::SignalPtr<MatrixHomogeneous,int> contactWorldPositionSIN; // estimate(worldRf)
69-
dg::SignalPtr<MatrixHomogeneous,int> contactEmbeddedPositionSIN; // waistRleg
70-
dg::SignalTimeDependent<dynamicgraph::Vector,int> anglesSOUT; // [ flex1 flex2 yaw_drift ]
71-
dg::SignalTimeDependent<MatrixRotation,int> flexibilitySOUT; // footRleg
72-
dg::SignalTimeDependent<MatrixRotation,int> driftSOUT; // Ryaw = worldRc est(wRc)^-1
73-
dg::SignalTimeDependent<MatrixRotation,int> sensorWorldRotationSOUT; // worldRc
74-
dg::SignalTimeDependent<MatrixRotation,int> waistWorldRotationSOUT; // worldRwaist
75-
dg::SignalTimeDependent<MatrixHomogeneous,int> waistWorldPositionSOUT; // worldMwaist
76-
dg::SignalTimeDependent<dynamicgraph::Vector,int> waistWorldPoseRPYSOUT; // worldMwaist
77-
78-
dg::SignalPtr<dynamicgraph::Matrix,int> jacobianSIN;
79-
dg::SignalPtr<dynamicgraph::Vector,int> qdotSIN;
80-
dg::SignalTimeDependent<dynamicgraph::Vector,int> xff_dotSOUT;
81-
dg::SignalTimeDependent<dynamicgraph::Vector,int> qdotSOUT;
56+
AngleEstimator(const std::string& name);
57+
virtual ~AngleEstimator(void);
58+
59+
public: /* --- SIGNAL --- */
60+
dg::SignalPtr<MatrixRotation, int> sensorWorldRotationSIN; // estimate(worldRc)
61+
dg::SignalPtr<MatrixHomogeneous, int> sensorEmbeddedPositionSIN; // waistRchest
62+
dg::SignalPtr<MatrixHomogeneous, int> contactWorldPositionSIN; // estimate(worldRf)
63+
dg::SignalPtr<MatrixHomogeneous, int> contactEmbeddedPositionSIN; // waistRleg
64+
dg::SignalTimeDependent<dynamicgraph::Vector, int> anglesSOUT; // [ flex1 flex2 yaw_drift ]
65+
dg::SignalTimeDependent<MatrixRotation, int> flexibilitySOUT; // footRleg
66+
dg::SignalTimeDependent<MatrixRotation, int> driftSOUT; // Ryaw = worldRc est(wRc)^-1
67+
dg::SignalTimeDependent<MatrixRotation, int> sensorWorldRotationSOUT; // worldRc
68+
dg::SignalTimeDependent<MatrixRotation, int> waistWorldRotationSOUT; // worldRwaist
69+
dg::SignalTimeDependent<MatrixHomogeneous, int> waistWorldPositionSOUT; // worldMwaist
70+
dg::SignalTimeDependent<dynamicgraph::Vector, int> waistWorldPoseRPYSOUT; // worldMwaist
71+
72+
dg::SignalPtr<dynamicgraph::Matrix, int> jacobianSIN;
73+
dg::SignalPtr<dynamicgraph::Vector, int> qdotSIN;
74+
dg::SignalTimeDependent<dynamicgraph::Vector, int> xff_dotSOUT;
75+
dg::SignalTimeDependent<dynamicgraph::Vector, int> qdotSOUT;
8276

8377
public: /* --- FUNCTIONS --- */
84-
dynamicgraph::Vector& computeAngles( dynamicgraph::Vector& res,
85-
const int& time );
86-
MatrixRotation& computeFlexibilityFromAngles( MatrixRotation& res,
87-
const int& time );
88-
MatrixRotation& computeDriftFromAngles( MatrixRotation& res,
89-
const int& time );
90-
MatrixRotation& computeSensorWorldRotation( MatrixRotation& res,
91-
const int& time );
92-
MatrixRotation& computeWaistWorldRotation( MatrixRotation& res,
93-
const int& time );
94-
MatrixHomogeneous& computeWaistWorldPosition( MatrixHomogeneous& res,
95-
const int& time );
96-
dynamicgraph::Vector& computeWaistWorldPoseRPY( dynamicgraph::Vector& res,
97-
const int& time );
98-
dynamicgraph::Vector& compute_xff_dotSOUT( dynamicgraph::Vector& res,
99-
const int& time );
100-
dynamicgraph::Vector& compute_qdotSOUT( dynamicgraph::Vector& res,
101-
const int& time );
78+
dynamicgraph::Vector& computeAngles(dynamicgraph::Vector& res, const int& time);
79+
MatrixRotation& computeFlexibilityFromAngles(MatrixRotation& res, const int& time);
80+
MatrixRotation& computeDriftFromAngles(MatrixRotation& res, const int& time);
81+
MatrixRotation& computeSensorWorldRotation(MatrixRotation& res, const int& time);
82+
MatrixRotation& computeWaistWorldRotation(MatrixRotation& res, const int& time);
83+
MatrixHomogeneous& computeWaistWorldPosition(MatrixHomogeneous& res, const int& time);
84+
dynamicgraph::Vector& computeWaistWorldPoseRPY(dynamicgraph::Vector& res, const int& time);
85+
dynamicgraph::Vector& compute_xff_dotSOUT(dynamicgraph::Vector& res, const int& time);
86+
dynamicgraph::Vector& compute_qdotSOUT(dynamicgraph::Vector& res, const int& time);
10287

10388
public: /* --- PARAMS --- */
10489
void fromSensor(const bool& fs) { fromSensor_ = fs; }
105-
bool fromSensor() const { return fromSensor_; }
90+
bool fromSensor() const { return fromSensor_; }
91+
10692
private:
10793
bool fromSensor_;
108-
10994
};
11095

96+
} /* namespace sot */
97+
} /* namespace dynamicgraph */
11198

112-
} /* namespace sot */} /* namespace dynamicgraph */
113-
114-
115-
116-
#endif // #ifndef __SOT_ANGLE_ESTIMATOR_H__
99+
#endif // #ifndef __SOT_ANGLE_ESTIMATOR_H__

0 commit comments

Comments
 (0)