Skip to content

Commit e6a1c10

Browse files
committed
build: rename rcs to rcs-core
- fix rcs package name in extensions - added rcs as dependency in build process - improved robustness of downloading assets
1 parent ece23f8 commit e6a1c10

16 files changed

Lines changed: 122 additions & 51 deletions

File tree

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,13 @@ pip install 'pip>=25.1'
148148
pip install --group build_deps
149149

150150
# install rcs
151-
pip install -ve .
151+
pip install -ve . --no-build-isolation
152+
```
153+
154+
### Via PyPI/pip
152155

156+
```shell
157+
pip install rcs-core
153158
```
154159

155160
### RCS Asset Cache
@@ -162,9 +167,6 @@ On import, RCS checks whether that path exists. If it does not, it downloads the
162167
export RCS_PREFIX=/path/to/rcs-assets
163168
```
164169

165-
### Via PyPI/pip
166-
167-
*Coming soon...*
168170

169171
## 🦾 Hardware Extensions
170172

extensions/rcs_fr3/cmake/Findrcs.cmake

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,43 @@ if (NOT rcs_FOUND)
22
if (NOT Python3_FOUND)
33
set(rcs_FOUND FALSE)
44
if (rcs_FIND_REQUIRED)
5-
message(FATAL_ERROR "Could not find rcs. Please install rcs using pip.")
5+
message(FATAL_ERROR "Could not find rcs 1. Please install rcs-core using pip.")
6+
endif()
7+
return()
8+
endif()
9+
10+
execute_process(
11+
COMMAND
12+
${Python3_EXECUTABLE}
13+
-c
14+
"import importlib.util; import pathlib; spec = importlib.util.find_spec('rcs'); print(pathlib.Path(next(iter(spec.submodule_search_locations))).resolve() if spec and spec.submodule_search_locations else '')"
15+
OUTPUT_VARIABLE rcs_package_dir
16+
OUTPUT_STRIP_TRAILING_WHITESPACE
17+
)
18+
if (NOT rcs_package_dir)
19+
set(rcs_FOUND FALSE)
20+
if (rcs_FIND_REQUIRED)
21+
message(FATAL_ERROR "Could not find rcs 2. Please install rcs-core using pip.")
622
endif()
723
return()
824
endif()
925

1026
# Check if the include directory exists
11-
cmake_path(APPEND Python3_SITELIB rcs include OUTPUT_VARIABLE rcs_INCLUDE_DIRS)
27+
cmake_path(APPEND rcs_package_dir include OUTPUT_VARIABLE rcs_INCLUDE_DIRS)
1228
if (NOT EXISTS ${rcs_INCLUDE_DIRS})
1329
set(rcs_FOUND FALSE)
1430
if (rcs_FIND_REQUIRED)
15-
message(FATAL_ERROR "Could not find rcs. Please install rcs using pip.")
31+
message(FATAL_ERROR "Could not find rcs 3. Please install rcs-core using pip.")
1632
endif()
1733
return()
1834
endif()
1935

2036
# Check if the library file exists
21-
cmake_path(APPEND Python3_SITELIB rcs OUTPUT_VARIABLE rcs_library_path)
22-
file(GLOB rcs_library_path "${rcs_library_path}/librcs.so")
37+
set(rcs_library_path "${rcs_package_dir}/librcs.so")
2338
if (NOT EXISTS ${rcs_library_path})
2439
set(rcs_FOUND FALSE)
2540
if (rcs_FIND_REQUIRED)
26-
message(FATAL_ERROR "Could not find rcs. Please install rcs using pip.")
41+
message(FATAL_ERROR "Could not find rcs 4. Please install rcs-core using pip.")
2742
endif()
2843
return()
2944
endif()
@@ -43,4 +58,4 @@ if (NOT rcs_FOUND)
4358
IMPORTED_LOCATION "${rcs_library_path}"
4459
)
4560
set(rcs_FOUND TRUE)
46-
endif()
61+
endif()

