Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into notebook-review
Browse files Browse the repository at this point in the history
# Conflicts:
#	notebooks/1a-configurations.ipynb
#	notebooks/1b-botop.ipynb
#	notebooks/1c-komo.ipynb
#	notebooks/configurationEditing.ipynb
#	notebooks/features.ipynb
#	notebooks/komo-reporting.ipynb
  • Loading branch information
cornelius-braun committed Oct 27, 2023
2 parents d1a098e + 02b13b7 commit 30fbb21
Show file tree
Hide file tree
Showing 47 changed files with 355 additions and 5,717 deletions.
25 changes: 8 additions & 17 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,29 @@ env:

jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
# recursively checkout all submodules
submodules: 'recursive'

- uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: install ubuntu dependencies
run: |
sudo apt-get install libboost-system-dev libfcl-dev
APTGETYES=1 make -C rai -j1 installUbuntuAll
- name: install python and pybind
- name: install python dependencies
run: |
sudo apt-get install python3 python3-dev python3-numpy python3-pip python3-distutils
sudo pip3 install jupyter nbconvert matplotlib pybind11
pip install numpy pybind11
- name: setup build files
run: |
make -C rai -j1 unityAll
ln -s build_utils/CMakeLists-ubuntu.txt CMakeLists.txt
cd $HOME && mkdir -p .local/include && cd .local/include && ln -s /usr/include/libqhull qhull
- name: cmake configure
run: |
export PYTHONVERSION=`python3 -c "import sys; print(str(sys.version_info[0])+'.'+str(sys.version_info[1]))"`
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DUSE_PHYSX=OFF -DUSE_BULLET=OFF -DPYBIND11_PYTHON_VERSION=$PYTHONVERSION -DUSE_QHULL8=ON
ls
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DUSE_PHYSX=OFF -DUSE_BULLET=OFF -DPYBIND11_PYTHON_VERSION=$PYTHONVERSION -DUSE_QHULL8=ON .
- name: cmake build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
30 changes: 30 additions & 0 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: SphinxDocumentation

on: [push, pull_request]

permissions:
contents: write

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: install ubuntu dependencies
run: |
sudo apt-get install pandoc freeglut3 libglew-dev
- name: install python dependencies
run: |
pip install sphinx sphinx_rtd_theme myst_parser nbsphinx robotic numpy
- name: Sphinx build
run: |
cd rai-docs && sphinx-build doc ../html
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: html
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ dist/
robotic.egg-info/
rai-robotModels
ry.pyi
build_wheel/

%% compile temporaries
/build
build/
*.o
*.a
*.so
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
[submodule "botop"]
path = botop
url = [email protected]:MarcToussaint/botop.git
[submodule "rai-docs"]
path = rai-docs
url = [email protected]:MarcToussaint/rai-docs.git
44 changes: 44 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
default: docs

docs:
cd rai-docs && sphinx-build doc ../html

docs-clean:
rm -Rf html

install:
ln -f -s _build_utils/CMakeLists-ubuntu.txt CMakeLists.txt
cmake -B build .
+make -C build _robotic docstrings install

install-clean:
rm -R ${HOME}/.local/lib/python3.8/site-packages/robotic*
rm ${HOME}/.local/lib/*rai*
rm ${HOME}/.local/bin/*ry*

wheels:
$(eval id = $(shell _build_utils/run-docker.sh -d))
@echo "started docker " ${id}
docker exec -it ${id} /bin/bash -C local/_build_utils/build-wheels.sh
docker stop ${id}
# _build_utils/run-docker.sh local/_build_utils/build-wheels.sh

wheels-upload:
twine upload dist/*.whl --repository robotic

wheels-local:
python3.8 -m pip install --user dist/robotic-*cp38*.whl --force-reinstall

test:
cd ${HOME} && python3 -c 'from robotic import ry; print("ry version:", ry.__version__, ry.compiled());'

pull:
cd rai && git pull
cd rai-robotModels && git pull
cd rai-docs && git pull
cd botop && git pull

docker-clean:
$(shell docker container kill "$(docker container ls -q)")
docker system prune

21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Lab](https://argmin.lis.tu-berlin.de/), operate our robots.

## Documentation

Please follow the documentation and tutorials here: https://marctoussaint.github.io/robotics-course/
Please follow the documentation and tutorials here: https://marctoussaint.github.io/robotic/

## Installation via pip (simulation only, no real Franka & realsense support)

Expand All @@ -24,17 +24,19 @@ sudo apt install liblapack3 freeglut3 libglew-dev python3 python3-pip
```
* pip-install robotic and dependencies (numpy, scipy)
```
python3 -m pip install --user robotic numpy scipy
pip install robotic
```
* Test:
* Tests:
```
python3 -c 'from robotic import ry; print("ry version:", ry.__version__, ry.compiled());'
python3 -c 'from robotic import ry; ry.test.RndScene()'
python3 -c 'import robotic as ry; print("ry version:", ry.__version__, ry.compiled());'
```
```
python3 -c 'import robotic as ry; ry.test.RndScene()'
```
<!--
If the `rai-robotModels` path fails, find rai-robotModels and try something like
```
python3 -c 'from robotic import ry; ry.setRaiPath("/usr/local/rai-robotModels"); ry.test.RndScene()'
python3 -c 'import robotic as ry; ry.setRaiPath("/usr/local/rai-robotModels"); ry.test.RndScene()'
```
When rai-robotModels is still messed up, try cloning it completely:
```
Expand Down Expand Up @@ -86,11 +88,10 @@ make -C rai-python/build install

* This should install everything in .local/lib/python*/site-packages/robotic. Test:
```
python3 -c 'from robotic import ry; print("ry version:", ry.__version__, ry.compiled());'
python3 -c 'from robotic import ry; ry.test.RndScene()'
python3 -c 'import robotic as ry; print("ry version:", ry.__version__, ry.compiled());'
python3 -c 'import robotic as ry; ry.test.RndScene()'
```


