Skip to content

Commit

Permalink
Applied code-review suggestions and fixed includes
Browse files Browse the repository at this point in the history
  • Loading branch information
guihomework committed Mar 11, 2023
1 parent 5715e8f commit fcb9cca
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 23 deletions.
33 changes: 17 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,29 @@ set(CONTROL_FILTERS_INCLUDE_DEPENDS
tf2_ros
)

foreach(Dependency IN ITEMS ${CONTROL_FILTERS_INCLUDE_DEPENDS})
find_package(${Dependency} REQUIRED)
endforeach()

generate_parameter_library(
gravity_compensation_filter_parameters
src/control_filters/gravity_compensation_filter_parameters.yaml
)

add_library(gravity_compensation SHARED
src/control_filters/gravity_compensation.cpp
)
target_compile_features(gravity_compensation PUBLIC cxx_std_17)
target_include_directories(gravity_compensation PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
generate_parameter_library(
gravity_compensation_filter_parameters
src/control_filters/gravity_compensation_filter_parameters.yaml
$<INSTALL_INTERFACE:include/control_toolbox>
)
target_link_libraries(gravity_compensation gravity_compensation_filter_parameters)
ament_target_dependencies(gravity_compensation ${CONTROL_FILTERS_INCLUDE_DEPENDS})

target_link_libraries(gravity_compensation PUBLIC gravity_compensation_filter_parameters)
ament_target_dependencies(gravity_compensation PUBLIC ${CONTROL_FILTERS_INCLUDE_DEPENDS})

# Install pluginlib xml
pluginlib_export_plugin_description_file(filters control_filters.xml)

##########
# Testing
Expand Down Expand Up @@ -124,18 +134,9 @@ install(TARGETS gravity_compensation gravity_compensation_filter_parameters
RUNTIME DESTINATION bin
)

# Install pluginlib xml
pluginlib_export_plugin_description_file(filters control_filters.xml)

ament_export_targets(export_control_toolbox HAS_LIBRARY_TARGET)
ament_export_dependencies(${THIS_PACKAGE_INCLUDE_DEPENDS} ${CONTROL_FILTERS_INCLUDE_DEPENDS})
ament_export_include_directories(
include
)
ament_export_libraries(
control_toolbox
gravity_compensation
gravity_compensation_filter_parameters
)

ament_package()
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ To run it initially over the whole repo you can use:

If you get error that something is missing on your computer, do the following for:

- `clang-format-10`
- `clang-format-14`
```
sudo apt install clang-format-10
sudo apt install clang-format-14
```
2 changes: 1 addition & 1 deletion include/control_filters/gravity_compensation.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2021, Stogl Robotics Consulting UG (haftungsbeschränkt)
// Copyright (c) 2023, Stogl Robotics Consulting UG (haftungsbeschränkt)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/control_filters/gravity_compensation.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2021, Stogl Robotics Consulting UG (haftungsbeschränkt)
// Copyright (c) 2023, Stogl Robotics Consulting UG (haftungsbeschränkt)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion test/control_filters/test_gravity_compensation.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2021, Stogl Robotics Consulting UG (haftungsbeschränkt)
// Copyright (c) 2023, Stogl Robotics Consulting UG (haftungsbeschränkt)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion test/control_filters/test_gravity_compensation.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2021, Stogl Robotics Consulting UG (haftungsbeschränkt)
// Copyright (c) 2023, Stogl Robotics Consulting UG (haftungsbeschränkt)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion test/control_filters/test_load_gravity_compensation.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2021, Stogl Robotics Consulting UG (haftungsbeschränkt)
// Copyright (c) 2023, Stogl Robotics Consulting UG (haftungsbeschränkt)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down

0 comments on commit fcb9cca

Please sign in to comment.