Skip to content

Commit

Permalink
v1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcToussaint committed Feb 27, 2024
1 parent e57dad5 commit d354acc
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 29 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ pip install robotic
```
* Tests:
```
ry-info
```
```
python3 -c 'import robotic as ry; print("ry version:", ry.__version__, ry.compiled());'
```
```
Expand Down
27 changes: 19 additions & 8 deletions _build_utils/CMakeLists-docker.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ option(USE_OPENCV "link to opencv" OFF)
option(USE_REALSENSE "link to realsense2 driver library" OFF)
option(USE_LIBFRANKA "link to libfranka" OFF)
option(USE_PCL "link to pcl library" OFF)
option(USE_H5 "link to h5 library" ON)

## compile options
add_compile_options(
Expand All @@ -41,7 +42,7 @@ add_definitions(
-DRAI_ROOT_PATH=\"${CMAKE_SOURCE_DIR}/rai\"
-DRAI_X11 -DRAI_LAPACK -DRAI_EIGEN -DRAI_PTHREAD
-DRAI_GL
-DRAI_GLFW -DRAI_ANN -DRAI_QHULL8 -DRAI_ASSIMP -DNO_CYCLE_DETECTION -DRAI_PNG -DRAI_PLY -DRAI_H5
-DRAI_GLFW -DRAI_ANN -DRAI_QHULL8 -DRAI_ASSIMP -DNO_CYCLE_DETECTION -DRAI_PNG -DRAI_PLY
-DRAI_GJK -DRAI_CCD -DRAI_FCL -DRAI_Lewiner
-DRAI_NO_STB_IMPL
-DRAI_BotOp
Expand Down Expand Up @@ -104,26 +105,32 @@ add_library(rai SHARED
${SRC_Audio}
)


################################################################################
#
# rai include/link

target_link_libraries(rai PRIVATE
# ORDER MATTERS! test with -no-undefined linker flag (above)
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
libjsoncpp.a lapack libatlas.a
libassimp.a libglfw3.a libGLEW.a glut GLU GL libpng16.a libzlibstatic.a libqhull.a libANN.a libfcl.a libccd.a
libhdf5_cpp.a libhdf5.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
dl
)

################################################################################
#
# include external libraries

#find_package (FindEigen3 REQUIRED)
#target_link_libraries (rai FindEigen3::Eigen)
#target_link_libraries (rai eigen)

if(USE_H5)
add_definitions(-DRAI_H5)
target_link_libraries(rai PRIVATE libhdf5_cpp.a libhdf5.a libzlibstatic.a)
message(STATUS "[rai] using H5 libs: hdf5 hdf5_cpp in " ${HDF5_INCLUDE_DIRS})
endif()

if(USE_BULLET)
find_package(Bullet REQUIRED)
add_definitions(-DRAI_BULLET)
Expand Down Expand Up @@ -157,6 +164,10 @@ if(USE_LIBFRANKA)
message(STATUS "[rai] using libfranka")
endif()

target_link_libraries(rai PRIVATE
pthread rt X11 dl
)

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

if(USE_PYBIND)
Expand Down
34 changes: 22 additions & 12 deletions _build_utils/CMakeLists-ubuntu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ add_definitions(
include_directories(
rai/src
botop/src
/usr/include/eigen3
$ENV{HOME}/.local/include
/usr/include/eigen3
)

link_directories(
Expand All @@ -64,6 +64,9 @@ link_directories(
if(USE_PHYSX)
link_directories($ENV{HOME}/.local/lib/PhysX)
endif()
if(USE_H5)
link_directories(/usr/lib/x86_64-linux-gnu/hdf5/serial)
endif()

file(GLOB SRC_GeoGJK rai/src/Geo/GJK/*.c)
file(GLOB SRC_GeoPly rai/src/Geo/ply/*.c)
Expand Down Expand Up @@ -103,32 +106,35 @@ add_library(rai SHARED
${SRC_Audio}
)

################################################################################
#
# rai include/link

# default/required dependencies
target_link_libraries(rai PRIVATE
# ORDER MATTERS! test with -no-undefined linker flag (above)
jsoncpp lapack blas pthread rt X11
assimp ccd fcl qhull ann glfw GLEW glut GLU GL png
boost_system
jsoncpp lapack blas
assimp fcl ccd ann qhull
glfw GLEW glut GLU GL png
)

################################################################################
#
# include external libraries

#find_package (Eigen3 3.3 REQUIRED NO_MODULE)
#target_link_libraries (rai Eigen3::Eigen)
find_package(PkgConfig REQUIRED)

if(USE_H5)
find_package(HDF5 REQUIRED)
add_definitions(-DRAI_H5)
target_link_libraries(rai PRIVATE hdf5_cpp hdf5)
message(STATUS "[rai] using H5 libs: hdf5 hdf5_cpp")
include_directories(${HDF5_INCLUDE_DIRS})
target_link_libraries(rai PRIVATE hdf5_cpp hdf5 z)
message(STATUS "[rai] using H5 libs: hdf5 hdf5_cpp in " ${HDF5_INCLUDE_DIRS})
endif()

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 PRIVATE ${BULLET_LIBRARIES})
message(STATUS "[rai] using bullet libs:" ${BULLET_LIBRARIES})
endif()

Expand All @@ -141,7 +147,7 @@ endif()
if(USE_OPENCV)
find_package(OpenCV REQUIRED)
add_definitions(-DRAI_OPENCV)
target_link_libraries(rai ${OpenCV_LIBS})
target_link_libraries(rai PRIVATE ${OpenCV_LIBS})
message(STATUS "[rai] using OpenCV libs:" ${OpenCV_LIBS})
endif()

Expand All @@ -164,6 +170,10 @@ if(USE_LIBFRANKA)
message(STATUS "[rai] using libfranka")
endif()

target_link_libraries(rai PRIVATE
pthread rt X11 boost_system
)

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

if(USE_PYBIND)
Expand Down
5 changes: 1 addition & 4 deletions _build_utils/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,8 @@ RUN ./install.sh -gc fcl
RUN ./install.sh -gc assimp

RUN ./install.sh -gc bullet
RUN rm install.sh
RUN wget https://github.com/MarcToussaint/rai-extern/raw/main/install.sh; chmod a+x install.sh
RUN ./install.sh -gc physx

#RUN wget https://github.com/MarcToussaint/rai-extern/raw/main/install.sh; chmod a+x install.sh
#RUN yum -y install openssl-devel poco-devel libusbx-devel
#RUN ./install.sh -g librealsense
#RUN ./install.sh -g libfranka
Expand All @@ -51,4 +48,4 @@ RUN python3.11 -m pip install pybind11 pybind11-stubgen==0.16.2 numpy

WORKDIR /root

RUN printf "\necho '*** Welcome to the manylinux docker! ***'\n" >> $HOME/.bashrc
RUN printf "\necho '*** Robotic Python Lib - docker for wheel build ***'\n" >> $HOME/.bashrc
2 changes: 1 addition & 1 deletion _build_utils/build-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ for ver in 8 9 10 11 6 7; do
strip --strip-unneeded robotic/librai.so

echo -e "\n\n======== build wheel (python version " $ver ") ========"
python3.$ver setup.py bdist_wheel
python3.$ver setup.py --quiet bdist_wheel
#break
done

Expand Down
2 changes: 1 addition & 1 deletion botop
2 changes: 1 addition & 1 deletion rai
2 changes: 1 addition & 1 deletion robotic/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.1.7'
__version__ = '0.1.8'
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ def has_ext_modules(foo):

setup(
name='robotic',
packages=['robotic'],
#packages=['robotic'],
packages=setuptools.find_namespace_packages(),
package_data={
'robotic': ['_robotic.so', 'librai.so', '_robotic.pyi', 'version.py', 'render.py',
'rai-robotModels/*/*', 'rai-robotModels/*/*/*', 'rai-robotModels/*/*/*/*', 'rai-robotModels/*/*/*/*/*', 'rai-robotModels/*/*/*/*/*/*',
Expand Down

0 comments on commit d354acc

Please sign in to comment.