extensions/rcs_fr3/pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ requires = [
88
"cmake",
99
"ninja",
1010
"pin==3.7.0",
11+
"rcs-core>=0.7.2",
1112
]
1213
build-backend = "scikit_build_core.build"
1314

1415
[project]
1516
name = "rcs_fr3"
1617
version = "0.7.2"
1718
description = "RCS libfranka integration"
18-
dependencies = ["rcs>=0.7.2", "frankik"]
19+
dependencies = ["rcs-core>=0.7.2", "frankik"]
1920
readme = "README.md"
2021
maintainers = [{ name = "Tobias Jülg", email = "tobias.juelg@utn.de" }]
2122
authors = [{ name = "Tobias Jülg", email = "tobias.juelg@utn.de" }]

extensions/rcs_panda/cmake/Findrcs.cmake

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,43 @@ if (NOT rcs_FOUND)
22
if (NOT Python3_FOUND)
33
set(rcs_FOUND FALSE)
44
if (rcs_FIND_REQUIRED)
5-
message(FATAL_ERROR "Could not find rcs. Please install rcs using pip.")
5+
message(FATAL_ERROR "Could not find rcs 1. Please install rcs-core using pip.")
6+
endif()
7+
return()
8+
endif()
9+
10+
execute_process(
11+
COMMAND
12+
${Python3_EXECUTABLE}
13+
-c
14+
"import importlib.util; import pathlib; spec = importlib.util.find_spec('rcs'); print(pathlib.Path(next(iter(spec.submodule_search_locations))).resolve() if spec and spec.submodule_search_locations else '')"
15+
OUTPUT_VARIABLE rcs_package_dir
16+
OUTPUT_STRIP_TRAILING_WHITESPACE
17+
)
18+
if (NOT rcs_package_dir)
19+
set(rcs_FOUND FALSE)
20+
if (rcs_FIND_REQUIRED)
21+
message(FATAL_ERROR "Could not find rcs 2. Please install rcs-core using pip.")
622
endif()
723
return()
824
endif()
925

1026
# Check if the include directory exists
11-
cmake_path(APPEND Python3_SITELIB rcs include OUTPUT_VARIABLE rcs_INCLUDE_DIRS)
27+
cmake_path(APPEND rcs_package_dir include OUTPUT_VARIABLE rcs_INCLUDE_DIRS)
1228
if (NOT EXISTS ${rcs_INCLUDE_DIRS})
1329
set(rcs_FOUND FALSE)
1430
if (rcs_FIND_REQUIRED)
15-
message(FATAL_ERROR "Could not find rcs. Please install rcs using pip.")
31+
message(FATAL_ERROR "Could not find rcs 3. Please install rcs-core using pip.")
1632
endif()
1733
return()
1834
endif()
1935

2036
# Check if the library file exists
21-
cmake_path(APPEND Python3_SITELIB rcs OUTPUT_VARIABLE rcs_library_path)
22-
file(GLOB rcs_library_path "${rcs_library_path}/librcs.so")
37+
set(rcs_library_path "${rcs_package_dir}/librcs.so")
2338
if (NOT EXISTS ${rcs_library_path})
2439
set(rcs_FOUND FALSE)
2540
if (rcs_FIND_REQUIRED)
26-
message(FATAL_ERROR "Could not find rcs. Please install rcs using pip.")
41+
message(FATAL_ERROR "Could not find rcs 4. Please install rcs-core using pip.")
2742
endif()
2843
return()
2944
endif()
@@ -43,4 +58,4 @@ if (NOT rcs_FOUND)
4358
IMPORTED_LOCATION "${rcs_library_path}"
4459
)
4560
set(rcs_FOUND TRUE)
46-
endif()
61+
endif()

extensions/rcs_panda/pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ requires = [
77
"pybind11",
88
"cmake",
99
"ninja",
10+
"rcs-core>=0.7.2",
1011
]
1112
build-backend = "scikit_build_core.build"
1213

