Skip to content

Commit cd79902

Browse files
authored
1 parent 8780065 commit cd79902

23 files changed

+232
-231
lines changed

.github/workflows/cmake.yml

Lines changed: 20 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: CMake
22

33
on:
44
push:
5-
branches: [main, v1.x]
5+
branches: [main, v0.x]
66
pull_request:
7-
branches: [main, v1.x]
7+
branches: [main, v0.x]
88
workflow_dispatch:
99

1010
env:
@@ -13,153 +13,33 @@ env:
1313

1414
jobs:
1515
build-ubuntu-22:
16-
# Use GitHub-hosted Ubuntu 22.04 runner
16+
# GitHub-hosted Ubuntu 22.04 runner
1717
runs-on: ubuntu-22.04
18-
18+
# Use shared steps
1919
steps:
20-
- uses: actions/checkout@v2
21-
22-
- name: Build and install dependencies
23-
# Build and install all dependencies to RDK installation directory.
24-
run: |
25-
cd ${{github.workspace}}
26-
cd thirdparty
27-
bash build_and_install_dependencies.sh ~/rdk_install $(nproc)
28-
29-
- name: Build and install library
30-
# Configure CMake, then build and install the flexiv_rdk INTERFACE library to RDK installation directory.
31-
run: |
32-
cd ${{github.workspace}}
33-
mkdir -p build && cd build
34-
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
35-
make install
36-
37-
- name: Build examples
38-
# Find and link to the flexiv_rdk INTERFACE library, then build all examples.
39-
run: |
40-
cd ${{github.workspace}}/example
41-
mkdir -p build && cd build
42-
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
43-
make -j$(nproc)
44-
45-
- name: Build tests
46-
# Find and link to the flexiv_rdk INTERFACE library, then build all tests.
47-
run: |
48-
cd ${{github.workspace}}/test
49-
mkdir -p build && cd build
50-
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
51-
make -j$(nproc)
20+
- uses: actions/checkout@v3
21+
- uses: ./.github/workflows/shared_steps
5222

5323
build-ubuntu-20:
54-
# Use GitHub-hosted Ubuntu 20.04 runner
24+
# GitHub-hosted Ubuntu 20.04 runner
5525
runs-on: ubuntu-20.04
56-
26+
# Use shared steps
5727
steps:
58-
- uses: actions/checkout@v2
59-
60-
- name: Build and install dependencies
61-
# Build and install all dependencies to RDK installation directory.
62-
run: |
63-
cd ${{github.workspace}}
64-
cd thirdparty
65-
bash build_and_install_dependencies.sh ~/rdk_install $(nproc)
66-
67-
- name: Build and install library
68-
# Configure CMake, then build and install the flexiv_rdk INTERFACE library to RDK installation directory.
69-
run: |
70-
cd ${{github.workspace}}
71-
mkdir -p build && cd build
72-
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
73-
make install
74-
75-
- name: Build examples
76-
# Find and link to the flexiv_rdk INTERFACE library, then build all examples.
77-
run: |
78-
cd ${{github.workspace}}/example
79-
mkdir -p build && cd build
80-
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
81-
make -j$(nproc)
82-
83-
- name: Build tests
84-
# Find and link to the flexiv_rdk INTERFACE library, then build all tests.
85-
run: |
86-
cd ${{github.workspace}}/test
87-
mkdir -p build && cd build
88-
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
89-
make -j$(nproc)
90-
91-
build-macos-12:
92-
# Use self-hosted macOS 12 runner with arm64 processor
93-
runs-on: [self-hosted, macos-12, ARM64]
28+
- uses: actions/checkout@v3
29+
- uses: ./.github/workflows/shared_steps
9430

31+
build-macos-14:
32+
# GitHub-hosted macOS 14 runner with M1 chip
33+
runs-on: macos-14
34+
# Use shared steps
9535
steps:
96-
- uses: actions/checkout@v2
97-
98-
- name: Build and install dependencies
99-
# Build and install all dependencies to RDK installation directory.
100-
run: |
101-
cd ${{github.workspace}}
102-
cd thirdparty
103-
bash build_and_install_dependencies.sh ~/rdk_install $(sysctl -n hw.ncpu)
104-
105-
- name: Build and install library
106-
# Configure CMake, then build and install the flexiv_rdk INTERFACE library to RDK installation directory.
107-
run: |
108-
cd ${{github.workspace}}
109-
mkdir -p build && cd build
110-
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
111-
make install
112-
113-
- name: Build examples
114-
# Find and link to the flexiv_rdk INTERFACE library, then build all examples.
115-
run: |
116-
cd ${{github.workspace}}/example
117-
mkdir -p build && cd build
118-
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
119-
make -j$(sysctl -n hw.ncpu)
120-
121-
- name: Build tests
122-
# Find and link to the flexiv_rdk INTERFACE library, then build all tests.
123-
run: |
124-
cd ${{github.workspace}}/test
125-
mkdir -p build && cd build
126-
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
127-
make -j$(sysctl -n hw.ncpu)
36+
- uses: actions/checkout@v3
37+
- uses: ./.github/workflows/shared_steps
12838

