-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
electrical_protocol: use ament_cmake_python instead of ament_python, …
…move calculator example back to test
- Loading branch information
Showing
6 changed files
with
62 additions
and
127 deletions.
There are no files selected for viewing
This file contains 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,52 @@ | ||
cmake_minimum_required(VERSION 3.5) | ||
project(electrical_protocol) | ||
|
||
find_package(ament_cmake REQUIRED) | ||
find_package(ament_cmake_python REQUIRED) | ||
find_package(rclpy REQUIRED) | ||
|
||
# Install the python module for this package | ||
ament_python_install_package(${PROJECT_NAME}) | ||
|
||
# include_directories(include ${rclcpp_INCLUDE_DIRS}) | ||
# link_directories(${rclcpp_LIBRARY_DIRS}) | ||
|
||
# Add a c++ library | ||
# add_library(${PROJECT_NAME} src/some_file.cpp) | ||
# target_link_libraries(${PROJECT_NAME} ${rclcpp_LIBRARIES}) | ||
# | ||
# # Install C++ headers | ||
# install( | ||
# DIRECTORY include/${PROJECT_NAME}/ | ||
# DESTINATION include/${PROJECT_NAME} | ||
# FILES_MATCHING PATTERN "*.hpp") | ||
|
||
# Install python scripts | ||
# install(PROGRAMS test/calculator_device.py DESTINATION bin) | ||
install(PROGRAMS | ||
test/calculator_device.py | ||
DESTINATION lib/${PROJECT_NAME} ) | ||
|
||
# Export package dependencies | ||
ament_export_dependencies(ament_cmake) | ||
ament_export_dependencies(ament_cmake_python) | ||
ament_export_dependencies(rclpy) | ||
# ament_export_include_directories(include ${rclcpp_INCLUDE_DIRS}) | ||
# ament_export_libraries(${PROJECT_NAME} ${rclcpp_LIBRARIES}) | ||
|
||
if(BUILD_TESTING) | ||
find_package(ament_cmake_pytest REQUIRED) | ||
set(_pytest_tests | ||
test/test_simulated_basic.py | ||
) | ||
foreach(_test_path ${_pytest_tests}) | ||
get_filename_component(_test_name ${_test_path} NAME_WE) | ||
ament_add_pytest_test(${_test_name} ${_test_path} | ||
APPEND_ENV PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR} | ||
TIMEOUT 60 | ||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
) | ||
endforeach() | ||
endif() | ||
|
||
ament_package() |
118 changes: 0 additions & 118 deletions
118
src/mil_common/electrical_protocol/electrical_protocol/examples/calculator_device.py
This file was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
|
@@ -7,12 +7,13 @@ | |
<maintainer email="[email protected]">Cameron Brown</maintainer> | ||
<license>MIT</license> | ||
|
||
<test_depend>ament_copyright</test_depend> | ||
<test_depend>ament_flake8</test_depend> | ||
<test_depend>ament_pep257</test_depend> | ||
<buildtool_depend>ament</buildtool_depend> | ||
<buildtool_depend>ament_cmake_python</buildtool_depend> | ||
<test_depend>python3-pytest</test_depend> | ||
|
||
<exec_depend>rclpy</exec_depend> | ||
|
||
<export> | ||
<build_type>ament_python</build_type> | ||
<build_type>ament_cmake</build_type> | ||
</export> | ||
</package> |
File renamed without changes.
This file contains 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 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