Skip to content

Commit 39a1daf

Browse files
authored
Merge pull request #9 from jhu-saw/rc-2.1
2.1.0
2 parents bb103e8 + 86730ab commit 39a1daf

17 files changed

+1090
-902
lines changed

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
11
Change log
22
==========
33

4+
2.1.0 (2023-11-21)
5+
==================
6+
7+
* API changes:
8+
* mtsPID:
9+
* Assumes control is performed on actuators, not joints
10+
* Removed all code related to actuator to joint coupling
11+
* Configuration file is now `.cdg` based and uses JSON (was XML)
12+
* Effort and position limits come from IO level and are retrieved in `Startup` method
13+
* Deprecated features:
14+
* mtsPID: Removed non-linear gains
15+
* New features:
16+
* mtsPID:
17+
* Now uses the velocities sent through `servo_jp` as reference velocities, much better trajectory following!
18+
* Added support for disturbance observer
19+
* mtsPID QtWidget:
20+
* More signals plotted
21+
* GUI uses CRTK naming convention
22+
* Added option to save configuration
23+
* CMake:
24+
* Updated install targets and debian packages generation
25+
* Works with ROS2/colcon
26+
* Bug fixes:
27+
* mtsPID: fixed deadband transitions
28+
429
2.0.0 (2021-04-08)
530
==================
631

CMakeLists.txt

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# (C) Copyright 2012-2016 Johns Hopkins University (JHU), All Rights Reserved.
2+
# (C) Copyright 2012-2023 Johns Hopkins University (JHU), All Rights Reserved.
33
#
44
# --- begin cisst license - do not edit ---
55
#
@@ -9,7 +9,21 @@
99
#
1010
# --- end cisst license ---
1111

12-
cmake_minimum_required (VERSION 2.8)
12+
cmake_minimum_required (VERSION 3.10)
13+
project (sawControllersAll VERSION 2.1.0)
14+
15+
find_package (cisst REQUIRED)
16+
include (${CISST_USE_FILE})
17+
cisst_cpack_settings (
18+
VENDOR "JHU"
19+
MAINTAINER "anton.deguet@jhu.edu")
1320

1421
add_subdirectory (components)
22+
23+
set (sawControllers_DIR "${sawControllersAll_BINARY_DIR}/components")
1524
add_subdirectory (examples)
25+
26+
include (CPack)
27+
cpack_add_component (sawControllers)
28+
cpack_add_component (sawControllers-Examples
29+
DEPENDS sawControllers sawControllers-Qt)

colcon.pkg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "sawControllersAll",
3+
"dependencies": ["cisst", "sawKeyboardAll"]
4+
}

components/CMakeLists.txt

Lines changed: 26 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# (C) Copyright 2011-2021 Johns Hopkins University (JHU), All Rights Reserved.
2+
# (C) Copyright 2011-2023 Johns Hopkins University (JHU), All Rights Reserved.
33
#
44
# --- begin cisst license - do not edit ---
55
#
@@ -9,61 +9,53 @@
99
#
1010
# --- end cisst license ---
1111

12-
cmake_minimum_required (VERSION 2.8)
13-
14-
project (sawControllers)
12+
cmake_minimum_required (VERSION 3.10)
13+
project (sawControllers VERSION 2.1.0)
1514

1615
set (CMAKE_CXX_STANDARD 14)
1716
set (CMAKE_CXX_STANDARD_REQUIRED ON)
1817
set (CMAKE_CXX_EXTENSIONS OFF)
1918

2019
set (REQUIRED_CISST_LIBRARIES
2120
cisstCommon
22-
cisstCommonXML
2321
cisstVector
2422
cisstOSAbstraction
2523
cisstMultiTask
2624
cisstParameterTypes
2725
cisstRobot
2826
cisstNumerical)
2927

30-
find_package (cisst 1.1.0 REQUIRED ${REQUIRED_CISST_LIBRARIES})
28+
find_package (cisst 1.2.0 REQUIRED ${REQUIRED_CISST_LIBRARIES})
3129

3230
if (cisst_FOUND)
3331

3432
# load cisst configuration
3533
include (${CISST_USE_FILE})
3634

3735
# catkin/ROS paths
38-
cisst_is_catkin_build (sawControllers_IS_CATKIN_BUILT)
39-
if (sawControllers_IS_CATKIN_BUILT)
40-
set (sawControllers_CONFIG_FILE_DIR
41-
"${CATKIN_DEVEL_PREFIX}/share/sawControllers/cmake")
42-
set (LIBRARY_OUTPUT_PATH "${sawControllers_BINARY_DIR}/lib")
43-
set (EXECUTABLE_OUTPUT_PATH "${CATKIN_DEVEL_PREFIX}/bin")
44-
else ()
45-
set (sawControllers_CONFIG_FILE_DIR "${sawControllers_BINARY_DIR}")
46-
endif ()
36+
cisst_set_output_path ()
4737

4838
# create/configure file for find_package (sawControllers)
4939
set (sawControllers_INCLUDE_DIR "${sawControllers_SOURCE_DIR}/include"
5040
"${sawControllers_BINARY_DIR}/include")
41+
set (sawControllers_HEADER_DIR "${sawControllers_SOURCE_DIR}/include/sawControllers")
5142
set (sawControllers_LIBRARY_DIR "${LIBRARY_OUTPUT_PATH}")
5243
set (sawControllers_LIBRARIES sawControllers)
5344

54-
# Set the version number
55-
set (sawControllers_VERSION_MAJOR "2")
56-
set (sawControllers_VERSION_MINOR "0")
57-
set (sawControllers_VERSION_PATCH "0")
58-
set (sawControllers_VERSION "${sawControllers_VERSION_MAJOR}.${sawControllers_VERSION_MINOR}.${sawControllers_VERSION_PATCH}")
45+
include_directories (BEFORE ${sawControllers_INCLUDE_DIR})
5946