12939
build-windows-2022:
130-
# Use GitHub-hosted Windows 2022 runner
40+
# GitHub-hosted Windows 2022 runner
13141
runs-on: windows-2022
132-
42+
# Use shared steps
13343
steps:
134-
- uses: actions/checkout@v2
135-
136-
- name: Build and install dependencies
137-
# Build and install all dependencies to RDK installation directory.
138-
run: |
139-
cd ${{github.workspace}}
140-
cd thirdparty
141-
bash build_and_install_dependencies.sh ~/rdk_install $(nproc)
142-
143-
- name: Build and install library
144-
# Configure CMake, then build and install the flexiv_rdk INTERFACE library to RDK installation directory.
145-
run: |
146-
cd ${{github.workspace}}
147-
mkdir build && cd build
148-
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
149-
cmake --build . --target install --config Release
150-
151-
- name: Build examples
152-
# Find and link to the flexiv_rdk INTERFACE library, then build all examples.
153-
run: |
154-
cd ${{github.workspace}}/example
155-
mkdir build && cd build
156-
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
157-
cmake --build . --config Release -j $(nproc)
158-
159-
- name: Build tests
160-
# Find and link to the flexiv_rdk INTERFACE library, then build all tests.
161-
run: |
162-
cd ${{github.workspace}}/test
163-
mkdir build && cd build
164-
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
165-
cmake --build . --config Release -j $(nproc)
44+
- uses: actions/checkout@v3
45+
- uses: ./.github/workflows/shared_steps
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "Shared Build Steps"
2+
runs:
3+
using: "composite"
4+
# Note: working directory will be reset to the repo root for each new step
5+
steps:
6+
# Build and install all dependencies to RDK installation directory.
7+
- name: Build and install dependencies
8+
shell: bash
9+
run: |
10+
pwd
11+
cd thirdparty
12+
bash build_and_install_dependencies.sh ~/rdk_install 4
13+
14+
# Configure CMake, then build and install flexiv_rdk library to RDK installation directory.
15+
- name: Build and install library
16+
shell: bash
17+
run: |
18+
pwd
19+
mkdir -p build && cd build
20+
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
21+
cmake --build . --target install --config Release
22+
23+
# Find and link to flexiv_rdk library, then build all example programs.
24+
- name: Build examples
25+
shell: bash
26+
run: |
27+
pwd
28+
cd example
29+
mkdir -p build && cd build
30+
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
31+
cmake --build . --config Release -j 4
32+
33+
# Find and link to flexiv_rdk library, then build all test programs.
34+
- name: Build tests
35+
shell: bash
36+
run: |
37+
pwd
38+
cd test
39+
mkdir -p build && cd build
40+
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
41+
cmake --build . --config Release -j 4

CMakeLists.txt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.16.3)
33
# ===================================================================
44
# PROJECT SETUP
55
# ===================================================================
6-
project(flexiv_rdk VERSION 1.5.0)
6+
project(flexiv_rdk VERSION 1.5.1)
77

88
# Configure build type
99
if(NOT CMAKE_BUILD_TYPE)
@@ -72,12 +72,6 @@ if(spdlog_FOUND)
7272
message(STATUS "Found spdlog: ${spdlog_DIR}")
7373
endif()
7474

75-
# Fast-CDR
76-
find_package(fastcdr 1.0.24 REQUIRED)
77-
if(fastcdr_FOUND)
78-
message(STATUS "Found fastcdr: ${fastcdr_DIR}")
79-
endif()
80-
8175
# Fast-DDS (Fast-RTPS)
8276
find_package(fastrtps 2.6.7 REQUIRED)
8377
if(fastrtps_FOUND)
@@ -105,7 +99,6 @@ target_link_libraries(${PROJECT_NAME} INTERFACE
10599
Eigen3::Eigen
106100
spdlog::spdlog
107101
fastrtps
108-
fastcdr
109102
)
110103

111104
# Use moderate compiler warning option

README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ Flexiv RDK (Robotic Development Kit), a key component of the Flexiv Robotic Soft
1111

1212
## Compatibility Overview
1313

