Skip to content

Commit adbac13

Browse files
authored
Merge branch 'orocos:master' into pinv-velocity-solver-sigma-output
2 parents c332a23 + b8c7473 commit adbac13

Some content is hidden

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

51 files changed

+702
-388
lines changed

.github/workflows/main.yml

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: CI
22

3-
on: [push, pull_request]
3+
on: [push, pull_request, workflow_dispatch]
44

55
env:
66
CXXFLAGS: "-Wall -Wextra -Wno-unused-parameter"
@@ -12,28 +12,41 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
os: [ubuntu-20.04]
15+
os: [ubuntu-20.04, ubuntu-22.04]
1616
orocos_build_type: [Debug, Release]
1717
compiler: [gcc, clang]
18-
python_version: ['3.8']
18+
python_version: ['3.8', '3.10']
19+
exclude:
20+
- os: ubuntu-20.04
21+
python_version: '3.10'
22+
- os: ubuntu-22.04
23+
python_version: '3.8'
1924
include:
20-
- os: ubuntu-18.04
25+
- os: ubuntu-20.04
2126
orocos_build_type: Release
2227
compiler: gcc
23-
python_version: '2'
28+
python_version: '3.9'
2429
- os: ubuntu-20.04
2530
orocos_build_type: Release
2631
compiler: gcc
27-
python_version: '3.9'
32+
python_version: '3.10'
33+
- os: ubuntu-20.04
34+
orocos_build_type: Release
35+
compiler: gcc
36+
python_version: '3.11'
37+
- os: ubuntu-22.04
38+
orocos_build_type: Release
39+
compiler: gcc
40+
python_version: '3.11'
2841
env:
2942
CC: ${{ matrix.compiler }}
3043
OROCOS_BUILD_TYPE: ${{ matrix.orocos_build_type }}
3144
ROS_PYTHON_VERSION: ${{ matrix.python_version }}
3245
steps:
33-
- uses: actions/checkout@v2
46+
- uses: actions/checkout@v4
3447
with:
3548
submodules: recursive
36-
- uses: actions/setup-python@v2
49+
- uses: actions/setup-python@v5
3750
with:
3851
python-version: ${{ matrix.python_version }}
3952
- name: Install
@@ -76,18 +89,6 @@ jobs:
7689
fail-fast: false
7790
matrix:
7891
include:
79-
- env:
80-
ROS_DISTRO: kinetic
81-
ROS_REPO: ros
82-
ABICHECK_URL: github:orocos/orocos_kinematics_dynamics#release-1.3
83-
ABICHECK_MERGE: false
84-
branch: release-1.3
85-
- env:
86-
ROS_DISTRO: melodic
87-
ROS_REPO: ros
88-
ABICHECK_URL: github:orocos/orocos_kinematics_dynamics#release-1.4
89-
ABICHECK_MERGE: false
90-
branch: release-1.4
9192
- env:
9293
ROS_DISTRO: noetic
9394
ROS_REPO: ros
@@ -96,7 +97,7 @@ jobs:
9697
branch: release-1.5
9798
env: ${{ matrix.env }}
9899
steps:
99-
- uses: actions/checkout@v1
100+
- uses: actions/checkout@v4
100101
with:
101102
submodules: recursive
102103
if: ${{ (github.event_name == 'push' && endsWith(github.ref, matrix.branch)) || (github.event_name == 'pull_request' && endsWith(github.base_ref, matrix.branch)) }}

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,8 @@ The C++ library is located in the `orocos_kdl` folder. The installation instruct
1313
The python bindings, are located in the `python_orocos_kdl` folder. The installation instructions can be found in
1414
[INSTALL.md](python_orocos_kdl/INSTALL.md).
1515

16+
Always use the same version of the C++ library and the python bindings. As a mismatch between these two can cause many issues.
17+
18+
Also when using ROS/catkin, it is preferred to use the catkin installation method over the `cmake/make` method.
19+
20+
There will be no ROS Noetic release.

orocos_kdl/CMakeLists.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
#
22
# Test CMake version
33
#
4-
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
5-
IF(POLICY CMP0048)
6-
CMAKE_POLICY(SET CMP0048 NEW)
7-
ENDIF()
8-
#MARK_AS_ADVANCED( FORCE CMAKE_BACKWARDS_COMPATIBILITY )
4+
CMAKE_MINIMUM_REQUIRED(VERSION 3.0.2)
95

