Unverified Commit 4d0349ba authored by Guilhem Saurel's avatar Guilhem Saurel Committed by GitHub
Browse files

Merge pull request #34 from nim65s/devel

[CI][CMake] add .gitlab-ci.yml & badges, sync submodules, update cmake
parents f5bc5a19 40bfc63c
Pipeline #1153 passed with stage
in 15 minutes and 38 seconds
variables:
GIT_SUBMODULE_STRATEGY: "recursive"
GIT_DEPTH: "3"
CCACHE_BASEDIR: "${CI_PROJECT_DIR}"
CCACHE_DIR: "${CI_PROJECT_DIR}/ccache"
cache:
paths:
- ccache
.robotpkg-sot-dynamic-pinocchio-v3: &robotpkg-sot-dynamic-pinocchio-v3
except:
- gh-pages
script:
- mkdir -p ccache
- cd /root/robotpkg/wip/sot-dynamic-pinocchio-v3
- git pull
- make checkout MASTER_REPOSITORY="dir ${CI_PROJECT_DIR}"
- make install
- cd work.$(hostname)/$(make show-var VARNAME=DISTNAME)
- make test
robotpkg-sot-dynamic-pinocchio-v3-14.04-release:
<<: *robotpkg-sot-dynamic-pinocchio-v3
image: eur0c.laas.fr:5000/stack-of-tasks/sot-dynamic-pinocchio/sot-dynamic-pinocchio-v3:14.04
robotpkg-sot-dynamic-pinocchio-v3-16.04-release:
<<: *robotpkg-sot-dynamic-pinocchio-v3
image: eur0c.laas.fr:5000/stack-of-tasks/sot-dynamic-pinocchio/sot-dynamic-pinocchio-v3:16.04
robotpkg-sot-dynamic-pinocchio-v3-18.04-release:
<<: *robotpkg-sot-dynamic-pinocchio-v3
image: eur0c.laas.fr:5000/stack-of-tasks/sot-dynamic-pinocchio/sot-dynamic-pinocchio-v3:18.04
doc-coverage:
<<: *robotpkg-sot-dynamic-pinocchio-v3
image: eur0c.laas.fr:5000/stack-of-tasks/sot-dynamic-pinocchio/sot-dynamic-pinocchio-v3:16.04
before_script:
- echo -e 'CXXFLAGS+= --coverage\nLDFLAGS+= --coverage\nPKG_DEFAULT_OPTIONS= debug' >> /opt/openrobots/etc/robotpkg.conf
after_script:
- cd /root/robotpkg/wip/sot-dynamic-pinocchio-v3
- cd work.$(hostname)/$(make show-var VARNAME=DISTNAME)
- make doc
- mv doc/doxygen-html ${CI_PROJECT_DIR}
- mkdir -p ${CI_PROJECT_DIR}/coverage/
- gcovr -r .
- gcovr -r . --html --html-details -o ${CI_PROJECT_DIR}/coverage/index.html
artifacts:
expire_in: 1 day
paths:
- doxygen-html/
- coverage/
......@@ -20,6 +20,7 @@ INCLUDE(cmake/boost.cmake)
INCLUDE(cmake/eigen.cmake)
INCLUDE(cmake/lapack.cmake)
INCLUDE(cmake/cpack.cmake)
INCLUDE(cmake/python.cmake)
SET(PROJECT_NAME sot-dynamic-pinocchio)
......@@ -27,6 +28,7 @@ SET(PROJECT_DESCRIPTION "pinocchio bindings for dynamic-graph.")
SET(PROJECT_URL "https://github.com/stack-of-tasks/sot-dynamic-pinocchio/")
SET(CUSTOM_HEADER_DIR "${PROJECT_NAME}")
SET(DOXYGEN_USE_MATHJAX YES)
# Disable -Werror on Unix for now.
SET(CXX_DISABLE_WERROR True)
......@@ -62,15 +64,13 @@ SET(plugins
SET(LIBRARY_NAME ${PROJECT_NAME})
LIST(APPEND plugins dynamic)
LIST(APPEND LOGGING_WATCHED_TARGETS ${plugins})
# Add dependency toward sot-dynamic-pinocchio library in pkg-config file.
PKG_CONFIG_APPEND_LIBS(${LIBRARY_NAME})
# Search for dependencies.
# Boost
SET(BOOST_COMPONENTS filesystem system unit_test_framework python)
FINDPYTHON()
SEARCH_FOR_BOOST()
SEARCH_FOR_EIGEN()
......
......@@ -2,8 +2,10 @@ sot-dynamic-pinocchio
Encapsulate Pinocchio in SoT
===========
[![Build Status](https://travis-ci.org/stack-of-tasks/sot-dynamic-pinocchio.png?branch=master)](https://travis-ci.org/stack-of-tasks/sot-dynamic-pinocchio)
[![Coverage Status](https://coveralls.io/repos/stack-of-tasks/sot-dynamic-pinocchio/badge.png)](https://coveralls.io/r/stack-of-tasks/sot-dynamic-pinocchio)
[![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)
[![Pipeline status](https://gepgitlab.laas.fr/stack-of-tasks/sot-dynamic-pinocchio/badges/master/pipeline.svg)](https://gepgitlab.laas.fr/stack-of-tasks/sot-dynamic-pinocchio/commits/master)
[![Coverage report](https://gepgitlab.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/)
This software provides robot dynamic computation for dynamic-graph
by using pinocchio.
......@@ -41,4 +43,3 @@ have to be available on your machine.
[dynamic-graph]: http://github.com/stack-of-tasks/dynamic-graph
[pinocchio]: http://github.com/stack-of-tasks/pinocchio
[sot-core]: http://github.com/stack-of-tasks/sot-core
>>>>>>> devel
Subproject commit 212cba414aac3cd18037d4102788b23f3df501f8
Subproject commit 8e7bedfcbd8524c0401a58fd74edc07c3d4308d0
# Copyright (C) 2008-2016 LAAS-CNRS, JRL AIST-CNRS.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program 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 Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# SOT_DYNAMIC_PYTHON_MODULE SUBMODULENAME LIBRARYNAME TARGETNAME
# ---------------------------
#
# Add a python submodule to dynamic_graph
#
# SUBMODULENAME : the name of the submodule (can be foo/bar),
#
# LIBRARYNAME : library to link the submodule with.
#
# TARGETNAME : name of the target: should be different for several
# calls to the macro.
#
# NOTICE : Before calling this macro, set variable NEW_ENTITY_CLASS as
# the list of new Entity types that you want to be bound.
# Entity class name should match the name referencing the type
# in the factory.
#
MACRO(SOT_DYNAMIC_PYTHON_MODULE SUBMODULENAME LIBRARYNAME TARGETNAME)
FINDPYTHON()
SET(PYTHON_MODULE ${TARGETNAME})
ADD_LIBRARY(${PYTHON_MODULE}
MODULE
${PROJECT_SOURCE_DIR}/src/python-module-py.cpp)
#${PROJECT_SOURCE_DIR}/src/sot-dynamic-py.cpp)
FILE(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/src/dynamic_graph/${SUBMODULENAME})
SET_TARGET_PROPERTIES(${PYTHON_MODULE}
PROPERTIES PREFIX ""
OUTPUT_NAME dynamic_graph/${SUBMODULENAME}/wrap
)
TARGET_LINK_LIBRARIES(${PYTHON_MODULE} "-Wl,--no-as-needed")
TARGET_LINK_LIBRARIES(${PYTHON_MODULE} ${LIBRARYNAME} ${PYTHON_LIBRARY})
TARGET_LINK_LIBRARIES(${PYTHON_MODULE} ${Boost_LIBRARIES})
TARGET_LINK_LIBRARIES(${PYTHON_MODULE} pinocchio)
TARGET_LINK_LIBRARIES(${PYTHON_MODULE} eigenpy)
PKG_CONFIG_USE_DEPENDENCY(${PYTHON_MODULE} dynamic-graph)
PKG_CONFIG_USE_DEPENDENCY(${PYTHON_MODULE} pinocchio)
PKG_CONFIG_USE_DEPENDENCY(${PYTHON_MODULE} eigenpy)
INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
#
# Installation
#
SET(PYTHON_INSTALL_DIR ${PYTHON_SITELIB}/dynamic_graph/${SUBMODULENAME})
INSTALL(TARGETS ${PYTHON_MODULE}
DESTINATION
${PYTHON_INSTALL_DIR})
SET(ENTITY_CLASS_LIST "")
FOREACH (ENTITY ${NEW_ENTITY_CLASS})
SET(ENTITY_CLASS_LIST "${ENTITY_CLASS_LIST}${ENTITY}('')\n")
ENDFOREACH(ENTITY ${NEW_ENTITY_CLASS})
CONFIGURE_FILE(
${PROJECT_SOURCE_DIR}/cmake/dynamic_graph/submodule/__init__.py.cmake
${PROJECT_BINARY_DIR}/src/dynamic_graph/${SUBMODULENAME}/__init__.py
)
INSTALL(
FILES ${PROJECT_BINARY_DIR}/src/dynamic_graph/${SUBMODULENAME}/__init__.py
DESTINATION ${PYTHON_INSTALL_DIR}
)
ENDMACRO(DYNAMIC_GRAPH_PYTHON_MODULE SUBMODULENAME)
\ No newline at end of file
INCLUDE(../cmake/python.cmake)
FINDPYTHON()
INSTALL(
FILES kine_romeo.py kine_romeo_small.py
DESTINATION ${PYTHON_SITELIB}/dynamic_graph/tutorial
......
......@@ -14,8 +14,6 @@
# received a copy of the GNU Lesser General Public License along with
# sot-dynamic-pinocchio. If not, see <http://www.gnu.org/licenses/>.
INCLUDE(../custom_cmake/python.cmake)
INCLUDE(../cmake/python.cmake)
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
# Verbosity level
......@@ -54,7 +52,7 @@ FOREACH(lib ${plugins})
# build python submodule
STRING(REPLACE - _ PYTHON_LIBRARY_NAME ${lib})
SOT_DYNAMIC_PYTHON_MODULE("sot/dynamics_pinocchio/${PYTHON_LIBRARY_NAME}"
DYNAMIC_GRAPH_PYTHON_MODULE("sot/dynamics_pinocchio/${PYTHON_LIBRARY_NAME}"
${libname}
sot-dynamic-pinocchio-${PYTHON_LIBRARY_NAME}-wrap
)
......@@ -81,4 +79,4 @@ INSTALL(FILES
${CMAKE_CURRENT_SOURCE_DIR}/dynamic_graph/sot/dynamics_pinocchio/tools.py
${CMAKE_CURRENT_SOURCE_DIR}/dynamic_graph/sot/dynamics_pinocchio/parser.py
DESTINATION ${PYTHON_SITELIB}/dynamic_graph/sot/dynamics_pinocchio
)
\ No newline at end of file
)
......@@ -12,7 +12,6 @@
# General Lesser Public License for more details. You should have
# received a copy of the GNU Lesser General Public License along with
# sot-dynamic-pinocchio. If not, see <http://www.gnu.org/licenses/>.
INCLUDE(../cmake/python.cmake)
ADD_DEFINITIONS(-DDEBUG=2)
......@@ -30,9 +29,6 @@ test_constructor
# Install procedure for the urdf files
#----------------------------------------------------
FILE(COPY ${CMAKE_CURRENT_SOURCE_DIR}/two_link.urdf
DESTINATION urdf)
SET(test_dyn_plugins_dependencies dynamic)
# Make Boost.Test generates the main function in test cases.
......@@ -50,8 +46,6 @@ ADD_DEFINITIONS(-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN)
#SET(sampleinitconfig
# ${JRL_DYNAMICS_PKGDATAROOTDIR}/jrl-dynamics/examples/data/sampleInitConfig.dat)
FINDPYTHON()
LIST(APPEND LOGGING_WATCHED_VARIABLES samplespec sampleljr)
FOREACH(test ${tests})
......@@ -60,7 +54,7 @@ FOREACH(test ${tests})
${test}.cpp)
MESSAGE("PYTHON_INCLUDE_PATH: ${PYTHON_INCLUDE_PATH}")
INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
TARGET_LINK_LIBRARIES(${EXECUTABLE_NAME}
dp-zmpreffromcom
dp-force-compensation
......@@ -77,7 +71,7 @@ FOREACH(test ${tests})
PKG_CONFIG_USE_DEPENDENCY(${EXECUTABLE_NAME} sot-core)
PKG_CONFIG_USE_DEPENDENCY(${EXECUTABLE_NAME} dynamic-graph)
PKG_CONFIG_USE_DEPENDENCY(${EXECUTABLE_NAME} dynamic-graph-python)
IF(${test}_plugins_dependencies)
ADD_DEPENDENCIES(${EXECUTABLE_NAME} "${${test}_plugins_dependencies}")
TARGET_LINK_LIBRARIES(${EXECUTABLE_NAME} "${${test}_plugins_dependencies}")
......@@ -89,7 +83,7 @@ FOREACH(test ${tests})
IF (UNIX)
SET(EXTRA_LD_LIBRARY_PATH $ENV{LD_LIBRARY_PATH})
SET_PROPERTY(TEST ${test} PROPERTY
SET_PROPERTY(TEST ${test} PROPERTY
ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}:${CMAKE_BINARY_DIR}/src:${BOOST_ROOT}/lib:${EXTRA_LD_LIBRARY_PATH}")
ENDIF(UNIX)
......
<?xml version="1.0"?>
<!--
simple_humanoid URDF model
FIXME: fill missing data: sole, gripper and sensors
-->
<robot xmlns:xacro="http://ros.org/wiki/xacro" name="test_two_link">
<link name="base_link"/>
<joint name="JOINT1" type="revolute">
<axis xyz="0 0 1"/>
<parent link="base_link"/>
<child link="CHILD1"/>
<origin xyz="1 0 0"/>
<limit effort="12" lower="0" upper="3.14" velocity="10"/>
</joint>
<link name="CHILD1">
<inertial>
<origin xyz="0.5 0 0" rpy="0 0 0"/>
<mass value="10"/>
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1" />
</inertial>
</link>
<joint name="JOINT2" type="revolute">
<axis xyz="0 0 1"/>
<parent link="CHILD1"/>
<child link="CHILD2"/>
<origin xyz="1 0 0"/>
<limit effort="12" lower="0" upper="3.14" velocity="10"/>
</joint>
<link name="CHILD2">
<inertial>
<origin xyz="0.5 0 0" rpy="0 0 0"/>
<mass value="20"/>
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1" />
</inertial>
</link>
<joint name="FRAMEJOINT1" type="fixed">
<parent link="CHILD2"/>
<child link="CHILD3"/>
<origin rpy="0 0 0" xyz="0 0 -0.16"/>
</joint>
<link name="CHILD3"/>
</robot>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment