Skip to content

Commit c4e8ebe

Browse files
authored
Merge branch 'devel' into devel
2 parents 461af7f + ac02067 commit c4e8ebe

30 files changed

+484
-443
lines changed

.clang-format

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

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# pre-commit run -a (Guilhem Saurel, 2022-07-28)
2+
a81119ab9e0c26da6ef91e40cd96c2fa6642525f

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include: http://rainboard.laas.fr/project/roscontrol_sot/.gitlab-ci.yml
1+
include: https://rainboard.laas.fr/project/roscontrol_sot/.gitlab-ci.yml

.gitlab-ci.yml.backup

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ variables:
1111
cache:
1212
paths:
1313
- ccache
14-
14+
1515
.robotpkg-roscontrol-sot: &robotpkg-roscontrol-sot
1616
variables:
1717
ROBOTPKG: roscontrol-sot
@@ -29,7 +29,7 @@ cache:
2929
- make install
3030
- cd work.$(hostname)/$(make show-var VARNAME=DISTNAME)
3131
- make test
32-
32+
3333
except:
3434
- gh-pages
3535

@@ -41,17 +41,17 @@ robotpkg-roscontrol-sot-14.04:
4141
- cd build
4242
- export CCACHE_BASEDIR=${PWD}
4343
- export CCACHE_DIR=${PWD}/ccache
44-
- apt-get update
45-
- apt-get install -y ros-indigo-twist-mux ros-indigo-joy-teleop ros-indigo-moveit-ros-move-group ros-indigo-humanoid-nav-msgs ros-indigo-four-wheel-steering-msgs
44+
- apt-get update
45+
- apt-get install -y ros-indigo-twist-mux ros-indigo-joy-teleop ros-indigo-moveit-ros-move-group ros-indigo-humanoid-nav-msgs ros-indigo-four-wheel-steering-msgs
4646
image: ${IMAGE}:14.04
47-
47+
4848
robotpkg-roscontrol-sot-16.04:
4949
before_script:
5050
- mkdir -p build/ccache
5151
- cd build
5252
- export CCACHE_BASEDIR=${PWD}
5353
- export CCACHE_DIR=${PWD}/ccache
54-
- apt-get update
54+
- apt-get update
5555
- apt-get install -y ros-kinetic-twist-mux ros-kinetic-joy-teleop ros-kinetic-moveit-ros-move-group ros-kinetic-humanoid-nav-msgs ros-kinetic-four-wheel-steering-msgs ros-kinetic-urdf-geometry-parser
5656
script:
5757
- cd /root/robotpkg
@@ -69,7 +69,7 @@ robotpkg-roscontrol-sot-16.04:
6969
except:
7070
- gh-pages
7171
image: ${IMAGE}:16.04
72-
72+
7373
robotpkg-roscontrol-sot-dubnium:
7474
<<: *robotpkg-roscontrol-sot
7575
before_script:
@@ -98,5 +98,5 @@ robotpkg-roscontrol-sot-dubnium:
9898
- make install
9999
- cd work.*/${PROJECT}*/
100100
except:
101-
- gh-pages
102-
image: ${IMAGE}:dubnium
101+
- gh-pages
102+
image: ${IMAGE}:dubnium

.pre-commit-config.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
ci:
2+
autoupdate_branch: 'devel'
3+
repos:
4+
- repo: https://github.com/pre-commit/mirrors-clang-format
5+
rev: v14.0.6
6+
hooks:
7+
- id: clang-format
8+
args: [--style=Google]
9+
- repo: https://github.com/pre-commit/pre-commit-hooks
10+
rev: v4.3.0
11+
hooks:
12+
- id: check-added-large-files
13+
- id: check-ast
14+
- id: check-executables-have-shebangs
15+
- id: check-json
16+
- id: check-merge-conflict
17+
- id: check-symlinks
18+
- id: check-toml
19+
- id: check-yaml
20+
- id: debug-statements
21+
- id: destroyed-symlinks
22+
- id: detect-private-key
23+
- id: end-of-file-fixer
24+
- id: fix-byte-order-marker
25+
- id: mixed-line-ending
26+
- id: trailing-whitespace
27+
- repo: https://github.com/psf/black
28+
rev: 22.6.0
29+
hooks:
30+
- id: black
31+
- repo: https://github.com/PyCQA/flake8
32+
rev: 4.0.1
33+
hooks:
34+
- id: flake8
35+
- repo: https://github.com/cheshirekow/cmake-format-precommit
36+
rev: v0.6.13
37+
hooks:
38+
- id: cmake-format

CMakeLists.txt

Lines changed: 69 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,56 @@
11
# Copyright (C) 2017-2020 LAAS-CNRS
22
#
3-
# Author: Olivier Stasse
4-
# Author: Guilhem Saurel
3+
# Author: Olivier Stasse Author: Guilhem Saurel
54
#
6-
CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
5+
cmake_minimum_required(VERSION 3.1)
76

87
# Project properties
9-
SET(PROJECT_ORG stack-of-tasks)
10-
SET(PROJECT_DESCRIPTION roscontrol_sot)
11-
SET(PROJECT_NAME roscontrol_sot)
12-
SET(PROJECT_URL "https://github.com/${PROJECT_ORG}/${PROJECT_NAME}")
8+
set(PROJECT_ORG stack-of-tasks)
9+
set(PROJECT_DESCRIPTION roscontrol_sot)
10+
set(PROJECT_NAME roscontrol_sot)
11+
set(PROJECT_URL "https://github.com/${PROJECT_ORG}/${PROJECT_NAME}")
1312

1413
# Project options
1514

1615
# Project configuration
17-
SET(CXX_DISABLE_WERROR True)
18-
SET(PROJECT_USE_CMAKE_EXPORT TRUE)
16+
set(CXX_DISABLE_WERROR True)
17+
set(PROJECT_USE_CMAKE_EXPORT TRUE)
1918

2019
# JRL-cmakemodule setup
21-
INCLUDE(cmake/base.cmake)
22-
INCLUDE(cmake/boost.cmake)
23-
INCLUDE(cmake/python.cmake)
24-
INCLUDE(cmake/ros.cmake)
20+
include(cmake/base.cmake)
21+
include(cmake/boost.cmake)
22+
include(cmake/ros.cmake)
2523

2624
# Project definition
27-
COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX)
28-
PROJECT(${PROJECT_NAME} ${PROJECT_ARGS})
29-
CHECK_MINIMAL_CXX_STANDARD(11 ENFORCE)
25+
compute_project_args(PROJECT_ARGS LANGUAGES CXX)
26+
project(${PROJECT_NAME} ${PROJECT_ARGS})
27+
check_minimal_cxx_standard(11 ENFORCE)
3028

3129
# Project dependencies
32-
FINDPYTHON()
33-
SEARCH_FOR_BOOST_PYTHON()
30+
add_project_dependency(dynamic-graph-python 4.0.6 REQUIRED)
31+
add_project_dependency(dynamic_graph_bridge REQUIRED)
32+
add_project_dependency(sot-core REQUIRED)
33+
add_project_dependency(pinocchio REQUIRED)
34+
include(cmake/python.cmake) # TODO: overwriting eigenpy/python.cmake
35+
36+
add_project_dependency(control_toolbox REQUIRED)
3437
add_required_dependency(bullet)
3538
add_required_dependency(urdfdom)
3639

37-
find_package(catkin REQUIRED COMPONENTS
38-
pal_hardware_interfaces
39-
controller_interface
40-
controller_manager
41-
pal_common_msgs
42-
roscpp
43-
std_msgs
44-
control_msgs
45-
sensor_msgs
46-
realtime_tools
47-
rospy
48-
)
40+
find_package(
41+
catkin REQUIRED
42+
COMPONENTS pal_hardware_interfaces
43+
controller_interface
44+
controller_manager
45+
pal_common_msgs
46+
roscpp
47+
std_msgs
48+
control_msgs
49+
sensor_msgs
50+
realtime_tools
51+
rospy)
4952
find_package(temperature_sensor_controller)
5053

51-
ADD_PROJECT_DEPENDENCY(dynamic-graph-python 4.0.0 REQUIRED)
52-
ADD_PROJECT_DEPENDENCY(dynamic_graph_bridge REQUIRED)
53-
ADD_PROJECT_DEPENDENCY(sot-core REQUIRED )
54-
ADD_PROJECT_DEPENDENCY(pinocchio REQUIRED)
55-
ADD_PROJECT_DEPENDENCY(control_toolbox REQUIRED)
56-
5754
# Detect the controller interface version to switch code
5855
if(controller_interface_FOUND)
5956
if(${controller_interface_VERSION} VERSION_GREATER "0.2.5")
@@ -64,43 +61,50 @@ if(controller_interface_FOUND)
6461
endif()
6562
endif()
6663

67-
# Detect if temperature sensor controller package is found
68-
# if yes then it is a PAL Robotics Forked code.
64+
# Detect if temperature sensor controller package is found if yes then it is a
65+
# PAL Robotics Forked code.
6966

70-
add_library(rcsot_controller
71-
src/roscontrol-sot-controller.cpp
72-
src/log.cpp
73-
)
74-
target_include_directories(rcsot_controller SYSTEM PUBLIC
75-
${catkin_INCLUDE_DIRS}
76-
$<INSTALL_INTERFACE:include>)
77-
target_link_libraries(rcsot_controller
78-
${catkin_LIBRARIES}
79-
${bullet_LIBRARIES}
80-
sot-core::sot-core
81-
dynamic_graph_bridge::sot_loader
82-
${control_toolbox_LIBRARIES})
67+
add_library(rcsot_controller src/roscontrol-sot-controller.cpp src/log.cpp)
68+
target_include_directories(
69+
rcsot_controller SYSTEM PUBLIC ${catkin_INCLUDE_DIRS}
70+
$<INSTALL_INTERFACE:include>)
71+
target_link_libraries(
72+
rcsot_controller ${catkin_LIBRARIES} ${bullet_LIBRARIES} sot-core::sot-core
73+
dynamic_graph_bridge::sot_loader ${control_toolbox_LIBRARIES})
8374
if(temperature_sensor_controller_FOUND)
84-
target_compile_definitions(rcsot_controller PUBLIC TEMPERATURE_SENSOR_CONTROLLER)
85-
message("temperature_sensor_controller_LIBRARIES: ${temperature_sensor_controller_LIBRARIES}")
86-
target_include_directories(rcsot_controller SYSTEM PUBLIC ${temperature_sensor_controller_INCLUDE_DIRS})
87-
target_link_libraries(rcsot_controller ${temperature_sensor_controller_LIBRARIES})
75+
target_compile_definitions(rcsot_controller
76+
PUBLIC TEMPERATURE_SENSOR_CONTROLLER)
77+
message(
78+
"temperature_sensor_controller_LIBRARIES: ${temperature_sensor_controller_LIBRARIES}"
79+
)
80+
target_include_directories(
81+
rcsot_controller SYSTEM
82+
PUBLIC ${temperature_sensor_controller_INCLUDE_DIRS})
83+
target_link_libraries(rcsot_controller
84+
${temperature_sensor_controller_LIBRARIES})
8885
endif()
8986