60-
# Generate sawControllersRevision.h
61-
configure_file ("${sawControllers_SOURCE_DIR}/code/sawControllersRevision.h.in"
62-
"${sawControllers_BINARY_DIR}/include/sawControllers/sawControllersRevision.h")
47+
if (CISST_HAS_QT)
48+
add_subdirectory (code/Qt)
49+
set (sawControllers_LIBRARIES ${sawControllers_LIBRARIES} sawControllersQt)
50+
endif ()
6351

64-
include_directories (${sawControllers_INCLUDE_DIR})
65-
set (sawControllers_HEADER_DIR "${sawControllers_SOURCE_DIR}/include/sawControllers")
52+
cisst_add_config_files (sawControllers)
6653

54+
# create data type using the data generator
55+
cisst_data_generator (sawControllers
56+
"${sawControllers_BINARY_DIR}/include" # where to save the file
57+
"sawControllers/" # sub directory for include
58+
code/mtsPIDConfiguration.cdg)
6759
set (HEADER_FILES
6860
${sawControllers_HEADER_DIR}/osaGravityCompensation.h
6961
${sawControllers_HEADER_DIR}/osaPDGC.h
@@ -86,39 +78,27 @@ if (cisst_FOUND)
8678
code/mtsPDGC.cpp
8779
code/mtsPID.cpp)
8880

89-
add_library (sawControllers ${HEADER_FILES} ${SOURCE_FILES})
90-
cisst_target_link_libraries (sawControllers ${REQUIRED_CISST_LIBRARIES})
91-
set_property (TARGET sawControllers PROPERTY FOLDER "sawControllers")
92-
93-
# add Qt code
94-
add_subdirectory (code/Qt)
95-
set (sawControllers_LIBRARIES ${sawControllers_LIBRARIES} ${sawControllersQt_LIBRARIES})
96-
97-
set (sawControllers_CMAKE_CONFIG_FILE
98-
"${sawControllers_CONFIG_FILE_DIR}/sawControllersConfig.cmake")
81+
add_library (sawControllers ${HEADER_FILES} ${SOURCE_FILES}
82+
${sawControllers_CISST_DG_SRCS}
83+
${sawControllers_CISST_DG_HDRS})
9984

100-
configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/cmake/sawControllersConfig.cmake.in"
101-
"${sawControllers_CONFIG_FILE_DIR}/sawControllersConfig.cmake"
102-
@ONLY)
85+
set_target_properties (sawControllers PROPERTIES
86+
VERSION ${sawControllers_VERSION}
87+
FOLDER "sawControllers")
10388

104-
cisst_add_config_version ("${sawControllers_CONFIG_FILE_DIR}/sawControllersConfigVersion.cmake"
105-
VERSION ${sawControllers_VERSION}
106-
DESTINATION ${CISST_CMAKE_INSTALL_SUFFIX}/saw
107-
COMPONENT sawControllers)
89+
cisst_target_link_libraries (sawControllers ${REQUIRED_CISST_LIBRARIES})
10890

10991
# Install targets for headers and library
11092
install (DIRECTORY
11193
${sawControllers_SOURCE_DIR}/include/sawControllers
11294
${sawControllers_BINARY_DIR}/include/sawControllers
11395
DESTINATION include
96+
COMPONENT sawControllers-dev
11497
PATTERN .svn EXCLUDE)
11598

116-
install (TARGETS sawControllers
99+
install (TARGETS sawControllers COMPONENT sawControllers
117100
RUNTIME DESTINATION bin
118101
LIBRARY DESTINATION lib
119102
ARCHIVE DESTINATION lib)
120103

121-
install (FILES "${sawControllers_CMAKE_CONFIG_FILE}"
122-
DESTINATION "share/sawControllers")
123-
124104
endif( cisst_FOUND )

components/cmake/sawControllersConfig.cmake.in

Lines changed: 0 additions & 31 deletions
This file was deleted.

components/code/Qt/CMakeLists.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# (C) Copyright 2013-2020 Johns Hopkins University (JHU), All Rights Reserved.
2+
# (C) Copyright 2013-2021 Johns Hopkins University (JHU), All Rights Reserved.
33
#
44
# --- begin cisst license - do not edit ---
55
#
@@ -42,11 +42,15 @@ if (cisst_FOUND_AS_REQUIRED)
4242
${sawControllers_HEADER_DIR}/mtsPIDQtWidget.h
4343
mtsPIDQtWidget.cpp
4444
${SAW_CONTROLLERS_QT_WRAP_CPP})
45-
set_property (TARGET sawControllersQt PROPERTY FOLDER "sawControllers")
45+
set_target_properties (sawControllersQt PROPERTIES
46+
VERSION ${sawControllers_VERSION}
47+
FOLDER "sawControllers")
4648
cisst_target_link_libraries (sawControllersQt ${REQUIRED_CISST_LIBRARIES})
4749

48-
# make sure the new library is known by the parent folder to add to the config file
49-
set (sawControllersQt_LIBRARIES sawControllersQt PARENT_SCOPE)
50+
install (TARGETS sawControllersQt COMPONENT sawControllers-Qt
51+
RUNTIME DESTINATION bin
52+
LIBRARY DESTINATION lib
53+
ARCHIVE DESTINATION lib)
5054

5155
else (cisst_FOUND_AS_REQUIRED)
5256
message ("Information: code will not be compiled, it requires ${REQUIRED_CISST_LIBRARIES}")

0 commit comments

Comments
 (0)