diff --git a/CMakeLists.txt b/CMakeLists.txt index f05808fa..54c74211 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.5) set(CMAKE_CXX_STANDARD 14) -project(retargeting) +project(walking-teleoperation) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) diff --git a/README.md b/README.md index f5a3cf6b..ca989f63 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,7 @@ The description of dependencies are located [here](./docs/Dependencies.md). This guide is only for teleoperation dependencies on a Windows machine and it includes the guide to install Oculus module and Virtualizer module SDKs. -Besides, you need to have a linux machine for **Walking-controllers** if you intend to move the robot base as well. to install follow the instructions in [robotology-superbuild#dynamics](https://github.com/robotology/robotology-superbuild#dynamics) - +Besides, you need to have a linux machine for **Walking-controllers** module described [here](https://github.com/robotology/walking-controllers/tree/devel_hand_retargeting). # :hammer: Build the suite ## Linux/macOs diff --git a/docs/Dependencies.md b/docs/Dependencies.md index ce414abf..abe57da5 100644 --- a/docs/Dependencies.md +++ b/docs/Dependencies.md @@ -7,36 +7,42 @@ 2. **YARP:** Using superbuild install the [YARP](http://www.yarp.it/): to handle the comunication with the robot with both ovrheadset and SDLjoypad drivers; + if you are not using superbuild, look at [this link](http://www.yarp.it/) for installing YARP. + + Use YARP and icub repos using the devel branch instead of the master branch. The main reason is because of the `camCalibWithPose` application. + + Enable the following options (be sure that this option is enabled in all the machines for the image communication): + ``` + ENABLE_yarpcar_mjpeg + MJPEG_AUTOCOMPRESS + ``` 3. **QT5 and Eigen3:** In the Super-build, enable the QT5 and Eigen3 to install (follow the instructions [here](https://github.com/robotology/robotology-superbuild#system-libraries)). -4. **Oculus SDK:** In order to install the oculus SDK, you need to install first the Oculus app on windows (oculus application), install the depenecies(GLEW, GLFW3), and finally install the sdk (LibOVR): +4. **Oculus SDK:** In order to install the oculus SDK, you need to install first the Oculus app on windows (oculus application), install the dependencies (GLEW, GLFW3), and finally install the sdk (LibOVR): 1. `oculus application`: Download and install the oculus [setup application](https://www.oculus.com/setup/). It is used for both the Oculus Virtual Reality headset (ovrheadset) and joypads (touch controller). - 2. `GLEW`: Dowload the version 2.1.0 of the [glew libarary](http://glew.sourceforge.net/index.html) from this[link](https://sourceforge.net/projects/glew/files/glew/2.1.0/) (if you want to dowload from the [glew libarary](http://glew.sourceforge.net/index.html) select the source file) + 2. `GLEW`: Download the version 2.1.0 of the [glew library](http://glew.sourceforge.net/index.html) from this [link](https://sourceforge.net/projects/glew/files/glew/2.1.0/) (if you want to download from the [glew library](http://glew.sourceforge.net/index.html) select the source file) - extract and copy the glew library to your robot/code workspace (in our case in same path of robotology-superbuild) - - the library has the makefiles, so go to the 'glew\glew-2.1.0\glew-2.1.0\build\vc12' and using the VS15 (VS 2017) build the library (release and debug!) + - the library has the makefiles, so go to the `glew\glew-2.1.0\glew-2.1.0\build\vc12` path and using the VS15 (VS 2017) build the library (release and debug!) - Add the following variables value in robotology/yarp using CMake GUI (search for glew!) - - `GLEW_INCLUDE_DIR`: '/glew/glew-2.1.0/glew-2.1.0/include + ``` + GLEW_INCLUDE_DIR: /glew/glew-2.1.0/glew-2.1.0/include (inside this folder you should find the GL folder and inside that the header files) - `GLEW_LIBRARY_DEBUG`: '/glew/glew-2.1.0/glew-2.1.0/lib/Debug/x64/glew32d.lib' - - `GLEW_LIBRARY_RELEASE`: '/glew/glew-2.1.0/glew-2.1.0/lib/Release/x64/glew32.lib' + GLEW_LIBRARY_DEBUG: /glew/glew-2.1.0/glew-2.1.0/lib/Debug/x64/glew32d.lib - `YARP_USE_GLEW`: check the box - + GLEW_LIBRARY_RELEASE: /glew/glew-2.1.0/glew-2.1.0/lib/Release/x64/glew32.lib + + YARP_USE_GLEW: check the box + ``` - Append the following directories to the `Path` User environmental variable, for example using the [Rapid Environment Editor](https://www.rapidee.com): - - `Path`: (Expandable string) - `\glew\glew-2.1.0\glew-2.1.0\bin\Release\x64` - `\glew\glew-2.1.0\glew-2.1.0\bin\Debug\x64` - + ``` + Path: (Expandable string) + \glew\glew-2.1.0\glew-2.1.0\bin\Release\x64 + \glew\glew-2.1.0\glew-2.1.0\bin\Debug\x64 + ``` - Don't forget to configure, generate the cmake (cmake gui --> robotology yarp) and build release mode the yarp using vs15. @@ -52,25 +58,35 @@ - Use CMake GUI to to configure and generate the project. - - After that using the VS15 (VS 2017) build the project. - + - After that, using the VS15 (VS 2017) build the project. + + + - Add the following value to the `CMAKE_INSTALL_PREFIX` of the glfw project + ``` + CMAKE_INSTALL_PREFIX: /glfw/glfw-3.2.1/glfw-3.2.1/build/install + ``` + - After builing the project, install it as well. - Add the following paths to the variables of robotology/YARP (cmake gui --> robotology yarp); as the yarpdev which gets the data from the sdk of the ovr and publishes in yarp framework, has dependencies on this library: - - `GLFW3_DIR`: `/glfw/glfw-3.2.1/glfw-3.2.1/build/install/lib/cmake/glfw3` (inside this folder you should find the cmake files) - - `GLFW3_INCLUDE_DIR`: `/glfw/glfw-3.2.1/glfw-3.2.1/build/install/include` (inside that you should find the GLFW folder, and inside it the header files) - - `GLFW3_OPENGL_DIR`: `/glfw/glfw-3.2.1/glfw-3.2.1/build/install/lib` (you should be able to find the glfw.lib file) - `YARP_USEGLFW3`: check the box + + ``` + GLFW3_DIR: /glfw/glfw-3.2.1/glfw-3.2.1/build/install/lib/cmake/glfw3 (inside this folder you should find the cmake files) + + GLFW3_GLFW_LIBRARY: /glfw/glfw-3.2.1/glfw-3.2.1/build/install/lib/cmake/glfw3 + GLFW3_INCLUDE_DIR: /glfw/glfw-3.2.1/glfw-3.2.1/build/install/include` (inside that you should find the GLFW folder, and inside it the header files) + + GLFW3_OPENGL_DIR: /glfw/glfw-3.2.1/glfw-3.2.1/build/install/lib` (you should be able to find the glfw.lib file) + + YARP_USE_GLFW3: check the box + ``` - Add the following varibale to the User environmental variable: - - `GLFW3_DIR`= `\glfw\glfw-3.2.1\glfw-3.2.1\build\install` (variable type is String) - + ``` + GLFW3_DIR= \glfw\glfw-3.2.1\glfw-3.2.1\build\install (variable type is String) + ``` - Don't forget to configure, generate the cmake (cmake gui --> robotology yarp) and build release mode the yarp using vs15. - - if you have problems with compiling GLFW, [this link](https://www.glfw.org/docs/latest/compile_guide.html#compile_generate) or [here](https://github.com/nigels-com/glew) may help. + - if you have problems with compiling GLFW3, [this link](https://www.glfw.org/docs/latest/compile_guide.html#compile_generate) or [here](https://github.com/nigels-com/glew) may help. 4. `LibOVR`: to dowload the SDK, you can go to [this website](https://developer.oculus.com/downloads/), choose "Native Windows", then "Core Package: OCULUS SDK for windows". Select the version 1.16.0 to download. Or easily follow this [link](https://developer.oculus.com/downloads/package/oculus-sdk-for-windows/1.16.0/) and choose version 1.16.0 to download. @@ -78,45 +94,65 @@ - Extract and place the package in your workspace (in our case in same path of robotology-superbuild), inside that there are two libraries which we need: LibOVR, and LibOVRKernel. - Build (both release and debug) the projects inside the sdk using VS15: + ``` + \LibOVR\Projects\Windows\VS2015\LibOVR.vcxproj - `\LibOVR\Projects\Windows\VS2015\LibOVR.vcxproj` + \LibOVRKernel\Projects\Windows\VS2015\LibOVRKernel.vcxproj + ``` + Before building the projects change the follwing options using VS: + ``` + LibOVR or LibOVRKernel projects -> properties -> C/C++ -> Code Generation: + + Configuration: Debug --> Runtime Library: Multi-threaded Debug DLL(/MDd); + + Configuration: Release --> Runtime Library: Multi-threaded DLL(/MD) + ``` + After these changes, build the projects. - `\LibOVRKernel\Projects\Windows\VS2015\LibOVRKernel.vcxproj` - - Add the following paths to the variables of robotology/YARP (because the yarpdev which gets the data from the sdk of the ovr and publishes in yarp framework, has dependencies on this library) - - `LibOVR_LibOVRKernel_INCLUDE_DIR`:`/OculusSDK/LibOVRKernel/Src` + ``` + LibOVR_LibOVRKernel_INCLUDE_DIR:/OculusSDK/LibOVRKernel/Src - `LibOVR_LibOVRKernel_LIBRARY_DEBUG`:`/OculusSDK/LibOVRKernel/Lib/Windows/x64/Debug/VS2015/LibOVRKernel.lib` + LibOVR_LibOVRKernel_LIBRARY_DEBUG:/OculusSDK/LibOVRKernel/Lib/Windows/x64/Debug/VS2015/LibOVRKernel.lib + + LibOVR_LibOVRKernel_LIBRARY_RELEASE: /OculusSDK/LibOVRKernel/Lib/Windows/x64/Release/VS2015/LibOVRKernel.lib - `LibOVR_LibOVRKernel_LIBRARY_RELEASE`: `/OculusSDK/LibOVRKernel/Lib/Windows/x64/Release/VS2015/LibOVRKernel.lib` + LibOVR_LibOVR_Extras_INCLUDE_DIR: /OculusSDK/LibOVR/Include/Extras - `LibOVR_LibOVR_Extras_INCLUDE_DIR`: `/OculusSDK/LibOVR/Include/Extras` + LibOVR_LibOVR_INCLUDE_DIR: /OculusSDK/LibOVR/Include - `LibOVR_LibOVR_INCLUDE_DIR:PATH`: `/OculusSDK/LibOVR/Include` + LibOVR_LibOVR_LIBRARY_DEBUG: /OculusSDK/LibOVR/Lib/Windows/x64/Debug/VS2015/LibOVR.lib - `LibOVR_LibOVR_LIBRARY_DEBUG`: `/OculusSDK/LibOVR/Lib/Windows/x64/Debug/VS2015/LibOVR.lib` + LibOVR_LibOVR_LIBRARY_RELEASE: /OculusSDK/LibOVR/Lib/Windows/x64/Release/VS2015/LibOVR.lib - `LibOVR_LibOVR_LIBRARY_RELEASE`: `/OculusSDK/LibOVR/Lib/Windows/x64/Release/VS2015/LibOVR.lib` + YARP_USE_LOBOVR: check the box + ENABLE_yarpmod_ovrheadset: check the box + ``` + Before building the projects change the follwing options using VS: + ``` + Yarp project -> Plugins -> Devices -> yarp_ovrheadset :: properties -> C/C++ -> Code Generation: + + Configuration: Debug --> Runtime Library: Multi-threaded Debug DLL(/MDd); + + Configuration: Release --> Runtime Library: Multi-threaded DLL(/MD) + ``` - `YARP_USE_LOBOVR`: check the box + - Add and append the following variables to the User Environmental Variable: + ``` + OculusSDK_ROOT: \OculusSDK (variable type is String) + Path: \OculusSDK\3rdParty\Windows Kits\8.1\Redist\D3D\x64 + ``` - - Add and append the following variables to the User environmental variable: - - `OculusSDK_ROOT`= `\OculusSDK' (variable type is String)` - `Path`= `\OculusSDK\3rdParty\Windows Kits\8.1\Redist\D3D\x64` - - - Configure, generate the cmake (cmake gui --> robotology yarp) and build the yarp using vs15. +5. **Cyberith SDK:** To allow the virtualizer module to capture the operator data, the virtualizer needs two modules to download: the CybSDK_app (used for the calibration) and the CybSDK: -5. **Cyberith SDK:** To allow the virtualizer module to capture the operator data, the virtualizer needs two modules to download: the CybSDK_app (used for the calibration!) and the CybSDK: - - 1. `CybSDK_app`: you can download the application from [this link](https://developer.cyberith.com/downloads). Go to 'Tools' tab, download the 'Virtualizer Control Panel'. Copy the download application to the workspace. Everytime start using the virtualizer, please calibrate it using this application. + 1. `CybSDK_app`: you can download the application from [this link](https://developer.cyberith.com/downloads). Go to `Tools` tab, download the `Virtualizer Control Panel`. Copy the download application to the workspace. Everytime start using the virtualizer, please calibrate it using this application. - 2. `CybSDK`: you can download the application from [this link](https://developer.cyberith.com/downloads). Go to 'SDK' tab, download the 'C++ SDK for Windows (Developed for: Visual Studio 2015 Community)'. Copy the download application to the workspace. in theory, we should build it in our Windows machine, but time being it is already built (there exists the .dll file) and is working, so you do not need to build it. + 2. `CybSDK`: you can download the application from [this link](https://developer.cyberith.com/downloads). Go to `SDK` tab, download the `C++ SDK for Windows (Developed for: Visual Studio 2015 Community)`. Copy the download application to the workspace. in theory, we should build it in our Windows machine, but time being it is already built (there exists the .dll file) and is working, so you do not need to build it. - Append the following variables to the User environmental variable `Path`: - - `Path`= `\CybSDK\src\CybSDK_Windows_Cpp_Console\Plugins\x86_64` + ``` + Path: \CybSDK\src\CybSDK_Windows_Cpp_Console\Plugins\x86_64 + ```