90-
IF(SUFFIX_SO_VERSION)
91-
SET_TARGET_PROPERTIES(rcsot_controller PROPERTIES SOVERSION ${PROJECT_VERSION})
92-
ENDIF(SUFFIX_SO_VERSION)
87+
if(SUFFIX_SO_VERSION)
88+
set_target_properties(rcsot_controller PROPERTIES SOVERSION
89+
${PROJECT_VERSION})
90+
endif(SUFFIX_SO_VERSION)
9391

94-
IF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
95-
INSTALL(TARGETS rcsot_controller EXPORT ${TARGETS_EXPORT_NAME} DESTINATION lib)
96-
ENDIF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
92+
if(NOT INSTALL_PYTHON_INTERFACE_ONLY)
93+
install(
94+
TARGETS rcsot_controller
95+
EXPORT ${TARGETS_EXPORT_NAME}
96+
DESTINATION lib)
97+
endif(NOT INSTALL_PYTHON_INTERFACE_ONLY)
9798

98-
ADD_EXECUTABLE(roscontrol-sot-parse-log src/roscontrol-sot-parse-log.cc)
99-
install(TARGETS roscontrol-sot-parse-log EXPORT ${TARGETS_EXPORT_NAME} DESTINATION bin)
99+
add_executable(roscontrol-sot-parse-log src/roscontrol-sot-parse-log.cc)
100+
install(
101+
TARGETS roscontrol-sot-parse-log
102+
EXPORT ${TARGETS_EXPORT_NAME}
103+
DESTINATION bin)
100104

101105
foreach(dir config launch)
102106
install(DIRECTORY ${dir} DESTINATION share/${PROJECT_NAME})
103107
endforeach(dir)
104108

105-
ADD_SUBDIRECTORY(tests)
106-
INSTALL(FILES package.xml DESTINATION share/${PROJECT_NAME})
109+
add_subdirectory(tests)
110+
install(FILES package.xml DESTINATION share/${PROJECT_NAME})

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
[![License](https://img.shields.io/badge/License-BSD%202--Clause-green.svg)](https://opensource.org/licenses/BSD-2-Clause)
2-
[![Build Status](https://gitlab.laas.fr/stack-of-tasks/roscontrol_sot/badges/master/pipeline.svg)](http://gitlab.laas.fr/stack-of-tasks/roscontrol_sot)
3-
[![Coverage report](https://gitlab.laas.fr/stack-of-tasks/roscontrol_sot/badges/master/coverage.svg?job=doc-coverage)](http://projects.laas.fr/gepetto/doc/stack-of-tasks/roscontrol_sot/master/coverage/)
2+
[![Pipeline status](https://gitlab.laas.fr/stack-of-tasks/roscontrol-sot/badges/master/pipeline.svg)](https://gitlab.laas.fr/stack-of-tasks/roscontrol-sot/commits/master)
3+
[![Coverage report](https://gitlab.laas.fr/stack-of-tasks/roscontrol-sot/badges/master/coverage.svg?job=doc-coverage)](https://gepettoweb.laas.fr/doc/stack-of-tasks/roscontrol-sot/master/coverage/)
4+
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
5+
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/stack-of-tasks/roscontrol-sot/master.svg)](https://results.pre-commit.ci/latest/github/stack-of-tasks/roscontrol-sot)
6+
47

58
# Introduction
69
This package encapsulates a SoT graph to control a robot in the ros-control framework.

cmake

Submodule cmake updated 103 files

config/roscontrol_sot_controller_plugins.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@
66
</description>
77
</class>
88
</library>
9-

config/sot_test_params.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ gains:
1010
joint_state_controller:
1111
type: joint_state_controller/JointStateController
1212
publish_rate: 50
13-
13+
1414
sot_controller:
1515
type: sot_controller/RCSotController
1616
libname: libsot-test-controller.so
@@ -39,4 +39,3 @@ sot_controller:
3939
dt: 0.001
4040
jitter: 0.0004
4141
verbosity_level: 25
42-

0 commit comments

Comments
 (0)