Skip to content

Commit 3655927

Browse files
authored
refactor: Remove private scenes, add public assets (#182)
* Remove private scenes, add public assets Assets than can be shared are added in the assets dir. UTN scenes integration with the token etc. is removed. Included scenes are compiled and the binary .mjb file is added to the pip package. The global rcsss.scenes dict now contains, for each scene, the paths to the .mjb and the path to the .urdf. * Removed model download from build * Build _core and franka only in makefile
1 parent 70e7774 commit 3655927

File tree

204 files changed

+4213379
-190
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

204 files changed

+4213379
-190
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.stl filter=lfs diff=lfs merge=lfs -text
2+
.obj filter=lfs diff=lfs merge=lfs -text

.github/workflows/py.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ jobs:
4646
run: python -m pip install -r requirements_dev.txt
4747
- name: Install wheel
4848
run: python -m pip install wheel
49-
- name: Download the models using cmake
50-
env:
51-
MODEL_TOKEN: ${{ secrets.MODEL_TOKEN }}
52-
run: cmake -G Ninja -B build -DINCLUDE_UTN_MODELS=ON -DGITLAB_MODELS_TOKEN="$MODEL_TOKEN" -DMUJOCO_VERSION=3.1.5
5349
- name: Install the package
5450
run: python -m pip install --no-build-isolation .
5551
- name: Code linting

CMakeLists.txt

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ set(RL_BUILD_EXTRAS OFF)
4141
set(BUILD_PYTHON_INTERFACE OFF)
4242
set(BUILD_DOCUMENTATION OFF)
4343

44-
option(INCLUDE_UTN_MODELS "Whether to include the private UTN models. Requires GITLAB_MODELS_TOKEN to be set to a valid token wit read_api permissions" OFF)
45-
4644
include(FetchContent)
4745

4846
find_package(Eigen3 REQUIRED)
@@ -94,22 +92,6 @@ target_link_libraries(mujoco_ui_lib MuJoCo::MuJoCo glfw)
9492
target_include_directories(mujoco_ui_lib INTERFACE ${MuJoCo_UI_DIR})
9593

9694
FetchContent_MakeAvailable(libfranka rl pybind11)
97-
98-
if (${INCLUDE_UTN_MODELS})
99-
if (DEFINED GITLAB_MODELS_TOKEN)
100-
include(download_scenes)
101-
set(ref 055a6fdab480dde8443030236012f76d9be90918)
102-
FetchContent_Declare(
103-
scenes
104-
URL "https://gitos.rrze.fau.de/api/v4/projects/1100/repository/archive?path=scenes&sha=${ref}"
105-
HTTP_HEADER "PRIVATE-TOKEN: ${GITLAB_MODELS_TOKEN}"
106-
)
107-
FetchContent_MakeAvailable(scenes)
108-
resolve_symlinks(${ref})
109-
else()
110-
message(FATAL_ERROR "GITLAB_MODELS_TOKEN missing. Not including lab scene")
111-
endif()
112-
endif()
11395
include(compile_scenes)
11496

11597
add_subdirectory(src)

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ cpplint:
1515
gcccompile:
1616
pip install --upgrade --requirement requirements_dev.txt
1717
cmake -DCMAKE_BUILD_TYPE=${COMPILE_MODE} -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -B build -G Ninja
18-
cmake --build build
18+
cmake --build build --target _core franka
1919

2020
clangcompile:
2121
pip install --upgrade --requirement requirements_dev.txt
2222
cmake -DCMAKE_BUILD_TYPE=${COMPILE_MODE} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -B build -G Ninja
23-
cmake --build build
23+
cmake --build build --target _core franka
2424

2525
# Auto generation of CPP binding stub files
2626
stubgen:

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ source .venv/bin/activate
1515
pip install -r requirements_dev.txt
1616
pip config --site set global.no-build-isolation false
1717
```
18-
2.5 (optional) include UTN models if you have an access token
19-
```shell
20-
pip config --site set install.config-settings "cmake.args=-DINCLUDE_UTN_MODELS=ON;-DGITLAB_MODELS_TOKEN=<token>"
21-
```
2218
3. Build and install RCS:
2319
```shell
2420
pip install -ve .
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<mujoco model="d435i">
2+
<compiler meshdir="../obj" fitaabb="true"/>
3+
4+
<visual>
5+
<global azimuth="90" elevation="-90"/>
6+
</visual>
7+
8+
<default>
9+
<default class="d435i">
10+
<material specular="0" shininess="0.25"/>
11+
<default class="visual">
12+
<geom group="2" type="mesh" contype="0" conaffinity="0" mass="0"/>
13+
</default>
14+
<default class="collision">
15+
<geom group="3" type="mesh" mass="0"/>
16+
</default>
17+
</default>
18+
</default>
19+
20+
<asset>
21+
<material class="d435i" name="Black_Acrylic" rgba="0.070360 0.070360 0.070360 1"/>
22+
<material class="d435i" name="Cameras_Gray" rgba="0.296138 0.296138 0.296138 1"/>
23+
<material class="d435i" name="IR_Emitter_Lens" rgba="0.287440 0.665387 0.327778 1"/>
24+
<material class="d435i" name="IR_Lens" rgba="0.035601 0.035601 0.035601 1"/>
25+
<material class="d435i" name="IR_Rim" rgba="0.799102 0.806952 0.799103 1"/>
26+
<material class="d435i" name="Metal_Casing" rgba="1 1 1 1"/>
27+
<material class="d435i" name="RGB_Pupil" rgba="0.087140 0.002866 0.009346 1"/>
28+
29+
<mesh file="d435i_0.obj"/>
30+
<mesh file="d435i_1.obj"/>
31+
<mesh file="d435i_2.obj"/>
32+
<mesh file="d435i_3.obj"/>
33+
<mesh file="d435i_4.obj"/>
34+
<mesh file="d435i_5.obj"/>
35+
<mesh file="d435i_6.obj"/>
36+
<mesh file="d435i_7.obj"/>
37+
<mesh file="d435i_8.obj"/>
38+
</asset>
39+
40+
<worldbody>
41+
<light pos="0 0 1.5" dir="0 0 -1" directional="true"/>
42+
<body name="d435i" childclass="d435i">
43+
<geom mesh="d435i_0" material="IR_Lens" class="visual"/>
44+
<geom mesh="d435i_1" material="IR_Emitter_Lens" class="visual"/>
45+
<geom mesh="d435i_2" material="IR_Rim" class="visual"/>
46+
<geom mesh="d435i_3" material="IR_Lens" class="visual"/>
47+
<geom mesh="d435i_4" material="Cameras_Gray" class="visual"/>
48+
<geom mesh="d435i_5" material="Black_Acrylic" class="visual"/>
49+
<geom mesh="d435i_6" material="Black_Acrylic" class="visual"/>
50+
<geom mesh="d435i_7" material="RGB_Pupil" class="visual"/>
51+
<geom mesh="d435i_8" mass="0.072" material="Metal_Casing" class="visual"/>
52+
<geom class="collision" type="capsule" mesh="d435i_8"/>
53+
<!-- camera offset can be lookup on the datasheet on page 96: https://www.intelrealsense.com/wp-content/uploads/2024/10/Intel-RealSense-D400-Series-Datasheet-October-2024.pdf -->
54+
<camera name="wrist_0" mode="fixed" pos="0.0325 0 0" euler="0 180 0" resolution="1920 1080"/>
55+
<!-- <body pos="0.0325 0 0">
56+
<geom type="sphere" size="0.01" rgba="1 1 0 1" />
57+
</body> -->
58+
</body>
59+
</worldbody>
60+
</mujoco>

0 commit comments

Comments
 (0)