106

117
###################################################
@@ -58,7 +54,7 @@ if(NOT EIGEN3_FOUND)
5854
include(${PROJ_SOURCE_DIR}/cmake/FindEigen3.cmake)
5955
endif()
6056
include_directories(${EIGEN3_INCLUDE_DIR})
61-
SET(KDL_CFLAGS "${KDL_CFLAGS} -I${EIGEN3_INCLUDE_DIR}")
57+
SET(KDL_CFLAGS "${KDL_CFLAGS} -I\"${EIGEN3_INCLUDE_DIR}\"")
6258

6359
# Check the platform STL containers capabilities
6460
include(cmake/CheckSTLContainers.cmake)

orocos_kdl/examples/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@ IF(ENABLE_EXAMPLES)
88
TARGET_LINK_LIBRARIES(trajectory_example orocos-kdl)
99

1010
add_executable(chainiksolverpos_lma_demo chainiksolverpos_lma_demo.cpp )
11-
TARGET_LINK_LIBRARIES(chainiksolverpos_lma_demo orocos-kdl orocos-kdl-models)
11+
find_package(Boost REQUIRED)
12+
IF(${Boost_VERSION_MACRO} LESS 108300)
13+
TARGET_LINK_LIBRARIES(chainiksolverpos_lma_demo orocos-kdl orocos-kdl-models)
14+
ELSE()
15+
TARGET_LINK_LIBRARIES(chainiksolverpos_lma_demo boost_timer orocos-kdl orocos-kdl-models)
16+
ENDIF()
1217

1318
ENDIF(ENABLE_EXAMPLES)
1419

orocos_kdl/examples/chainiksolverpos_lma_demo.cpp

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,24 @@ estimate of shortest time per invposkin (ms) 0.155544
5656
#include <chainfksolverpos_recursive.hpp>
5757
#include <utilities/utility.h>
5858

59+
#include <boost/version.hpp>
60+
#if BOOST_VERSION < 108300
5961
#include <boost/timer.hpp>
62+
#else
63+
#include <boost/timer/timer.hpp>
64+
#endif
6065

