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

Commit 0ca806b

Browse files
committed
Merge tag 'v3.6.0'
Release of version 3.6.0.
2 parents 7d1fbf6 + 655876f commit 0ca806b

25 files changed

+232
-286
lines changed

CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ SET(DOXYGEN_USE_MATHJAX YES)
2525
# JRL-cmakemodule setup
2626
INCLUDE(cmake/base.cmake)
2727
INCLUDE(cmake/boost.cmake)
28+
INCLUDE(cmake/lapack.cmake)
2829
INCLUDE(cmake/python.cmake)
2930
INCLUDE(cmake/sphinx.cmake)
3031

@@ -36,18 +37,18 @@ PROJECT(${PROJECT_NAME} ${PROJECT_ARGS})
3637
ADD_PROJECT_DEPENDENCY(sot-tools REQUIRED PKG_CONFIG_REQUIRES sot-tools)
3738
ADD_PROJECT_DEPENDENCY(example-robot-data)
3839

39-
SET(BOOST_COMPONENTS filesystem system unit_test_framework)
40+
IF(BUILD_TESTING)
41+
FIND_PACKAGE(Boost REQUIRED COMPONENTS unit_test_framework)
42+
ENDIF(BUILD_TESTING)
4043

4144
IF(BUILD_PYTHON_INTERFACE)
4245
FINDPYTHON()
46+
SEARCH_FOR_BOOST_PYTHON(REQUIRED)
4347
STRING(REGEX REPLACE "-" "_" PYTHON_DIR ${CUSTOM_HEADER_DIR})
44-
ADD_PROJECT_DEPENDENCY(dynamic-graph-python REQUIRED
48+
ADD_PROJECT_DEPENDENCY(dynamic-graph-python 4.0.0 REQUIRED
4549
PKG_CONFIG_REQUIRES dynamic-graph-python)
46-
SET(BOOST_COMPONENTS ${BOOST_COMPONENTS} python)
4750
ENDIF(BUILD_PYTHON_INTERFACE)
4851

49-
SEARCH_FOR_BOOST()
50-
5152
# Main Library
5253
SET(${PROJECT_NAME}_HEADERS
5354
include/${CUSTOM_HEADER_DIR}/dynamic-pinocchio.h
@@ -69,8 +70,7 @@ SET(${PROJECT_NAME}_SOURCES
6970
ADD_LIBRARY(${PROJECT_NAME} SHARED
7071
${${PROJECT_NAME}_SOURCES} ${${PROJECT_NAME}_HEADERS})
7172
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:include>)
72-
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${Boost_LIBRARIES}
73-
sot-core::sot-core)
73+
TARGET_LINK_LIBRARIES(${PROJECT_NAME} sot-core::sot-core)
7474

7575
IF(SUFFIX_SO_VERSION)
7676
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION})

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ sot-dynamic-pinocchio
22
Encapsulate Pinocchio in SoT
33
===========
44

