-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
250 changed files
with
58,706 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
cover/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
.pybuilder/ | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pdm | ||
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. | ||
#pdm.lock | ||
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it | ||
# in version control. | ||
# https://pdm.fming.dev/#use-with-ide | ||
.pdm.toml | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# pytype static type analyzer | ||
.pytype/ | ||
|
||
# Cython debug symbols | ||
cython_debug/ | ||
|
||
# PyCharm | ||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can | ||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore | ||
# and can be added to the global gitignore or merged into this file. For a more nuclear | ||
# option (not recommended) you can uncomment the following to ignore the entire idea folder. | ||
.idea/ | ||
|
||
# Project specific: | ||
src/gymfcpp/gymfcpp_config.h | ||
src/gymfcpp/gymfcpp_version.h | ||
|
||
# MacOS stuff | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
CMAKE_MINIMUM_REQUIRED(VERSION 3.20) | ||
MESSAGE(STATUS "Using CMake ${CMAKE_VERSION}") | ||
|
||
SET(RLENVSCPP_VERSION_MAJOR 1) | ||
SET(RLENVSCPP_VERSION_MINOR 8) | ||
SET(RLENVSCPP_VERSION_PATCH 0) | ||
|
||
SET(RLENVSCPP_VERSION "${RLENVSCPP_VERSION_MAJOR}.${RLENVSCPP_VERSION_MINOR}.${RLENVSCPP_VERSION_PATCH}") | ||
MESSAGE(STATUS "rlenvscpplib Version ${RLENVSCPP_VERSION}") | ||
|
||
# create a CMake project | ||
PROJECT(rlenvscpp VERSION ${RLENVSCPP_VERSION} LANGUAGES CXX) | ||
|
||
# ----------------------------------------------------------------------------- | ||
# Prevent in-source builds. | ||
# ----------------------------------------------------------------------------- | ||
|
||
IF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) | ||
MESSAGE( FATAL_ERROR "In-source build is not possible. Choose an empty directory for build output.") | ||
ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) | ||
|
||
# Be sure to avoid troubles with library paths when using old policy | ||
IF(COMMAND cmake_policy) | ||
CMAKE_POLICY(SET CMP0003 NEW) | ||
CMAKE_POLICY(SET CMP0048 NEW) | ||
ENDIF(COMMAND cmake_policy) | ||
|
||
OPTION(ENABLE_TESTS_FLAG OFF) | ||
OPTION(ENABLE_EXAMPLES_FLAG OFF) | ||
OPTION(ENABLE_DOC_FLAG OFF) | ||
|
||
SET(CMAKE_BUILD_TYPE "Debug") | ||
|
||
#SET(CMAKE_CXX_COMPILER /usr/bin/g++-11) | ||
#SET(CMAKE_C_COMPILER /usr/bin/gcc-11) | ||
SET(CMAKE_CXX_STANDARD 20) | ||
SET(CMAKE_CXX_STANDARD_REQUIRED True) | ||
SET(CMAKE_LINKER_FLAGS "-pthread") | ||
|
||
|
||
IF(CMAKE_BUILD_TYPE STREQUAL "Debug") | ||
|
||
SET(CMAKE_INSTALL_PREFIX ${PROJECT_SOURCE_DIR}/install/dbg) | ||
SET(CMAKE_CXX_FLAGS "-g ") # -Wall -Wextra") | ||
SET(RLENVSCPP_DEBUG ON) | ||
|
||
ELSE(CMAKE_BUILD_TYPE STREQUAL "Release") | ||
|
||
SET(CMAKE_INSTALL_PREFIX ${PROJECT_SOURCE_DIR}/install/opt) | ||
SET(CMAKE_CXX_FLAGS "-O2") | ||
SET(RLENVSCPP_DEBUG OFF) | ||
|
||
ENDIF() | ||
|
||
# where to install the library | ||
IF(ENABLE_TESTS_FLAG) | ||
# find gtest | ||
FIND_PACKAGE(GTest REQUIRED) | ||
|
||
IF(GTest_FOUND) | ||
INCLUDE_DIRECTORIES(${GTEST_INCLUDE_DIRS}) | ||
LINK_DIRECTORIES("/usr/local/lib") | ||
|
||
MESSAGE( STATUS "Found Gtest at ${GTEST_INCLUDE_DIRS}.") | ||
ELSE() | ||
MESSAGE( FATAL_ERROR "ENABLE_TESTS_FLAG is ON but could not find GTest library.") | ||
ENDIF() | ||
ENDIF() | ||
|
||
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") | ||
|
||
configure_file(config.h.in ${PROJECT_SOURCE_DIR}/src/rlenvs/rlenvscpp_config.h @ONLY) | ||
configure_file(version.h.in ${PROJECT_SOURCE_DIR}/src/rlenvs/rlenvscpp_version.h @ONLY) | ||
|
||
|
||
# Find boost | ||
FIND_PACKAGE(Boost 1.74.0 REQUIRED) | ||
FIND_PACKAGE(BLAS REQUIRED) | ||
FIND_PACKAGE(Eigen3 REQUIRED) | ||
IF(Boost_FOUND) | ||
MESSAGE( STATUS "Found needed Boost C++ library.") | ||
SET(Boost_USE_SHARED_LIBS ON) | ||
ELSE() | ||
MESSAGE( FATAL_ERROR "Boost C++ library is required but not found.") | ||
ENDIF() | ||
|
||
MESSAGE(STATUS "Build type: ${CMAKE_BUILD_TYPE}") | ||
MESSAGE(STATUS "C++ Compiler: ${CMAKE_CXX_COMPILER}") | ||
MESSAGE(STATUS "C Compiler: ${CMAKE_C_COMPILER}") | ||
MESSAGE(STATUS "Boost lib: ${Boost_LIBRARY_DIR}") | ||
MESSAGE(STATUS "Boost include: ${Boost_INCLUDE_DIRS}") | ||
MESSAGE(STATUS "Install dst: ${CMAKE_INSTALL_PREFIX}") | ||
|
||
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) | ||
INCLUDE_DIRECTORIES(src/) | ||
|
||
FILE(GLOB SRCS src/rlenvs/*.cpp | ||
src/rlenvs/envs/*.cpp | ||
src/rlenvs/envs/api_server/*.cpp | ||
src/rlenvs/envs/gymnasium/*.cpp | ||
src/rlenvs/envs/gymnasium/toy_text/*.cpp | ||
src/rlenvs/envs/gymnasium/classic_control/*.cpp | ||
src/rlenvs/envs/gymnasium/classic_control/vector/*.cpp | ||
src/rlenvs/envs/gdrl/*.cpp | ||
#src/rlenvs/envs/gym_pybullet_drones/*.cpp | ||
src/rlenvs/envs/grid_world/*.cpp | ||
src/rlenvs/envs/connect2/*.cpp | ||
src/rlenvs/dynamics/*.cpp | ||
src/rlenvs/utils/*.cpp | ||
src/rlenvs/utils/io/*.cpp | ||
src/rlenvs/utils/io/tensor_board_server/*.cpp | ||
src/rlenvs/utils/geometry/*.cpp | ||
src/rlenvs/utils/geometry/shapes/*.cpp | ||
src/rlenvs/utils/trajectory/*.cpp | ||
) | ||
|
||
ADD_LIBRARY(rlenvscpplib SHARED ${SRCS}) | ||
|
||
SET_TARGET_PROPERTIES(rlenvscpplib PROPERTIES LINKER_LANGUAGE CXX) | ||
INSTALL(TARGETS rlenvscpplib DESTINATION ${CMAKE_INSTALL_PREFIX}) | ||
MESSAGE(STATUS "Installation destination at: ${CMAKE_INSTALL_PREFIX}") | ||
|
||
IF(ENABLE_EXAMPLES_FLAG) | ||
# Add the examples | ||
ADD_SUBDIRECTORY(examples) | ||
ELSE() | ||
MESSAGE(WARNING "Examples have not been enabled") | ||
ENDIF() | ||
|
||
IF(ENABLE_TESTS_FLAG) | ||
# Add the tests | ||
ADD_SUBDIRECTORY(tests) | ||
ELSE() | ||
MESSAGE(WARNING "Tests have not been enabled") | ||
ENDIF() | ||
|
||
|
||
IF(ENABLE_DOC_FLAG) | ||
# Add the tests | ||
ADD_SUBDIRECTORY(doc) | ||
ELSE() | ||
MESSAGE(WARNING "Documentation will not be generated") | ||
ENDIF() |
Oops, something went wrong.