6166
/**
6267
* tests the inverse kinematics on the given kinematic chain for a
6368
* large number of times and provides statistics on the result.
6469
* \TODO provide other examples.
6570
*/
6671
void test_inverseposkin(KDL::Chain& chain) {
72+
#if BOOST_VERSION < 108300
6773
boost::timer timer;
74+
#else
75+
boost::timer::cpu_timer timer;
76+
#endif
6877
int num_of_trials = 1000000;
6978
int total_number_of_iter = 0;
7079
int n = chain.getNrOfJoints();
@@ -90,9 +99,9 @@ void test_inverseposkin(KDL::Chain& chain) {
9099
KDL::JntArray q_sol(n);
91100
for (int trial=0;trial<num_of_trials;++trial) {
92101
q.data.setRandom();
93-
q.data *= PI;
102+
q.data *= KDL::PI;
94103
q_init.data.setRandom();
95-
q_init.data *= PI;
104+
q_init.data *= KDL::PI;
96105
KDL::Frame pos_goal,pos_reached;
97106
fwdkin.JntToCart(q,pos_goal);
98107
//solver.compute_fwdpos(q.data);
@@ -159,7 +168,12 @@ void test_inverseposkin(KDL::Chain& chain) {
159168
std::cout << "max. trans. difference after solving " << max_trans_diff << std::endl;
160169
std::cout << "min. rot. difference after solving " << min_rot_diff << std::endl;
161170
std::cout << "max. rot. difference after solving " << max_rot_diff << std::endl;
171+
#if BOOST_VERSION < 108300
162172
double el = timer.elapsed();
173+
#else
174+
boost::timer::cpu_times const ct(timer.elapsed());
175+
double el = ct.user / 1e9;
176+
#endif
163177
std::cout << "elapsed time " << el << std::endl;
164178
std::cout << "estimate of average time per invposkin (ms)" << el/num_of_trials*1000 << std::endl;
165179
std::cout << "estimate of longest time per invposkin (ms) " << el/total_number_of_iter*max_num_of_iter *1000 << std::endl;
@@ -177,7 +191,7 @@ int main(int argc,char* argv[]) {
177191
<< " This routine can take more then 6 minutes to execute. It then gives statistics on execution times\n"
178192
<< " and failures.\n"
179193
<< " Typically when executed 1 000 000 times, you will still see some small amount of failures\n"
180-
<< " Typically these failures are in the neighbourhoud of singularities. Most failures of type -2 still\n"
194+
<< " Typically these failures are in the neighbourhood of singularities. Most failures of type -2 still\n"
181195
<< " reach an accuracy better than 1E-4.\n"
182196
<< " This is much better than ChainIkSolverPos_NR, which fails a few times per 100 trials.\n";
183197

orocos_kdl/models/kukaLWRtestDHnew.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ int getInputs(JntArray &_q, JntArray &_qdot, JntArray &_qdotdot, int &linenr)
109109
*READING Qdot = joint velocities
110110
*/
111111
counter=0;//reset counter
112-
ifstream inQdotfile("interpreteerbaar/qdot", std::ios::in);
112+
std::ifstream inQdotfile("interpreteerbaar/qdot", std::ios::in);
113113

114114
if (!inQdotfile)
115115
{

orocos_kdl/orocos_kdl-config.cmake.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ set(orocos_kdl_INCLUDE_DIRS
2828
${EIGEN3_INCLUDE_DIR}
2929
)
3030
set(orocos_kdl_LIBRARIES orocos-kdl)
31+
set(orocos_kdl_TARGETS orocos-kdl)
3132

3233
# where the .pc pkgconfig files are installed
3334
set(orocos_kdl_PKGCONFIG_DIR "${orocos_kdl_PREFIX}/lib/pkgconfig")

orocos_kdl/package.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
<export>
2828
<build_type>cmake</build_type>
29+
<rosdoc config="rosdoc.yaml"/>
2930
</export>
3031

3132
</package>

orocos_kdl/rosdoc.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- builder: doxygen
2+
name: C++ API
3+
file_patterns: '*.cpp *.cxx *.h *.hpp *.inl'
4+
tab_size: 4
5+
exclude_patterns: '*.svn* CMake*'

orocos_kdl/src/CMakeLists.txt

Lines changed: 36 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -16,46 +16,44 @@ ENDIF(MSVC)
1616
CONFIGURE_FILE(config.h.in config.h @ONLY)
1717

1818
#### Settings for rpath
19-
IF(${CMAKE_MINIMUM_REQUIRED_VERSION} VERSION_GREATER "2.8.12")
20-
MESSAGE(AUTHOR_WARNING "CMAKE_MINIMUM_REQUIRED_VERSION is now ${CMAKE_MINIMUM_REQUIRED_VERSION}. This check can be removed.")
21-
ENDIF()
22-
IF(NOT (CMAKE_VERSION VERSION_LESS 2.8.12))
23-
IF(NOT MSVC)
24-
#add the option to disable RPATH
25-
OPTION(OROCOSKDL_ENABLE_RPATH "Enable RPATH during installation" TRUE)
26-
MARK_AS_ADVANCED(OROCOSKDL_ENABLE_RPATH)
27-
ENDIF(NOT MSVC)
19+
IF(NOT MSVC)
20+
#add the option to disable RPATH
21+
OPTION(OROCOSKDL_ENABLE_RPATH "Enable RPATH during installation" TRUE)
22+
MARK_AS_ADVANCED(OROCOSKDL_ENABLE_RPATH)
23+
ENDIF(NOT MSVC)
2824

29-
IF(OROCOSKDL_ENABLE_RPATH)
30-
#Configure RPATH
31-
SET(CMAKE_MACOSX_RPATH TRUE) #enable RPATH on OSX. This also suppress warnings on CMake >= 3.0
32-
# when building, don't use the install RPATH already
33-
# (but later on when installing)
34-
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
35-
#build directory by default is built with RPATH
36-
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
25+
IF(OROCOSKDL_ENABLE_RPATH)
26+
#Configure RPATH
27+
SET(CMAKE_MACOSX_RPATH TRUE) #enable RPATH on OSX. This also suppress warnings on CMake >= 3.0
28+
# when building, don't use the install RPATH already
29+
# (but later on when installing)
30+
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
31+
#build directory by default is built with RPATH
32+
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
3733

38-
#This is relative RPATH for libraries built in the same project
39-
#I assume that the directory is
40-
# - install_dir/something for binaries
41-
# - install_dir/lib for libraries
42-
LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
43-
IF("${isSystemDir}" STREQUAL "-1")
44-
FILE(RELATIVE_PATH _rel_path "${CMAKE_INSTALL_PREFIX}/bin" "${CMAKE_INSTALL_PREFIX}/lib")
45-
IF (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
46-
SET(CMAKE_INSTALL_RPATH "@loader_path/${_rel_path}")
47-
ELSE()
48-
SET(CMAKE_INSTALL_RPATH "\$ORIGIN/${_rel_path}")
49-
ENDIF()
50-
ENDIF("${isSystemDir}" STREQUAL "-1")
51-
# add the automatically determined parts of the RPATH
52-
# which point to directories outside the build tree to the install RPATH
53-
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) #very important!
54-
ENDIF()
34+
#This is relative RPATH for libraries built in the same project
35+
#I assume that the directory is
36+
# - install_dir/something for binaries
37+
# - install_dir/lib for libraries
38+
LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
39+
IF("${isSystemDir}" STREQUAL "-1")
40+
FILE(RELATIVE_PATH _rel_path "${CMAKE_INSTALL_PREFIX}/bin" "${CMAKE_INSTALL_PREFIX}/lib")
41+
IF (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
42+
SET(CMAKE_INSTALL_RPATH "@loader_path/${_rel_path}")
43+
ELSE()
44+
SET(CMAKE_INSTALL_RPATH "\$ORIGIN/${_rel_path}")
45+
ENDIF()
46+
ENDIF("${isSystemDir}" STREQUAL "-1")
47+
# add the automatically determined parts of the RPATH
48+
# which point to directories outside the build tree to the install RPATH
49+
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) #very important!
5550
ENDIF()
5651
#####end RPATH
5752

58-
ADD_LIBRARY(orocos-kdl ${LIB_TYPE} ${KDL_SRCS} config.h)
53+
ADD_LIBRARY(orocos-kdl ${LIB_TYPE} ${KDL_SRCS})
54+
55+
TARGET_INCLUDE_DIRECTORIES(orocos-kdl PUBLIC
56+
"$<INSTALL_INTERFACE:include>")
5957

6058
SET_TARGET_PROPERTIES( orocos-kdl PROPERTIES
6159
SOVERSION "${KDL_VERSION_MAJOR}.${KDL_VERSION_MINOR}"
@@ -65,22 +63,15 @@ SET_TARGET_PROPERTIES( orocos-kdl PROPERTIES
6563
)
6664

6765
#### Settings for rpath disabled (back-compatibility)
68-
IF(${CMAKE_MINIMUM_REQUIRED_VERSION} VERSION_GREATER "2.8.12")
69-
MESSAGE(AUTHOR_WARNING "CMAKE_MINIMUM_REQUIRED_VERSION is now ${CMAKE_MINIMUM_REQUIRED_VERSION}. This check can be removed.")
70-
ENDIF()
71-
IF(CMAKE_VERSION VERSION_LESS 2.8.12)
66+
IF(NOT OROCOSKDL_ENABLE_RPATH)
7267
SET_TARGET_PROPERTIES( orocos-kdl PROPERTIES
7368
INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
74-
ELSE()
75-
IF(NOT OROCOSKDL_ENABLE_RPATH)
76-
SET_TARGET_PROPERTIES( orocos-kdl PROPERTIES
77-
INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
78-
ENDIF()
7969
ENDIF()
8070
#####end RPATH
8171

8272
# Needed so that the generated config.h can be used
83-
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
73+
TARGET_INCLUDE_DIRECTORIES(orocos-kdl PUBLIC
74+
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>")
8475
TARGET_LINK_LIBRARIES(orocos-kdl ${Boost_LIBRARIES})
8576

8677
INSTALL(TARGETS orocos-kdl

0 commit comments

Comments
 (0)