diff --git a/external-control/.gitignore b/external-control/.gitignore new file mode 100644 index 00000000000..dfbfeb0c6bb --- /dev/null +++ b/external-control/.gitignore @@ -0,0 +1 @@ +cppbuild/ \ No newline at end of file diff --git a/external-control/CMakeLists.txt b/external-control/CMakeLists.txt new file mode 100644 index 00000000000..dd0cbdb9c0a --- /dev/null +++ b/external-control/CMakeLists.txt @@ -0,0 +1,23 @@ +cmake_minimum_required(VERSION 3.5) +set(CMAKE_CXX_STANDARD 17) + +project(external-control CXX) + +find_package(Eigen3 3.3 REQUIRED NO_MODULE) + +file(GLOB_RECURSE SOURCES + "src/main/cpp/*.cpp" + "src/main/cpp/*.hpp" +) + +add_library(external-control SHARED ${SOURCES}) +target_include_directories(external-control PUBLIC + src/main/cpp) + +install(TARGETS external-control + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) +install(DIRECTORY src/main/cpp/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include FILES_MATCHING PATTERN "*.hpp") + +target_link_libraries(external-control Eigen3::Eigen zmq) diff --git a/external-control/README.md b/external-control/README.md new file mode 100644 index 00000000000..e53ec67bf29 --- /dev/null +++ b/external-control/README.md @@ -0,0 +1,81 @@ +# IHMC-External Control + +**NOTE: We currently ONLY support Ubuntu 22.04. Other versions of Ubuntu, and Windows / macOS operating systems are not supported and are almost certain to break.** + +After reading this and installing, be sure to read [ARCHITECTURE.md](ARCHITECTURE.md) and [CONTRIBUTING.md](CONTRIBUTING.md) for more information on how the code in this repository is structured, and how to contribute effectively. + +## Contents + +* [Overview](#overview) +* [Dependencies](#dependencies) +* [Install](#install) +* [Development](#development) +* [Troubleshooting](#troubleshooting) + * [Failed Docker container creation](#failed-docker-container-creation) + * [Annoying permissions issues in generated-java](#annoying-permissions-issues-in-generated-java) + +## Overview + +* This project contains a thin C++ wrapper to allow setting up calls to a custom controller on the C++ side, and then interfacing with it from Java +* We create JNI bindings for the C++ wrapper library + +## Dependencies + +* Docker (check with `docker --version`). You'll want to run `docker` commands without having to prefix `sudo` all the + time, follow the instructions [here](https://askubuntu.com/questions/477551/how-can-i-use-docker-without-sudo). + +## Install + +Starting from a typical IHMC setup consisting of a `repository-group` workspace +with `ihmc-open-robotics-software`, perform the following steps: + +1. Clone this repository into `repository-group`. + +(NOTE: you may need to `chmod +x