1314
[project]
1415
name = "rcs_panda"
1516
version = "0.7.2"
1617
description = "RCS libfranka integration"
17-
dependencies = ["rcs>=0.7.2"]
18+
dependencies = ["rcs-core>=0.7.2"]
1819
readme = "README.md"
1920
maintainers = [{ name = "Tobias Jülg", email = "tobias.juelg@utn.de" }]
2021
authors = [{ name = "Tobias Jülg", email = "tobias.juelg@utn.de" }]

extensions/rcs_realsense/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "rcs_realsense"
77
version = "0.7.2"
88
description = "RCS realsense module"
99
dependencies = [
10-
"rcs>=0.7.2",
10+
"rcs-core>=0.7.2",
1111
"pyrealsense2~=2.55.1",
1212
"pupil_apriltags",
1313
"diskcache",

extensions/rcs_robotics_library/cmake/Findrcs.cmake

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,43 @@ if (NOT rcs_FOUND)
22
if (NOT Python3_FOUND)
33
set(rcs_FOUND FALSE)
44
if (rcs_FIND_REQUIRED)
5-
message(FATAL_ERROR "Could not find rcs. Please install rcs using pip.")
5+
message(FATAL_ERROR "Could not find rcs 1. Please install rcs-core using pip.")
6+
endif()
7+
return()
8+
endif()
9+
10+
execute_process(
11+
COMMAND
12+
${Python3_EXECUTABLE}
13+
-c
14+
"import importlib.util; import pathlib; spec = importlib.util.find_spec('rcs'); print(pathlib.Path(next(iter(spec.submodule_search_locations))).resolve() if spec and spec.submodule_search_locations else '')"
15+
OUTPUT_VARIABLE rcs_package_dir
16+
OUTPUT_STRIP_TRAILING_WHITESPACE
17+
)
18+
if (NOT rcs_package_dir)
19+
set(rcs_FOUND FALSE)
20+
if (rcs_FIND_REQUIRED)
21+
message(FATAL_ERROR "Could not find rcs 2. Please install rcs-core using pip.")
622
endif()
723
return()
824
endif()
925

1026
# Check if the include directory exists
11-
cmake_path(APPEND Python3_SITELIB rcs include OUTPUT_VARIABLE rcs_INCLUDE_DIRS)
27+
cmake_path(APPEND rcs_package_dir include OUTPUT_VARIABLE rcs_INCLUDE_DIRS)
1228
if (NOT EXISTS ${rcs_INCLUDE_DIRS})
1329
set(rcs_FOUND FALSE)
1430
if (rcs_FIND_REQUIRED)
15-
message(FATAL_ERROR "Could not find rcs. Please install rcs using pip.")
31+
message(FATAL_ERROR "Could not find rcs 3. Please install rcs-core using pip.")
1632
endif()
1733
return()
1834
endif()
1935

2036
# Check if the library file exists
21-
cmake_path(APPEND Python3_SITELIB rcs OUTPUT_VARIABLE rcs_library_path)
22-
file(GLOB rcs_library_path "${rcs_library_path}/librcs.so")
37+
set(rcs_library_path "${rcs_package_dir}/librcs.so")
2338
if (NOT EXISTS ${rcs_library_path})
2439
set(rcs_FOUND FALSE)
2540
if (rcs_FIND_REQUIRED)
26-
message(FATAL_ERROR "Could not find rcs. Please install rcs using pip.")
41+
message(FATAL_ERROR "Could not find rcs 4. Please install rcs-core using pip.")
2742
endif()
2843
return()
2944
endif()
@@ -43,4 +58,4 @@ if (NOT rcs_FOUND)
4358
IMPORTED_LOCATION "${rcs_library_path}"
4459
)
4560
set(rcs_FOUND TRUE)
46-
endif()
61+
endif()

extensions/rcs_robotics_library/pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ requires = [
77
"pybind11",
88
"cmake",
99
"ninja",
10+
"rcs-core>=0.7.2",
1011
]
1112
build-backend = "scikit_build_core.build"
1213