14-
| **Supported OS** | **Supported processor** | **Supported language** | **Required compiler kit** |
15-
| -------------------------- | ----------------------- | ---------------------- | ------------------------- |
16-
| Linux (Ubuntu 20.04/22.04) | x86_64, arm64 | C++, Python | build-essential |
17-
| macOS 12 and above | arm64 | C++, Python | Xcode Command Line Tools |
18-
| Windows 10/11 | x86_64 | C++, Python | MSVC v14.2+ |
14+
| **Supported OS** | **Supported processor** | **Supported language** | **Required compiler kit** |
15+
| ------------------------------ | ----------------------- | ---------------------- | ------------------------- |
16+
| Linux (Ubuntu 20.04 and above) | x86_64, arm64 | C++, Python | build-essential |
17+
| macOS 12 and above | arm64 | C++, Python | Xcode Command Line Tools |
18+
| Windows 10 and above | x86_64 | C++, Python | MSVC v14.2+ |
1919

2020
## Quick Start
2121

22-
The **C++ and Python** RDK libraries are packed into a unified modern CMake project named ``flexiv_rdk``, which can be configured and installed via CMake on all supported OS.
22+
The **C++ and Python** RDK libraries are packed into a unified modern CMake project named ``flexiv_rdk``, which can be configured and installed using CMake on all supported OS.
2323

2424
### Note
2525

@@ -38,20 +38,22 @@ The **C++ and Python** RDK libraries are packed into a unified modern CMake proj
3838
cd flexiv_rdk/thirdparty
3939
bash build_and_install_dependencies.sh ~/rdk_install
4040

41-
4. In a new Terminal, use CMake to configure the ``flexiv_rdk`` project:
41+
NOTE: Internet connection is required for this step.
42+
43+
4. In a new Terminal, configure ``flexiv_rdk`` library as a CMake project:
4244

4345
cd flexiv_rdk
4446
mkdir build && cd build
4547
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install -DINSTALL_PYTHON_RDK=ON
4648

47-
NOTE: ``-D`` followed by ``CMAKE_INSTALL_PREFIX`` sets the CMake variable that specifies the path of the installation directory. ``-D`` followed by ``INSTALL_PYTHON_RDK=ON`` enables the installation of Python RDK besides C++ RDK. The configuration process can also be done using CMake GUI.
49+
NOTE: ``-D`` followed by ``CMAKE_INSTALL_PREFIX`` sets the CMake variable that specifies the path of the installation directory. ``-D`` followed by ``INSTALL_PYTHON_RDK=ON`` enables the installation of the Python library alongside the C++ library. Alternatively, this configuration step can be done using CMake GUI.
4850

49-
5. Install C++ and Python RDK:
51+
5. Install ``flexiv_rdk`` libraries (C++ and Python):
5052

5153
cd flexiv_rdk/build
5254
cmake --build . --target install --config Release
5355

54-
C++ RDK is installed to the path specified by ``CMAKE_INSTALL_PREFIX``, which may or may not be globally discoverable by CMake. Python RDK is installed to the user site packages path, which is globally discoverable by Python interpreter.
56+
The C++ library will be installed to ``CMAKE_INSTALL_PREFIX`` path, which may or may not be globally discoverable by CMake. The Python library is installed to the user site packages path, which is globally discoverable by the Python interpreter.
5557

5658
### Install on macOS
5759

@@ -73,9 +75,9 @@ The **C++ and Python** RDK libraries are packed into a unified modern CMake proj
7375
3. Install bash emulator: Download and install [Git for Windows](https://git-scm.com/download/win/), which comes with a bash emulator Git Bash.
7476
4. Within the bash emulator, the rest are identical to steps 2 and below in [Install on Linux](#install-on-linux).
7577

76-
### Link to C++ RDK from a user program
78+
### Link to installed library from a user program
7779

78-
After C++ RDK is installed, it can be found as a CMake library and linked to by other CMake projects. Use the provided examples project for instance::
80+
After the C++ RDK library is installed, it can be found as a CMake target and linked to from other CMake projects. Using the provided examples project for instance::
7981

8082
cd flexiv_rdk/example
8183
mkdir build && cd build

cmake/flexiv_rdk-config.cmake.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ find_dependency(Threads REQUIRED)
66
find_dependency(Eigen3 REQUIRED)
77
find_dependency(spdlog REQUIRED)
88
find_dependency(fastrtps 2.6.7 REQUIRED)
9-
find_dependency(fastcdr 1.0.24 REQUIRED)
109

1110
# Add targets file
1211
include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]")

doc/Doxyfile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "Flexiv RDK APIs"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = 1.5
41+
PROJECT_NUMBER = 1.5.1
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

0 commit comments

Comments
 (0)