## Building a wheel within a manylinux docker

* Build the docker
Expand All @@ -102,7 +103,7 @@ _build_utils/build-docker.sh
```
_build_utils/run-docker.sh
## inside docker:
cd local #this mounts rai-python/
cd local #this mounts robotic/
_build_utils/build-wheels.sh
exit
```
Expand Down
52 changes: 30 additions & 22 deletions _build_utils/CMakeLists-docker.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ add_definitions(
################################################################################

include_directories(
rai/rai
rai/src
botop/src
/usr/local/include/eigen3
/usr/include/eigen3
Expand All @@ -58,10 +58,10 @@ link_directories(
$ENV{HOME}/.local/lib
)

file(GLOB SRC_GeoGJK rai/rai/Geo/GJK/*.c)
file(GLOB SRC_GeoPly rai/rai/Geo/ply/*.c)
file(GLOB SRC_GeoCcd rai/rai/Geo/ccd_rai/*.c)
file(GLOB SRC_GeoLewiner rai/rai/Geo/Lewiner/*.cpp)
file(GLOB SRC_GeoGJK rai/src/Geo/GJK/*.c)
file(GLOB SRC_GeoPly rai/src/Geo/ply/*.c)
file(GLOB SRC_GeoCcd rai/src/Geo/ccd_rai/*.c)
file(GLOB SRC_GeoLewiner rai/src/Geo/Lewiner/*.cpp)

file(GLOB SRC_BotOp botop/src/BotOp/*.cpp)
file(GLOB SRC_Franka botop/src/Franka/*.cpp)
Expand All @@ -71,21 +71,21 @@ file(GLOB SRC_Robotiq botop/src/Robotiq/*.cpp)
file(GLOB SRC_Audio botop/src/Audio/*.cpp)

add_library(rai STATIC
rai/rai/Core/unity.cxx
rai/rai/Optim/unity.cxx
rai/rai/Geo/unity.cxx
rai/src/Core/unity.cxx
rai/src/Optim/unity.cxx
rai/src/Geo/unity.cxx
${SRC_GeoGJK}
${SRC_GeoPly}
${SRC_GeoCcd}
${SRC_GeoLewiner}
rai/rai/Algo/unity.cxx
rai/rai/Search/unity.cxx
rai/rai/PathAlgos/unity.cxx
rai/rai/Gui/unity.cxx
rai/rai/Kin/unity.cxx
rai/rai/KOMO/unity.cxx
rai/rai/Logic/unity.cxx
rai/rai/Control/unity.cxx
rai/src/Algo/unity.cxx
rai/src/Search/unity.cxx
rai/src/PathAlgos/unity.cxx
rai/src/Gui/unity.cxx
rai/src/Kin/unity.cxx
rai/src/KOMO/unity.cxx
rai/src/Logic/unity.cxx
rai/src/Control/unity.cxx
${SRC_BotOp}
${SRC_Franka}
${SRC_OptiTrack}
Expand All @@ -106,7 +106,7 @@ if(USE_BULLET)
find_package(Bullet REQUIRED)
add_definitions(-DRAI_BULLET)
include_directories(${BULLET_INCLUDE_DIRS})
# target_link_libraries(rai ${BULLET_LIBRARIES})
target_link_libraries(rai ${BULLET_LIBRARIES})
message(STATUS "[rai] using bullet libs:" ${BULLET_LIBRARIES})
endif()

Expand Down Expand Up @@ -150,12 +150,12 @@ if(USE_PYBIND)
find_package(pybind11)
add_definitions(-DRAI_PYBIND)

pybind11_add_module(ry SHARED
rai/rai/ry/unity.cxx
pybind11_add_module(_robotic SHARED
rai/src/ry/unity.cxx
botop/src/BotOp/pyBot.cxx
)

target_link_libraries(ry PRIVATE
target_link_libraries(_robotic PRIVATE
rai
libjsoncpp.a lapack pthread rt X11 libatlas.a
libassimp.a libglfw3.a libGLEW.a glut GLU GL libpng16.a libzlibstatic.a libqhull.a libANN.a libccd.a libfcl.a
Expand All @@ -168,8 +168,16 @@ endif()

################################################################################

#add_executable(kinEdit rai/bin/src_kinEdit/main.cpp)
#target_link_libraries(kinEdit rai)
add_executable(raiView rai/bin/src_kinEdit/main.cpp)
target_link_libraries(raiView PRIVATE
rai
dl libjsoncpp.a lapack pthread rt X11 libatlas.a
libassimp.a libglfw3.a libGLEW.a glut GLU GL libpng16.a libzlibstatic.a libqhull.a libANN.a libccd.a libfcl.a
#${BULLET_LIBRARIES}
libBullet2FileLoader.a libBullet3Common.a libBullet3Geometry.a libBulletCollision.a libBulletInverseDynamics.a
libBullet3Collision.a libBullet3Dynamics.a libBullet3OpenCL_clew.a libBulletDynamics.a libBulletSoftBody.a
libLinearMath.a
)

#add_executable(testSim rai/test/Kin/simulation/main.cpp)
#target_link_libraries(testSim rai)
Expand Down
Loading

0 comments on commit 30fbb21

Please sign in to comment.