forked from ros-controls/ros2_control
-
Notifications
You must be signed in to change notification settings - Fork 0
first version of transmissions for mock hardware #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
mamueluth
wants to merge
5
commits into
master
Choose a base branch
from
mock_hw_transmissions
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
09538db
first version of transmissions for mock hardware
mamueluth 03207a8
remove actuator_slowdown
mamueluth 7eb38ca
initialize generic system
mamueluth 6b71932
only throw if position is not present
mamueluth e27e79a
check if is transmission otherwise export normal way
mamueluth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| cmake_minimum_required(VERSION 3.16) | ||
| project(mock_hardware LANGUAGES CXX) | ||
|
|
||
| if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)") | ||
| add_compile_options(-Wall -Wextra -Werror=conversion -Werror=unused-but-set-variable -Werror=return-type -Werror=shadow) | ||
| endif() | ||
|
|
||
| set(THIS_PACKAGE_INCLUDE_DEPENDS | ||
| hardware_interface | ||
| pluginlib | ||
| rclcpp_lifecycle | ||
| rcpputils | ||
| rcutils | ||
| transmission_interface | ||
| ) | ||
|
|
||
| find_package(ament_cmake REQUIRED) | ||
| foreach(Dependency IN ITEMS ${THIS_PACKAGE_INCLUDE_DEPENDS}) | ||
| find_package(${Dependency} REQUIRED) | ||
| endforeach() | ||
|
|
||
| add_library(mock_components SHARED | ||
| src/generic_system.cpp | ||
| ) | ||
| target_compile_features(mock_components PUBLIC cxx_std_17) | ||
| target_include_directories(mock_components PUBLIC | ||
| $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> | ||
| $<INSTALL_INTERFACE:include/mock_components> | ||
| ) | ||
| ament_target_dependencies(mock_components PUBLIC ${THIS_PACKAGE_INCLUDE_DEPENDS}) | ||
| # Causes the visibility macros to use dllexport rather than dllimport, | ||
| # which is appropriate when building the dll but not consuming it. | ||
| target_compile_definitions(mock_components PRIVATE "MOCK_COMPONENTS_BUILDING_DLL") | ||
|
|
||
| pluginlib_export_plugin_description_file( | ||
| hardware_interface mock_components_plugin_description.xml) | ||
|
|
||
| if(BUILD_TESTING) | ||
|
|
||
| find_package(ament_cmake_gmock REQUIRED) | ||
| find_package(ros2_control_test_assets REQUIRED) | ||
|
|
||
| ament_add_gmock(test_generic_system test/test_generic_system.cpp) | ||
| target_include_directories(test_generic_system PRIVATE include) | ||
| target_link_libraries(test_generic_system mock_components) | ||
| ament_target_dependencies(test_generic_system | ||
| pluginlib | ||
| ros2_control_test_assets | ||
| ) | ||
| endif() | ||
|
|
||
| install( | ||
| DIRECTORY include/ | ||
| DESTINATION include/mock_components | ||
| ) | ||
| install( | ||
| TARGETS | ||
| mock_components | ||
| EXPORT export_mock_components | ||
| RUNTIME DESTINATION bin | ||
| ARCHIVE DESTINATION lib | ||
| LIBRARY DESTINATION lib | ||
| ) | ||
|
|
||
| ament_export_targets(export_mock_components HAS_LIBRARY_TARGET) | ||
| ament_export_dependencies(${THIS_PACKAGE_INCLUDE_DEPENDS}) | ||
| ament_package() |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| <?xml version="1.0"?> | ||
| <package format="2"> | ||
| <name>mock_hardware</name> | ||
| <version>4.3.0</version> | ||
| <description>ros2_control hardware interface</description> | ||
| <maintainer email="[email protected]">Bence Magyar</maintainer> | ||
| <maintainer email="[email protected]">Denis Štogl</maintainer> | ||
| <license>Apache License 2.0</license> | ||
|
|
||
| <buildtool_depend>ament_cmake</buildtool_depend> | ||
|
|
||
| <depend>hardware_interface</depend> | ||
| <depend>rclcpp_lifecycle</depend> | ||
| <depend>pluginlib</depend> | ||
| <depend>rcpputils</depend> | ||
| <depend>transmission_interface</depend> | ||
|
|
||
| <build_depend>rcutils</build_depend> | ||
| <exec_depend>rcutils</exec_depend> | ||
|
|
||
| <test_depend>ament_cmake_gmock</test_depend> | ||
| <test_depend>ros2_control_test_assets</test_depend> | ||
|
|
||
| <export> | ||
| <build_type>ament_cmake</build_type> | ||
| </export> | ||
| </package> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.