5-
[![Building Status](https://travis-ci.org/stack-of-tasks/sot-dynamic-pinocchio.svg?branch=master)](https://travis-ci.org/stack-of-tasks/sot-dynamic-pinocchio)
5+
[![License](https://img.shields.io/badge/License-BSD%202--Clause-green.svg)](https://opensource.org/licenses/BSD-2-Clause)
66
[![Pipeline status](https://gitlab.laas.fr/stack-of-tasks/sot-dynamic-pinocchio/badges/master/pipeline.svg)](https://gitlab.laas.fr/stack-of-tasks/sot-dynamic-pinocchio/commits/master)
77
[![Coverage report](https://gitlab.laas.fr/stack-of-tasks/sot-dynamic-pinocchio/badges/master/coverage.svg?job=doc-coverage)](http://projects.laas.fr/gepetto/doc/stack-of-tasks/sot-dynamic-pinocchio/master/coverage/)
88

doc/Doxyfile.extra.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@ IMAGE_PATH = @CMAKE_SOURCE_DIR@/doc/pictures
55
FILE_PATTERNS = *.cc *.cpp *.h *.hh *.hxx
66

77
TAGFILES = \
8-
"@JRL_MAL_DOXYGENDOCDIR@/jrl-mal.doxytag = @JRL_MAL_DOXYGENDOCDIR@" \
98
"@DYNAMIC_GRAPH_DOXYGENDOCDIR@/dynamic-graph.doxytag = @DYNAMIC_GRAPH_DOXYGENDOCDIR@" \
109
"@SOT_CORE_DOXYGENDOCDIR@/sot-core.doxytag = @SOT_CORE_DOXYGENDOCDIR@"

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
/* STD */
1818
#include <string>
1919
#include <map>
20+
#include <memory>
2021

2122
/* SOT */
2223
#include <pinocchio/fwd.hpp>
@@ -29,6 +30,7 @@
2930
#include <sot/core/matrix-geometry.hh>
3031
/* Matrix */
3132
#include <dynamic-graph/linear-algebra.h>
33+
#include <sot/dynamic-pinocchio/deprecated.hh>
3234

3335
/* PINOCCHIO */
3436
#include <pinocchio/macros.hpp>
@@ -80,7 +82,7 @@ class SOTDYNAMIC_EXPORT DynamicPinocchio : public dg::Entity {
8082

8183
/* --- MODEL ATRIBUTES --- */
8284
pinocchio::Model* m_model;
83-
pinocchio::Data* m_data;
85+
std::unique_ptr<pinocchio::Data> m_data;
8486

8587
/* --- MODEL ATRIBUTES --- */
8688

@@ -164,7 +166,15 @@ class SOTDYNAMIC_EXPORT DynamicPinocchio : public dg::Entity {
164166

165167
void setModel(pinocchio::Model*);
166168

167-
void setData(pinocchio::Data*);
169+
void createData();
170+
171+
/// \deprecated this function does nothing. This class has its own
172+
/// pinocchio::Data object, which can be access with \ref getData.
173+
void setData(pinocchio::Data*) SOT_DYNAMIC_PINOCCHIO_DEPRECATED;
174+
175+
pinocchio::Model* getModel() { return m_model; };
176+
177+
pinocchio::Data* getData() { return m_data.get(); };
168178

169179
/* --- GETTERS --- */
170180

package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<package format="2">
22
<name>sot-dynamic-pinocchio</name>
3-
<version>3.5.2</version>
3+
<version>3.6.0</version>
44
<description>
55
Pinocchio bindings for dynamic-graph
66
</description>

src/CMakeLists.txt

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ SET(plugins
1818
)
1919

2020
SET(integrator-force-rk4_plugins_deps integrator-force)
21-
SET(integrator-force-exact_plugins_deps integrator-force)
21+
SET(integrator-force-exact_plugins_deps integrator-force lapack)
22+
SET(mass-apparent_plugins_deps integrator-force)
2223

2324
FOREACH(plugin ${plugins})
2425
GET_FILENAME_COMPONENT(LIBRARY_NAME ${plugin} NAME)
@@ -28,7 +29,8 @@ FOREACH(plugin ${plugins})
2829
SET_TARGET_PROPERTIES(${LIBRARY_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION})
2930
ENDIF(SUFFIX_SO_VERSION)
3031

31-
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${PROJECT_NAME} ${${LIBRARY_NAME}_deps})
32+
TARGET_LINK_LIBRARIES(${LIBRARY_NAME}
33+
PUBLIC ${PROJECT_NAME} ${${LIBRARY_NAME}_plugins_deps})
3234

3335
IF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
3436
INSTALL(TARGETS ${LIBRARY_NAME} EXPORT ${TARGETS_EXPORT_NAME}
@@ -37,10 +39,15 @@ FOREACH(plugin ${plugins})
3739

3840
IF(BUILD_PYTHON_INTERFACE)
3941
STRING(REPLACE - _ PYTHON_LIBRARY_NAME ${LIBRARY_NAME})
40-
DYNAMIC_GRAPH_PYTHON_MODULE("${PYTHON_DIR}/${PYTHON_LIBRARY_NAME}"
41-
${LIBRARY_NAME} ${PROJECT_NAME}-${PYTHON_LIBRARY_NAME}-wrap
42-
1 "src/python-module-py.cpp")
43-
TARGET_LINK_BOOST_PYTHON(${PROJECT_NAME}-${PYTHON_LIBRARY_NAME}-wrap)
42+
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${plugin}-python-module-py.cc")
43+
DYNAMIC_GRAPH_PYTHON_MODULE("${PYTHON_DIR}/${PYTHON_LIBRARY_NAME}"
44+
${LIBRARY_NAME} ${PROJECT_NAME}-${PYTHON_LIBRARY_NAME}-wrap
45+
SOURCE_PYTHON_MODULE "${CMAKE_CURRENT_SOURCE_DIR}/${plugin}-python-module-py.cc")
46+
elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${plugin}-python.hh")
47+
DYNAMIC_GRAPH_PYTHON_MODULE("${PYTHON_DIR}/${PYTHON_LIBRARY_NAME}"
48+
${LIBRARY_NAME} ${PROJECT_NAME}-${PYTHON_LIBRARY_NAME}-wrap
49+
MODULE_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/${plugin}-python.hh")
50+
endif()
4451
ENDIF(BUILD_PYTHON_INTERFACE)
4552
ENDFOREACH(plugin)
4653

src/angle-estimator-python.hh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#include <sot/dynamic-pinocchio/angle-estimator.h>
2+
3+
typedef boost::mpl::vector< dynamicgraph::sot::AngleEstimator > entities_t;

src/dynamic-command.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ class GetJointNames : public Command {
7575
}
7676
const std::vector<std::string>& jointNames = robot.m_model->names;
7777
// Remove first joint names 'universe'
78-
std::size_t n(jointNames.size());
79-
assert(n >= 1);
78+
assert(jointNames.size() >= 1);
8079
std::vector<Value> res;
8180
for (std::size_t i = 1; i < jointNames.size(); ++i) {
8281
res.push_back(Value(jointNames[i]));

src/dynamic-python-module-py.cc

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#include <dynamic-graph/python/module.hh>
2+
3+
#include <sot/dynamic-pinocchio/dynamic-pinocchio.h>
4+
5+
namespace dg = dynamicgraph;
6+
namespace dgs = dynamicgraph::sot;
7+
8+
typedef bp::return_value_policy<bp::reference_existing_object> reference_existing_object;
9+
10+
BOOST_PYTHON_MODULE(wrap)
11+
{
12+
bp::import("dynamic_graph");
13+
bp::import("pinocchio");
14+
15+
dg::python::exposeEntity<dgs::DynamicPinocchio, bp::bases<dg::Entity>, dg::python::AddCommands>()
16+
.add_property("model",
17+
bp::make_function(&dgs::DynamicPinocchio::getModel, reference_existing_object()),
18+
bp::make_function(&dgs::DynamicPinocchio::setModel))
19+
.add_property("data",
20+
bp::make_function(&dgs::DynamicPinocchio::getData, reference_existing_object()),
21+
bp::make_function(&dgs::DynamicPinocchio::setData))
22+
.def("setModel", &dgs::DynamicPinocchio::setModel)
23+
.def("createData", &dgs::DynamicPinocchio::createData)
24+
.def("setData", &dgs::DynamicPinocchio::setData)
25+
;
26+
}

0 commit comments

Comments
 (0)