@@ -15,7 +16,7 @@ name = "rcs_robotics_library"
1516
version = "0.7.2"
1617
description = "RCS robotics library integration"
1718
readme = "README.md"
18-
dependencies = ["rcs>=0.7.2"]
19+
dependencies = ["rcs-core>=0.7.2"]
1920
maintainers = [{ name = "Tobias Jülg", email = "tobias.juelg@utn.de" }]
2021
authors = [
2122
{ name = "Tobias Jülg", email = "tobias.juelg@utn.de" },

extensions/rcs_robotiq2f85/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "rcs_robotiq2f85"
77
version = "0.7.2"
88
description="RCS RobotiQ module"
99
dependencies = [
10-
"rcs>=0.7.2",
10+
"rcs-core>=0.7.2",
1111
"2f85-python-driver @ git+https://github.com/RobotControlStack/2f85-python-driver.git",
1212
]
1313
readme = "README.md"

extensions/rcs_so101/cmake/Findrcs.cmake

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,43 @@ if (NOT rcs_FOUND)
22
if (NOT Python3_FOUND)
33
set(rcs_FOUND FALSE)
44
if (rcs_FIND_REQUIRED)
5-
message(FATAL_ERROR "Could not find rcs. Please install rcs using pip.")
5+
message(FATAL_ERROR "Could not find rcs 1. Please install rcs-core using pip.")
6+
endif()
7+
return()
8+
endif()
9+
10+
execute_process(
11+
COMMAND
12+
${Python3_EXECUTABLE}
13+
-c
14+
"import importlib.util; import pathlib; spec = importlib.util.find_spec('rcs'); print(pathlib.Path(next(iter(spec.submodule_search_locations))).resolve() if spec and spec.submodule_search_locations else '')"
15+
OUTPUT_VARIABLE rcs_package_dir
16+
OUTPUT_STRIP_TRAILING_WHITESPACE
17+
)
18+
if (NOT rcs_package_dir)
19+
set(rcs_FOUND FALSE)
20+
if (rcs_FIND_REQUIRED)
21+
message(FATAL_ERROR "Could not find rcs 2. Please install rcs-core using pip.")
622
endif()
723
return()
824
endif()
925

1026
# Check if the include directory exists
11-
cmake_path(APPEND Python3_SITELIB rcs include OUTPUT_VARIABLE rcs_INCLUDE_DIRS)
27+
cmake_path(APPEND rcs_package_dir include OUTPUT_VARIABLE rcs_INCLUDE_DIRS)
1228
if (NOT EXISTS ${rcs_INCLUDE_DIRS})
1329
set(rcs_FOUND FALSE)
1430
if (rcs_FIND_REQUIRED)
15-
message(FATAL_ERROR "Could not find rcs. Please install rcs using pip.")
31+
message(FATAL_ERROR "Could not find rcs 3. Please install rcs-core using pip.")
1632
endif()
1733
return()
1834
endif()
1935

2036
# Check if the library file exists
21-
cmake_path(APPEND Python3_SITELIB rcs OUTPUT_VARIABLE rcs_library_path)
22-
file(GLOB rcs_library_path "${rcs_library_path}/librcs.so")
37+
set(rcs_library_path "${rcs_package_dir}/librcs.so")
2338
if (NOT EXISTS ${rcs_library_path})
2439
set(rcs_FOUND FALSE)
2540
if (rcs_FIND_REQUIRED)
26-
message(FATAL_ERROR "Could not find rcs. Please install rcs using pip.")
41+
message(FATAL_ERROR "Could not find rcs 4. Please install rcs-core using pip.")
2742
endif()
2843
return()
2944
endif()
@@ -43,4 +58,4 @@ if (NOT rcs_FOUND)
4358
IMPORTED_LOCATION "${rcs_library_path}"
4459
)
4560
set(rcs_FOUND TRUE)
46-
endif()
61+
endif()

0 commit comments

Comments
 (0)