vrkin
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
vrkin [2018/04/23 22:01] – [OpenVR Code] keitaronishimura | vrkin [2018/04/24 11:26] (current) – [Importing Video Feed into HMD] keitaronishimura | ||
---|---|---|---|
Line 42: | Line 42: | ||
{{ vive_tut: | {{ vive_tut: | ||
</fc> | </fc> | ||
+ | | ||
+ | \\ | ||
+ | {{ vive_tut: | ||
+ | \\ | ||
| | ||
\\ | \\ | ||
Line 399: | Line 403: | ||
</ | </ | ||
This code will take the data from the kinect and find the distance between the sensor and a yellow object. Then taking the FK data from Hubo's right hand will display the distance between the yellow object and Hubo's right hand above the detected object. How to run the code will be explained later on. | This code will take the data from the kinect and find the distance between the sensor and a yellow object. Then taking the FK data from Hubo's right hand will display the distance between the yellow object and Hubo's right hand above the detected object. How to run the code will be explained later on. | ||
- | + | \\ | |
+ | Then make a CMakeLists.txt file in the package and add the following code into it: | ||
+ | <code txt> | ||
+ | cmake_minimum_required(VERSION 2.8.3) | ||
+ | project(kinect2hubo) | ||
+ | |||
+ | set(CMAKE_CXX_FLAGS " | ||
+ | # Unused warnings | ||
+ | set(CMAKE_CXX_FLAGS " | ||
+ | # Additional warnings | ||
+ | set(CMAKE_CXX_FLAGS " | ||
+ | |||
+ | # Check for c++11 support | ||
+ | INCLUDE(CheckCXXCompilerFlag) | ||
+ | CHECK_CXX_COMPILER_FLAG(" | ||
+ | CHECK_CXX_COMPILER_FLAG(" | ||
+ | IF(COMPILER_SUPPORTS_CXX11) | ||
+ | SET(CMAKE_CXX_FLAGS " | ||
+ | ELSEIF(COMPILER_SUPPORTS_CXX0X) | ||
+ | SET(CMAKE_CXX_FLAGS " | ||
+ | ELSE() | ||
+ | MESSAGE(ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler." | ||
+ | ENDIF() | ||
+ | |||
+ | find_package(catkin REQUIRED COMPONENTS | ||
+ | cv_bridge | ||
+ | geometry_msgs | ||
+ | message_runtime | ||
+ | roscpp | ||
+ | sensor_msgs | ||
+ | std_msgs | ||
+ | image_transport | ||
+ | ) | ||
+ | find_package(freenect2 REQUIRED HINTS " | ||
+ | find_package(OpenCV REQUIRED) | ||
+ | |||
+ | include_directories( | ||
+ | ${catkin_INCLUDE_DIRS} | ||
+ | ${OpenCV_INCLUDE_DIRS} | ||
+ | ${freenect2_INCLUDE_DIRS} | ||
+ | ) | ||
+ | |||
+ | add_executable(${PROJECT_NAME}_node src/ | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | ) | ||
+ | </ | ||
+ | Then make a package.xml file and add the following code: | ||
+ | <code xml> | ||
+ | <?xml version=" | ||
+ | <package format=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |||
+ | < | ||
+ | |||
+ | < | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | Then you should be ready to make the package using catkin_make. | ||
==== Importing Video Feed into HMD ==== | ==== Importing Video Feed into HMD ==== | ||
+ | \\ | ||
+ | To insert the video feed into the HMD we will use the UniversalVROverlay package on the windows 10 computer running the HTC Vive. Please download the [[https:// | ||
+ | \\ | ||
+ | {{ vive_tut: | ||
+ | \\ | ||
+ | The following steps depict how to stream the video feed from the OpenCV code into the the Vive HMD. | ||
+ | 1. Connect all computers by router | ||
- | First introduce how this tutorial will show the reader how to get image and depth data into the openVR exe file using pre-existing package for ros, and opencv API. | + | 2. Run the iai kinect code |
- | First go through the kinect computer and setting it up. Going through | + | 3. Run the Opencv code |
- | Then go into how to create | + | 4. Run the web video server |
- | Then how to use the ros package to send the stream | + | 5. View the stream |
- | Finally, talk about how to get the stream | + | 6. Use the UniversalVRoverlay |
vrkin.1524546115.txt.gz · Last modified: by keitaronishimura