-
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.
Upload code from roboticslab-uc3m/yarp-devices
- Loading branch information
0 parents
commit 7cd2138
Showing
36 changed files
with
2,144 additions
and
0 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,118 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- 'doc/**' | ||
- '**.md' | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
env: | ||
CMAKE_CCACHE_LAUNCHER: -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
ARAVIS_VER: 0.6.4 | ||
PEAK_DRIVER_VER: 8.11.0 | ||
|
||
jobs: | ||
maybe_skip: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
should_skip: ${{steps.skip_check.outputs.should_skip}} | ||
steps: | ||
- uses: fkirc/skip-duplicate-actions@v5 | ||
id: skip_check | ||
with: | ||
cancel_others: 'true' | ||
|
||
build: | ||
name: build (${{matrix.os}}, ${{matrix.robotology.yarp}}, ${{matrix.compiler.cc}}) | ||
runs-on: ${{matrix.os}} | ||
needs: maybe_skip | ||
if: ${{needs.maybe_skip.outputs.should_skip != 'true'}} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-20.04, ubuntu-22.04] | ||
robotology: | ||
- { yarp: yarp-3.8, cmake: 3.16.x } | ||
- { yarp: yarp-3.9, cmake: 3.16.x } | ||
- { yarp: master, cmake: 3.16.x } | ||
compiler: | ||
- { cc: gcc, cxx: g++ } | ||
- { cc: clang, cxx: clang++ } | ||
experimental: | ||
- ${{github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'}} | ||
exclude: | ||
- { experimental: false, robotology: { yarp: master } } | ||
|
||
steps: | ||
- name: Check out main project | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check out YCM | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: robotology/ycm | ||
path: .deps/ycm | ||
|
||
- name: Check out YARP | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: robotology/yarp | ||
ref: ${{matrix.robotology.yarp}} | ||
path: .deps/yarp | ||
|
||
- name: Check out roboticslab-uc3m/yarp-devices | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: roboticslab-uc3m/yarp-devices | ||
path: .deps/yarp-devices | ||
|
||
- name: Install dependencies via apt | ||
run: sudo apt-get update && sudo apt-get install -qq ccache | ||
|
||
- name: Set up CMake | ||
uses: jwlawson/actions-setup-cmake@v1 | ||
with: | ||
cmake-version: ${{matrix.robotology.cmake}} | ||
|
||
- name: Set up Ccache | ||
uses: hendrikmuhs/ccache-action@v1 | ||
with: | ||
key: ${{matrix.os}}-${{matrix.robotology.yarp}}-${{matrix.compiler.cc}} | ||
|
||
- name: Set environment variables | ||
run: | | ||
echo "CC=${{matrix.compiler.cc}}" >> $GITHUB_ENV | ||
echo "CXX=${{matrix.compiler.cxx}}" >> $GITHUB_ENV | ||
- name: Build YCM | ||
run: | | ||
cmake -S .deps/ycm -B .deps/ycm/build | ||
cmake --build .deps/ycm/build | ||
sudo cmake --install .deps/ycm/build | ||
- name: Build YARP | ||
run: | | ||
cmake -S .deps/yarp -B .deps/yarp/build $CMAKE_CCACHE_LAUNCHER -DSKIP_ACE=ON -DYARP_DISABLE_VERSION_SOURCE=ON | ||
cmake --build .deps/yarp/build | ||
sudo cmake --install .deps/yarp/build | ||
- name: Build roboticslab-uc3m/yarp-devices | ||
run: | | ||
cmake -S .deps/yarp-devices -B .deps/yarp-devices/build $CMAKE_CCACHE_LAUNCHER | ||
cmake --build .deps/yarp-devices/build | ||
sudo cmake --install .deps/yarp-devices/build | ||
- name: Configure main project | ||
run: cmake -S . -B build $CMAKE_CCACHE_LAUNCHER | ||
|
||
- name: Compile main project | ||
run: cmake --build build | ||
|
||
- name: Install main project | ||
run: sudo cmake --install build && sudo ldconfig | ||
|
||
- name: Uninstall main project | ||
run: sudo cmake --build build --target uninstall |
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,18 @@ | ||
**/build*/ | ||
*~ | ||
*.swp | ||
*.orig | ||
tags | ||
CMakeLists.txt.user | ||
doc/html | ||
doc/doxygen_sqlite3.db | ||
/.cproject | ||
/.project | ||
/.settings/ | ||
/.vscode/ | ||
/.vs/ | ||
.idea | ||
venv | ||
**/__pycache__ | ||
/external/ | ||
**/*.mcw |
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,80 @@ | ||
cmake_minimum_required(VERSION 3.16) | ||
|
||
project(DEXTRA_YARP_DEVICES LANGUAGES CXX) | ||
|
||
# Let the user specify a configuration (only single-config generators). | ||
if(NOT CMAKE_CONFIGURATION_TYPES) | ||
# Possible values. | ||
set(_configurations Debug Release MinSizeRel RelWithDebInfo) | ||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${_configurations}) | ||
|
||
foreach(_conf ${_configurations}) | ||
set(_conf_string "${_conf_string} ${_conf}") | ||
endforeach() | ||
|
||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY HELPSTRING | ||
"Choose the type of build, options are:${_conf_string}") | ||
|
||
if(NOT CMAKE_BUILD_TYPE) | ||
# Encourage the user to specify build type. | ||
message(STATUS "Setting build type to 'Release' as none was specified.") | ||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY VALUE Release) | ||
endif() | ||
endif() | ||
|
||
# Pick up our CMake modules. | ||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake | ||
${CMAKE_SOURCE_DIR}/cmake/find-modules) | ||
|
||
# Hard dependencies. | ||
find_package(YCM 0.11 REQUIRED) | ||
find_package(YARP 3.8 REQUIRED COMPONENTS os dev) | ||
|
||
# Soft dependencies. | ||
find_package(ROBOTICSLAB_YARP_DEVICES QUIET) | ||
find_package(Doxygen QUIET) | ||
#find_package(GTestSources 1.8 QUIET) | ||
|
||
# Always build YARP devices as MODULE libraries. | ||
set(YARP_FORCE_DYNAMIC_PLUGINS TRUE CACHE INTERNAL "Force dynamic plugins") | ||
|
||
# Configure installation paths for YARP resources. | ||
yarp_configure_external_installation(dextra-yarp-devices WITH_PLUGINS) | ||
|
||
# Standard installation directories. | ||
include(GNUInstallDirs) | ||
|
||
# Control where libraries and executables are placed during the build. | ||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}) | ||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) | ||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) | ||
|
||
# Create targets if specific requirements are satisfied. | ||
include(CMakeDependentOption) | ||
|
||
# Acknowledge this is a CTest-friendly project. | ||
#enable_testing() | ||
|
||
# Add main contents. | ||
add_subdirectory(libraries) | ||
# add_subdirectory(programs) | ||
# add_subdirectory(tests) | ||
# add_subdirectory(share) | ||
add_subdirectory(doc) | ||
|
||
# Store the package in the user registry. | ||
set(CMAKE_EXPORT_PACKAGE_REGISTRY ON) | ||
|
||
# Create and install config files. | ||
include(InstallBasicPackageFiles) | ||
|
||
install_basic_package_files(DEXTRA_YARP_DEVICES | ||
VERSION 0.1.0 | ||
COMPATIBILITY AnyNewerVersion | ||
NO_EXPORT | ||
NO_SET_AND_CHECK_MACRO | ||
NO_CHECK_REQUIRED_COMPONENTS_MACRO | ||
NAMESPACE ROBOTICSLAB::) | ||
|
||
# Configure and create uninstall target. | ||
include(AddUninstallTarget) |
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,10 @@ | ||
Have a feature request or found a bug? | ||
|
||
Before opening a fresh issue, do a search on [GitHub](https://github.com/roboticslab-uc3m/dextra-yarp-devices/issues?utf8=%E2%9C%93&q=is%3Aissue) and make sure it hasn't already been addressed. Here are some notes on how to detail feature requests or bug reports: | ||
* Explain, as detailed as possible, how to reproduce the issue or the specific behaviour for the feature. | ||
* Include what you expected to happen and what actually happened. | ||
* Please include information on what operating system and version you are working with. Also add any other relevant details. | ||
* Feel free to attach any other information illustrating the issue if copying and pasting text is not an option. | ||
|
||
Notes: | ||
* We follow the [Forking](https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow/) Git workflow. |
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,35 @@ | ||
# dextra-yarp-devices | ||
|
||
YARP devices for the [Dextra prosthetic hand](https://github.com/roboticslab-uc3m/Dextra). | ||
|
||
## Installation | ||
|
||
Installation instructions for installing from source can be found [here](doc/dextra-yarp-devices-install.md). | ||
|
||
## Contributing | ||
|
||
#### Posting Issues | ||
|
||
1. Read [CONTRIBUTING.md](CONTRIBUTING.md) | ||
2. [Post an issue / Feature request / Specific documentation request](https://github.com/roboticslab-uc3m/dextra-yarp-devices/issues) | ||
|
||
#### Fork & Pull Request | ||
|
||
1. [Fork the repository](https://github.com/roboticslab-uc3m/dextra-yarp-devices/fork) | ||
2. Create your feature branch (`git checkout -b my-new-feature`) off the `master` branch, following the [Forking Git workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow) | ||
3. Commit your changes | ||
4. Push to the branch (`git push origin my-new-feature`) | ||
5. Create a new Pull Request | ||
|
||
## Status | ||
|
||
[](https://github.com/roboticslab-uc3m/dextra-yarp-devices/actions) | ||
|
||
[](https://github.com/roboticslab-uc3m/dextra-yarp-devices/issues) | ||
|
||
## Similar and Related Projects | ||
|
||
- [roboticslab-uc3m/yarp-devices](https://github.com/roboticslab-uc3m/yarp-devices) | ||
- [issue #176](https://github.com/roboticslab-uc3m/yarp-devices/issues/176) | ||
- [issue #227](https://github.com/roboticslab-uc3m/yarp-devices/issues/227) | ||
- [roboticslab-uc3m/Dextra](https://github.com/roboticslab-uc3m/Dextra) |
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,32 @@ | ||
# https://stackoverflow.com/a/25217937 | ||
get_directory_property(_has_parent PARENT_DIRECTORY) | ||
|
||
if(NOT _has_parent) | ||
cmake_minimum_required(VERSION 3.9) | ||
project(doxygen NONE) | ||
find_package(Doxygen REQUIRED) | ||
elseif(NOT DOXYGEN_FOUND) | ||
return() | ||
endif() | ||
|
||
set(DOXYGEN_PROJECT_NAME "dextra-yarp-devices") | ||
set(DOXYGEN_REPEAT_BRIEF NO) | ||
set(DOXYGEN_EXTRACT_PRIVATE YES) | ||
set(DOXYGEN_EXTRACT_STATIC YES) | ||
set(DOXYGEN_EXAMPLE_PATH ./examples) | ||
set(DOXYGEN_EXAMPLE_RECURSIVE YES) | ||
set(DOXYGEN_IMAGE_PATH ./doc/fig) | ||
set(DOXYGEN_HTML_TIMESTAMP YES) | ||
set(DOXYGEN_USE_MATHJAX YES) | ||
set(DOXYGEN_USE_MDFILE_AS_MAINPAGE ./README.md) | ||
|
||
set(_doxygen_input README.md | ||
doc | ||
examples | ||
libraries | ||
programs | ||
share | ||
tests) | ||
|
||
doxygen_add_docs(dox ${_doxygen_input} | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..) |
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,26 @@ | ||
# Installation from Source Code | ||
|
||
First install the dependencies: | ||
- [Install CMake 3.16+](https://github.com/roboticslab-uc3m/installation-guides/blob/master/install-cmake.md/) | ||
- [Install YCM 0.11+](https://github.com/roboticslab-uc3m/installation-guides/blob/master/install-ycm.md/) | ||
- [Install YARP 3.8+](https://github.com/roboticslab-uc3m/installation-guides/blob/master/install-yarp.md/) | ||
- [Install YARP 3.8+](https://github.com/roboticslab-uc3m/installation-guides/blob/master/install-yarp.md/) | ||
|
||
### Components with known additional/specific dependencies | ||
- [../libraries/YarpPlugins/DextraCanControlBoard](../libraries/YarpPlugins/DextraCanControlBoard#requirements) | ||
|
||
## Installation (Ubuntu) | ||
|
||
Once the required dependencies have been installed, the code has to be compiled and installed. Note that you will be prompted for your password upon using `sudo` a couple of times: | ||
|
||
```bash | ||
cd # go home | ||
mkdir -p repos; cd repos # make $HOME/repos if it doesn't exist; then, enter it | ||
git clone https://github.com/roboticslab-uc3m/dextra-yarp-devices.git # Download yarp-devices software from the repository | ||
cd dextra-yarp-devices; mkdir build; cd build; cmake .. # Configure the dextra-yarp-devices software | ||
make -j$(nproc) # Compile | ||
sudo make install # Install :-) | ||
sudo ldconfig # Just in case | ||
``` | ||
|
||
For additional options use `ccmake` instead of `cmake`. |
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,49 @@ | ||
|
||
/** | ||
@brief The main, catch-all namespace for Robotics Lab UC3M. | ||
*/ | ||
namespace roboticslab | ||
{ | ||
/** | ||
* @brief Contains classes related to unit testing. | ||
*/ | ||
namespace test {} | ||
} | ||
|
||
/** | ||
* @defgroup dextra_yarp_devices_libraries Libraries | ||
* @brief dextra-yarp-devices libraries. | ||
*/ | ||
|
||
/** | ||
* @ingroup dextra_yarp_devices_libraries | ||
* @defgroup YarpPlugins YARP plugins | ||
* | ||
* @brief Contains libraries that implement YARP device interfaces | ||
* and therefore can be invoked as YARP plugins. | ||
*/ | ||
|
||
/** | ||
* @defgroup dextra_yarp_devices_programs Programs | ||
* @brief dextra-yarp-devices programs. | ||
*/ | ||
|
||
/** | ||
* @defgroup dextra_yarp_devices_tests Tests | ||
* @brief dextra-yarp-devices tests. | ||
*/ | ||
|
||
/** | ||
* @defgroup dextra_yarp_devices_examples Examples | ||
* @brief dextra-yarp-devices examples. | ||
*/ | ||
|
||
/** | ||
* @ingroup dextra_yarp_devices_examples | ||
* @defgroup dextra_yarp_devices_examples_cpp C++ examples | ||
*/ | ||
|
||
/** | ||
* @ingroup dextra_yarp_devices_examples | ||
* @defgroup dextra_yarp_devices_examples_py Python examples | ||
*/ |
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,2 @@ | ||
add_subdirectory(DextraRawControlBoardLib) | ||
add_subdirectory(YarpPlugins) |
Oops, something went wrong.